/* Version 2: same content, built for easy reading.
   Clear sans-serif body text, serif headings, cards for projects,
   a timeline for research roles, and alternating section backgrounds. */

:root {
  --ink: #12252b;
  --text: #22343a;
  --muted: #5b6c71;
  --paper: #f7f5f0;
  --tint: #eef3f2;
  --card: #ffffff;
  --line: #dde3e1;
  --sea: #0f6470;
  --sea-soft: #e3efee;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --bar: 68px;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 12px); }
body { margin: 0; background: var(--paper); color: var(--text); font: 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 30; background: #fff; padding: 8px 14px; }
.skip:focus { top: 10px; }

/* Top bar: name in the middle, sections on both sides, current section highlighted */
.bar {
  position: sticky; top: 0; z-index: 20; min-height: var(--bar);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(20px, 3vw, 48px);
  padding: 10px clamp(18px, 4vw, 56px);
  background: rgba(247, 245, 240, .97); border-bottom: 1px solid var(--line);
}
.brand { font: 600 22px/1.1 var(--serif); color: var(--ink); text-decoration: none; white-space: nowrap; text-align: center; }
.bar nav { display: flex; align-items: center; justify-content: space-between; gap: clamp(12px, 2vw, 28px); font-size: 14px; }
.bar nav a { position: relative; text-decoration: none; white-space: nowrap; padding: 6px 0; color: var(--muted); transition: color .2s ease; }
.bar nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--sea); transform: scaleX(0); transition: transform .25s ease; }
.bar nav a:hover, .bar nav a.is-active { color: var(--ink); }
.bar nav a.is-active::after { transform: scaleX(1); }
.bar nav .nav-portfolio { background: var(--ink); color: #fff; padding: 8px 15px; border-radius: 999px; }
.bar nav .nav-portfolio::after { display: none; }
.bar nav .nav-portfolio:hover { background: var(--sea); color: #fff; }

/* Intro video */
.hero { position: relative; height: calc(100svh - var(--bar)); min-height: 460px; overflow: hidden; background: var(--ink); }
.hero-media { position: absolute; inset: 0; }
.clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 2s ease-in-out; }
.clip.is-on { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 60% 0 0; background: linear-gradient(transparent, rgba(5, 20, 25, .55)); pointer-events: none; }
.hero-text { position: absolute; z-index: 1; left: clamp(20px, 4vw, 56px); right: 20px; bottom: clamp(24px, 5vh, 48px); color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.hero h1 { margin: 0; font: 500 clamp(30px, 3.2vw, 44px)/1.1 var(--serif); }
.hero h1::after { content: ""; display: block; width: 44px; height: 1px; margin: 14px 0 12px; background: rgba(255, 255, 255, .8); }
.credentials { margin: 0; font-size: clamp(13px, 1.05vw, 15px); line-height: 1.7; letter-spacing: .02em; }
.scroll-cue { position: absolute; z-index: 1; left: 50%; bottom: 22px; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid rgba(255, 255, 255, .8); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* Sections */
.block { padding: clamp(64px, 9vw, 112px) 0; }
.block.tint { background: var(--tint); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }
.wrap.narrow { max-width: 760px; }
.eyebrow { margin: 0 0 6px; color: var(--sea); font-size: 13px; font-weight: 600; letter-spacing: .14em; }
h2 { margin: 0 0 32px; color: var(--ink); font: 500 clamp(32px, 4vw, 44px)/1.15 var(--serif); }
h3 { margin: 0; color: var(--ink); font: 600 20px/1.35 var(--serif); }
.sub { margin: 44px 0 14px; font-size: 20px; }

/* About */
.intro { margin: 0 0 20px; font-size: clamp(18px, 1.6vw, 20px); line-height: 1.75; color: var(--text); }
.reach-out { margin: 28px 0 24px; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--sea); border-radius: var(--radius); font-size: 17px; }
.reach-out .email { font-weight: 700; color: var(--ink); }

/* Chips for interests and skills */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 6px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; font-size: 14.5px; color: var(--ink); }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); box-shadow: 0 1px 2px rgba(18, 37, 43, .04), 0 8px 24px rgba(18, 37, 43, .05); }
.cards { display: grid; gap: 24px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; color: var(--muted); font-size: 13.5px; font-weight: 600; letter-spacing: .02em; }
.meta span + span::before { content: "•"; margin-right: 18px; color: var(--line); }
.badge { display: inline-block; margin: 14px 0 0; padding: 5px 12px; background: var(--sea-soft); color: var(--sea); border-radius: 999px; font-size: 13.5px; font-weight: 600; }
.body { margin: 16px 0 0; max-width: 62ch; }
.org { margin: 4px 0 0; color: var(--muted); font-size: 16px; }
.people { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.6; }
.people p { margin: 0; }
.orgs { color: var(--muted); font-size: 13px; }
sup { font-size: .7em; line-height: 0; }

