/* ============================================
   IMPORTS & VARIABLES
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Space+Mono:wght@400;700&family=Karla:wght@300;400;500;600&display=swap');

:root {
  --bg-primary:       #080b14;
  --bg-surface:       #0d1117;
  --bg-card:          #111827;
  --bg-card-hover:    #151f30;
  --border:           #1e2535;
  --border-light:     #2a3347;

  --accent-r:         #818cf8;   /* research — indigo */
  --accent-t:         #34d399;   /* travel   — emerald */
  --accent-a:         #c17d53;   /* about    — terracotta */
  --accent-a-deep:    #503628;   /* about    — deep brown */
  --dim-r:            rgba(129,140,248,0.10);
  --dim-t:            rgba(52,211,153,0.10);
  --dim-a:            rgba(193,125,83,0.10);

  --text-primary:     #f1f5f9;
  --text-secondary:   #94a3b8;
  --text-muted:       #64748b;

  --font-display:     'Crimson Pro', Georgia, serif;
  --font-body:        'Karla', sans-serif;
  --font-mono:        'Space Mono', monospace;

  --nav-h:            64px;
  --max-w:            1180px;
  --ease:             cubic-bezier(0.16,1,0.3,1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Structural grid motif — references engineering grids */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(129,140,248,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129,140,248,0.028) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(8,11,20,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 200;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}
.nav-logo span { color: var(--accent-r); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.nav-links a.active { color: var(--accent-r); background: var(--dim-r); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 6px;
}

/* Mobile nav */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: 2px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 10px 14px; }
}

/* ============================================
   PAGE WRAPPER
   ============================================ */
.page { padding-top: var(--nav-h); }

/* ============================================
   HOME HERO
   ============================================ */
.home-hero {
  padding: 6rem 0 3.5rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-r);
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent-r);
  flex-shrink: 0;
}

.home-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4.6rem);
  font-weight: 300;
  line-height: 1.1;
  max-width: 680px;
  margin-bottom: 1.5rem;
}
.home-hero h1 em { font-style: italic; color: var(--accent-r); }

.home-hero p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 500px;
  line-height: 1.8;
  margin-bottom: 2.25rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 4.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-surface);
}

/* ============================================
   BRANCH CARDS
   ============================================ */
.branches { padding-bottom: 5rem; }

.branches-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1.25rem;
}

.branch-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform .35s var(--ease), border-color .2s, background .2s;
}
.branch-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
}
.branch-card.r::after { background: var(--accent-r); }
.branch-card.t::after { background: var(--accent-t); }
.branch-card.a::after { background: var(--accent-a); }

.branch-card:hover { transform: translateY(-3px); background: var(--bg-card-hover); }
.branch-card.r:hover { border-color: rgba(129,140,248,.3); }
.branch-card.t:hover { border-color: rgba(52,211,153,.3); }
.branch-card.a:hover { border-color: rgba(193,125,83,.3); }

.branch-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem;
}
.branch-card.r .branch-icon { background: var(--dim-r); }
.branch-card.t .branch-icon { background: var(--dim-t); }
.branch-card.a .branch-icon { background: var(--dim-a); }

.branch-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: .6rem;
}
.branch-card.r .branch-num { color: var(--accent-r); }
.branch-card.t .branch-num { color: var(--accent-t); }
.branch-card.a .branch-num { color: var(--accent-a); }

.branch-card h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: .75rem;
}

.branch-card > p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.branch-list {
  list-style: none;
  margin-bottom: 1.75rem;
}
.branch-list li {
  font-size: 13px;
  color: var(--text-muted);
  padding: .3rem 0;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: .5rem;
}
.branch-list li::before {
  content: '';
  width: 3px; height: 3px;
  border-radius: 50%;
  flex-shrink: 0;
}
.branch-card.r .branch-list li::before { background: var(--accent-r); }
.branch-card.t .branch-list li::before { background: var(--accent-t); }
.branch-card.a .branch-list li::before { background: var(--accent-a); }

.branch-cta {
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; gap: .5rem;
  transition: gap .2s;
}
.branch-card:hover .branch-cta { gap: .8rem; }
.branch-card.r .branch-cta { color: var(--accent-r); }
.branch-card.t .branch-cta { color: var(--accent-t); }
.branch-card.a .branch-cta { color: var(--accent-a); }

