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

/* ===== DESIGN TOKENS ===== */
:root {
  --primary:       #1a3d2b;
  --primary-mid:   #2d6a4f;
  --accent:        #52b788;
  --accent-light:  #d8f3dc;
  --amber:         #e8a020;
  --amber-light:   #fef3cd;
  --bg:            #ffffff;
  --bg-alt:        #f5fbf7;
  --text:          #1c1c1e;
  --text-muted:    #5c6b65;
  --border:        #ddeee4;
  --nav-h:         70px;
  --font-sans:     'Inter', system-ui, -apple-system, sans-serif;
  --font-serif:    'Playfair Display', Georgia, 'Times New Roman', serif;
  --radius:        12px;
  --radius-lg:     20px;
  --shadow:        0 2px 8px rgba(26,61,43,0.07), 0 8px 24px rgba(26,61,43,0.08);
  --shadow-lg:     0 12px 40px rgba(26,61,43,0.15);
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-mid); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ===== LAYOUT ===== */
.container { max-width: 1060px; margin: 0 auto; padding: 0 1.75rem; }
.section { padding: 5.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: var(--primary); color: #fff; }

.section-label {
  display: block;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.6rem;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 2.2rem; font-weight: 700; line-height: 1.2;
  color: var(--primary); margin-bottom: 1rem;
}
.section-dark .section-title { color: #fff; }
.section-sub { color: var(--text-muted); font-size: 1.05rem; max-width: 580px; margin-bottom: 2.5rem; line-height: 1.7; }

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  background: linear-gradient(to bottom, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0) 100%);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
nav.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
}
nav.scrolled .nav-logo { color: var(--primary); }
nav.scrolled .nav-links a { color: var(--text-muted); }
nav.scrolled .nav-links a:hover,
nav.scrolled .nav-links a.active { color: var(--primary); }

.nav-inner {
  max-width: 1060px; margin: 0 auto; padding: 0 1.75rem;
  height: 100%; display: flex; align-items: center;
}
.nav-logo {
  font-family: var(--font-serif); font-size: 1.15rem; font-weight: 700;
  color: rgba(255,255,255,0.95); flex-shrink: 0;
  text-decoration: none; transition: color 0.2s;
}
.nav-logo:hover { text-decoration: none; color: var(--accent); }

.nav-links { list-style: none; display: flex; gap: 0.1rem; margin-left: auto; }
.nav-links a {
  display: block; padding: 0.45rem 0.9rem; border-radius: 8px;
  color: rgba(255,255,255,0.85); font-size: 0.88rem; font-weight: 500;
  transition: color 0.15s, background 0.15s; text-decoration: none;
}
.nav-links a:hover  { color: #fff; background: rgba(255,255,255,0.12); }
.nav-links a.active { color: #fff; background: rgba(255,255,255,0.18); }

nav.scrolled .nav-links a.active { color: var(--primary); background: var(--accent-light); }
nav.scrolled .nav-links a:hover  { color: var(--primary); background: var(--bg-alt); }

.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; margin-left: auto; }
nav.scrolled .nav-toggle { color: var(--text); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: flex-start;
  position: relative; overflow: hidden;
  background:
    linear-gradient(to bottom, rgba(10,28,18,0.72) 0%, rgba(15,40,25,0.60) 60%, rgba(20,45,30,0.75) 100%),
    url('https://images.unsplash.com/photo-1441974231531-c6227db76b6e?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  color: #fff;
}
.hero-inner {
  max-width: 1060px; margin: 0 auto; padding: 5.5rem 1.75rem 5rem;
  display: flex; align-items: center; gap: 4rem; width: 100%;
}
.hero-text { flex: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(82,183,136,0.22); border: 1px solid rgba(82,183,136,0.4);
  color: #a7f3d0; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.35rem 0.9rem; border-radius: 999px; margin-bottom: 1.5rem;
}
.hero-headshot {
  width: 135px; height: 135px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.35);
  margin-bottom: 1.25rem;
  display: block;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 700; line-height: 1.1;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero-tagline {
  font-size: 1.15rem; line-height: 1.7;
  color: rgba(255,255,255,0.85); max-width: 560px;
  margin-bottom: 2.25rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-card {
  flex-shrink: 0; width: 280px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-lg); padding: 2rem 1.75rem;
}
.hero-card h3 { font-family: var(--font-serif); font-size: 1.1rem; margin-bottom: 1rem; color: #fff; }
.hero-card .stat { margin-bottom: 1rem; }
.hero-card .stat-num { font-size: 1.8rem; font-weight: 700; color: var(--accent); font-family: var(--font-serif); }
.hero-card .stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.7); line-height: 1.3; }
.hero-card .divider { border: none; border-top: 1px solid rgba(255,255,255,0.15); margin: 1rem 0; }

/* Soundwave scroll cue */
.scroll-cue {
  position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: rgba(255,255,255,0.6); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  animation: bounce 2s ease-in-out infinite;
}
.scroll-cue svg { opacity: 0.7; }
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

/* Wave divider */
.wave-divider { display: block; line-height: 0; }
.wave-divider svg { width: 100%; height: auto; display: block; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block; padding: 0.75rem 1.6rem; border-radius: var(--radius);
  font-size: 0.92rem; font-weight: 600; cursor: pointer;
  transition: all 0.18s ease; text-decoration: none !important;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--primary); }
