/* ────────────────────────────────────────────────────────────────────────────
   Anita Iotti — portfolio v2
   Cool, quiet, R&D-grade. Periwinkle accent, no chrome, lots of air.
   ──────────────────────────────────────────────────────────────────────── */

:root {
  --bg: #F7F7FB;
  --surface: #FFFFFF;
  --ink:   #0E1226;
  --ink-2: #2C314D;
  --muted: #6E7390;
  --muted-2: #A1A5BC;
  --line:        rgba(14, 18, 38, 0.07);
  --line-strong: rgba(14, 18, 38, 0.14);
  --accent:      #6B78D9;
  --accent-2:    #8A95E3;
  --accent-deep: #4C58B8;
  --accent-soft: rgba(107, 120, 217, 0.10);
  --accent-wash: rgba(107, 120, 217, 0.04);

  --sans:  "Geist", "Inter", -apple-system, BlinkMacSystemFont,
           "SF Pro Display", system-ui, sans-serif;
  --mono:  "Geist Mono", ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;

  --gutter: clamp(20px, 5vw, 56px);
  --col:    1040px;
  --col-narrow: 880px;
  --section-pad: clamp(80px, 12vw, 160px);

  --radius: 14px;
  --radius-lg: 22px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11", "kern", "liga";
}

::selection { background: var(--accent-soft); color: var(--accent-deep); }

a { color: inherit; text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--accent); }

/* ── Page shell ─────────────────────────────────────────────────────────── */

.page { position: relative; }

.section {
  padding: var(--section-pad) var(--gutter);
}
.container {
  max-width: var(--col);
  margin: 0 auto;
}
.container.narrow { max-width: var(--col-narrow); }

/* ── Eyebrow / labels ───────────────────────────────────────────────────── */

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
  display: inline-block;
}

/* ── Top bar ────────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px var(--gutter);
  font-size: 14px;
  background: rgba(247, 247, 251, 0.75);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid transparent;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.topbar.scrolled { border-bottom-color: var(--line); }

.topbar .brand {
  font-weight: 500;
  letter-spacing: -0.012em;
  font-size: 14.5px;
  white-space: nowrap;
}
.topbar .brand .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 9px;
  vertical-align: 2px;
  box-shadow: 0 0 0 0 var(--accent-soft);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(107, 120, 217, 0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(107, 120, 217, 0); }
}

.topbar nav {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.topbar nav a {
  position: relative;
  padding: 4px 0;
}
.topbar nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right .2s var(--ease);
}
.topbar nav a:hover::after { right: 0; }

@media (max-width: 680px) {
  .topbar nav { display: none; }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  padding: clamp(64px, 12vw, 140px) var(--gutter) clamp(48px, 8vw, 96px);
}
.hero .container { max-width: 880px; }

.hero .name {
  font-size: clamp(13px, 1.05vw, 14px);
  letter-spacing: 0.02em;
  font-family: var(--mono);
  color: var(--muted);
  margin: 0 0 56px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero .name::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--muted-2);
  display: inline-block;
}

.hero .intro {
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.42;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 30ch;
  margin: 0 0 28px;
  font-weight: 400;
  text-wrap: pretty;
}
.hero .intro:last-of-type { margin-bottom: 56px; }

.hero .intro .accent { color: var(--accent); }
.hero .intro .soft { color: var(--muted); }

.hero-status {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding-top: 24px;
  border-top: 0.5px solid var(--line);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: var(--muted);
}
.hero-status .live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}
.hero-status .live::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(107, 120, 217, 0.4);
  animation: pulse 2.4s var(--ease) infinite;
}
.hero-status .sep {
  color: var(--muted-2);
  user-select: none;
}
.hero-status a {
  color: var(--accent);
  border-bottom: 0.5px solid transparent;
  transition: border-color .15s var(--ease);
}
.hero-status a:hover { border-bottom-color: var(--accent); }

/* ── Generic section heads ──────────────────────────────────────────────── */

