/* ==========================================================================
   Danny Muzata — Field Notebook design system
   Concept: the contour line of a fitness landscape as structural motif;
   genome-browser precision (mono, coordinates, specimen tags) meets an
   editorial scientific-journal hand (serif headings, real bibliography).
   ========================================================================== */

:root {
  --paper: #f5fafd;
  --paper-raised: #ffffff;
  --paper-sunken: #e7f2fb;
  --ink: #00204d;
  --ink-soft: #3d5573;
  --ink-faint: #74889f;
  --line: #d3e3f0;
  --line-strong: #a9c3dc;

  --azure: #026fc2;
  --azure-deep: #014a8a;
  --azure-wash: rgba(2, 111, 194, 0.08);
  --azure-wash-strong: rgba(2, 111, 194, 0.16);

  --amber: #d06d0c;
  --amber-wash: rgba(208, 109, 12, 0.1);

  --seq-blue: #4a7fb0;
  --seq-blue-wash: rgba(74, 127, 176, 0.08);

  --shadow: 0 1px 2px rgba(0, 32, 77, 0.05);

  --font-display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

body.dark {
  --paper: #061529;
  --paper-raised: #0b2038;
  --paper-sunken: #04101f;
  --ink: #eaf3fc;
  --ink-soft: #a9c3dc;
  --ink-faint: #6f89a6;
  --line: #16324f;
  --line-strong: #234563;

  --azure: #5aa8e8;
  --azure-deep: #8cc4f2;
  --azure-wash: rgba(90, 168, 232, 0.14);
  --azure-wash-strong: rgba(90, 168, 232, 0.22);

  --amber: #f5a445;
  --amber-wash: rgba(245, 164, 69, 0.14);

  --seq-blue: #7fb2df;
  --seq-blue-wash: rgba(127, 178, 223, 0.12);

  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ---------- reset & base ---------- */

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  margin: 0;
  line-height: 1.65;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  transition: background 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; }

::selection { background: var(--azure-wash-strong); color: var(--ink); }

a { color: var(--seq-blue); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  text-wrap: balance;
  color: var(--ink);
  letter-spacing: -0.01em;
}

em, i { font-style: italic; }

/* mono "eyebrow" label used throughout as section/field labels */
.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--azure);
}

/* ---------- nav (ruler bar) ---------- */

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 24px;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1000;
  /* nav sits above the quotes rail (which starts at top: 54px), so it never
     overlaps it — reclaim the width body reserves for the rail below it */
  margin-right: calc(-1 * (var(--quotes-w, 0px) + var(--quotes-inset, 0px) + 8px));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  overflow-x: auto;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-links::-webkit-scrollbar { display: none; }

nav a {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

nav a:hover {
  color: var(--azure);
  border-bottom-color: var(--azure);
}

.nav-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  line-height: 0;
}
.nav-brand img { height: 30px; width: auto; display: block; }

.nav-social {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.nav-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: var(--ink-faint);
  font-size: 0.92rem;
  border-bottom: none;
  padding-bottom: 0;
  transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}
.nav-social a:hover { transform: translateY(-2px); opacity: 0.8; }
.nav-social a img { width: 22px; height: 22px; object-fit: contain; display: block; }
.nav-social a img.icon-orcid { width: 26px; height: 26px; }
.nav-social a.icon-fa {
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.86rem;
}
.nav-social a.icon-fa:hover { color: var(--azure); border-color: var(--azure); }

.nav-search { position: relative; flex: 0 0 auto; display: flex; align-items: center; }

#searchToggle {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 28px;
  height: 28px;
  color: var(--azure);
  cursor: pointer;
  display: grid;
  place-items: center;
}
#searchToggle:hover { border-color: var(--azure); }

.search-form {
  position: absolute;
  top: 36px;
  right: 0;
  width: 240px;
  z-index: 50;
}
.search-form[hidden] { display: none; }

.search-form input {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--paper-raised);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(0, 32, 77, 0.12);
}
.search-form input:focus { outline: none; border-color: var(--azure); }

.search-hit { outline: 2px solid var(--amber); outline-offset: 4px; border-radius: 2px; }

/* ---------- section rhythm ---------- */

section {
  max-width: 1400px;
  margin: auto;
  padding: 44px 24px;
}