.btn-primary:hover { background: #6ed4a0; box-shadow: 0 4px 16px rgba(82,183,136,0.4); }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: var(--accent-light); }
.btn-outline { border: 2px solid rgba(255,255,255,0.6); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.15); border-color: #fff; }
.btn-green-outline { border: 2px solid var(--primary-mid); color: var(--primary); }
.btn-green-outline:hover { background: var(--accent-light); border-color: var(--accent); }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.83rem; }

/* ===== RESEARCH FOCUS ===== */
.focus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.focus-image-wrap { position: relative; }
.focus-image {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.focus-image-wrap::before {
  content: '';
  position: absolute; inset: -12px 12px 12px -12px;
  border: 2px solid var(--accent); border-radius: var(--radius-lg);
  z-index: -1;
}
.focus-text { }
.keyword-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0; }
.keyword {
  background: var(--accent-light); color: var(--primary-mid);
  font-size: 0.8rem; font-weight: 600; padding: 0.3rem 0.8rem;
  border-radius: 999px; border: 1px solid var(--accent);
}

/* ===== WHAT I DO CARDS ===== */
.what-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.what-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none; color: var(--text); display: block;
}
.what-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); text-decoration: none; color: var(--text); }
.what-card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent-light); display: flex; align-items: center;
  justify-content: center; font-size: 1.5rem; margin-bottom: 1.1rem;
}
.what-card h3 { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--primary); }
.what-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }
.what-card .card-link { display: inline-block; margin-top: 1rem; font-size: 0.82rem; font-weight: 600; color: var(--accent); }

/* ===== AWARDS BAR ===== */
.awards-bar {
  background: var(--primary); color: #fff;
  padding: 2.5rem 0;
}
.awards-inner { display: flex; justify-content: center; flex-wrap: wrap; gap: 3rem; }
.award-item { text-align: center; }
.award-num { font-family: var(--font-serif); font-size: 2.5rem; font-weight: 700; color: var(--accent); line-height: 1; }
.award-label { font-size: 0.82rem; color: rgba(255,255,255,0.7); margin-top: 0.3rem; max-width: 140px; }