/* ============================================
   SECTION HEADER
   ============================================ */
.sec-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.sec-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex; align-items: center; gap: .6rem;
}
.sec-label::before { content:''; width:16px; height:1px; background:var(--text-muted); }
.sec-more {
  font-size: 13px;
  color: var(--accent-r);
  font-weight: 500;
}
.sec-more:hover { text-decoration: underline; }

/* ============================================
   POST CARDS (home + archive)
   ============================================ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 1rem;
  margin-bottom: 5rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color .2s, background .2s;
  display: block;
}
.post-card:hover { background: var(--bg-card-hover); border-color: var(--border-light); }

.post-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .15em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: .75rem;
  display: inline-block;
}
.post-badge.research { background: var(--dim-r); color: var(--accent-r); }
.post-badge.travel   { background: var(--dim-t); color: var(--accent-t); }

.post-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: .4rem;
}
.post-card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================
   PAGE HERO (sub-pages)
   ============================================ */
.page-hero {
  padding: 5rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4rem;
}
.page-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 1rem;
}
.page-label::before { content:''; width:24px; height:1px; flex-shrink:0; }
.page-label.r { color: var(--accent-r); }
.page-label.r::before { background: var(--accent-r); }
.page-label.t { color: var(--accent-t); }
.page-label.t::before { background: var(--accent-t); }
.page-label.a { color: var(--accent-a); }
.page-label.a::before { background: var(--accent-a); }

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 300;
  line-height: 1.15;
  max-width: 660px;
  margin-bottom: 1rem;
}
.page-hero p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.8;
}

/* ============================================
   RESEARCH THEMES (image cards)
   ============================================ */
.research-themes-section {
  margin-bottom: 5rem;
}

.themes-intro {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.themes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.theme-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  background-image: var(--img);
  background-size: cover;
  background-position: center;
  transition: transform .4s var(--ease);
}

.theme-card:hover {
  transform: translateY(-4px);
}

.theme-card:hover .theme-card-img {
  transform: scale(1.06);
}

.theme-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(5, 8, 16, 0.94) 0%,
    rgba(5, 8, 16, 0.55) 50%,
    rgba(5, 8, 16, 0.18) 100%
  );
  transition: background .35s;
}

.theme-card:hover .theme-overlay {
  background: linear-gradient(
    to top,
    rgba(5, 8, 16, 0.97) 0%,
    rgba(5, 8, 16, 0.65) 55%,
    rgba(5, 8, 16, 0.22) 100%
  );
}

.theme-body {
  position: relative;
  z-index: 1;
  padding: 1.75rem 1.75rem 1.5rem;
}

.theme-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-r);
  display: block;
  margin-bottom: .65rem;
}

.theme-body h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: .6rem;
  color: var(--text-primary);
}

.theme-body p {
  font-size: 13px;
  color: rgba(241, 245, 249, 0.72);
  line-height: 1.7;
  margin-bottom: 1.1rem;
  max-width: 380px;
}

.theme-cta {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-r);
  letter-spacing: .02em;
  transition: gap .2s;
}

.theme-card:hover .theme-cta {
  gap: .75rem;
}

/* Legacy .areas-grid kept for backward compat */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1rem;
  margin-bottom: 4rem;
}
.area-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}
.area-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-r);
  margin-bottom: .75rem;
}
.area-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: .5rem;
}
.area-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================
   PUBLICATIONS
   ============================================ */
.publications-section {
  margin-bottom: 5rem;
}

.pub-intro {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.pub-loading {
  color: var(--text-muted);
  font-size: 14px;
  padding: 1.5rem 0;
}

.pub-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  margin-bottom: 5rem;
}

.pub-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  column-gap: 1.75rem;
  row-gap: 0;
  padding: 1.4rem 0.75rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  border-radius: 8px;
  align-items: start;
  transition: background .2s;
}

.pub-item:hover {
  background: rgba(129, 140, 248, 0.06);
}

.pub-year-col {
  padding-top: 4px;
  text-align: right;
}

.pub-year {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-r);
  letter-spacing: .06em;
  white-space: nowrap;
}

.pub-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pub-content h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.4;
  margin: 0 0 0.28rem;
  color: var(--text-primary);
}