/* Abstract opens as a note below */
.abstract { margin-top: 16px; }
.abstract summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; color: var(--sea); font-size: 15px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.abstract summary::-webkit-details-marker { display: none; }
.abstract summary::after { content: "+"; font-size: 18px; line-height: 1; text-decoration: none; }
.abstract[open] summary::after { content: "−"; }
.note { margin-top: 12px; padding: 18px 20px; background: var(--paper); border-left: 3px solid var(--ink); border-radius: 0 var(--radius) var(--radius) 0; font-size: 15.5px; line-height: 1.75; }
.note p { margin: 0; }
.abstract[open] .note { animation: open .28s ease; }
@keyframes open { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }

/* Research timeline */
.timeline { position: relative; margin: 0; padding: 0 0 0 34px; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.stop { position: relative; padding-bottom: 48px; }
.stop:last-child { padding-bottom: 0; }
.stop::before { content: ""; position: absolute; left: -34px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 3px solid var(--sea); }
.points { margin: 14px 0 0; padding: 0 0 0 20px; max-width: 66ch; }
.points li { margin-top: 8px; padding-left: 4px; }
.points li::marker { color: var(--sea); }
.shots { display: flex; gap: 14px; margin-top: 20px; }
.shots a { display: block; width: 210px; padding: 5px; background: #fff; border-radius: 6px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 6px 16px rgba(0, 0, 0, .08); transition: transform .25s ease; }
.shots a:hover { transform: translateY(-3px); }
.shots img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; }
.shots img.focus-low { object-position: 50% 62%; }

/* Education and activities */
.schools, .two-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.school .org { font-size: 16px; }
.list-label { margin: 0 0 4px; font: 700 13px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--sea); }
.two-cards .points { margin-top: 6px; }

/* Footer */
.foot { background: var(--ink); color: #fff; padding: clamp(56px, 8vw, 96px) 0 32px; }
.foot h2 { color: #fff; margin-bottom: 20px; }
.links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.links a { text-underline-offset: 5px; }
.copy { margin: 48px 0 0; color: #a9b8ba; font-size: 13px; }

/* Gentle fade-in as sections arrive (only when JavaScript runs) */
.reveal-ready .card, .reveal-ready .stop, .reveal-ready .intro, .reveal-ready .reach-out { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal-ready .is-seen { opacity: 1 !important; transform: none !important; }

@media (max-width: 860px) {
  :root { --bar: 118px; }
  .bar { grid-template-columns: 1fr; grid-template-areas: "brand" "left" "right"; gap: 6px; padding: 10px 18px 8px; }
  .brand { grid-area: brand; font-size: 21px; }
  .nav-left { grid-area: left; }
  .nav-right { grid-area: right; }
  .bar nav { min-width: 0; gap: 8px; font-size: 13px; }
  .bar nav a { padding: 3px 0; }
  .bar nav .nav-portfolio { padding: 4px 12px; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .meta { flex-direction: column; gap: 2px; }
  .meta span + span::before { content: none; }
  .meta span + span { font-weight: 500; }
  .schools, .two-cards { grid-template-columns: 1fr; }
  .timeline { padding-left: 26px; }
  .stop::before { left: -26px; width: 14px; height: 14px; }
  .timeline::before { left: 6px; }
  .shots { gap: 10px; }
  .shots a { width: calc(50% - 5px); padding: 4px; }
  .credentials { font-size: 13px; }
  .scroll-cue { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue span, .abstract[open] .note { animation: none; }
  .shots a { transition: none; }
  .reveal-ready .card, .reveal-ready .stop, .reveal-ready .intro, .reveal-ready .reach-out { opacity: 1; transform: none; transition: none; }
}
