/* ============================================
   Theme & Variables
   ============================================ */

:root {
  /* Typography */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Colors - Modern Academic / Warm Editorial */
  --bg-body: #FDFBF7;       /* Warm Alabaster */
  --bg-surface: #FFFFFF;
  --bg-surface-alt: #F5F2ED; /* Richer cream */
  
  --text-main: #27272a;     /* Zinc 800 */
  --text-muted: #52525b;    /* Zinc 600 */
  --text-light: #a1a1aa;

  --accent-primary: #8c3211; /* Deep Terracotta */
  --accent-secondary: #c2410c;
  --accent-subtle: #ffedd5;

  --border-light: #e4e4e7;
  --border-strong: #d4d4d8;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem; /* Adjusted for better overall vertical rhythm */
  --space-xl: 5rem;
  
  /* Layout */
  --container-width: 1100px; 
  --nav-height: 90px;
  --radius-sm: 4px;
  --radius-md: 2px;
}

/* ============================================
   Reset & Base
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.7;
  font-weight: 400;
  padding-top: var(--nav-height); /* Offset for fixed nav */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--text-main);
  line-height: 1.2;
  font-weight: 600;
}

h1 { font-size: clamp(3rem, 5vw, 4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.2rem); margin-bottom: var(--space-md); letter-spacing: -0.02em; }
h3 { font-size: 1.3rem; margin-bottom: var(--space-xs); font-weight: 600; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul { list-style: none; }

/* ============================================
   Navigation
   ============================================ */

.navbar {
  position: fixed; 
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(253, 251, 247, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.03);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-logo {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-social {
  display: flex;
  gap: 0.75rem;
  border-left: 1px solid var(--border-light);
  padding-left: 1rem;
}

.social-nav-link {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-light);
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

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

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 400;
  color: var(--text-muted);
  position: relative;
  transition: all 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-primary);
  transition: all 0.3s ease;
  opacity: 0;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%; 
  opacity: 0.5;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-toggle { 
  display: none; 
  background: none; 
  border: none; 
  cursor: pointer; 
  color: var(--text-main);
  padding: 5px;
  z-index: 1100;
}

/* --- Mobile Menu Overlay --- */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-body);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu .nav-link {
  font-size: 1.5rem;
}

.mobile-nav-social {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

/* ============================================
   Layout Components
   ============================================ */

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

.section {
  padding: 3rem 0; /* Reduced from 4rem for a tighter, more professional measure */
}

/* Header spacing for sections */
.section h1 {
  margin-bottom: 1rem; /* Slightly reduced for better cohesion */
}

.section-light { background-color: var(--bg-body); }
.section-alt { background-color: var(--bg-surface-alt); }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px; 
  padding: 0 1.2rem;
  border-radius: 0;
  font-weight: 500;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--text-main);
  white-space: nowrap;
}

.hero-text .btn {
  min-width: 170px; 
}

.btn-primary {
  background-color: var(--text-main); 
  color: #fff;
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--text-main);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--text-main);
  color: var(--text-main);
  transform: translateY(-2px);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  min-height: 75vh;
  display: flex;
  align-items: center;
  padding: var(--space-lg) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero-text h1 {
  margin-bottom: 1.2rem; /* Hero specific spacing */
  font-size: clamp(3.5rem, 8vw, 5.2rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.hero-bio {
  color: var(--text-main);
  margin-bottom: var(--space-md);
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 100%;
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.hero-image img {
  width: 100%;
  max-width: 580px; 
  padding: 12px;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 15px 45px -15px rgba(0, 0, 0, 0.1);
  filter: contrast(102%);
}

/* ============================================
   Chic Editorial Sections
   ============================================ */

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.pillar-item {
  position: relative;
}

.pillar-number {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
  display: block;
  letter-spacing: 0.15em;
}

.pillar-item h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.pillar-item p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ================= ==========================
   List Styles (Unboxed & Editorial)
   ============================================ */

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

.list-item {
  position: relative;
  padding: 0;
  background: transparent;
  border: none;
  display: grid;
  grid-template-columns: 160px 1fr; 
  gap: 1.5rem; 
  transition: all 0.3s ease;
}

.item-meta {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  font-weight: 600;
  font-family: var(--font-sans);
}

.item-title {
  font-size: 1.3rem;
  font-family: var(--font-serif);
  margin-bottom: 0.25rem;
  color: var(--text-main);
  line-height: 1.3;
}

.item-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 700px;
}

/* ============================================
   Expandable Abstract
   ============================================ */

.abstract-toggle {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s ease;
  margin-top: 0.25rem;
}

.abstract-toggle:hover {
  opacity: 0.7;
}

.abstract-content {
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.abstract-content.open {
  max-height: 800px;
  margin-top: 1rem;
  padding: 1.2rem;
  background: var(--bg-surface-alt);
  border-left: 2px solid var(--accent-primary);
}

/* Latest Work - Detailed Scholarly Style */
.work-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem; 
}

.work-entry {
  display: flex;
  flex-direction: column;
}

.work-journal {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.work-title {
  font-family: var(--font-serif);
  font-size: 1.6rem; 
  line-height: 1.2;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

/* ============================================
   Footer
   ============================================ */

.social-nav-link:hover .rg-logo-nav {
  filter: grayscale(0%);
  opacity: 1;
}

.doi-link {
  color: var(--accent-primary);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(140, 50, 17, 0.2);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.doi-link::after {
  content: '↗';
  font-size: 0.7rem;
  margin-left: 4px;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.doi-link:hover {
  border-bottom-color: var(--accent-primary);
}

.doi-link:hover::after {
  transform: translate(2px, -2px);
  opacity: 1;
}

.footer {
  padding: 1.5rem 0; 
  background: var(--bg-body);
  color: var(--text-muted);
  font-size: 0.75rem;
  border-top: 1px solid rgba(0,0,0,0.03);
}

.footer-content {
  display: flex;
  justify-content: center;
}

/* ============================================
   Responsive (Refined Editorial Mobile)
   ============================================ */

@media (max-width: 992px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 4.5rem;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: left; 
    gap: var(--space-md);
  }

  .hero-text h1 {
    font-size: 2.8rem;
    line-height: 1.1;
  }

  .hero-bio {
    max-width: 100%;
  }

  .hero-image {
    order: -1;
    justify-content: flex-start; 
  }

  .hero-image img {
    max-width: 340px;
  }

  .hero-text .btn-container {
    display: flex;
    flex-direction: column; 
    gap: 0.75rem;
    width: 100%;
  }

  .hero-text .btn {
    width: fit-content; 
    min-width: 220px;
  }

  .pillar-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.footer-social-mobile {
  display: none; /* Hidden on desktop */
}

@media (max-width: 768px) {
  .footer-social-mobile {
    display: flex;
    justify-content: center; /* Center icons horizontally */
    align-items: center;
    gap: 2rem; /* More balanced gap for mobile */
    margin-bottom: 1.5rem;
  }
  
  .footer-content {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .container {
    padding: 0 1.5rem; 
  }

  .nav-links, .nav-social { display: none; } 
  .nav-toggle { display: block; }
  
  .navbar { background: var(--bg-body); }

  .list-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .item-meta {
    font-size: 0.75rem;
    opacity: 0.8;
  }

  .work-title {
    font-size: 1.25rem;
  }

  .section {
    padding: var(--space-lg) 0;
  }
}