.pub-authors {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 0.2rem;
  line-height: 1.5;
}

.pub-journal {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 0.6rem;
  line-height: 1.4;
}

.pub-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.pub-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--dim-r);
  color: var(--accent-r);
}

.pub-doi {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(129,140,248,.25);
  color: var(--accent-r);
  text-decoration: none;
}

.pub-abstract {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0 0 0.6rem;
}

/* ============================================
   MODAL
   ============================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(4, 7, 14, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s var(--ease);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  transform: translateY(22px) scale(0.97);
  transition: transform .32s var(--ease);
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}

.modal-backdrop.open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-panel::-webkit-scrollbar { width: 4px; }
.modal-panel::-webkit-scrollbar-track { background: transparent; }
.modal-panel::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 10px; }

/* Top bar — sticky, holds only the close button */
.modal-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1.25rem 0;
  background: var(--bg-surface);
  border-radius: 20px 20px 0 0;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .18s, color .18s, border-color .18s;
}

.modal-close:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  color: var(--text-primary);
}

/* Scrollable content area */
.modal-inner {
  padding: 1.25rem 2.25rem 2.25rem;
}

/* Kicker: number badge + type label */
.modal-kicker {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.85rem;
}

.modal-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-r);
  background: var(--dim-r);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.pub-year-badge {
  letter-spacing: .08em;
}

.modal-type-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Title */
.modal-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 1.1rem;
}

/* Authors + journal (pub modal only) */
.modal-authors {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 0.25rem;
}

.modal-journal-line {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

/* Abstract / brief */
.modal-brief {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.82;
  margin: 0 0 1.75rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(129,140,248,.4);
}

/* Image gallery — stacked */
.modal-gallery {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  margin-bottom: 1.75rem;
}

.modal-img-block {
  margin: 0;
}

.modal-img-block img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}

.modal-img-caption {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.6;
  margin-top: 0.55rem;
  padding-left: 0.2rem;
}

/* Tag row at bottom */
.modal-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
}


/* ============================================
   TRAVEL
   ============================================ */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent-t);
  color: var(--accent-t);
  background: var(--dim-t);
}

.travel-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 1.25rem;
  margin-bottom: 5rem;
}
.travel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: block;
  transition: border-color .2s, transform .35s var(--ease);
}
.travel-card:hover {
  border-color: rgba(52,211,153,.3);
  transform: translateY(-3px);
}
.travel-img {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-style: italic;
  color: rgba(255,255,255,.14);
  /* Background set inline via posts.js */
}
.travel-body { padding: 1.4rem; }
.travel-loc {
  display: flex; align-items: center; gap: .45rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--accent-t);
  margin-bottom: .5rem;
}
.travel-card h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: .45rem;
  line-height: 1.3;
}
.travel-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: .9rem;
}
.travel-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================
   ABOUT
   ============================================ */