section > h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0.35rem 0 1.6rem;
}

/* contour-line divider, the recurring motif */
.contour {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  color: var(--line-strong);
  opacity: 0.7;
}

.contour svg {
  display: block;
  width: 100%;
  height: 30px;
}

.contour path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}

/* ---------- generic card / specimen index-card ---------- */

.card {
  background: var(--paper-raised);
  color: var(--ink);
  padding: 28px;
  border-radius: 3px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.card a { color: var(--seq-blue); text-decoration: none; border-bottom: 1px solid var(--seq-blue-wash); }
.card a:hover { border-bottom-color: var(--seq-blue); }

/* justified long-form prose, hyphenated for clean rag on narrow columns */
.card p,
.hero-tagline,
.lab-content p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}
.card p:last-child { margin-bottom: 0; }

.card,
.publication-item,
.teaching-item,
.hero,
nav {
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* research interests */
.interest-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.interest-list li {
  padding: 11px 0 11px 22px;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-size: 0.96rem;
}

.interest-list li::before {
  content: "\2022";
  position: absolute;
  left: 4px;
  color: var(--azure);
  font-weight: 700;
}

/* ---------- core-sample timeline ---------- */

.timeline {
  border-left: 1px solid var(--line-strong);
  padding-left: 24px;
  position: relative;
}

.timeline div {
  margin-bottom: 26px;
  position: relative;
}

.timeline div::before {
  content: "";
  position: absolute;
  left: -28.5px;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--azure);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--azure);
}

.timeline b { font-family: var(--font-mono); font-weight: 600; font-size: 0.92rem; letter-spacing: 0.01em; }

.section-subtitle {
  font-family: var(--font-mono);
  color: var(--ink-soft);
  margin-bottom: 34px;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* ---------- experience / teaching list ---------- */

.teaching-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.teaching-item {
  display: flex;
  gap: 28px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 22px 24px;
}

.teaching-date {
  min-width: 150px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--azure);
  padding-top: 2px;
}

.teaching-content h3 { margin: 0 0 4px 0; font-size: 1.04rem; color: var(--ink); font-family: var(--font-display); }
.teaching-content p { margin: 0 0 12px 0; color: var(--ink-soft); font-size: 0.94rem; }
.teaching-content ul.content-list { margin: 0; }

@media (max-width: 768px) {
  .teaching-item { flex-direction: column; gap: 10px; }
  .teaching-date { min-width: auto; }
}

/* ---------- publications: real bibliography ---------- */

.pub-metrics {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.publication-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: pub;
  border-top: 1px solid var(--line);
}

.publication-item {
  border-bottom: 1px solid var(--line);
  padding: 26px 0 26px 44px;
  position: relative;
  counter-increment: pub;
}

.publication-item::before {
  content: counter(pub, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 27px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.publication-item h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
}

.pub-authors { color: var(--ink-soft); margin-bottom: 6px; font-size: 0.94rem; }
.pub-venue { font-family: var(--font-mono); color: var(--ink-faint); margin-bottom: 14px; font-size: 0.82rem; }
.pub-venue em { font-family: var(--font-display); font-style: italic; }
.pub-summary { color: var(--ink-soft); line-height: 1.7; margin-bottom: 14px; }

.pub-link { color: var(--seq-blue); text-decoration: none; font-weight: 500; font-size: 0.92rem; border-bottom: 1px solid var(--seq-blue-wash); }
.pub-link:hover { border-bottom-color: var(--seq-blue); }

.pub-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border-radius: 2px;
  margin-left: 0.5rem;
  vertical-align: middle;
  border: 1px solid transparent;
}
.pub-status.published { color: var(--azure); border-color: var(--azure-wash-strong); background: var(--azure-wash); }
.pub-status.preprint { color: var(--amber); border-color: var(--amber-wash); background: var(--amber-wash); }
.pub-status.review { color: var(--seq-blue); border-color: var(--seq-blue-wash); background: var(--seq-blue-wash); }
.pub-status.chapter { color: var(--ink-soft); border-color: var(--line); background: var(--paper-sunken); }

body.dark .hero-badges span {
  background: var(--azure-wash);
  border: 1px solid var(--azure-wash-strong);
  color: var(--ink);
}