/* ===== ABOUT SECTION ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 4rem; align-items: start; }
.about-photo-area { position: relative; }
.about-photo-placeholder {
  width: 100%; aspect-ratio: 3/4; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 50%, var(--accent) 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 5rem; font-weight: 700;
  color: rgba(255,255,255,0.35); box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.about-photo-placeholder img { width: 100%; height: 100%; object-fit: cover; }
.about-badge {
  position: absolute; bottom: 1.5rem; right: -1.5rem;
  background: #fff; border-radius: var(--radius); padding: 0.9rem 1.1rem;
  box-shadow: var(--shadow-lg); border-left: 4px solid var(--accent);
  max-width: 200px;
}
.about-badge .badge-num { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.about-badge .badge-text { font-size: 0.78rem; color: var(--text-muted); line-height: 1.4; }

.about-text .section-title { margin-bottom: 1.25rem; }
.about-text p { color: var(--text-muted); margin-bottom: 1.1rem; font-size: 0.98rem; }
.about-text p strong { color: var(--text); }

.profiles-list { margin-top: 1.75rem; }
.profiles-list h4 { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.75rem; }
.profile-links { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.profile-link {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.4rem 0.85rem; border-radius: 8px;
  background: var(--bg-alt); border: 1px solid var(--border);
  font-size: 0.82rem; font-weight: 600; color: var(--primary);
  transition: all 0.15s; text-decoration: none;
}
.profile-link:hover { background: var(--accent-light); border-color: var(--accent); text-decoration: none; }
.profile-link svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ===== PAGE HERO ===== */
.page-hero {
  padding-top: calc(var(--nav-h) + 3.5rem);
  padding-bottom: 3.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  color: #fff; position: relative; overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: url('https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=1600&q=60') center/cover no-repeat;
  opacity: 0.08; pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero .section-label { color: var(--accent); }
.page-hero h1 { font-family: var(--font-serif); font-size: 3.5rem; font-weight: 700; line-height: 1.15; margin-bottom: 0.9rem; color: #fff; }
.page-hero p { font-size: 1.05rem; color: rgba(255,255,255,0.8); max-width: 600px; }

/* ===== PROSE ===== */
.prose { max-width: 700px; }
.prose h2 { font-family: var(--font-serif); font-size: 1.65rem; font-weight: 700; color: var(--primary); margin: 2.5rem 0 0.85rem; }
.prose h3 { font-size: 1.05rem; font-weight: 700; color: var(--primary); margin: 1.75rem 0 0.5rem; }
.prose p { margin-bottom: 1.1rem; color: var(--text-muted); font-size: 0.98rem; }
.prose ul { padding-left: 1.4rem; margin-bottom: 1.1rem; }
.prose ul li { margin-bottom: 0.5rem; color: var(--text-muted); font-size: 0.98rem; }
.prose ul li::marker { color: var(--accent); }
.prose a { color: var(--primary-mid); font-weight: 500; }
.prose strong { color: var(--text); }
.prose em { color: var(--primary); }

/* ===== TIMELINE ===== */
.timeline { list-style: none; padding: 0; max-width: 680px; }
.tl-item {
  display: flex; gap: 1.5rem;
  padding-bottom: 2.5rem; position: relative;
}
.tl-item::before {
  content: '';
  position: absolute; left: 22px; top: 40px;
  width: 2px; bottom: 0;
  background: var(--border);
}
.tl-item:last-child::before { display: none; }
.tl-dot {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent-light); border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; position: relative; z-index: 1;
}
.tl-content { padding-top: 0.5rem; }
.tl-year { font-size: 0.78rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.25rem; }
.tl-title { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700; color: var(--primary); margin-bottom: 0.3rem; }
.tl-inst { font-size: 0.88rem; font-weight: 600; color: var(--primary-mid); margin-bottom: 0.3rem; }
.tl-body { font-size: 0.9rem; color: var(--text-muted); }

/* ===== SUPERVISOR CARDS ===== */
.supervisor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 1.5rem 0; }
.supervisor-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.supervisor-role { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 0.4rem; }
.supervisor-name { font-family: var(--font-serif); font-size: 1rem; font-weight: 700; color: var(--primary); }