.about-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3.5rem;
  margin-bottom: 5rem;
  align-items: start;
}
.about-intro {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}
.about-intro em { font-style: italic; color: var(--accent-a); }
.about-body {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 1.5rem;
}
.about-body:last-of-type { margin-bottom: 2.5rem; }

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.1rem;
}
.s-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .9rem;
}
.avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--dim-a);
  border: 2px solid rgba(193,125,83,.25);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--accent-a);
  margin: 0 auto .9rem;
}
.s-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: .25rem;
}
.s-role {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
}
.s-list { list-style: none; }
.s-list li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
  display: flex; gap: .5rem;
}
.s-list li:last-child { border-bottom: none; }
.s-list li strong {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  min-width: 55px;
  padding-top: 2px;
}
.s-link {
  font-size: 13px;
  color: var(--accent-r);
  transition: opacity .2s;
  display: block;
  padding: .45rem 0;
  border-bottom: 1px solid var(--border);
}
.s-link:last-child { border-bottom: none; padding-bottom: 0; }
.s-link:hover { opacity: .75; }
.s-link.pink { color: var(--accent-a); }

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.t-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  transition: background .2s, border-color .2s;
}
.t-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent-a), var(--accent-a-deep));
  border-radius: 3px 0 0 3px;
}
.t-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(193,125,83,.2);
}
.t-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: rgba(193,125,83,0.12);
  color: var(--accent-a);
  border: 1px solid rgba(193,125,83,0.2);
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 3px;
}
.t-item h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  margin-bottom: .25rem;
}
.t-item span {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 5rem;
}
.contact-box h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 300;
  margin-bottom: .4rem;
}
.contact-box > p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.form-group { display: flex; flex-direction: column; gap: .45rem; }
.form-group.full { grid-column: 1 / -1; }
.form-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.form-input, .form-textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .7rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent-a); }
.form-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.6rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
}
.btn-send { background: var(--accent-a); color: #fff; }
.btn-send:hover { background: #cd8f6b; }
.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.footer-logo span { color: var(--accent-r); }
.footer-nav { display: flex; gap: 1.25rem; }
.footer-nav a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color .2s;
}
.footer-nav a:hover { color: var(--text-primary); }
.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-up {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp .65s var(--ease) forwards;
}
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.d1 { animation-delay: .08s; }
.d2 { animation-delay: .18s; }
.d3 { animation-delay: .28s; }
.d4 { animation-delay: .38s; }
.d5 { animation-delay: .48s; }
.d6 { animation-delay: .58s; }

/* Scroll-triggered */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================
   ABOUT: HERO DECORATION
   ============================================ */
.about-hero-deco {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-rings-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-ring {
  position: absolute;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  border: 1px solid rgba(193,125,83,var(--o));
  animation: aboutRingPulse 4s ease-in-out var(--d) infinite;
}

@keyframes aboutRingPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%       { transform: scale(1.06); opacity: 1; }
}

.about-initials {
  font-family: var(--font-display);
  font-size: 3rem;
  font-style: italic;
  color: var(--accent-a);
  position: relative;
  z-index: 1;
  letter-spacing: -0.01em;
  user-select: none;
}

/* ============================================
   ABOUT: STATS STRIP ACCENT OVERRIDE
   ============================================ */
.about-stats .r-stat-num { color: var(--accent-a); }

/* ============================================
   ABOUT: PROFILE CARD WITH IMAGE
   ============================================ */
.about-profile-card {
  padding: 1.25rem;
  text-align: center;
}

.about-profile-img-wrap {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 0.85rem;
  border: 2px solid rgba(193,125,83,.25);
  background: var(--dim-a);
}

.about-profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* ============================================
   ABOUT: SIDEBAR LINK WITH ICON
   ============================================ */
.s-link-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.s-link-icon svg {
  flex-shrink: 0;
  opacity: 0.5;
}

/* ============================================
   ABOUT: TOOLKIT SECTION
   ============================================ */
.toolkit-section {
  margin-top: 2rem;
}

.toolkit-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.toolkit-label::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--text-muted);
}

.toolkit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.t-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-surface);
  transition: border-color .2s, color .2s, background .2s;
}

.t-chip:hover {
  border-color: rgba(193,125,83,.35);
  color: var(--accent-a);
  background: var(--dim-a);
}

/* ============================================
   ABOUT: CONTACT HEADER
   ============================================ */
.contact-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.contact-header h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 300;
  margin-bottom: 0.4rem;
}

.contact-header > div > p {
  font-size: 14px;
  color: var(--text-secondary);
}

.contact-email-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--accent-a);
  border: 1px solid rgba(193,125,83,.25);
  background: var(--dim-a);
  padding: 7px 14px;
  border-radius: 20px;
  transition: border-color .2s, background .2s;
  white-space: nowrap;
  margin-top: 0.5rem;
}

.contact-email-pill:hover {
  border-color: rgba(193,125,83,.5);
  background: rgba(193,125,83,.15);
}

/* ============================================
   RESEARCH: STATS STRIP
   ============================================ */
.research-stats {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-card);
  margin-bottom: 4.5rem;
  overflow: hidden;
}

.r-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 1rem;
  position: relative;
  gap: 0.35rem;
}

.r-stat + .r-stat::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: var(--border);
}

.r-stat-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1;
}

.r-stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================
   RESEARCH: ASYMMETRIC THEME GRID
   ============================================ */
.themes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 310px 290px;
  gap: 1.25rem;
}

.theme-card:nth-child(1) { grid-column: 1 / 3; grid-row: 1; }
.theme-card:nth-child(2) { grid-column: 3;     grid-row: 1; }
.theme-card:nth-child(3) { grid-column: 2 / 4; grid-row: 2; }
.theme-card:nth-child(4) { grid-column: 1;     grid-row: 2; }

