/* 
========================
VARIABLES & ROOT SETTINGS
========================
*/
:root {
  /* New Dark Color Variables */
  --color-background: #121212;      /* charcoal black */
  --color-primary-text: #E0E0E0;    /* light gray */
  --color-secondary-text: #B0B0B0;  /* medium gray */
  --color-borders: #444444;         /* dark gray */
  --color-accent: #666666;          /* neutral gray */
  
  /* Legacy color variables for compatibility */
  --color-white: #E0E0E0;
  --color-black: #121212;
  --color-slate: #B0B0B0;
  --color-midnight: #E0E0E0;
  --color-rich-black: #E0E0E0;
  --color-granite: #888888;
  --color-tan: #121212;
  --color-peach: #1A1A1A;
  --color-ash: #2A2A2A;
  --color-orange: #666666;
  --color-orange-dark: #555555;

  /* Font Variables */
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --default-font: var(--font-family-primary);

  /* Theme Variables */
  --primary-color: var(--color-primary-text);
  --secondary-color: var(--color-secondary-text);
  --accent-color: var(--color-accent);
  --text-color: var(--color-primary-text);
  --light-text: var(--color-secondary-text);
  --bg-color: var(--color-background);
  --light-bg: #1A1A1A;
  --border-color: var(--color-borders);
  --transition: all 0.3s ease;
}

/* 
========================
BASE STYLES
========================
*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--default-font);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
  display: flex;
  min-height: 100vh;
  /* overflow: hidden; */
  flex-direction: column;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* Typography */
a {
  text-decoration: none;
  color: var(--color-midnight);
  transition: var(--transition);
}

a:hover {
  color: var(--color-granite);
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  color: var(--color-midnight);
  font-family: var(--default-font);
  font-weight: 400;
}

h1 {
  font-size: 5.5rem;
  font-weight: 600;
  line-height: 1; /* Decreases the gap between lines */
}

h2 {
  font-size: 2rem;
  letter-spacing: -0.025em;
}

/* Utility Classes */
.orange-highlight {
  color: #666666;    /* Neutral gray that complements the dark background */
  font-weight: bold;
  padding: 0 0.2rem;
  border-radius: 3px;
}

/* 
========================
LAYOUT & CONTAINERS
========================
*/
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.layout-container {
  max-width: 1200px; /* Adjust to your desired max width */
  display: flex;
  margin:0 auto;
  position: relative;
  z-index: 1;
}

main {
  min-height: calc(100vh - 160px); /* Account for header and footer */
}

/* Content Wrapper */
.content-wrapper {
  width: calc(100% - 400px);
  padding: 2rem;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* 
========================
SIDEBAR STYLES
========================
*/
.sidebar {
  width:400px;
  height: 100vh;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  top: 0;               /* sticks to the top of the viewport */
  align-self: flex-start; /* ensure it doesn't stretch in a flex column layout */
  height: 100vh;        /* fill the viewport height */
  overflow-y: auto;     /* if the sidebar content itself overflows */
}

.profile {
  background-color: var(--light-bg);
  padding: 2rem;
  border-radius: 10px; /* Optional: adds rounded corners */
  border: 1px solid var(--color-borders); /* Add border for definition in dark theme */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); /* Darker shadow for dark theme */
  text-align: center; /* Centers all text and inline elements */
  display: flex;
  flex-direction: column;
  align-items: center; /* Centers block elements horizontally */
}

.sidebar-image {
  width: 240px;
  height: 300px;
  border-radius: 10px; /* For circular image */
  object-fit: cover;
  margin-bottom: 1.5rem;
}

.sidebar-name {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--color-primary-text);
}

.profile-bio {
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.5;
  color: var(--color-secondary-text);
}

/* Sidebar now uses standard fade-in animation */

/* 
========================
BLOG STYLES
========================
*/
.blog-section {
  padding: 2rem 0;
}

.blog-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.blog-placeholder {
  text-align: center;
  max-width: 600px;
  padding: 3rem 2rem;
  background-color: var(--light-bg);
  border-radius: 12px;
  border: 1px solid var(--color-borders);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.placeholder-icon {
  font-size: 3rem;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.blog-placeholder h3 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-primary-text);
}

.blog-placeholder p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-secondary-text);
  margin-bottom: 2rem;
}

.placeholder-topics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.topic-tag {
  background-color: var(--color-accent);
  color: var(--color-background);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Blog Card Styles - Minimal Design */
.blog-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background-color: var(--light-bg);
  border: 1px solid var(--color-borders);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  border-color: var(--color-accent);
  text-decoration: none;
  color: inherit;
}

.blog-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
  transform: scale(1.05);
}

.blog-content {
  padding: 1.5rem;
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--color-secondary-text);
}

.blog-date {
  font-weight: 500;
}

.blog-read-time {
  font-weight: 500;
}

.blog-title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-primary-text);
  margin: 0 0 0.75rem 0;
}

