/* ================================================================
   Design system — "the darkened spectroscopy lab"
   Dark is the native theme (fluorescence lives in the dark);
   [data-theme="light"] is the daylight-lab override. Every color
   used below must exist in both blocks.
   ================================================================ */
:root {
  --bg: #070b14;
  --surface: #0e1526;
  --surface-2: #121a2e;
  --emission: #3ce88f;
  --emission-soft: rgba(60, 232, 143, 0.12);
  --emission-line: rgba(60, 232, 143, 0.35);
  --excitation: #7c6cf0;
  --excitation-soft: rgba(124, 108, 240, 0.12);
  --text: #e6ecf5;
  --muted: #8ea3b8;
  --hairline: rgba(142, 163, 184, 0.16);
  --hairline-soft: rgba(142, 163, 184, 0.08);
  --emission-soft-2: rgba(60, 232, 143, 0.18);
  --emission-glow: rgba(60, 232, 143, 0.35);
  --nav-bg: rgba(7, 11, 20, 0.85);
  --nav-bg-solid: rgba(7, 11, 20, 0.97);
  --btn-solid-text: #06281a;
  --card-shadow: 0 14px 44px rgba(0, 0, 0, 0.45);
  --display: 'Spectral', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme="light"] {
  --bg: #f5f7f6;
  --surface: #ffffff;
  --surface-2: #eef1f0;
  --emission: #0a724e;
  --emission-soft: rgba(10, 114, 78, 0.1);
  --emission-line: rgba(10, 114, 78, 0.4);
  --emission-soft-2: rgba(10, 114, 78, 0.16);
  --emission-glow: rgba(10, 114, 78, 0.3);
  --excitation: #6553e8;
  --excitation-soft: rgba(101, 83, 232, 0.1);
  --text: #1a2422;
  --muted: #526661;
  --hairline: rgba(26, 36, 34, 0.18);
  --hairline-soft: rgba(26, 36, 34, 0.09);
  --nav-bg: rgba(245, 247, 246, 0.85);
  --nav-bg-solid: rgba(245, 247, 246, 0.98);
  --btn-solid-text: #ffffff;
  --card-shadow: 0 14px 44px rgba(26, 36, 34, 0.12);
}

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

html {
  scroll-padding-top: 80px;
}

body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

::selection {
  background: var(--emission);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--emission);
  outline-offset: 2px;
}

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

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ================================================================
   Navbar
   ================================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--hairline-soft);
  padding: 12px 0;
}

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-logo {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.nav-logo span { color: var(--emission); }

.nav-links {
  display: flex;
  gap: 26px;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--emission);
  transition: width 0.3s var(--ease);
}

.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--emission); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.theme-toggle {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  color: var(--emission);
  border-color: var(--emission);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* sun shown in dark mode ("switch to light"), moon in light mode */
.theme-toggle .moon-icon,
[data-theme="light"] .theme-toggle .sun-icon {
  display: none;
}

[data-theme="light"] .theme-toggle .moon-icon {
  display: block;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ================================================================
   Hero
   ================================================================ */
.hero.hidden { display: none; }

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  /* bottom padding tracks the spectra SVG, whose height is ~14.2vw (170/1200 of full width) */
  padding: 120px 0 max(160px, 17vw);
  overflow: hidden;
  background: var(--bg);
}

#mol-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  align-items: center;
}

.hero-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

.jablonski {
  width: 100%;
  max-width: 300px;
}

.jablonski-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.jablonski-grid .jablonski {
  max-width: none;
}

.jablonski video {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--hairline-soft);
  background: #070b14;
}

.jablonski figcaption {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
}

.photo-frame {
  position: relative;
  width: 270px;
  height: 270px;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--emission-line);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--emission);
  background: var(--emission-soft);
  border: 1px solid var(--emission-line);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 26px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emission);
  position: relative;
}

.hero-badge .dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--emission);
  animation: pulse-ring 2.2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.8rem, 7vw, 4.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.hero-sub {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--emission);
  margin-bottom: 22px;
}

.hero-desc {
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 34px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-solid,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 12px 26px;
  border-radius: 6px;
  text-decoration: none;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s ease, color 0.3s ease;
}

.btn-solid {
  background: var(--emission);
  color: var(--btn-solid-text);
}

.btn-solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--emission-glow);
}