/* ============================================
   RESEARCH: ICON-LED THEME CARDS
   ============================================ */
.theme-card {
  background: var(--bg-card);
  background-image: none !important;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: unset;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .25s, background .25s;
}

.theme-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-r), transparent 70%);
}

.theme-card::after {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(129,140,248,0.07), transparent 70%);
  pointer-events: none;
  transition: opacity .3s;
}

.theme-card:hover {
  transform: translateY(-4px);
  border-color: rgba(129,140,248,.28);
  background: var(--bg-card-hover);
}

.theme-card:hover::after { opacity: 1.5; }

/* Hide old photo-based overlay */
.theme-overlay { display: none !important; }

.theme-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  background: var(--dim-r);
  border: 1px solid rgba(129,140,248,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-r);
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

/* Wide cards get a slightly larger icon */
.theme-card:nth-child(1) .theme-icon-wrap,
.theme-card:nth-child(3) .theme-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 15px;
}

/* Reset old absolutely-positioned theme-body */
.theme-body {
  position: static !important;
  padding: 0 !important;
  z-index: auto !important;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.theme-body h3 {
  font-size: 1.35rem;
}

/* Larger heading on wide cards */
.theme-card:nth-child(1) .theme-body h3,
.theme-card:nth-child(3) .theme-body h3 {
  font-size: 1.6rem;
}

.theme-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1.25rem;
  max-width: none;
}

.theme-cta {
  margin-top: auto;
}

/* ============================================
   RESEARCH: CURRENTLY WORKING ON
   ============================================ */
.ongoing-section {
  margin-bottom: 4.5rem;
}

.ongoing-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.ongoing-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2rem;
  padding: 1.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.ongoing-status-col {
  padding-top: 3px;
}

.ongoing-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.ongoing-status::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.ongoing-status.under-review {
  background: rgba(251,191,36,.1);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,.2);
}
.ongoing-status.under-review::before { background: #fbbf24; }

.ongoing-status.in-prep {
  background: var(--dim-r);
  color: var(--accent-r);
  border: 1px solid rgba(129,140,248,.2);
}
.ongoing-status.in-prep::before { background: var(--accent-r); }

.ongoing-content h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.45;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.ongoing-meta {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ============================================
   RESEARCH: YEAR-GROUPED PUBLICATIONS
   ============================================ */
.pub-year-group {
  margin-bottom: 0.5rem;
}

.pub-year-heading {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 300;
  color: rgba(129,140,248,.1);
  line-height: 1;
  padding: 1rem 0.75rem 0;
  user-select: none;
  pointer-events: none;
}

.pub-year-items {
  border-top: 1px solid var(--border);
}

/* ============================================
   RESEARCH: PUB ACCORDION
   ============================================ */
.pub-item {
  display: block !important;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  border-radius: 8px;
  transition: background .2s;
}

.pub-item:hover { background: rgba(129,140,248,.04); }
.pub-item.open  { background: rgba(129,140,248,.06); }

.pub-summary {
  display: grid;
  grid-template-columns: 52px 1fr 28px;
  column-gap: 1.75rem;
  padding: 1.4rem 0.75rem;
  align-items: start;
}

.pub-toggle-icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 5px;
  flex-shrink: 0;
  transition: transform .35s var(--ease), color .2s;
}

.pub-item.open .pub-toggle-icon {
  transform: rotate(45deg);
  color: var(--accent-r);
}

.pub-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height .45s var(--ease);
  padding-left: calc(52px + 1.75rem + 0.75rem);
  padding-right: calc(28px + 1.75rem + 0.75rem);
}

.pub-item.open .pub-expand {
  max-height: 500px;
}

.pub-abstract-full {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.85;
  padding: 0.9rem 0 1rem;
  border-top: 1px solid var(--border);
}

.pub-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1.5rem;
  flex-wrap: wrap;
}

.pub-cite-btn {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 13px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
}

.pub-cite-btn:hover {
  border-color: rgba(129,140,248,.4);
  color: var(--accent-r);
  background: var(--dim-r);
}