/* ---------- research visualization ---------- */

.research-demo { margin-top: 56px; }

.research-demo h3 { font-size: 1.3rem; color: var(--ink); margin-bottom: 10px; }

.demo-subtitle {
  color: var(--ink-soft);
  max-width: 680px;
  line-height: 1.7;
  margin: 0 0 20px;
}

.demo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  font-family: var(--font-mono);
}

.demo-tags span {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  padding: 5px 11px;
  border-radius: 2px;
  font-size: 0.76rem;
  color: var(--ink-soft);
}

canvas {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0;
  border-radius: 3px;
  border: 1px solid var(--line);
}

/* ---------- contact maps ---------- */

.maps-grid {
  max-width: 1400px;
  margin: 1.4rem auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.map-card { background: var(--paper-raised); }

.map-card figcaption {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.map-logo { width: 22px; height: 22px; object-fit: contain; flex: 0 0 auto; }

.map-card iframe {
  display: block;
  width: 100%;
  height: 260px;
  border: 0;
}

@media (max-width: 680px) {
  .maps-grid { grid-template-columns: 1fr; }
}

/* ---------- resume tabs ---------- */

.resume-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.8rem;
}

.resume-tab {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 4px;
  margin-right: 18px;
  cursor: pointer;
  white-space: nowrap;
}
.resume-tab:hover { color: var(--azure); }
.resume-tab.active { color: var(--azure); border-bottom-color: var(--azure); }

.resume-panel[hidden] { display: none; }

.references-list { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.reference-item { display: flex; gap: 1rem; align-items: center; padding: 1.1rem 1.3rem; background: var(--paper-raised); }
.reference-item img { width: 56px; height: 56px; border-radius: 999px; object-fit: cover; border: 1px solid var(--line-strong); flex: 0 0 auto; }
.reference-item h3 { margin: 0 0 0.15rem; font-size: 0.98rem; }
.reference-role { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--azure); margin: 0 0 0.3rem; }
.reference-item p:last-child { margin: 0; font-size: 0.86rem; color: var(--ink-soft); }

@media (max-width: 560px) {
  .reference-item { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 700px) {
  .resume-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .resume-tab { margin-right: 14px; }
}

/* ---------- footer ---------- */

footer {
  text-align: center;
  padding: 40px 20px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
}

.footer-signature { display: block; height: 48px; width: auto; margin: 0 auto 10px; opacity: 0.85; }

/* ---------- masthead hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  padding: 64px 40px 56px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 56px;
  width: 100%;
}

.hero-left { flex: 0 1 auto; max-width: 620px; }

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  line-height: 1;
}

.subtitle {
  font-family: var(--font-mono);
  color: var(--azure);
  font-weight: 500;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.affiliation {
  color: var(--ink-soft);
  margin-top: 8px;
  font-size: 0.95rem;
}

.hero-tagline {
  margin-top: 18px;
  color: var(--ink-soft);
  line-height: 1.75;
  font-size: 1.06rem;
  max-width: 58ch;
}

.hero-badges { margin-top: 18px; }

/* links row: mono, ruler-tick separated */
.icon-row {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.icon-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  color: var(--ink-soft);
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.icon-row a:hover {
  color: var(--azure);
  border-color: var(--azure);
  transform: translateY(-2px);
}

.icon-row a span { display: none; }
.icon-row a img { width: 20px; height: 20px; object-fit: contain; display: block; }
.icon-row a.icon-svg svg { display: block; }

.hero-buttons { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }

.hero-btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 2px;
  background: var(--azure);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--azure);
  transition: 0.2s ease;
}

.hero-btn:hover { background: var(--azure-deep); border-color: var(--azure-deep); }

/* portrait: framed, editorial, right-aligned against the hero column */
.hero-right { flex: 0 1 190px; min-width: 0; }

.profile-wrapper {
  padding: 0;
  background: none;
  width: 100%;
  max-width: 190px;
  position: relative;
}

.profile-wrapper img {
  width: 100%;
  aspect-ratio: 190 / 230;
  height: auto;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 14px 32px rgba(0, 32, 77, 0.14);
  object-fit: cover;
  object-position: top center;
  display: block;
}

.profile-wrapper .plate-label {
  display: block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
}

.profile-wrapper .plate-label small {
  display: block;
  margin-top: 3px;
  font-size: 0.62rem;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
}

@media (max-width: 768px) {
  .hero { text-align: left; padding: 48px 20px 36px; }
  .hero-top { flex-direction: column-reverse; }
  .hero-left, .hero-right { flex: 100%; max-width: 100%; }
  .hero-right { align-self: flex-start; }
  .profile-wrapper { width: 180px; }
  .profile-wrapper img { width: 180px; height: 220px; }
  .interest-list { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.4rem; }
  .hero-tagline { font-size: 0.96rem; }
  nav { padding: 10px 14px; gap: 10px; }
  .nav-social { display: none; }
  section { padding: 32px 18px; }
  .card { padding: 20px; }
  .publication-item { padding-left: 36px; }
}

/* ---------- research highlights: crossfade, one at a time ---------- */

.highlights-fade {
  position: relative;
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-raised);
  overflow: hidden;
}