.btn-ghost {
  border: 1px solid var(--hairline);
  color: var(--text);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--emission-line);
  color: var(--emission);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 44px;
  margin-top: 46px;
  padding-top: 30px;
  border-top: 1px solid var(--hairline-soft);
}

.stat .stat-num {
  font-family: var(--mono);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: normal;
  color: var(--emission);
}

.stat p {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Signature: absorption/emission spectra at the hero's lower edge */
.spectra {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
  z-index: 1;
}

/* ================================================================
   Sections (page-switching)
   ================================================================ */
main > section {
  display: none;
  /* top padding clears the fixed navbar since sections open at scroll 0 */
  padding: 150px 0 100px;
}

main > section.current {
  display: block;
  animation: page-in 0.5s var(--ease) both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--emission);
  margin-bottom: 14px;
}

.section-label::before {
  content: '';
  width: 34px;
  height: 1px;
  background: var(--emission);
}

.section-title {
  font-family: var(--display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 16px;
  text-wrap: balance;
}

.section-desc {
  color: var(--muted);
  max-width: 62ch;
}

/* ================================================================
   About
   ================================================================ */
.about-text {
  margin-top: 28px;
  max-width: 68ch;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 16px;
}

.about-text em {
  color: var(--text);
  font-style: italic;
}

.interests-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.interest-tag {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--emission);
  background: var(--emission-soft);
  border: 1px solid var(--emission-line);
  border-radius: 999px;
  padding: 6px 15px;
  transition: transform 0.25s var(--ease), background 0.25s ease;
}

.interest-tag:hover {
  transform: translateY(-2px);
  background: var(--emission-soft-2);
}

/* ================================================================
   Cards (research + skills)
   ================================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
  margin-top: 44px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: 10px;
  padding: 30px;
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s ease, box-shadow 0.35s var(--ease);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--emission), var(--excitation), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--emission-line);
  box-shadow: var(--card-shadow);
}

.card:hover::before { opacity: 1; }

.card-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--emission-soft);
  color: var(--emission);
  margin-bottom: 18px;
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.card > p {
  font-size: 0.92rem;
  color: var(--muted);
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chips li {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px 11px;
}

/* Expandable writeups inside research cards */
.card details {
  margin-top: 16px;
  border-top: 1px solid var(--hairline-soft);
  padding-top: 12px;
}

.card summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--emission);
}

.card summary::-webkit-details-marker { display: none; }

.card summary::after {
  content: '+';
  font-family: var(--mono);
  font-size: 1rem;
  transition: transform 0.25s var(--ease);
}

.card details[open] summary::after { transform: rotate(45deg); }

.card details p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 12px;
}

.card figure {
  border: 1px solid var(--hairline-soft);
  border-radius: 8px;
  padding: 16px 12px 12px;
  text-align: center;
  margin-top: 14px;
}

.card figure svg {
  width: 100%;
  height: auto;
  display: block;
}

.card figure .fig-label {
  font-family: var(--mono);
  font-size: 9px;
  fill: var(--muted);
}

.card figcaption {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

/* ================================================================
   Timeline (education)
   ================================================================ */
.timeline {
  list-style: none;
  margin-top: 44px;
  border-left: 1px solid var(--hairline);
  margin-left: 6px;
}

.timeline li {
  position: relative;
  padding: 0 0 42px 32px;
}

.timeline li:last-child { padding-bottom: 4px; }

.timeline li::before {
  content: '';
  position: absolute;
  left: -5.5px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emission);
  box-shadow: 0 0 12px var(--emission-glow);
}

.tl-date {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emission);
  margin-bottom: 6px;
}

.timeline h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
}

.timeline h4 {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  margin: 2px 0 8px;
}

.timeline p {
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 62ch;
}

/* ================================================================
   Publications
   ================================================================ */
.pub-list {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
}

.pub-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 26px 0;
  border-top: 1px solid var(--hairline-soft);
}

.pub-item:last-child { border-bottom: 1px solid var(--hairline-soft); }

.pub-number {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--emission);
  padding-top: 3px;
}

.pub-item h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 6px;
  text-wrap: balance;
}

.pub-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.pub-meta b i { color: var(--text); }

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--emission);
  text-decoration: none;
}

.pub-link:hover { text-decoration: underline; }

/* ================================================================
   Conferences
   ================================================================ */
.conf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin-top: 44px;
}

.conf-card {
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: 10px;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.35s var(--ease), border-color 0.35s ease;
}