.pub-cite-btn.copied {
  border-color: rgba(52,211,153,.4);
  color: var(--accent-t);
  background: rgba(52,211,153,.08);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
  .branches-grid  { grid-template-columns: 1fr; }
  .posts-grid     { grid-template-columns: 1fr; }
  .areas-grid     { grid-template-columns: 1fr; }
  .travel-grid    { grid-template-columns: 1fr; }
  .about-wrap     { grid-template-columns: 1fr; }
  .form-grid      { grid-template-columns: 1fr; }
  .about-sidebar  { order: -1; }
  .modal-inner      { padding: 1rem 1.25rem 1.75rem; }
  .modal-topbar     { padding: 0.75rem 0.75rem 0; }
  .modal-img-block img { height: 170px; }

  /* Research page responsive */
  .research-stats { flex-wrap: wrap; }
  .r-stat { flex: 1 1 50%; }
  .r-stat + .r-stat::before { display: none; }
  .r-stat:nth-child(1),
  .r-stat:nth-child(2) { border-bottom: 1px solid var(--border); }

  .themes-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .theme-card:nth-child(1),
  .theme-card:nth-child(2),
  .theme-card:nth-child(3),
  .theme-card:nth-child(4) {
    grid-column: auto;
    grid-row: auto;
    min-height: 240px;
  }

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

  .contact-header { flex-direction: column; gap: 1rem; }

  .pub-expand {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .pub-summary { grid-template-columns: 40px 1fr 24px; column-gap: 1rem; }
}
@media (max-width: 560px) {
  .container { padding: 0 1.25rem; }
  .home-hero { padding: 4rem 0 2rem; }
  .footer-inner { justify-content: center; text-align: center; }

  .themes-grid { grid-template-columns: 1fr; }
  .theme-card:nth-child(1),
  .theme-card:nth-child(2),
  .theme-card:nth-child(3),
  .theme-card:nth-child(4) { min-height: 200px; }

  .r-stat { flex: 1 1 100%; }
  .r-stat:nth-child(1),
  .r-stat:nth-child(2) { border-bottom: 1px solid var(--border); }

  .about-hero-deco { display: none; }
}
/* --- Fullscreen Home Layout --- */
.home-fullscreen {
  position: relative;
  overflow-x: clip; /* clip doesn't create a scroll container, so position:sticky works */
}

/* Fixed background image — persists while scrolling into research section */
.hero-bg-container {
  position: fixed;
  inset: 0;
  z-index: -1;
}

.zoom-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.32);
  transform-origin: center center;
  will-change: transform;
}

/* Idle slow-breathe zoom — JS disables this once the user scrolls */
@keyframes heroIdleZoom {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.06); }
}

#hero-bg-img {
  animation: heroIdleZoom 14s ease-in-out infinite;
}

/* Hero section: full viewport height */
.home-hero-section {
  height: 100dvh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
}

/* Content over the image */
.hero-content {
  width: 100%;
  will-change: opacity, transform;
}

/* Scroll hint at bottom of hero */
.home-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
  animation: scrollHintFloat 3s ease-in-out infinite;
  transform-origin: center bottom;
}

@keyframes scrollHintFloat {
  0%, 100% { transform: translateX(-50%) translateY(0);    opacity: 0.7; }
  50%       { transform: translateX(-50%) translateY(-7px); opacity: 1;   }
}
.home-scroll-hint span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
}
.home-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,.4), transparent);
  animation: homeScrollPulse 2s ease-in-out infinite;
}
@keyframes homeScrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.15); }
}

/* ── Research reveal section ── */
.home-research-section {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding: 5rem 0 6rem;
  /* Dark gradient so research content is always readable over the zoomed bg */
  background: linear-gradient(
    to bottom,
    rgba(8,11,20,0)    0%,
    rgba(8,11,20,0.88) 4%,
    rgba(8,11,20,0.97) 14%,
    rgba(8,11,20,0.99) 100%
  );
}

.home-research-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.home-research-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-r);
  display: flex;
  align-items: center;
  gap: .6rem;
}
.home-research-label::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--accent-r);
}

.home-research-more {
  font-size: 13px;
  color: var(--accent-r);
  font-weight: 500;
  transition: opacity .2s;
}
.home-research-more:hover { opacity: .75; text-decoration: underline; }

.home-research-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 2.5rem;
}
.home-research-title em {
  font-style: italic;
  color: var(--accent-r);
}