/* ===== PROJECT CARDS ===== */
.project-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: #fff; box-shadow: var(--shadow);
  margin-bottom: 2rem;
  display: grid; grid-template-columns: 1fr 2.5fr;
}
.project-image {
  min-height: 200px; background-size: cover; background-position: center;
  position: relative;
}
.project-image-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(26,61,43,0.7), rgba(45,106,79,0.4));
}
.project-image-label {
  position: absolute; bottom: 1rem; left: 1rem;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: #fff; background: rgba(0,0,0,0.35); padding: 0.25rem 0.65rem; border-radius: 99px;
}
.project-body { padding: 2rem; }
.project-status {
  display: inline-block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 0.2rem 0.7rem; border-radius: 999px; margin-bottom: 0.75rem;
}
.project-status.active { background: #dcfce7; color: #166534; }
.project-status.collab { background: var(--amber-light); color: #92400e; }
.project-title { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; }
.project-meta { font-size: 0.83rem; color: var(--text-muted); margin-bottom: 0.9rem; font-weight: 500; }
.project-body p { font-size: 0.93rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }
.ptag {
  background: var(--bg-alt); color: var(--primary-mid);
  font-size: 0.78rem; font-weight: 600; padding: 0.2rem 0.65rem;
  border-radius: 999px; border: 1px solid var(--border);
}

/* ===== INTEREST CHIPS ===== */
.interest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.1rem; }
.interest-chip {
  padding: 1.5rem; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.interest-chip:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.chip-icon { font-size: 2rem; margin-bottom: 0.6rem; }
.interest-chip h4 { font-size: 0.95rem; font-weight: 700; color: var(--primary); margin-bottom: 0.35rem; }
.interest-chip p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.55; }

/* ===== WRITING ===== */
.writing-list { list-style: none; }
.writing-item {
  display: grid; grid-template-columns: 100px 1fr;
  gap: 1.5rem; padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.writing-date-block { text-align: center; padding-top: 0.2rem; }
.writing-month { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); }
.writing-year { font-size: 1.5rem; font-weight: 700; color: var(--primary); font-family: var(--font-serif); line-height: 1; }
.writing-body h3 { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; color: var(--primary); margin-bottom: 0.4rem; }
.writing-body h3 a { color: inherit; }
.writing-body h3 a:hover { color: var(--primary-mid); text-decoration: none; }
.writing-body p { font-size: 0.91rem; color: var(--text-muted); margin-bottom: 0.6rem; }
.writing-tag {
  display: inline-block; background: var(--accent-light); color: var(--primary-mid);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.15rem 0.6rem; border-radius: 999px;
}
.writing-tag.tag-opinion { background: var(--amber-light); color: #92400e; }
.writing-tag.tag-personal { background: #ede9fe; color: #5b21b6; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 4rem; align-items: start; }
.contact-block { margin-bottom: 2rem; }
.contact-block h3 { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 0.6rem; }
.contact-block p, .contact-block a { font-size: 0.95rem; color: var(--text-muted); }
.contact-block a { color: var(--primary-mid); font-weight: 500; }
.contact-block a:hover { text-decoration: underline; }
.contact-link-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.contact-link-row .icon { font-size: 1rem; }

.open-to { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; }
.open-to h3 { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; color: var(--primary); margin-bottom: 1rem; }
.open-to ul { list-style: none; }
.open-to ul li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.92rem; color: var(--text-muted); margin-bottom: 0.7rem; }
.open-to ul li::before { content: '✓'; color: var(--accent); font-weight: 700; flex-shrink: 0; margin-top: 0.05rem; }

/* ===== FOOTER ===== */
footer {
  background: var(--primary); color: rgba(255,255,255,0.7);
  padding: 3rem 0;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1.5rem;
}
.footer-logo { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700; color: #fff; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.85rem; color: rgba(255,255,255,0.6); transition: color 0.15s; }
.footer-links a:hover { color: var(--accent); text-decoration: none; }
.footer-copy { font-size: 0.8rem; color: rgba(255,255,255,0.4); margin-top: 1.5rem; text-align: center; }

/* ===== SIDEBAR LAYOUT ===== */
.home-content.sidebar-layout { margin: 0 auto; padding: 0 1.75rem; }
.sidebar-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 1220px !important;
}
.page-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  padding-bottom: 2rem;
}
.sidebar-back {
  display: block;
  font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--primary); background: var(--accent-light);
  border-radius: var(--radius); padding: 0.55rem 0.9rem;
  text-decoration: none; margin-bottom: 1.25rem;
  transition: background 0.15s, color 0.15s;
}
.sidebar-back::before { content: '← '; }
.sidebar-back:hover { background: var(--accent); color: #fff; text-decoration: none; }
.page-sidebar .page-toc { width: 100%; max-width: none; min-width: unset; margin-bottom: 0; }
.page-main { min-width: 0; }
@media (max-width: 900px) {
  .sidebar-layout { grid-template-columns: 1fr; gap: 0; }
  .page-sidebar { position: static; padding-bottom: 0; }
  .page-sidebar .page-toc { margin-bottom: 2rem; }
}

/* ===== IN-PAGE TOC ===== */
.page-toc {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.75rem;
  margin-bottom: 3rem; display: block; width: fit-content; min-width: 260px;
  position: static; top: auto; left: auto; right: auto; z-index: auto;
  height: auto;
}
.page-toc h4 {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-muted); margin-bottom: 0.75rem;
}
.page-toc ol { list-style: none; counter-reset: toc; }
.page-toc ol li { display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 0.45rem; counter-increment: toc; }
.page-toc ol li::before {
  content: counter(toc);
  font-size: 0.68rem; font-weight: 700; color: var(--accent);
  background: var(--accent-light); width: 18px; height: 18px;
  border-radius: 4px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.page-toc ol li a { font-size: 0.88rem; color: var(--primary-mid); line-height: 1.4; }
.page-toc ol li a:hover { color: var(--accent); text-decoration: none; }

/* ===== WRITING POST PAGES ===== */
.post-header {
  padding-top: calc(var(--nav-h) + 3rem); padding-bottom: 3.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  color: #fff; position: relative; overflow: hidden;
}
.post-header::after {
  content: ''; position: absolute; inset: 0;
  background: url('https://images.unsplash.com/photo-1441974231531-c6227db76b6e?auto=format&fit=crop&w=1200&q=40') center/cover no-repeat;
  opacity: 0.06; pointer-events: none;
}
.post-header .container { position: relative; z-index: 1; }
.post-tag {
  display: inline-block;
  background: rgba(82,183,136,0.25); color: #a7f3d0;
  border: 1px solid rgba(82,183,136,0.4);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.3rem 0.8rem; border-radius: 999px; margin-bottom: 1.1rem;
}
.post-header h1 {
  font-family: var(--font-serif); font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 700; line-height: 1.15; color: #fff; margin-bottom: 1rem;
  max-width: 760px;
}
.post-meta { font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.post-lead { font-size: 1.1rem; color: rgba(255,255,255,0.8); line-height: 1.7; max-width: 640px; margin-bottom: 1.25rem; }
.post-meta-bar { display: flex; gap: 1.25rem; font-size: 0.82rem; color: rgba(255,255,255,0.55); flex-wrap: wrap; }
.post-meta-bar span::before { content: '·'; margin-right: 1.25rem; }
.post-meta-bar span:first-child::before { content: none; }
a.post-back { display: inline-block; font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.65); margin-bottom: 1.25rem; padding: 0; max-width: none; border-top: none; }
a.post-back:hover { color: var(--accent); text-decoration: none; }
a.post-back::before { content: '←  '; }

.post-body {
  max-width: 720px; margin: 3.5rem auto 0; padding: 0 1.75rem 5rem;
}
.post-body h2 { font-family: var(--font-serif); font-size: 1.55rem; font-weight: 700; color: var(--primary); margin: 2.5rem 0 0.85rem; }
.post-body h3 { font-size: 1.05rem; font-weight: 700; color: var(--primary); margin: 2rem 0 0.6rem; }
.post-body p { color: var(--text-muted); font-size: 1rem; line-height: 1.85; margin-bottom: 1.15rem; }
.post-body blockquote {
  border-left: 3px solid var(--accent); padding: 0.85rem 1.4rem;
  margin: 1.75rem 0; background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.post-body blockquote p { margin: 0; font-style: italic; color: var(--primary); font-size: 1.05rem; }
.post-body ul, .post-body ol { padding-left: 1.4rem; margin-bottom: 1.15rem; }
.post-body li { color: var(--text-muted); font-size: 1rem; line-height: 1.75; margin-bottom: 0.45rem; }
.post-body li::marker { color: var(--accent); }
.post-body a { color: var(--primary-mid); font-weight: 500; }
.post-back { padding: 2rem 1.75rem; max-width: 720px; margin: 0 auto; border-top: 1px solid var(--border); }
.post-back a { font-size: 0.88rem; font-weight: 600; color: var(--primary-mid); }

/* ===== PUBLICATIONS PAGE ===== */
.pub-section { margin-bottom: 3rem; }
.pub-section-title {
  font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700;
  color: var(--primary); margin-bottom: 1.25rem;
  padding-bottom: 0.6rem; border-bottom: 2px solid var(--accent-light);
}
.pub-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; margin-bottom: 1rem; box-shadow: var(--shadow);
  display: flex; gap: 1.25rem; align-items: flex-start;
}
.pub-badge {
  flex-shrink: 0; padding: 0.2rem 0.65rem; border-radius: 999px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  white-space: nowrap;
}
.pub-badge.published { background: #dcfce7; color: #166534; }
.pub-badge.preprint  { background: #dbeafe; color: #1e40af; }
.pub-badge.review    { background: var(--amber-light); color: #92400e; }
.pub-badge.inprep    { background: var(--bg-alt); color: var(--text-muted); border: 1px solid var(--border); }
.pub-content { flex: 1; }
.pub-title { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 700; color: var(--primary); margin-bottom: 0.3rem; }
.pub-title a { color: inherit; }
.pub-title a:hover { color: var(--primary-mid); }
.pub-authors { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.pub-journal { font-size: 0.85rem; color: var(--primary-mid); font-weight: 600; margin-bottom: 0.6rem; }
.pub-abstract { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 0.75rem; }
.pub-links { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-top: 0.75rem; }

/* ===== EXPERIENCE PAGE ===== */
.skill-cloud { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.75rem; }
.skill-chip {
  background: var(--primary); color: rgba(255,255,255,0.9);
  font-size: 0.82rem; font-weight: 600; padding: 0.35rem 0.85rem;
  border-radius: 999px;
}
.grant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.grant-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow);
}
.grant-amount { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700; color: var(--accent); }
.grant-name, .grant-title { font-size: 0.88rem; font-weight: 700; color: var(--primary); margin: 0.25rem 0; }
.grant-body { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* ===== EXPERIMENT PAGES ===== */
.exp-methods-table { width: 100%; border-collapse: collapse; margin: 1.25rem 0 1.75rem; font-size: 0.9rem; }
.exp-methods-table th { background: var(--primary); color: #fff; padding: 0.6rem 0.9rem; text-align: left; font-size: 0.82rem; font-weight: 700; }
.exp-methods-table td { padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.exp-methods-table tr:nth-child(even) td { background: var(--bg-alt); }
.status-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.9rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 700;
}
.status-pill.complete  { background: #dcfce7; color: #166534; }
.status-pill.analysis  { background: #dbeafe; color: #1e40af; }
.status-pill.fieldwork { background: var(--amber-light); color: #92400e; }
.gdpr-note {
  background: var(--bg-alt); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1rem 1.25rem; margin: 2rem 0;
  font-size: 0.88rem; color: var(--text-muted);
}
.gdpr-note strong { color: var(--primary); }

/* ===== FADE IN ANIMATION ===== */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .what-cards { grid-template-columns: repeat(2, 1fr); }
  .supervisor-grid { grid-template-columns: 1fr 1fr; }
  .project-card { grid-template-columns: 1fr; }
  .project-image { min-height: 160px; }
  .focus-grid { grid-template-columns: 1fr; }
  .focus-image-wrap::before { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo-placeholder { aspect-ratio: 16/9; font-size: 3rem; }
  .about-badge { right: 1rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .writing-item { grid-template-columns: 70px 1fr; gap: 1rem; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 2.4rem; }
  .hero-inner { padding-top: 6rem; flex-direction: column; }
  .hero-card { width: 100%; }
  .what-cards { grid-template-columns: 1fr; }
  .supervisor-grid { grid-template-columns: 1fr; }
  .awards-inner { gap: 2rem; }
  .section { padding: 3.5rem 0; }
  .nav-links {
    display: none; flex-direction: column; position: fixed;
    top: var(--nav-h); left: 0; right: 0; bottom: 0;
    background: var(--primary); padding: 2rem 1.75rem; gap: 0.25rem; overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a { color: rgba(255,255,255,0.85); font-size: 1.1rem; padding: 0.75rem 1rem; }
  .nav-links a.active, .nav-links a:hover { background: rgba(255,255,255,0.1); color: #fff; }
  .nav-toggle { display: block; }
  .writing-item { grid-template-columns: 1fr; }
  .writing-date-block { display: none; }
}