.conf-card:hover {
  transform: translateY(-4px);
  border-color: var(--emission-line);
}

.conf-date {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emission);
}

.conf-card h3 {
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.4;
}

.conf-card p {
  font-size: 0.86rem;
  color: var(--muted);
}

.conf-type {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px 12px;
  margin-top: 6px;
}

.conf-type.contributed {
  color: var(--emission);
  border-color: var(--emission-line);
}

/* Sub-groups within a section (Talks / Posters / Participation) */
.group-heading {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--hairline-soft);
  padding-top: 26px;
  margin-top: 54px;
}

.group-heading + .conf-grid { margin-top: 24px; }

.empty-note {
  color: var(--muted);
  font-style: italic;
  font-size: 0.9rem;
  margin-top: 14px;
}

/* ================================================================
   Books — a .conf-card with the cover in a left column
   ================================================================ */
/* :has() so a card whose cover is missing falls back to the plain stacked card */
.book-card:has(img) {
  flex-direction: row;
  gap: 20px;
  align-items: flex-start;
}

.book-card img {
  width: 92px;
  flex-shrink: 0;
  border-radius: 4px;
  border: 1px solid var(--hairline-soft);
  /* hinges on the spine, so hover opens the cover toward the reader and it fluoresces */
  transform-origin: left center;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), filter 0.5s ease;
}

.book-card:hover img {
  transform: perspective(600px) rotateY(-24deg) scale(1.05);
  box-shadow: 16px 14px 30px rgba(0, 0, 0, 0.5), 0 0 24px 4px var(--emission-glow);
  filter: saturate(1.2) brightness(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .book-card img,
  .book-card:hover img {
    transition: none;
    transform: none;
  }
}

/* Reading progress — native <progress>, so it needs the vendor track/value pseudos */
/* outranks the .conf-card p font-size/color it inherits from the card pattern */
.book-card .book-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--emission);
}

.book-progress progress {
  -webkit-appearance: none;
  appearance: none;
  width: 110px;
  height: 5px;
  border: none;
  border-radius: 999px;
  background: var(--hairline);
}

.book-progress progress::-webkit-progress-bar {
  background: var(--hairline);
  border-radius: 999px;
}

.book-progress progress::-webkit-progress-value {
  background: var(--emission);
  border-radius: 999px;
  box-shadow: 0 0 8px var(--emission-glow);
}

.book-progress progress::-moz-progress-bar {
  background: var(--emission);
  border-radius: 999px;
}

.book-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ================================================================
   Contact
   ================================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 44px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: 10px;
  padding: 24px;
}

.contact-item .card-icon {
  margin-bottom: 0;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
}

.contact-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.contact-item p {
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.contact-item a {
  color: var(--emission);
  text-decoration: none;
}

.contact-item a:hover { text-decoration: underline; }

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.social-row a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--hairline-soft);
  border-radius: 8px;
  padding: 11px 20px;
  transition: transform 0.3s var(--ease), border-color 0.3s ease, color 0.3s ease;
}

.social-row a:hover {
  transform: translateY(-2px);
  border-color: var(--emission-line);
  color: var(--emission);
}

.social-row svg {
  width: 17px;
  height: 17px;
}

/* ================================================================
   Footer + scroll-top
   ================================================================ */
footer {
  border-top: 1px solid var(--hairline-soft);
  padding: 34px 0;
}

footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

footer p {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover { color: var(--emission); }

.scroll-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--emission-line);
  background: var(--surface);
  color: var(--emission);
  font-family: var(--mono);
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}

.scroll-top.show {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover { transform: translateY(-3px); }

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 860px) {
  .nav-links {
    /* absolute inside the fixed navbar, so it always sits flush under it */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--nav-bg-solid);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--hairline-soft);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease);
  }

  .nav-links.open { max-height: 560px; }

  .nav-links a {
    padding: 14px 24px;
    border-bottom: 1px solid var(--hairline-soft);
  }

  .nav-links a::after { display: none; }

  .hamburger { display: flex; }

  .hero { padding: 110px 0 max(120px, 17vw); }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-photo { align-items: flex-start; }

  .jablonski figcaption { text-align: left; }

  .photo-frame {
    width: 200px;
    height: 200px;
  }

  .hero-stats { gap: 28px; }

  main > section { padding: 120px 0 72px; }
}

/* ================================================================
   Reduced motion
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }
}