.blog-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-secondary-text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .blog-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .blog-content {
    padding: 1.25rem;
  }
  
  .blog-title {
    font-size: 1.2rem;
  }
  
  .blog-image {
    height: 180px;
  }
  
  .blog-placeholder {
    padding: 2rem 1.5rem;
  }
  
  .placeholder-icon {
    font-size: 2.5rem;
  }
  
  .blog-placeholder h3 {
    font-size: 1.5rem;
  }
  
  .blog-placeholder p {
    font-size: 1rem;
  }
}

/* 
========================
BLOG POST PAGE STYLES
========================
*/
.blog-post-full {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.blog-post-header {
  margin-bottom: 3rem;
}

.blog-post-breadcrumb {
  margin-bottom: 2rem;
}

.breadcrumb-link {
  color: var(--color-secondary-text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.breadcrumb-link:hover {
  color: var(--color-primary-text);
}

.blog-post-hero {
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
}

.blog-post-hero-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.blog-post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.blog-post-category {
  background-color: var(--color-accent);
  color: var(--color-background);
  padding: 0.5rem 1rem;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.blog-post-info {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--color-secondary-text);
}

.blog-post-date,
.blog-post-read-time {
  font-weight: 500;
}

.blog-post-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-primary-text);
  margin: 0 0 1rem 0;
}

.blog-post-excerpt {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--color-secondary-text);
  font-style: italic;
  margin: 0;
}

.blog-post-content {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--color-primary-text);
  margin-bottom: 3rem;
}

.blog-post-content p {
  margin-bottom: 1.5rem;
}

.blog-post-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary-text);
  margin: 2.5rem 0 1rem 0;
  line-height: 1.3;
}

.blog-post-content h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-primary-text);
  margin: 2rem 0 0.75rem 0;
  line-height: 1.3;
}

.blog-post-content ul,
.blog-post-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.blog-post-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.blog-post-content strong {
  font-weight: 600;
  color: var(--color-primary-text);
}

.blog-post-footer {
  border-top: 1px solid var(--color-borders);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.blog-post-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary-text);
  margin: 0 0 0.25rem 0;
}

.author-info p {
  font-size: 0.9rem;
  color: var(--color-secondary-text);
  margin: 0;
}

.blog-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
}

.blog-post-tag {
  background-color: rgba(136, 136, 136, 0.1);
  color: var(--color-secondary-text);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .blog-post-full {
    padding: 1rem 0;
  }
  
  .blog-post-hero-image {
    height: 250px;
  }
  
  .blog-post-title {
    font-size: 2rem;
  }
  
  .blog-post-excerpt {
    font-size: 1.1rem;
  }
  
  .blog-post-content {
    font-size: 1rem;
  }
  
  .blog-post-content h2 {
    font-size: 1.5rem;
  }
  
  .blog-post-content h3 {
    font-size: 1.2rem;
  }
  
  .blog-post-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .blog-post-footer {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .blog-post-tags {
    justify-content: flex-start;
  }
}

/* 
========================
SOCIAL MEDIA STYLES
========================
*/
.social-media-container {
  display: flex;
  justify-content: center;
  gap: 1rem; /* Spacing between icons */
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: transform 0.2s, background-color 0.2s;
}

.social-icon i,
.social-icon svg {
  font-size: 20px;
  color: var(--color-accent);
}

.social-icon svg path {
  fill: var(--color-accent);
}

.social-icon:hover i,
.social-icon:hover svg {
  color: var(--color-primary-text);
}

.social-icon:hover svg path {
  fill: var(--color-primary-text);
}

.social-icon:hover {
  transform: translateY(-3px);
  background-color: var(--color-borders);
}

.social-icon img {
  width: 20px;
  height: 20px;
}

.social-links {
  margin-bottom: 1rem;
}

.social-links a {
  color: var(--color-accent);
  margin: 0 0.5rem;
  font-size: 1.2rem;
}

.social-links a:hover {
  color: var(--color-primary-text);
}

/* 
========================
BUTTON STYLES
========================
*/
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 4px;
  font-weight: 500;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--default-font);
  letter-spacing: 0.01em;
}

.primary-btn {
  background-color: var(--color-accent); /* Soft gray background */
  color: var(--color-background); /* Dark text for contrast */
}

.primary-btn:hover {
  background-color: var(--color-primary-text); /* Light gray on hover */
  color: var(--color-background); /* Dark text for high contrast */
}

.secondary-btn {
  background-color: transparent;
  border: 2px solid var(--color-borders);
  color: var(--color-primary-text);
}