.highlight-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 1.8rem;
  padding: 1.8rem 2rem;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  animation: highlight-fade var(--rh-cycle, 56s) ease-in-out infinite;
}

.highlight-slide-image {
  flex: 0 0 auto;
  width: 170px;
  height: 170px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--paper-sunken);
  border: 1px solid var(--line-strong);
}
.highlight-slide-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.highlight-slide-body { min-width: 0; }
.highlight-slide-body h3 { margin: 0 0 0.4rem; font-size: 1.15rem; font-family: var(--font-display); }
.highlight-slide-body p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); line-height: 1.6; text-align: left; }

.work-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--azure);
  margin-bottom: 0.5rem;
}

@keyframes highlight-fade {
  0%   { opacity: 0; }
  3%   { opacity: 1; }
  9%   { opacity: 1; }
  12.5% { opacity: 0; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .highlight-slide { animation: none; opacity: 0; position: static; display: none; }
  .highlight-slide--first { opacity: 1; display: flex; }
}

@media (max-width: 640px) {
  .highlights-fade { min-height: 320px; }
  .highlight-slide { flex-direction: column; align-items: flex-start; gap: 0.9rem; padding: 1.3rem; }
  .highlight-slide-image { width: 100%; height: 170px; }
}

/* ---------- quotes rail: fixed vertical panel, always visible, width scales down on narrow screens ---------- */

:root { --quotes-w: 300px; --quotes-inset: 16px; }

.quotes-rail {
  display: block;
  position: fixed;
  top: 54px;
  right: var(--quotes-inset);
  width: var(--quotes-w);
  height: calc(100vh - 54px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: none;
  box-shadow: -8px 0 20px rgba(0, 32, 77, 0.06);
  background: var(--paper-sunken);
  z-index: 500;
}

body { padding-right: calc(var(--quotes-w) + var(--quotes-inset) + 8px); }

.quotes-rail-track {
  display: flex;
  flex-direction: column;
  animation: quotes-rail-up 130s linear infinite;
}

.quotes-rail-track:hover { animation-play-state: paused; }

.quotes-rail .quote-card {
  box-sizing: border-box;
  min-height: calc((100vh - 54px) / 3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.3rem 1.6rem;
  border-bottom: 1px solid var(--line);
}

.quote-photo {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  margin-bottom: 0.9rem;
}

.quote-card blockquote {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.94rem;
  line-height: 1.4;
  color: var(--ink);
}

.quote-card cite {
  display: block;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--azure);
  line-height: 1.4;
}

@keyframes quotes-rail-up {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .quotes-rail-track { animation: none; overflow-y: auto; height: 100%; }
}

/* narrower screens: the rail shrinks instead of disappearing */
@media (max-width: 1100px) {
  :root { --quotes-w: 190px; }
  .quotes-rail .quote-card { padding: 1rem 1.1rem; }
  .quote-photo { width: 56px; height: 56px; }
  .quote-card blockquote { font-size: 0.8rem; }
}

@media (max-width: 760px) {
  :root { --quotes-w: 124px; }
  .quotes-rail .quote-card { padding: 0.8rem 0.7rem; }
  .quote-photo { width: 44px; height: 44px; margin-bottom: 0.5rem; }
  .quote-card blockquote {
    font-size: 0.7rem;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .quote-card cite { font-size: 0.52rem; }
}

@media (max-width: 480px) {
  :root { --quotes-w: 74px; }
  .quotes-rail .quote-card { padding: 0.9rem 0.4rem 0.5rem; justify-content: flex-start; }
  .quote-photo { margin-bottom: 0; }
  .quote-card blockquote, .quote-card cite { display: none; }
}

/* ==========================================================================
   Homepage-specific components (indexed featured cards, grids, labs, skills)
   ========================================================================== */

.section-intro {
  max-width: 62ch;
  margin: -0.5rem 0 1.75rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

.hero-buttons a.hero-btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.hero-buttons a.hero-btn-secondary:hover { border-color: var(--azure); color: var(--azure); }

.highlights-grid,
.featured-projects,
.expertise-grid,
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.labs-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.highlight-card,
.featured-project-card,
.expertise-item,
.skill-card {
  background: var(--paper-raised);
  padding: 1.4rem 1.5rem;
  position: relative;
}

.highlight-card h3, .featured-project-card h3 { margin: 0 0 0.5rem; font-size: 1.08rem; }
.highlight-card p, .featured-project-card p, .lab-feature p, .skill-card p { line-height: 1.65; color: var(--ink-soft); font-size: 0.95rem; }

.highlight-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--azure);
  display: block;
  margin-bottom: 0.65rem;
}

.project-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.project-acronym { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }

.project-badge {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  color: var(--azure);
  background: var(--azure-wash);
  border: 1px solid var(--azure-wash-strong);
  white-space: nowrap;
}
.project-badge.status-preprint { color: var(--amber); background: var(--amber-wash); border-color: var(--amber-wash); }
.project-badge.status-ongoing { color: var(--seq-blue); background: var(--seq-blue-wash); border-color: var(--seq-blue-wash); }

.project-meta { font-family: var(--font-mono); color: var(--ink-faint); font-size: 0.78rem; margin-bottom: 0.7rem; }

.project-actions, .lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.project-actions a, .lab-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  border-radius: 2px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.project-actions a:first-child, .lab-actions a:first-child {
  background: var(--azure);
  color: var(--paper);
  border-color: var(--azure);
}
.project-actions a:hover, .lab-actions a:hover { border-color: var(--azure); }

.expertise-item, .skill-card { min-height: 130px; }

.expertise-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--seq-blue);
  margin-bottom: 0.6rem;
}