.section h2 {
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.026em;
  font-weight: 500;
  margin: 0 0 16px;
  max-width: 22ch;
  text-wrap: balance;
}
.section h2 .accent { color: var(--accent); }
.section h2 .soft { color: var(--muted); }

.section .lead {
  font-size: 19px;
  line-height: 1.5;
  letter-spacing: -0.008em;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0 0 56px;
}

/* ── Currently (featured project) ───────────────────────────────────────── */

.current {
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 56px);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: stretch;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset,
              0 20px 60px -30px rgba(14, 18, 38, 0.18);
}

.current .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.current .head .live {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.current .head .live::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.current h3 {
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.022em;
  font-weight: 500;
  margin: 0 0 16px;
  text-wrap: balance;
}
.current h3 .accent { color: var(--accent); }
.current p {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 14px;
}

.current .kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-top: 28px;
  border-top: 0.5px solid var(--line);
}
.current .kpi {
  padding: 18px 0;
  border-bottom: 0.5px solid var(--line);
}
.current .kpi:nth-child(odd)  { padding-right: 18px; border-right: 0.5px solid var(--line); }
.current .kpi:nth-child(even) { padding-left:  18px; }
.current .kpi:nth-last-child(-n+2) { border-bottom: 0; }
.current .kpi dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 6px;
}
.current .kpi dd {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.current .kpi dd .unit {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  margin-left: 6px;
}

.current .viz {
  background: linear-gradient(180deg, var(--accent-wash) 0%, transparent 100%);
  border-radius: var(--radius);
  padding: 20px 18px 14px;
  border: 0.5px solid var(--line);
  display: flex;
  flex-direction: column;
}
.current .viz-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.current .viz-head .ch {
  color: var(--accent);
}

@media (max-width: 880px) {
  .current { grid-template-columns: 1fr; gap: 32px; padding: 28px; }
}

/* ── Experience timeline ────────────────────────────────────────────────── */

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 0.5px solid var(--line);
}
.exp {
  display: grid;
  grid-template-columns: 160px 1fr 200px;
  gap: 40px;
  padding: 36px 0;
  border-bottom: 0.5px solid var(--line);
  position: relative;
  transition: background .15s var(--ease);
}
.exp:hover { background: var(--accent-wash); }
.exp .when {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: var(--muted);
  padding-top: 4px;
  line-height: 1.4;
}
.exp .when .place {
  display: block;
  color: var(--muted-2);
  font-size: 11.5px;
  margin-top: 6px;
}
.exp .body h4 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.014em;
  margin: 0 0 4px;
  line-height: 1.25;
}
.exp .body .role {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}
.exp .body p {
  margin: 0 0 8px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.exp .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
  padding-top: 4px;
}
.exp .tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  line-height: 1.4;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .exp { grid-template-columns: 100px 1fr; gap: 24px; }
  .exp .tags { grid-column: 1 / -1; padding-left: 124px; }
}
@media (max-width: 560px) {
  .exp { grid-template-columns: 1fr; }
  .exp .tags { padding-left: 0; }
}

/* ── Projects (catalogue) ───────────────────────────────────────────────── */

.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 0.5px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.project {
  background: var(--surface);
  padding: 32px 28px 28px;
  transition: background .2s var(--ease);
  display: flex;
  flex-direction: column;
  position: relative;
}
.project:hover { background: var(--accent-wash); }
.project-link:hover { color: inherit !important; }
.project-link:hover h3 { color: var(--accent); }
.project.span2 { grid-column: 1 / -1; }
.project.span2 .project-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
}
.project.span2 .viz-slot { padding-top: 8px; }

.project .pno {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  text-transform: uppercase;
}
.project .pno .tag { color: var(--accent); }

.project h3 {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.016em;
  line-height: 1.22;
  margin: 0 0 10px;
  text-wrap: balance;
}
.project h3 .accent { color: var(--accent); }

.project .meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.project .meta .dot { color: var(--muted-2); margin: 0 6px; }

.project p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 10px;
}

.project .stack {
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  line-height: 1.6;
  border-top: 0.5px dashed var(--line);
}
.project .stack span { display: inline; }
.project .stack .sep {
  color: var(--muted-2);
  margin: 0 6px;
  display: inline;
}