/* Research cards grid */
.home-research-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.home-pub-card {
  background: rgba(13,17,23,0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  cursor: pointer;
  transition: border-color .25s, background .25s, transform .35s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
}
.home-pub-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-r), transparent 70%);
}
.home-pub-card:hover {
  border-color: rgba(129,140,248,.35);
  background: rgba(17,24,39,0.9);
  transform: translateY(-4px);
}

.home-pub-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.home-pub-year {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-r);
  background: var(--dim-r);
  padding: 3px 9px;
  border-radius: 4px;
  letter-spacing: .06em;
}
.home-pub-journal {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--text-muted);
  font-style: italic;
}
.home-pub-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text-primary);
  transition: color .2s;
}
.home-pub-card:hover .home-pub-title { color: rgba(129,140,248,.9); }

.home-pub-abstract {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.78;
  flex: 1;
}
.home-pub-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.home-pub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.home-pub-cta {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-r);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .22s, transform .22s var(--ease), gap .2s;
}
.home-pub-card:hover .home-pub-cta {
  opacity: 1;
  transform: translateX(0);
  gap: .6rem;
}

.hero-text-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  align-items: center;
  gap: 4rem;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); /* Light shadow for readability */
}

.hero-left h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-desc {
  max-width: 700px;
  font-size: 1.1rem;
  color: #e2e8f0;
  margin-bottom: 2rem;
}

/* Profile Image on the Right */
.profile-frame {
  width: 220px;
  height: 280px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Button styles for hero */
.hero-btns {
  display: flex;
  gap: 1rem;
}

.btn-research { background: var(--accent-r); color: #fff; }
.btn-travel { background: transparent; border: 1px solid #fff; color: #fff; }

/* Hide footer only on homepage to maintain fullscreen look */
body:has(.home-fullscreen) .footer {
  display: none;
}

/* ── Home Themes: scroll-driven section ──────────────────── */
.home-themes-section {
  position: relative;
  z-index: 1;
  /* min-height set by JS: (numThemes + 1) * 100dvh */
}

.home-themes-sticky {
  position: sticky;
  top: 0;
  height: 100dvh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* background handled by themes-video-overlay */
}

/* Themes section: full-cover video background */
.themes-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.28);
  pointer-events: none;
}

/* Gradient overlay for text legibility */
.themes-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8,11,20,0.55) 0%,
    rgba(8,11,20,0.30) 45%,
    rgba(8,11,20,0.65) 100%
  );
  pointer-events: none;
}

/* Scroll progress bar — sits at the very bottom of the sticky panel */
.themes-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255,255,255,0.07);
  z-index: 2;
}

.themes-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-r);
  box-shadow: 0 0 8px rgba(129,140,248,0.6);
  will-change: width;
}

.home-themes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.home-theme-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.home-theme-progress {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.home-theme-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--text-muted);
}

.home-theme-dots {
  display: flex;
  gap: 7px;
}

.home-theme-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-light);
  transition: background .4s var(--ease), transform .4s var(--ease);
}

.home-theme-dot.active {
  background: var(--accent-r);
  transform: scale(1.4);
}

/* Cards container — fixed height, all cards absolutely positioned */
.home-themes-cards {
  position: relative;
  height: clamp(260px, 44vh, 380px);
  margin-bottom: 1rem;
}

.home-theme-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(54px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  pointer-events: none;
}

.home-theme-card.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.home-theme-card.exit-up {
  opacity: 0;
  transform: translateY(-44px);
}

.home-theme-card.exit-down {
  opacity: 0;
  transform: translateY(54px);
}

/* Watermark number */
.home-theme-num-bg {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-55%);
  font-family: var(--font-display);
  font-size: clamp(7rem, 18vw, 13rem);
  font-weight: 300;
  color: rgba(129,140,248,0.05);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  letter-spacing: -0.04em;
}

.home-theme-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-r);
  margin-bottom: 0.75rem;
}

.home-theme-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 3.6rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 1.1rem;
  max-width: 680px;
}

.home-theme-title em {
  font-style: italic;
  color: var(--accent-r);
}

.home-theme-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.82;
  max-width: 540px;
  margin-bottom: 1.25rem;
}