.expertise-item h3, .skill-card h3 { margin: 0 0 0.4rem; font-size: 1rem; font-family: var(--font-display); }
.expertise-item p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.55; }

.skill-card ul { margin: 0.5rem 0 0; padding-left: 1.05rem; color: var(--ink-soft); font-size: 0.87rem; line-height: 1.65; }

.lab-feature {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr);
  gap: 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.lab-mark {
  min-height: 150px;
  background: var(--paper-sunken);
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.lab-mark img { width: 100%; height: 100%; min-height: 150px; object-fit: cover; display: block; }

.lab-content { background: var(--paper-raised); padding: 1.4rem 1.5rem; }
.lab-subtitle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--azure);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: -0.4rem 0 0.8rem;
}
.lab-content h3 { margin-top: 0; font-size: 1.05rem; }

.awards-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.award-item {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.award-item i { display: none; }
.award-item h3 { margin: 0; font-size: 0.98rem; font-family: var(--font-display); flex: 0 0 auto; min-width: 260px; }
.award-item p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; font-family: var(--font-mono); }

.content-list { margin: 0.5rem 0 0; padding-left: 1.15rem; line-height: 1.75; }
.content-list li { margin-bottom: 0.25rem; }

.workshop-list {
  columns: 2;
  column-gap: 2.2rem;
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.9;
  font-size: 0.93rem;
  color: var(--ink-soft);
}

@media (max-width: 960px) {
  .highlights-grid, .featured-projects, .skills-grid, .expertise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .award-item { flex-direction: column; gap: 0.2rem; }
  .award-item h3 { min-width: 0; }
}

@media (max-width: 680px) {
  .highlights-grid, .featured-projects, .expertise-grid, .skills-grid, .lab-feature { grid-template-columns: 1fr; }
  .lab-mark { border-right: none; border-bottom: 1px solid var(--line); }
  .workshop-list { columns: 1; }
}

