/* ==========================================================
   Shaibal Saha — portfolio + travel journal
   Shared stylesheet for index.html and beyond-the-lab.html
   ========================================================== */

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #f0eee8;
  --ink: #16202b;
  --ink-2: #47525e;
  --ink-3: #7a838c;
  --line: #e4e1d8;
  --accent: #1f6f8b;        /* deep lake teal */
  --accent-2: #e07a3f;      /* canyon orange */
  --accent-soft: #e3f0f4;
  --warm-soft: #fbeee4;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(22, 32, 43, .04), 0 8px 24px rgba(22, 32, 43, .06);
  --shadow-lg: 0 2px 4px rgba(22, 32, 43, .05), 0 20px 48px rgba(22, 32, 43, .12);
  --max: 1120px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11161c;
    --surface: #182029;
    --surface-2: #1e2833;
    --ink: #eef1f4;
    --ink-2: #b7c0c9;
    --ink-3: #87919b;
    --line: #2a3541;
    --accent: #5cb3cf;
    --accent-2: #f0965f;
    --accent-soft: #1b3440;
    --warm-soft: #3a2a20;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 20px 48px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  --bg: #11161c;
  --surface: #182029;
  --surface-2: #1e2833;
  --ink: #eef1f4;
  --ink-2: #b7c0c9;
  --ink-3: #87919b;
  --line: #2a3541;
  --accent: #5cb3cf;
  --accent-2: #f0965f;
  --accent-soft: #1b3440;
  --warm-soft: #3a2a20;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 20px 48px rgba(0, 0, 0, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; color: var(--ink); }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { font-family: var(--font-serif); font-weight: 600; font-size: 20px; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent-2); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 12px; border-radius: 999px;
  color: var(--ink-2); font-size: 14.5px; font-weight: 500;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.nav-links a.pill { background: var(--ink); color: var(--bg); }
.nav-links a.pill:hover { background: var(--accent); color: #fff; }
.nav-toggle, .theme-toggle {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  width: 40px; height: 40px; border-radius: 999px; cursor: pointer; font-size: 16px;
  display: inline-grid; place-items: center;
}
.nav-toggle { display: none; }
.nav-right { display: flex; align-items: center; gap: 8px; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; }
  .nav-links {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 16px 20px;
    display: none; gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 16px; border-radius: 10px; }
}

/* ---------- Buttons / chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .15s, color .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--ink); color: var(--bg); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-warm { background: var(--accent-2); color: #fff; }
.btn-warm:hover { background: var(--ink); color: var(--bg); }
.chip {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 600;
}
.chip.warm { background: var(--warm-soft); color: var(--accent-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Sections ---------- */
section { padding: 52px 0; }
section + section { border-top: 1px solid var(--line); }
@media (max-width: 600px) { section { padding: 40px 0; } }
.eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 10px; display: block;
}
.section-title { font-family: var(--font-serif); font-size: clamp(30px, 4vw, 42px); font-weight: 600; letter-spacing: -.02em; margin-bottom: 14px; }
.section-lede { color: var(--ink-2); max-width: 640px; font-size: 17px; margin-bottom: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px;
}
@media (max-width: 600px) { .card { padding: 20px; } }