.secondary-btn:hover {
  background-color: var(--color-borders); /* Dark gray background on hover */
  color: var(--color-primary-text); /* Light text for high contrast */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Feature Buttons */
.button-container {
  display: flex;
  gap: 20px;
  font-family: Arial, sans-serif;
  flex-wrap: wrap;
}

.feature-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 8px;
  background-color: #000000;
  border: 2px solid #ffffff;
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.feature-button:hover {
  background-color: #ffffff;
  color: #000000;
  transform: translateY(-2px);
}

.button-content {
  display: flex;
  flex-direction: row;
}

.icon-container {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-container h3 {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  white-space: nowrap;
}

.arrow-container {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* 
========================
HEADER & NAVIGATION
========================
*/
.site-header {
  background-color: transparent;
  padding: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
}

.main-nav {
  position: relative;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 3rem;
  padding: 1rem 2rem;
  margin: 0;
  background-color: var(--color-tan);
  border-radius: 8px;
  position: relative;
}

.nav-link {
  display: block;
  padding: 0.75rem 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-primary-text);
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-link.active {
  color: var(--color-primary-text);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 4px;
  background-color: var(--color-accent);
}




/* 
========================
SECTION SPACING
========================
*/
section {
  margin-bottom: 100px; /* Adjust this value to control the amount of spacing */
}

section .button-container {
  margin-top: 30px; /* Adjust this value as needed */
}

section h1{
  margin-bottom: 40px;
}

/* More specific spacing control for each section type */
.intro-section {
  margin-bottom: 120px;
  gap: 10px;
}

.projects-section {
  margin-bottom: 120px;
}

.achievements-section {
  margin-bottom: 120px;
}

.research-section {
  margin-bottom: 120px;
}

.techstack-section {
  margin-bottom: 120px;
}

.contact-section {
  margin-bottom: 80px; /* Slightly less space at the bottom */
}

/* 
========================
FOOTER STYLES
========================
*/
.site-footer {
  background-color: var(--bg-color);
  color: var(--color-secondary-text);
  padding: 2rem;
  text-align: center;
  font-family: var(--default-font);
  font-size: 0.9rem;
}

/* 
========================
MEDIA QUERIES
========================
*/
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.7rem;
  }
  
  .site-header {
    padding: 1rem;
  }
  
  .main-nav ul {
    gap: 1.5rem;
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .nav-link {
    font-size: 0.9rem;
    padding: 0.5rem 0;
  }
}

/* ========================================
   RESPONSIVE LAYOUT ADJUSTMENTS
   ======================================== */

/* Tablet and below: stack sidebar above content */
@media (max-width: 1024px) {
  .layout-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    position: relative;      /* disable sticky on smaller screens */
    top: auto;
    height: auto;
    padding-bottom: 1rem;     /* give some breathing room */
  }
  .content-wrapper {
    width: 100%;
    padding: 1.5rem;
  }
}

/* Mobile: further tweak typography & spacing */
@media (max-width: 768px) {
  /* Sidebar → full-width header above main <h1> */
  .sidebar {
    order: -1;                /* move sidebar to the top of the column */
    padding: 1rem;
  }

  /* Scale headings for small screens */
  h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  h2 {
    font-size: 1.8rem;
  }

  /* Tweak profile card inside sidebar */
  .profile {
    padding: 1.5rem;
  }
  .sidebar-image {
    width: 180px;
    height: 220px;
  }
}

/* Extra-small phones: optimize form rows & buttons */
@media (max-width: 480px) {
  .form-row {
    flex-direction: column;
  }
  .feature-button {
    width: 100%;
    height: auto;
    padding: 20px;
  }
  .button-container {
    gap: 10px;
  }
  .main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
}


/* GitHub Button Styling */
.github-button {
  /* Simple button styling handled by .feature-button */
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.experience-card {
  border-top: 1px solid var(--color-borders);
  padding-top: 2rem;
  position: relative;
  transition: all 0.3s ease;
}

a.experience-card {
  cursor: pointer;
  display: block;
  color: inherit;
}

a.experience-card:hover {
  transform: translateX(10px);
}

.company {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.arrow {
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
}

a.experience-card:hover .arrow {
  transform: translate(5px, -5px);
  color: var(--color-orange);
}

.role {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-secondary-text);
  margin-bottom: 0.35rem;
}

.meta {
  color: var(--color-secondary-text);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.description {
  color: var(--color-secondary-text);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 80%;
}

.period {
  color: var(--color-accent);
  font-size: 0.9rem;
}

.card-list {
  margin: 1rem 0 1.5rem 1.25rem;
  padding: 0;
  color: var(--color-secondary-text);
  font-size: 1rem;
  line-height: 1.6;
}

.card-list li {
  margin-bottom: 0.5rem;
}


/* GitHub button inherits feature-button styling */

/* --- Row layout for name + email --- */
.form-row {
  display: flex;
  gap: 1rem;            /* space between the two fields */
  flex-wrap: wrap;      /* stack on narrow screens */
}

.form-row .form-group {
  flex: 1;              /* each takes equal width */
  min-width: 200px;     /* so they don’t shrink too small */
}

/* --- Smaller labels --- */
.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;    /* make the title smaller */
  font-weight: bold;
  color: var(--color-primary-text);
}

/* --- Inputs & textarea placeholders inherit width --- */
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--color-borders);
  border-radius: 4px;
  background-color: var(--light-bg);
  color: var(--color-primary-text);
}

/* --- Make the textarea expandable vertically --- */
.form-group textarea {
  resize: vertical;     /* user can drag to resize up/down */
  min-height: 120px;    /* starting height */
  max-height: 400px;    /* optional cap */
}

/* --- Full-width submit button --- */
.submit-button {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background-color: var(--color-orange);
  color: var(--color-white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 1rem;     /* separate it from the textarea */
}

.submit-button:hover {
  background-color: var(--color-orange-dark);
}