.home-theme-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* CTA that appears only on the last theme card */
.themes-end-cta {
  position: relative;
  z-index: 2;
  margin-top: 3.5rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  pointer-events: none;
}

.themes-end-cta.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

@media (max-width: 860px) {
  .home-themes-cards { height: clamp(300px, 55vh, 420px); }
  .home-theme-num-bg { font-size: 5rem; right: -0.5rem; }
  .home-theme-desc   { font-size: 14px; }
  .home-themes-header { margin-bottom: 1.75rem; }
}

@media (max-width: 560px) {
  .home-theme-title  { font-size: clamp(1.6rem, 7vw, 2.4rem); }
  .home-theme-right  { flex-direction: column; align-items: flex-end; gap: 0.5rem; }
  .home-theme-num-bg { display: none; }
}

/* Mobile adjustments */
@media (max-width: 860px) {
  .hero-text-wrapper {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-left { order: 2; }
  .hero-right { order: 1; display: flex; justify-content: center; }
  .profile-frame { width: 150px; height: 150px; border-radius: 50%; }
  .hero-btns { justify-content: center; }
  .hero-desc { margin-inline: auto; }

  .home-research-cards { grid-template-columns: 1fr; }
  .home-research-title { font-size: clamp(2rem, 8vw, 3rem); }
}

@media (max-width: 560px) {
  .home-research-section { padding: 4rem 0 5rem; }
}

/* ============================================
   CV REQUEST MODAL
   ============================================ */
.cv-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 910;
  background: rgba(4,7,14,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s var(--ease);
}
.cv-modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}
.cv-modal-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  position: relative;
  transform: translateY(22px) scale(.97);
  transition: transform .32s var(--ease);
}
.cv-modal-backdrop.open .cv-modal-panel {
  transform: translateY(0) scale(1);
}
.cv-modal-topbar {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1.25rem 0;
}
.cv-modal-inner {
  padding: .75rem 2rem 2rem;
}
.cv-modal-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--dim-a);
  border: 1px solid rgba(193,125,83,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-a);
  margin-bottom: 1.1rem;
}
.cv-modal-inner h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: .35rem;
}
.cv-modal-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.cv-email-error {
  font-size: 11px;
  color: #ef4444;
  margin-top: 5px;
  display: block;
}
.cv-modal-success {
  text-align: center;
  padding: 1rem 0 .5rem;
}
.cv-success-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(52,211,153,.1);
  border: 1px solid rgba(52,211,153,.28);
  color: var(--accent-t);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.cv-modal-success h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: .35rem;
}
.cv-modal-success p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Research Hero Split Layout --- */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 250px; /* Text takes most space, animation fixed on right */
  align-items: center;
  gap: 4rem;
}

.hero-left h1 {
  max-width: none; /* Removes old restriction so it fills the grid column */
}

/* --- Structural Animation --- */
.structure-anim {
  width: 100%;
  max-width: 180px;
  margin: 0 auto;
  color: var(--text-secondary); /* Keeps it monochrome / muted */
}

.building-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* The skewing animation simulates inter-storey drift */
.sway-group {
  transform-origin: 50px 90px; /* Anchors the animation to the ground line */
  animation: seismicDrift 4s ease-in-out infinite;
}

@keyframes seismicDrift {
  0%, 100% { transform: skewX(0deg); }
  25% { transform: skewX(-4deg); }
  75% { transform: skewX(4deg); }
}

/* Mobile adjustments */
@media (max-width: 860px) {
  .hero-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-right {
    display: none; /* Hides the animation on mobile to save vertical space */
  }
}
/* --- Travel Animation --- */
.travel-anim {
  width: 100%;
  max-width: 180px;
  margin: 0 auto;
  color: var(--text-secondary); /* Base monochrome color */
}

.mountain-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Clouds drift slowly back and forth */
.anim-clouds {
  animation: driftClouds 8s ease-in-out infinite alternate;
}

@keyframes driftClouds {
  0% { transform: translateX(0); }
  100% { transform: translateX(-8px); }
}

/* Sun arcs over the mountains */
.sun-orbit {
  transform-origin: 50px 90px; /* Anchors rotation below the ground line */
  animation: orbitSun 15s linear infinite;
}

@keyframes orbitSun {
  0% { transform: rotate(-30deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: rotate(70deg); opacity: 0; }
}