@media (max-width: 820px) {
  .projects { grid-template-columns: 1fr; }
  .project.span2 .project-inner { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Education / Talks ──────────────────────────────────────────────────── */

.lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.lists .col h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 22px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid var(--line);
}
.lists .row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 0.5px solid var(--line);
}
.lists .row:last-child { border-bottom: 0; }
.lists .row .yr {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  padding-top: 3px;
}
.lists .row .what {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.012em;
  margin: 0 0 3px;
}
.lists .row .where {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0 0 6px;
}
.lists .row .note {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 6px 0 0;
}

@media (max-width: 780px) {
  .lists { grid-template-columns: 1fr; gap: 48px; }
}

/* ── Contact ────────────────────────────────────────────────────────────── */

.contact {
  text-align: center;
  padding: clamp(120px, 16vw, 200px) var(--gutter) 100px;
}
.contact .eyebrow { justify-content: center; }
.contact h2 {
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.98;
  letter-spacing: -0.034em;
  font-weight: 500;
  margin: 0 auto 40px;
  max-width: 14ch;
  text-wrap: balance;
}
.contact h2 .accent { color: var(--accent); }
.contact .mailto {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.008em;
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.contact .mailto:hover {
  transform: translateY(-1px);
  background: var(--accent);
  color: white;
}
.contact .mailto svg {
  width: 16px; height: 16px;
  transition: transform .2s var(--ease);
}
.contact .mailto:hover svg { transform: translate(2px, -2px); }

.contact .ways {
  display: flex;
  justify-content: center;
  gap: clamp(28px, 5vw, 64px);
  margin-top: 56px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  flex-wrap: wrap;
}
.contact .ways .way .val {
  display: block;
  font-family: var(--sans);
  font-size: 15px;
  text-transform: none;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-top: 6px;
  font-weight: 500;
}

.colophon {
  border-top: 0.5px solid var(--line);
  padding: 24px var(--gutter);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  flex-wrap: wrap;
  gap: 16px;
}


/* Static portfolio refresh: retain the original palette, type and card language. */
@font-face{font-family:Geist;src:url('fonts/geist-latin.woff2') format('woff2');font-style:normal;font-weight:100 900;font-display:swap}
@font-face{font-family:'Geist Mono';src:url('fonts/geist-mono-latin.woff2') format('woff2');font-style:normal;font-weight:100 900;font-display:swap}
:root{--accent:#5966C5;--accent-deep:#4855B2;--muted:#606780;--muted-2:#6C728B;--section-pad:clamp(64px,8vw,100px)}
body{overflow-wrap:break-word}
img{display:block;max-width:100%;height:auto}
figure,dl,dd{margin:0}
button{font:inherit;cursor:pointer}
:focus-visible{outline:2px solid var(--accent);outline-offset:5px}
[id]{scroll-margin-top:95px}
.skip-link{position:fixed;top:8px;left:8px;padding:12px 18px;background:var(--ink);color:white;z-index:100;transform:translateY(-150%);border-radius:8px}
.skip-link:focus{transform:translateY(0);color:white}
.topbar{border-bottom-color:var(--line);gap:20px}
.topbar nav{gap:24px}
.topbar nav a{padding:10px 0}
.mobile-menu{display:none}
.hero{padding:clamp(48px,6vw,80px) var(--gutter) 48px}
.hero .container{max-width:var(--col)}
.hero .name{margin-bottom:24px}
h1{font-weight:500;letter-spacing:-.035em;line-height:1.09;text-wrap:balance}
.hero h1{font-size:clamp(36px,5.2vw,62px);margin:0 0 22px;max-width:25ch}
.accent{color:var(--accent)}
.supporting{font-size:clamp(15px,1.6vw,19px);color:var(--ink-2);margin:0 0 25px;line-height:1.6}
.credentials{font-size:14px;color:var(--muted);line-height:1.6;margin-bottom:28px;max-width:80ch}
.credentials p{margin:5px 0}
.credentials strong{font-weight:500;color:var(--ink-2)}
.actions{display:flex;flex-wrap:wrap;gap:10px}
.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;border:1px solid var(--line-strong);border-radius:999px;padding:10px 21px;font-size:14px;font-weight:500;background:var(--surface);color:var(--ink);transition:background .15s,color .15s}
.button:hover{background:var(--accent-soft);color:var(--accent-deep)}
.button.primary{background:var(--ink);border-color:var(--ink);color:white}
.button.primary:hover{background:var(--accent);border-color:var(--accent)}
.hero-status{display:flex;width:fit-content;margin:25px 0 0;padding-top:18px;font-size:11.5px}
.highlights{padding:0 var(--gutter) 20px;max-width:calc(var(--col) + 2 * var(--gutter))}
.highlights .eyebrow{margin:0 0 18px;font-size:10.5px}
.highlight-grid{display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid var(--line-strong);border-bottom:1px solid var(--line-strong)}
.highlight-grid>div{padding:22px 18px;border-right:1px solid var(--line)}
.highlight-grid>div:first-child{padding-left:0}
.highlight-grid>div:last-child{border:0}
.highlight-grid dt{font-size:18px;font-weight:500;letter-spacing:-.02em;margin-bottom:6px}
.highlight-grid dd{font-size:12px;color:var(--muted);line-height:1.5}
.featured{background:var(--surface);border:1px solid var(--line-strong);border-radius:var(--radius-lg);padding:clamp(22px,4vw,42px);box-shadow:0 16px 48px -35px rgba(14,18,38,.25)}
.feature-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:28px}
.feature-head .eyebrow{margin:0}
.meta{font-family:var(--mono);font-size:11px;letter-spacing:.02em;color:var(--muted)}
.feature-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:38px;align-items:start}
.feature-grid h3{font-size:clamp(26px,3vw,35px);font-weight:500;line-height:1.15;letter-spacing:-.025em;margin:0 0 18px;text-wrap:balance}
.feature-grid p{font-size:15px;line-height:1.65;margin:0 0 15px;color:var(--ink-2)}
.feature-grid .feature-method{font-family:var(--mono);font-size:11px;color:var(--muted)}
.text-link{display:inline-block;font-size:13px;font-weight:500;color:var(--accent-deep);padding:8px 0;text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px}
.result-note{background:var(--accent-wash);border-left:2px solid var(--accent);padding:18px 20px}
.result-note .meta{font-size:10px}
.result-note .result-number{font-size:36px;font-weight:500;line-height:1.2;letter-spacing:-.03em;color:var(--accent-deep);margin:12px 0}
.result-note p{font-size:13px;margin-bottom:10px}
p.note,.result-note p.note{font-size:12px;color:var(--muted);line-height:1.6}
.replay{margin-top:30px;border-top:1px solid var(--line);padding-top:24px}
.replay-grid{display:grid;grid-template-columns:1.12fr 1fr;gap:26px;align-items:start}
.replay-grid>figure{min-width:0}
.replay-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;margin-bottom:10px}
.media-label{font-size:14px;font-weight:500;color:var(--ink-2);margin:0}
.replay-switch{display:flex;gap:3px;padding:3px;border:1px solid var(--line-strong);border-radius:999px;background:var(--accent-wash)}
.replay-switch[hidden]{display:none}
.replay-switch button{min-height:36px;min-width:48px;padding:6px 12px;border:0;border-radius:999px;background:transparent;font-family:var(--mono);font-size:14px;color:var(--muted)}
.replay-switch button[aria-pressed="true"]{background:var(--ink);color:white}
.replay-switch button:hover{color:var(--accent-deep)}
.replay-switch button[aria-pressed="true"]:hover{color:white}
.replay-video{display:block;width:100%;height:auto;aspect-ratio:18/7;border-radius:9px;background:#b0b0b0}
.replay img{width:100%;border-radius:9px}
.replay-still-link{display:block}
.replay .media-link{display:inline-flex;align-items:center;min-height:44px;font-size:13px;color:var(--accent-deep);text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.replay figcaption{font-size:13px;color:var(--muted);line-height:1.6;margin-top:10px}
.replay .replay-video-caption{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:0;flex-wrap:wrap}
.replay-legend{display:flex;gap:14px;font-size:13px}
.replay-legend>span{display:inline-flex;align-items:center;gap:6px}
.replay-legend i{display:inline-block;width:14px;height:3px;border-radius:2px}
.reference-swatch{background:#d87800}.decoded-swatch{background:#009cdb}
.replay-context{font-size:13px;line-height:1.6;color:var(--muted);margin:12px 0 0}
.replay-fallback{font-size:13px;margin:8px 0}
.replay-fallback a{text-decoration:underline;text-underline-offset:3px}
@media(max-width:700px){.replay-grid{grid-template-columns:1fr;gap:20px}.replay-heading{margin-bottom:8px}.replay-context{margin-top:14px}}
@media print{.replay-motion{display:none}.replay-grid{display:block}.replay-still .media-link{display:none}.replay-still{break-inside:avoid}}
.project-group{margin-top:52px}
.group-heading{font-size:19px;font-weight:500;letter-spacing:-.02em;margin:0 0 20px}
.group-note{font-size:13px;color:var(--muted);margin:-10px 0 22px}
.project{min-width:0}
.project .pno{gap:10px;line-height:1.6;align-items:start}
.project .pno .tag{text-align:right}
.project h3 a:after{content:'';position:absolute;inset:0}
.project .text-link{position:relative;z-index:1;align-self:start;margin-top:12px}
.project .stack{margin-top:16px;padding-top:14px}
.project:hover{background:#F4F4FC}
.project:focus-within{outline:2px solid var(--accent);outline-offset:-2px}
.project:hover h3{color:var(--accent)}
.other-projects .project{padding:24px}
.other-projects .project h3{font-size:18px}
.other-projects .project p{font-size:14px}
.other-projects .projects{grid-template-columns:repeat(3,1fr)}
.exp .body h3{font-size:20px;font-weight:500;letter-spacing:-.014em;margin:0 0 6px;line-height:1.3}
.exp{grid-template-columns:145px 1fr 175px;gap:30px}
.tags{display:flex;flex-wrap:wrap;gap:6px;align-content:start}
.tag{font-family:var(--mono);font-size:10.5px;line-height:1.6}
.tags .tag{background:var(--accent-soft);color:var(--accent-deep);border-radius:999px;padding:4px 10px}
.education-row{display:grid;grid-template-columns:145px 1fr;gap:30px;padding:28px 0;border-bottom:1px solid var(--line)}
.education-row h3{font-size:19px;font-weight:500;margin:0 0 6px;line-height:1.4}
.education-row p{font-size:14px;margin:0 0 8px;color:var(--ink-2)}
.when{font-family:var(--mono);font-size:12px;color:var(--muted)}
.publication{border-top:1px solid var(--line-strong);border-bottom:1px solid var(--line);padding:24px 0}
.publication h3{font-size:22px;font-weight:500;line-height:1.35;margin:12px 0;max-width:70ch}
.publication>p:last-child{font-size:14px;color:var(--muted);margin-bottom:0}
.skill-grid{display:grid;grid-template-columns:1fr 1fr;gap:30px 50px;margin-top:32px}
.skill-grid article{border-top:1px solid var(--line-strong);padding-top:18px}
.skill-grid h3{font-size:14px;font-weight:500;color:var(--accent-deep);margin:0 0 10px}
.skill-grid p{font-size:14px;color:var(--ink-2);line-height:1.9;margin:0}
.interests{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding-top:38px;padding-bottom:38px;background:var(--accent-wash)}
.section.interests h2,.interests h3{font-size:11px;letter-spacing:.04em;margin:0 0 10px;line-height:1.5;max-width:none}
.interests p{font-size:15px;color:var(--ink-2);max-width:85ch;margin:0 0 25px;line-height:1.9}
.interests p:last-child{margin-bottom:0}
.contact{padding-top:90px;padding-bottom:70px}
.contact h2{font-size:clamp(42px,7vw,82px)}
.contact-intro{font-size:16px;color:var(--muted);max-width:50ch;margin:0 auto 30px}
.contact-links{display:flex;justify-content:center;flex-wrap:wrap;gap:26px;font-family:var(--mono);font-size:12px;color:var(--accent-deep);margin-top:28px}
.contact-links a{padding:10px 0}
.project-page,.cv-page{padding:40px var(--gutter) 80px;max-width:calc(880px + 2 * var(--gutter))}
.back-link{margin-bottom:38px}
.project-header{padding-bottom:30px;border-bottom:1px solid var(--line-strong)}
.project-header h1{font-size:clamp(32px,4.5vw,50px);max-width:27ch;margin:0 0 20px}
.project-header .eyebrow{margin-bottom:18px}
.project-header .lead{font-size:19px;line-height:1.6;margin:20px 0}
.project-brief>div{display:grid;grid-template-columns:145px 1fr;gap:30px;border-bottom:1px solid var(--line);padding:24px 0}
.project-brief dt{font-family:var(--mono);font-size:12px;color:var(--accent-deep);font-weight:500;padding-top:3px}
.project-brief dd{font-size:15px;line-height:1.8;color:var(--ink-2)}
.project-end{display:flex;flex-wrap:wrap;gap:12px;margin-top:38px}
.cv-tools{display:flex;justify-content:space-between;gap:15px;align-items:center;margin-bottom:38px}
.cv-header{border-bottom:1px solid var(--line-strong);padding-bottom:25px}
.cv-header h1{font-size:45px;margin:0 0 10px}
.cv-header p{font-size:14px}
.cv-header .supporting{font-size:20px}
.cv-header a{color:var(--accent-deep);text-decoration:underline;text-underline-offset:3px}
.cv-page section{margin-top:40px}
.cv-page section>h2{font-size:21px;font-weight:500;color:var(--accent-deep);margin-bottom:20px}
.cv-page .exp{grid-template-columns:125px 1fr;gap:22px;padding:24px 0}
.cv-page .exp .tags{grid-column:2;padding-left:0}
.cv-project{margin:24px 0}
.cv-project h3{font-size:17px;margin-bottom:8px;font-weight:500}
.cv-project p{font-size:14px;margin:6px 0}
.cv-page .publication h3{font-size:18px}
.cv-page .skill-grid{margin-top:20px}
@media(max-width:900px){.exp{grid-template-columns:120px 1fr;gap:24px}.exp .tags{grid-column:2;padding-left:0}.other-projects .projects{grid-template-columns:1fr 1fr}}
@media(max-width:760px){
  .topbar{padding-top:12px;padding-bottom:12px;align-items:center}
  .topbar .desktop-nav{display:none}
  .mobile-menu{display:block;font-family:var(--mono);font-size:12px}
  .mobile-menu summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:16px;min-height:44px}
  .mobile-menu summary::-webkit-details-marker{display:none}
  .mobile-menu nav{position:absolute;right:var(--gutter);top:64px;width:220px;display:flex;flex-direction:column;gap:2px;background:var(--surface);padding:14px 22px;border:1px solid var(--line-strong);border-radius:var(--radius);box-shadow:0 15px 35px rgba(14,18,38,.1)}
  .mobile-menu nav a{font-size:13px;min-height:44px}
  .highlight-grid{grid-template-columns:1fr 1fr}
  .highlight-grid>div{padding:18px 14px}
  .highlight-grid>div:nth-child(2){border-right:0}
  .highlight-grid>div:nth-child(n+3){border-top:1px solid var(--line)}
  .highlight-grid>div:nth-child(3){padding-left:0}
  .feature-grid{grid-template-columns:1fr;gap:25px}
  .hero h1{font-size:clamp(35px,6.3vw,48px)}
}
@media(max-width:560px){
  .hero{padding-top:38px}.hero .name{font-size:11px;margin-bottom:20px}.hero h1{font-size:35px}
  .hero-status .sep{display:none}.hero-status{gap:8px}.hero-status .live{align-items:start}.hero-status .live:before{flex-shrink:0;margin-top:5px}
  .highlight-grid dt{font-size:16px}.highlight-grid dd{font-size:11px}
  .feature-head{margin-bottom:22px}.feature-grid h3{font-size:27px}.featured{padding:22px}
  .section h2{font-size:35px}.section .lead{font-size:16px;margin-bottom:32px}
  .project{padding:24px}.other-projects .projects{grid-template-columns:1fr}
  .exp,.cv-page .exp{grid-template-columns:1fr;gap:14px}.exp .tags,.cv-page .exp .tags{grid-column:auto}
  .exp .body h3{font-size:19px}.exp .when{font-size:11px}
  .education-row{grid-template-columns:1fr;gap:12px}.skill-grid{grid-template-columns:1fr;gap:26px}
  .project-brief>div{grid-template-columns:1fr;gap:10px}.project-header h1{font-size:33px}
  .publication h3{font-size:20px}.contact .mailto{font-size:14px;padding:14px 18px;max-width:100%;overflow-wrap:anywhere}
  .colophon{font-size:10px}.project-page,.cv-page{padding-top:25px}.cv-tools .button{padding:9px 14px;font-size:12px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{animation:none!important;transition:none!important}}
@media print{
  @page{size:A4;margin:16mm}
  html,body{background:white;color:#111;font-size:10pt;line-height:1.45}
  .topbar,.skip-link,.colophon,.cv-tools,.cv-page .education-row .text-link{display:none}
  .cv-page{max-width:none;padding:0}.cv-header h1{font-size:25pt}.cv-header .supporting{font-size:13pt}.cv-header p{font-size:9pt;margin:5px 0}
  .cv-page section{margin-top:20px}.cv-page section>h2{font-size:13pt;margin-bottom:10px;break-after:avoid}
  .cv-page .exp{grid-template-columns:100px 1fr;padding:13px 0;gap:12px;break-inside:avoid}
  .cv-page .exp .tags{display:none}.cv-page .exp .when{font-size:8pt}.cv-page .exp .body h3{font-size:11pt}.cv-page .exp .body p{font-size:9pt;margin:4px 0}
  .cv-page .education-row{grid-template-columns:100px 1fr;gap:12px;padding:13px 0;break-inside:avoid}.cv-page .education-row h3{font-size:11pt}.cv-page .education-row p{font-size:9pt}
  .cv-project,.publication,.skill-grid article{break-inside:avoid}.cv-project{margin:15px 0}.cv-project h3,.cv-page .publication h3{font-size:11pt}.cv-project p,.cv-page .skill-grid p,.cv-page .publication p{font-size:9pt}
  .cv-page .skill-grid{gap:15px 25px}.cv-page .skill-grid h3{font-size:10pt}.cv-page section>p{font-size:9pt}.tags .tag{background:transparent}
}

/* Keep the printable CV to a compact research-oriented layout. */
@media print{
  @page{size:A4;margin:13mm}
  html,body{font-size:9pt;line-height:1.35}
  .cv-header{padding-bottom:12px}.cv-header h1{font-size:24pt}.cv-header p{line-height:1.4}
  .cv-page section{margin-top:15px}.cv-page section>h2{font-size:12pt;margin:0 0 10px}
  .cv-page .exp{padding:9px 0;gap:10px}.cv-page .exp .body h3{font-size:10pt}.cv-page .exp .body p{font-size:9pt;line-height:1.4}
  .cv-page .education-row{padding:9px 0}.cv-page .education-row h3{font-size:10pt}.cv-page .education-row p{line-height:1.4;margin-bottom:5px}
  .cv-project{margin:11px 0}.cv-project h3{margin:0 0 4px}.cv-project p{line-height:1.4;margin:3px 0}
  .cv-page .publication{padding:12px 0}.cv-page .publication h3{font-size:10pt;margin:7px 0}
  .cv-page .skill-grid{margin-top:10px;gap:12px 22px}.cv-page .skill-grid article{padding-top:10px}.cv-page .skill-grid p{line-height:1.5}
}