/* hero topic chips */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.hero-badges .venue-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  white-space: nowrap;
  height: 30px;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-soft);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.venue-chip > i:first-child { color: var(--azure); font-size: 0.68rem; }

/* research areas: 5 banner-derived pillar tiles */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 2.2rem;
}
.area-tile {
  background: var(--paper-raised);
  padding: 1.1rem 1rem 1.4rem;
  text-align: center;
}
.area-tile img { width: 72px; height: 72px; object-fit: contain; margin: 0 auto 0.8rem; display: block; }
.area-tile h3 { font-size: 0.92rem; margin: 0 0 0.4rem; font-family: var(--font-display); }
.area-tile p { margin: 0; font-size: 0.78rem; color: var(--ink-soft); line-height: 1.5; text-align: left; }

@media (max-width: 860px) {
  .areas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- hover treatments: a different, tasteful idea per component ---------- */
.highlight-slide-image img { transition: transform 0.3s ease; }
.highlight-slide:hover .highlight-slide-image img { transform: scale(1.06); }

@media (prefers-reduced-motion: no-preference) {
  /* area tiles: lift */
  .area-tile { transition: transform 0.25s ease, box-shadow 0.25s ease; }
  .area-tile:hover { transform: translateY(-6px); box-shadow: 0 10px 24px rgba(0, 32, 77, 0.14); }

  /* research figures: zoom into the media, frame stays put */
  .research-figure img,
  .research-figure canvas { transition: transform 0.4s ease; }
  .research-figure:hover img,
  .research-figure:hover canvas { transform: scale(1.05); }

  /* map cards: gentle scale + shadow */
  .map-card { transition: transform 0.25s ease, box-shadow 0.25s ease; }
  .map-card:hover { transform: scale(1.015); box-shadow: 0 10px 22px rgba(0, 32, 77, 0.12); }

  /* reference items: slide right */
  .reference-item { transition: transform 0.25s ease, background 0.25s ease; }
  .reference-item:hover { transform: translateX(6px); background: var(--azure-wash); }

  /* quote cards: lift + glow ring */
  .quote-card { transition: transform 0.3s ease, box-shadow 0.3s ease; }
  .quote-card:hover { transform: translateY(-4px); box-shadow: 0 0 0 3px var(--azure-wash), 0 8px 20px rgba(0, 32, 77, 0.18); }
}

/* publication / teaching rows: background tint (no layout shift, safe under reduced motion) */
.publication-item,
.teaching-item { transition: background 0.2s ease; }
.publication-item:hover,
.teaching-item:hover { background: var(--azure-wash); }

/* research figure */
.research-figure {
  max-width: 480px;
  margin: 0 auto 2rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.research-figure img { display: block; width: 100%; height: auto; }
.research-figure canvas { display: block; width: 100%; height: auto; background: var(--paper-sunken); }
.research-figure figcaption {
  padding: 0.9rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: var(--paper-sunken);
  border-top: 1px solid var(--line);
  text-align: center;
}

/* three research figures juxtaposed left-to-right, all sharing the same footprint */
.research-figures-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 0 auto 2rem;
  max-width: 1400px;
}
.research-figure--row {
  max-width: none;
  width: 100%;
  margin: 0;
}
/* data figures (real plots): fixed 4:3 frame, letterboxed so nothing is cropped */
.research-figure--data img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--paper-raised);
}
@media (max-width: 900px) {
  .research-figures-row { grid-template-columns: 1fr; max-width: 480px; }
}

/* ==========================================================================
   Project pages
   ========================================================================== */

.project-hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 72px 24px 40px;
  border-bottom: 1px solid var(--line);
}

.project-subtitle {
  font-family: var(--font-mono);
  color: var(--azure);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.project-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.project-authors {
  color: var(--ink-soft);
  margin-bottom: 22px;
  line-height: 1.8;
  font-size: 0.96rem;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--font-mono); }

.project-tags span {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  padding: 6px 11px;
  border-radius: 2px;
  font-size: 0.74rem;
  color: var(--ink-soft);
}

@media (max-width: 768px) {
  .project-hero { padding: 44px 20px 30px; }
}