/* ---------- Hero (home) ---------- */
.hero { padding: 56px 0 52px; border-top: 0; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-family: var(--font-serif); font-size: clamp(42px, 6vw, 68px); font-weight: 600; letter-spacing: -.03em; margin-bottom: 12px; }
.hero .role { font-size: 19px; color: var(--ink-2); margin-bottom: 24px; }
.hero .role b { color: var(--ink); font-weight: 600; }
.hero p.lead { font-size: 17.5px; color: var(--ink-2); max-width: 580px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 24px; }
.socials { display: flex; gap: 8px; }
.socials a {
  width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--ink-2); background: var(--surface); font-size: 18px;
}
.socials a:hover { color: #fff; background: var(--accent); border-color: var(--accent); text-decoration: none; }
.hero-photo { position: relative; justify-self: center; width: 100%; max-width: 380px; }
.hero-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow-lg); position: relative; z-index: 1; }
.hero-photo::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: 28px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%); opacity: .9;
}
.hero-badge {
  position: absolute; z-index: 2; left: -28px; bottom: 32px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow-lg);
  font-size: 13.5px; line-height: 1.35; max-width: 220px;
}
.hero-badge b { display: block; font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 56px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.stat b { display: block; font-family: var(--font-serif); font-size: 30px; font-weight: 600; color: var(--accent); line-height: 1.1; }
.stat span { font-size: 13.5px; color: var(--ink-2); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-photo { max-width: 240px; order: -1; }
  .hero-badge { left: -12px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Opportunity banner ---------- */
.banner {
  display: flex; gap: 16px; align-items: center; padding: 18px 22px; border-radius: var(--radius);
  background: var(--accent-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.banner i { font-size: 22px; color: var(--accent); }
.banner p { margin: 0; }
@media (max-width: 600px) { .banner { flex-direction: column; align-items: flex-start; } }

/* ---------- About / interests ---------- */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.about-grid p { color: var(--ink-2); font-size: 17px; }
.interest-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.interest-list li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-weight: 500; }
.interest-list i { color: var(--accent); width: 20px; text-align: center; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- News timeline ---------- */
.news { list-style: none; padding: 0; margin: 0; position: relative; }
.news li { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.news li:last-child { border-bottom: 0; }
.news time { font-weight: 700; color: var(--accent); font-size: 14px; padding-top: 2px; }
.news .hidden-item { display: none; }
.news.expanded .hidden-item { display: grid; }
@media (max-width: 600px) { .news li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Publications ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  padding: 7px 15px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.filter:hover { color: var(--ink); border-color: var(--ink-3); }
.filter.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pubs { display: grid; gap: 14px; }
.pub { display: grid; grid-template-columns: 80px 1fr; gap: 20px; padding: 22px 24px; }
.pub .year { font-family: var(--font-serif); font-size: 26px; font-weight: 600; color: var(--ink-3); line-height: 1; }
.pub .type { display: block; margin-top: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2); }
.pub h3 { font-size: 18px; font-weight: 650; margin-bottom: 6px; line-height: 1.35; }
.pub .authors { color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }
.pub .authors b { color: var(--ink); }
.pub .venue { color: var(--ink-3); font-style: italic; font-size: 14.5px; margin-bottom: 10px; }
.pub .links { display: flex; gap: 8px; flex-wrap: wrap; }
.pub .links a { font-size: 13.5px; font-weight: 600; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); }
.pub .links a:hover { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; }
.pub.highlight { border-color: color-mix(in srgb, var(--accent-2) 45%, var(--line)); }
@media (max-width: 600px) { .pub { grid-template-columns: 1fr; gap: 6px; } .pub .type { display: inline; margin-left: 8px; } }

/* ---------- Motto ---------- */
.motto {
  margin: 8px 0 36px; padding: 18px 24px; border-left: 4px solid var(--accent-2);
  background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-serif); font-size: clamp(20px, 2.4vw, 26px); font-style: italic; color: var(--ink); line-height: 1.4;
}
.motto span { display: block; font-family: var(--font-sans); font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }

/* ---------- Publication list (academic style) ---------- */
.pub-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13.5px; color: var(--ink-3); margin-bottom: 8px; }
.pub-year { font-family: var(--font-serif); font-size: 22px; font-weight: 600; color: var(--ink-3); margin: 28px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 12px 0; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.pub-list li + li { border-top: 1px dashed var(--line); }
.pub-list b { color: var(--ink); }
.pub-list .pub-title { color: var(--ink); font-weight: 600; }
.pub-list a { font-weight: 600; font-size: 14px; white-space: nowrap; }
.tag {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; margin-top: 2px;
}
.tag.j { background: var(--warm-soft); color: var(--accent-2); }
.tag.b { background: var(--surface-2); color: var(--ink); }
.hl { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent-2); background: var(--warm-soft); padding: 1px 8px; border-radius: 999px; margin-right: 4px; }

/* ---------- Book ---------- */
.book { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: start; }
.book img { border-radius: 8px; box-shadow: var(--shadow-lg); }
.book h3 { font-family: var(--font-serif); font-size: 28px; font-weight: 600; margin-bottom: 12px; }
.book dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 16px; font-size: 15px; }
.book dt { color: var(--ink-3); font-weight: 600; }
.book dd { margin: 0; }
.book p { color: var(--ink-2); }
@media (max-width: 700px) { .book { grid-template-columns: 1fr; } .book img { max-width: 180px; } }

/* ---------- Experience ---------- */
.timeline { position: relative; display: grid; gap: 20px; }
.job { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; }
.job h3 { font-size: 20px; font-weight: 700; }
.job .org { color: var(--ink-2); font-size: 15px; }
.job .when { text-align: right; font-size: 14px; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.job .body { grid-column: 1 / -1; margin-top: 10px; }
.job ul { margin: 10px 0 0; padding-left: 20px; color: var(--ink-2); }
.job li { margin: 6px 0; }
.job li b { color: var(--ink); }
.job .chips { margin-top: 10px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 14px; }
.course { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.course b { display: block; font-size: 14.5px; }
.course span { font-size: 13px; color: var(--ink-3); }
.mentees { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.mentee { border-left: 3px solid var(--accent); padding: 4px 12px; font-size: 14.5px; }
.mentee span { display: block; color: var(--ink-3); font-size: 13.5px; }
@media (max-width: 700px) {
  .job { grid-template-columns: 1fr; }
  .job .when { text-align: left; }
  .mentees { grid-template-columns: 1fr; }
}

/* ---------- Education ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.edu .when { font-size: 13.5px; color: var(--accent-2); font-weight: 700; }
.edu h3 { font-size: 18px; margin: 6px 0 4px; }
.edu p { color: var(--ink-2); font-size: 15px; margin: 0; }
@media (max-width: 900px) { .edu-grid { grid-template-columns: 1fr; } }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.skill-group h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.skill-group h3 i { color: var(--accent); }
.skill-group .chips .chip { background: var(--surface-2); color: var(--ink); font-weight: 500; font-size: 13.5px; }
@media (max-width: 700px) { .skills-grid { grid-template-columns: 1fr; } }

/* ---------- Honors ---------- */
.honors-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.honors-grid h3 { font-size: 17px; font-weight: 700; margin-bottom: 12px; display: flex; gap: 10px; align-items: center; }
.honors-grid h3 i { color: var(--accent-2); }
.honors-grid ul { margin: 0; padding: 0; list-style: none; }
.honors-grid li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.honors-grid li:last-child { border-bottom: 0; }
.honors-grid li b { color: var(--ink); }
@media (max-width: 800px) { .honors-grid { grid-template-columns: 1fr; } }

/* ---------- Travel teaser (home) ---------- */
.teaser {
  position: relative; overflow: hidden; border-radius: 24px; padding: 56px;
  background: linear-gradient(120deg, #173b4d 0%, #1f6f8b 45%, #e07a3f 120%); color: #fff;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
}
.teaser h2 { color: #fff; font-family: var(--font-serif); font-size: clamp(30px, 4vw, 44px); font-weight: 600; margin-bottom: 14px; }
.teaser p { color: rgba(255,255,255,.86); font-size: 17px; }
.teaser .eyebrow { color: #ffd2b3; }
.teaser .btn { background: #fff; color: #173b4d; }
.teaser .btn:hover { background: #ffd2b3; }
.teaser-stops { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.teaser-stops a {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 14px;
  padding: 14px 16px; color: #fff; transition: background .15s;
}
.teaser-stops a:hover { background: rgba(255,255,255,.22); text-decoration: none; }
.teaser-stops b { display: block; font-size: 15px; }
.teaser-stops span { font-size: 12.5px; opacity: .8; }
@media (max-width: 900px) { .teaser { grid-template-columns: 1fr; padding: 32px 24px; } }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--ink-3); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ==========================================================
   Travel page
   ========================================================== */
.t-hero { position: relative; padding: 64px 0 40px; border-top: 0; overflow: hidden; }
.t-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 400px at 85% -10%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 70%),
    radial-gradient(700px 400px at 0% 110%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%);
}
.t-hero h1 { font-family: var(--font-serif); font-size: clamp(44px, 7vw, 80px); font-weight: 600; letter-spacing: -.03em; max-width: 820px; margin-bottom: 18px; }
.t-hero h1 em { font-style: italic; color: var(--accent-2); }
.t-hero p { font-size: 18px; color: var(--ink-2); max-width: 620px; }
.t-stats { display: flex; gap: 36px; flex-wrap: wrap; margin-top: 36px; }
.t-stats div b { display: block; font-family: var(--font-serif); font-size: 36px; font-weight: 600; line-height: 1; color: var(--ink); }
.t-stats div span { font-size: 13.5px; color: var(--ink-3); }

.trip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
@media (max-width: 400px) { .trip-grid { grid-template-columns: 1fr; } }
.trip {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.trip:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.trip-cover { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--surface-2); }
.trip-cover .ph, .trip-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.trip-when {
  position: absolute; left: 14px; top: 14px; z-index: 2; background: rgba(255,255,255,.94); color: #16202b;
  font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
}
.trip-region {
  position: absolute; right: 14px; top: 14px; z-index: 2; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: #fff; background: rgba(0,0,0,.35); padding: 5px 10px; border-radius: 999px;
}
.trip-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.trip-body h3 { font-family: var(--font-serif); font-size: 23px; font-weight: 600; margin-bottom: 8px; letter-spacing: -.01em; }
.trip-body p { color: var(--ink-2); font-size: 15px; flex: 1; }
.trip-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.trip-meta small { color: var(--ink-3); font-size: 13px; }
.read-more { font-weight: 700; font-size: 14.5px; display: inline-flex; gap: 6px; align-items: center; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-family: inherit; }
.read-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Photo placeholder — shown until real photos are dropped into images/travel/ */
.ph {
  display: grid; place-items: center; text-align: center; color: rgba(255,255,255,.95);
  background: linear-gradient(135deg, var(--g1, #1f6f8b), var(--g2, #e07a3f));
  padding: 12px;
}
.ph > div { display: grid; gap: 4px; justify-items: center; }
.ph i { font-size: 26px; opacity: .85; }
.ph b { font-family: var(--font-serif); font-size: 18px; font-weight: 600; text-shadow: 0 1px 8px rgba(0,0,0,.2); }
.ph small { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }

/* Story view */
.story { display: none; }
body.reading .story { display: block; }
body.reading .journal { display: none; }
.story-hero { position: relative; height: min(62vh, 560px); min-height: 340px; overflow: hidden; background: var(--surface-2); }
.story-hero > img, .story-hero > .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.65) 100%); }
.story-hero .wrap { position: absolute; left: 0; right: 0; bottom: 40px; z-index: 2; color: #fff; }
.story-hero h1 { color: #fff; font-family: var(--font-serif); font-size: clamp(36px, 6vw, 64px); font-weight: 600; letter-spacing: -.02em; max-width: 860px; }
.story-hero .when { display: inline-block; background: rgba(255,255,255,.94); color: #16202b; font-weight: 700; font-size: 13px; padding: 5px 12px; border-radius: 999px; margin-bottom: 16px; }
.story-back { position: absolute; top: 20px; left: 0; right: 0; z-index: 3; }
.story-back a { background: rgba(255,255,255,.94); color: #16202b; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; box-shadow: var(--shadow); }
.story-back a:hover { text-decoration: none; background: #fff; }
.story-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; padding: 56px 0 80px; }
.story-text { font-size: 18px; line-height: 1.8; color: var(--ink); max-width: 700px; }
.story-text p:first-of-type::first-letter { font-family: var(--font-serif); float: left; font-size: 64px; line-height: .9; padding: 6px 10px 0 0; color: var(--accent-2); font-weight: 600; }
.story-text h2 { font-family: var(--font-serif); font-size: 26px; font-weight: 600; margin: 40px 0 12px; }
.story-text h2 small { display: block; font-family: var(--font-sans); font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 4px; }
.draft-note { font-size: 14px; background: var(--warm-soft); color: var(--ink-2); border-radius: 12px; padding: 12px 16px; margin-bottom: 28px; display: flex; gap: 10px; }
.draft-note i { color: var(--accent-2); padding-top: 3px; }
.story-aside { position: sticky; top: 88px; align-self: start; }
.places h3 { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.places ol { list-style: none; margin: 0; padding: 0; counter-reset: stop; position: relative; }
.places ol::before { content: ""; position: absolute; left: 13px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.places li { counter-increment: stop; position: relative; padding: 6px 0 14px 42px; }
.places li::before {
  content: counter(stop); position: absolute; left: 0; top: 4px; width: 28px; height: 28px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 0 0 4px var(--bg);
}
.places li a { color: var(--ink); font-weight: 600; }
.places li span { display: block; font-size: 13.5px; color: var(--ink-3); line-height: 1.4; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 32px 0; }
.gallery figure { margin: 0; position: relative; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.gallery figure img, .gallery figure .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery figure.wide { grid-column: span 2; aspect-ratio: auto; }
.gallery .ph b { font-size: 15px; }
.gallery.two { grid-template-columns: repeat(2, 1fr); }
.gallery.one { grid-template-columns: 1fr; }
.gallery.one figure { aspect-ratio: 16/9; }
.gallery.two figure { aspect-ratio: 4/5; }
.gallery figure.zoomable { cursor: zoom-in; }
.gallery figure img { transition: transform .4s ease; }
.gallery figure.zoomable:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 22px 12px 9px;
  font-size: 13px; line-height: 1.35; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6));
}
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(8, 12, 16, .92); display: none;
  flex-direction: column; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 10px; object-fit: contain; }
.lightbox p { color: #e9edf1; margin: 14px 0 0; font-size: 15px; text-align: center; }
.lightbox button { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 999px; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 18px; cursor: pointer; }
.story-nav { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 28px; margin-top: 40px; }
.story-nav a { display: block; max-width: 48%; }
.story-nav small { display: block; color: var(--ink-3); font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.story-nav b { font-family: var(--font-serif); font-weight: 600; font-size: 18px; color: var(--ink); }
.story-nav .next { text-align: right; margin-left: auto; }
@media (max-width: 900px) {
  .story-layout { grid-template-columns: 1fr; gap: 32px; }
  .story-aside { position: static; order: -1; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .story-text { font-size: 17px; }
}
.map-embed { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); height: 460px; }
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Tablet (portrait & landscape) ---------- */
@media (min-width: 601px) and (max-width: 1024px) {
  .wrap { padding: 0 32px; }
  .hero-grid { grid-template-columns: 1.5fr 1fr; gap: 36px; }
  .hero-photo { max-width: 280px; order: 0; }
  .about-grid { grid-template-columns: 1fr; }
  .honors-grid { grid-template-columns: 1fr 1fr; }
  .edu-grid { grid-template-columns: repeat(3, 1fr); }
  .teaser { grid-template-columns: 1fr; padding: 40px 32px; }
}
@media (min-width: 601px) and (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 240px; justify-self: start; }
  .honors-grid, .edu-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero { padding: 32px 0 40px; }
  .hero-photo { justify-self: start; max-width: 200px; }
  .pub-list li { font-size: 15px; grid-template-columns: 24px 1fr; gap: 10px; }
  .motto { padding: 14px 18px; }
}

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* Story video */
.story-video { margin: 28px 0; }
.story-video video { width: 100%; display: block; border-radius: 12px; background: #000; aspect-ratio: 16/9; }
.story-video figcaption { font-size: 13.5px; color: var(--ink-3); margin-top: 8px; text-align: center; }

/* Bookshelf */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.shelf-book { display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.shelf-cover { aspect-ratio: 2/3; border-radius: 4px 8px 8px 4px; overflow: hidden; box-shadow: 0 6px 16px rgba(0,0,0,.18), inset 3px 0 0 rgba(0,0,0,.12); background: var(--surface-2); }
.shelf-cover img { width: 100%; height: 100%; object-fit: cover; }
.shelf-art { width: 100%; height: 100%; padding: 10px 8px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: linear-gradient(160deg, var(--b1), var(--b2)); }
.shelf-art b { font-family: var(--font-serif); font-size: 14px; line-height: 1.15; }
.shelf-art span { font-size: 9.5px; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }
.shelf-meta h3 { font-family: var(--font-serif); font-size: 17px; font-weight: 600; margin: 8px 0 2px; }
.shelf-meta .by { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.shelf-meta p { font-size: 14px; color: var(--ink-2); margin: 0; line-height: 1.5; }
.shelf-meta .chip { font-size: 11px; padding: 2px 9px; }

.teaser-label { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #ffd2b3; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.teaser-books { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.teaser-books img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 3px 6px 6px 3px; box-shadow: 0 6px 14px rgba(0,0,0,.3); transition: transform .2s; }
.teaser-books:hover img { transform: translateY(-3px); }

.t-hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: center; }
.t-hero-photo { margin: 0; justify-self: end; width: 100%; max-width: 340px; }
.t-hero-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50% 50% 28px 28px; box-shadow: var(--shadow-lg); border: 6px solid var(--surface); }
@media (max-width: 800px) { .t-hero-grid { grid-template-columns: 1fr; gap: 28px; } .t-hero-photo { order: -1; justify-self: start; max-width: 200px; } }

.t-hero h1.t-title { font-size: clamp(30px, 4.4vw, 54px); line-height: 1.1; }
.t-hero h1.t-title span { display: block; }
@media (min-width: 601px) { .t-hero h1.t-title span { white-space: nowrap; } }

/* Recognition: two balanced cards */
.honors-grid { align-items: stretch; }
.honors-grid h3.sub { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

/* Travel board */
.board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.board-photo { margin: 0; }
.board-photo img { width: 100%; border-radius: 18px; box-shadow: var(--shadow-lg); }
@media (max-width: 800px) { .board-grid { grid-template-columns: 1fr; gap: 24px; } }
