/* =========================================================
   Özge Turgut — portfolio
   Idea: "nobody gets lost". A route that follows you down the
   page, pencil notes in the margin, and hand-drawn marks.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #F3ECEF;
  --paper: #FCF8FA;
  --ink: #1F161C;
  --muted: #6C5F68;
  --line: #DCCFD6;
  --line-soft: #E9DFE4;
  --accent: #7B2A68;   /* text-safe: 7.6:1 on --bg, more on --paper */
  --pencil: #A63B8C;   /* strokes and marks only */
  --ok: #2E7D5B;
  --shadow: 48 20 38;

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --spring: linear(0, .009, .035 2.1%, .141 4.4%, .723 12.9%, .938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, .991, .977 51%, .974 53.8%, .975 57.1%, .997 69.8%, 1.003 76.9%, 1.004 83.8%, 1);

  --i-ne: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 11.5l7-7M5.5 4.5h6v6'/%3E%3C/svg%3E");
  --i-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3v10M3.5 8.5 8 13l4.5-4.5'/%3E%3C/svg%3E");

  --maxw: 68rem;
  --pad: 1.5rem;
  --rail: 0rem;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #171117;
  --paper: #20191F;
  --ink: #F4EAF1;
  --muted: #AA9BA6;
  --line: #3B2F38;
  --line-soft: #2C232A;
  --accent: #EBA0D6;
  --pencil: #EBA0D6;
  --ok: #7BD3A8;
  --shadow: 0 0 0;
  color-scheme: dark;
}
/* No-JS fallback: follow the system until the script sets data-theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #171117;
    --paper: #20191F;
    --ink: #F4EAF1;
    --muted: #AA9BA6;
    --line: #3B2F38;
    --line-soft: #2C232A;
    --accent: #EBA0D6;
    --pencil: #EBA0D6;
    --ok: #7BD3A8;
    --shadow: 0 0 0;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}
html.lb-lock { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] body::before { filter: invert(1); opacity: .04; }

a { color: inherit; }
button { font: inherit; color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus {
  left: 1rem; top: 1rem;
  z-index: 70;
  background: var(--ink);
  color: var(--bg);
  padding: .6rem 1rem;
  border-radius: 999px;
}

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.hand {
  font-family: var(--hand);
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

/* The rail takes a gutter on wide screens; everything else shifts right. */
@media (min-width: 72rem) {
  :root { --rail: 9.5rem; }
  .top, main, .foot { padding-left: var(--rail); }
}

/* ---------- Shared bits ---------- */
/* Arrow that leaves top-right and comes back from bottom-left. */
.arr {
  --icon: var(--i-ne);
  --fly-x: 100%;
  --fly-y: -100%;
  position: relative;
  display: inline-block;
  flex: none;
  width: 1em; height: 1em;
  overflow: hidden;
  vertical-align: -.14em;
}
.arr::before, .arr::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
  transition: transform .5s var(--ease-out);
}
.arr::after { transform: translate(calc(var(--fly-x) * -1), calc(var(--fly-y) * -1)); }
a:hover .arr::before, a:focus-visible .arr::before,
.pub.has-link:hover .arr::before, .pub.has-link:focus-within .arr::before {
  transform: translate(var(--fly-x), var(--fly-y));
}
a:hover .arr::after, a:focus-visible .arr::after,
.pub.has-link:hover .arr::after, .pub.has-link:focus-within .arr::after { transform: none; }
.arr-down { --icon: var(--i-down); --fly-x: 0%; --fly-y: 100%; }

.link-arrow {
  --u: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding-bottom: .2rem;
  font-weight: 500;
  text-decoration: none;
  background:
    linear-gradient(var(--u), var(--u)) left bottom / 0 1.5px no-repeat,
    linear-gradient(var(--line), var(--line)) left bottom / 100% 1.5px no-repeat;
  transition: background-size .5s var(--ease-out), color .25s ease;
}
.link-arrow:hover, .link-arrow:focus-visible {
  background-size: 100% 1.5px, 100% 1.5px;
  color: var(--u);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .8rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  translate: var(--mx, 0px) var(--my, 0px);
  transition: translate .6s var(--spring), background-color .25s ease, color .25s ease, border-color .25s ease, scale .2s ease;
}
.btn.is-pulled { transition-duration: .16s, .25s, .25s, .25s, .2s; transition-timing-function: ease-out; }
.btn:active { scale: .97; }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: var(--accent); }
.btn-ghost { border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Header ---------- */
.top-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.75rem;
}
.wordmark {
  display: inline-flex;
  font-family: var(--display);
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1;
  text-decoration: none;
  padding-top: .3em;
}
/* The Ö's two dots are separate so they can hop. */
.wm-o { position: relative; display: inline-block; }
.wm-o i {
  position: absolute;
  top: -.13em;
  width: .15em; height: .15em;
  border-radius: 50%;
  background: var(--pencil);
}
.wm-o i:nth-child(1) { left: 22%; }
.wm-o i:nth-child(2) { left: 57%; }
.wordmark:hover .wm-o i, .wordmark:focus-visible .wm-o i { animation: hop .55s var(--ease-out); }
.wordmark:hover .wm-o i:nth-child(2), .wordmark:focus-visible .wm-o i:nth-child(2) { animation-delay: .09s; }
@keyframes hop {
  0%, 100% { transform: none; }
  40% { transform: translateY(-.26em); }
  70% { transform: translateY(.03em) scaleY(.85); }
}

.top-actions { display: flex; align-items: center; gap: .6rem; }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.625rem; height: 2.625rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  cursor: pointer;
  transition: border-color .25s ease, rotate .6s var(--spring);
}
.theme-toggle:hover { border-color: var(--ink); rotate: 18deg; }
.theme-toggle svg { overflow: visible; }
.sun-core { fill: currentColor; transform-origin: 12px 12px; transition: transform .6s var(--spring); }
.moon-cut { fill: var(--bg); transition: transform .6s var(--ease-out); }
.sun-rays {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  transform-origin: 12px 12px;
  transition: transform .6s var(--ease-out), opacity .3s ease;
}
:root[data-theme="dark"] .sun-core { transform: scale(1.7); }
:root[data-theme="dark"] .moon-cut { transform: translate(-9.5px, 5.5px); }
:root[data-theme="dark"] .sun-rays { transform: rotate(-80deg) scale(.3); opacity: 0; }

/* Theme change opens as a circle from the button. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.theme-vt *, .theme-vt *::before, .theme-vt *::after { transition: none !important; }

/* ---------- Route ---------- */
.route { position: fixed; z-index: 30; }
.route-list { list-style: none; margin: 0; padding: 0; }
.stop a { display: flex; align-items: center; text-decoration: none; }
.stop-dot {
  position: relative;
  z-index: 1;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--muted);
  background: var(--bg);
  transition: background-color .3s ease, border-color .3s ease, scale .5s var(--spring);
}

@media (min-width: 72rem) {
  .route { left: 1.75rem; top: 50%; translate: 0 -50%; }
  .route-toggle { display: none; }

  .route-line {
    position: absolute;
    left: 5px;
    top: var(--line-top, 0);
    width: 1.5px;
    height: var(--line-h, 0);
    background: var(--line);
  }
  .route-fill {
    position: absolute;
    inset: 0;
    background: var(--ink);
    transform-origin: top;
    transform: scaleY(var(--p, 0));
  }
  /* "You are here": rides the line with the scroll position. */
  .route-you {
    position: absolute;
    z-index: 2;
    left: 50%; top: 0;
    width: 19px; height: 19px;
    margin: -9.5px 0 0 -9.5px;
    border-radius: 50%;
    border: 1.5px solid var(--pencil);
    background: color-mix(in srgb, var(--pencil) 14%, transparent);
    transform: translateY(var(--you-y, 0px));
  }
  .route-you::after {
    content: "";
    position: absolute;
    inset: -1.5px;
    border-radius: 50%;
    border: 1.5px solid var(--pencil);
    animation: ping 2.6s var(--ease-out) infinite;
  }

  .stop a {
    gap: .8rem;
    height: 2.5rem;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--muted);
    transition: color .25s ease;
  }
  .stop a:hover { color: var(--ink); }
  .stop-dot { width: 11.5px; height: 11.5px; }
  .stop.passed .stop-dot { background: var(--ink); border-color: var(--ink); }
  .stop.active a { color: var(--ink); }
  .stop a:hover .stop-dot { scale: 1.3; }

  .stop-minor a { height: 1.5rem; font-size: .75rem; }
  .stop-minor .stop-dot { width: 7.5px; height: 7.5px; margin-inline: 2px; }
  .stop-minor.passed .stop-dot { background: var(--tint); border-color: var(--tint); }
  .stop-minor .stop-label {
    opacity: 0;
    translate: -6px 0;
    transition: opacity .3s ease, translate .45s var(--ease-out);
  }
  .stop-minor.active .stop-label,
  .route:hover .stop-minor .stop-label,
  .route:focus-within .stop-minor .stop-label { opacity: 1; translate: 0 0; }
}

/* Narrow screens: the route folds into a pill at the bottom. */
@media (max-width: 71.99rem) {
  html:not(.js) .route { display: none; }
  .route {
    left: 50%;
    bottom: max(1rem, env(safe-area-inset-bottom));
    translate: -50% 0;
  }
  .js .route { opacity: 0; }
  .js.is-ready .route { opacity: 1; transition: opacity .6s ease 1.4s; }

  .route-line { display: none; }
  .route-toggle {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .85rem .5rem .55rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--paper) 86%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
            backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 1px 2px rgb(var(--shadow) / .08), 0 10px 28px -10px rgb(var(--shadow) / .3);
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    transition: scale .2s ease;
  }
  .route-toggle:active { scale: .96; }
  .route-ring { rotate: -90deg; }
  .route-ring circle { fill: none; stroke-width: 2.5; }
  .ring-bg { stroke: var(--line); }
  .ring-fg {
    stroke: var(--pencil);
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: calc(1 - var(--scroll, 0));
  }
  .route-chev { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: rotate .4s var(--spring); }
  .route[data-open] .route-chev { rotate: 180deg; }

  .route-list {
    position: absolute;
    left: 50%;
    bottom: calc(100% + .6rem);
    min-width: 13rem;
    padding: .45rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--paper);
    box-shadow: 0 2px 4px rgb(var(--shadow) / .06), 0 24px 48px -16px rgb(var(--shadow) / .35);
    translate: -50% 0;
    transform-origin: bottom center;
    transform: translateY(10px) scale(.94);
    opacity: 0;
    visibility: hidden;
    transition: transform .2s ease-in, opacity .2s ease, visibility 0s .2s;
  }
  .route[data-open] .route-list {
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: transform .5s var(--spring), opacity .2s ease, visibility 0s;
  }
  .stop-minor { display: none; }
  .stop a {
    gap: .75rem;
    padding: .65rem .8rem;
    border-radius: 14px;
    font-size: .9375rem;
    font-weight: 500;
  }
  .stop-dot { width: 9px; height: 9px; background: none; }
  .stop.active a { background: var(--bg); }
  .stop.active .stop-dot { background: var(--pencil); border-color: var(--pencil); }
}

@keyframes ping {
  0% { transform: scale(1); opacity: .7; }
  70%, 100% { transform: scale(2.4); opacity: 0; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(3.5rem, 9vw, 6.5rem); }

.hello-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem .8rem;
  margin: 0 0 clamp(1.25rem, 3vw, 2rem);
  font-size: 1.0625rem;
  color: var(--muted);
}
.hello-hand {
  display: inline-block;
  font-size: 1.9rem;
  rotate: -4deg;
  transform-origin: left bottom;
}

.headline {
  position: relative;
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3.1rem, 10vw, 7.5rem);
  line-height: .94;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.w { display: inline-block; }
.people { position: relative; white-space: nowrap; }
.people-drag {
  position: relative;
  display: inline-block;
  cursor: grab;
  touch-action: pan-y;
  -webkit-user-select: none;
          user-select: none;
}
.people-drag.is-held { cursor: grabbing; }
.people-word { position: relative; display: inline-block; }
.people-ring {
  position: absolute;
  left: -7%; top: -2%;
  width: 114%; height: 118%;
  overflow: visible;
  pointer-events: none;
  transition: scale .6s var(--spring), rotate .6s var(--spring);
}
.people-ring path {
  fill: none;
  stroke: var(--pencil);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-dasharray: 1;
}
.people-drag:hover .people-ring { scale: 1.04; rotate: -1.5deg; }
/* Dotted line back to where the word belongs, shown while it is away. */
.tether {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
}
.tether line { stroke: var(--pencil); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: .1 9; }
.tether circle { fill: var(--pencil); }

.hero-note {
  display: flex;
  align-items: flex-start;
  gap: .3rem;
  width: max-content;
  max-width: 100%;
  margin: .9rem 0 0 var(--note-x, 0px);
  rotate: -2deg;
  transform-origin: left top;
}
.note-arrow { flex: none; width: clamp(2.3rem, 5vw, 3rem); height: clamp(2.1rem, 4.6vw, 2.75rem); margin-top: -.35rem; overflow: visible; }
/* No room to the right of the word: the note comes first and the arrow curls up at its end. */
.hero-note.is-flipped { flex-direction: row-reverse; }
.hero-note.is-flipped .note-arrow { scale: -1 1; }
.note-arrow path {
  fill: none;
  stroke: var(--pencil);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
}
.note-text {
  padding-top: .95rem;
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  transition: opacity .18s ease, translate .18s ease;
}
.hero-note.swap .note-text { opacity: 0; translate: 0 5px; }

.hero-foot { display: grid; gap: 2rem; margin-top: clamp(2rem, 5vw, 3.25rem); }
.lede {
  max-width: 34ch;
  margin: 0 0 1.75rem;
  font-size: clamp(1.125rem, 2.2vw, 1.4375rem);
  line-height: 1.45;
  color: var(--muted);
  text-wrap: pretty;
}
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (min-width: 60rem) {
  .hero-foot { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .hero-meta { flex-direction: column; align-items: flex-end; }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 55%, transparent);
  font-size: .875rem;
  color: var(--muted);
}
.pulse {
  position: relative;
  flex: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
}
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ok);
  animation: ping 2.6s var(--ease-out) infinite;
}
.clock { flex: none; overflow: visible; }
.clock circle, .clock path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.clock-h, .clock-m { transform-origin: 8px 8px; transition: transform .8s var(--spring); }
.clock-h { transform: rotate(var(--clock-h, 60deg)); }
.clock-m { transform: rotate(var(--clock-m, 300deg)); }
[data-clock] { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }
.colon { animation: blink 2s steps(1) infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* Intro, staged off .is-ready (set once fonts are in). */
.js .headline .w {
  opacity: 0;
  transform: translateY(.3em) rotate(3deg);
  filter: blur(10px);
}
.js.is-ready .headline .w {
  opacity: 1;
  transform: none;
  filter: none;
  transition: opacity .7s var(--ease-out), transform 1s var(--ease-out), filter .7s var(--ease-out);
  transition-delay: calc(var(--i) * 80ms + 80ms);
}
.js .people-ring path, .js .note-arrow path { stroke-dashoffset: 1; }
.js.is-ready .people-ring path { stroke-dashoffset: 0; transition: stroke-dashoffset .9s var(--ease-in-out) .7s; }
.js .note-text { clip-path: inset(-30% 100% -30% -3%); }
.js.is-ready .note-text {
  clip-path: inset(-30% -3% -30% -3%);
  transition: clip-path .8s var(--ease-out) 1.45s, opacity .18s ease, translate .18s ease;
}
.js.is-ready .note-arrow path { stroke-dashoffset: 0; transition: stroke-dashoffset .45s var(--ease-in-out) 2.1s; }
.js.is-ready .note-arrow path + path { transition-duration: .22s; transition-delay: 2.5s; }

.js [data-intro] { opacity: 0; transform: translateY(14px); }
.js.is-ready [data-intro] {
  opacity: 1;
  transform: none;
  transition: opacity .8s var(--ease-out) var(--d, 0ms), transform .9s var(--ease-out) var(--d, 0ms);
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 9vw, 6.5rem) 0; }
.section, .project { scroll-margin-top: 1.25rem; }
.sec-head { margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.eyebrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin: 0 0 .9rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 1.75rem; height: 1.5px;
  background: currentColor;
  transform-origin: left;
}
.js .sec-head:not(.in) .eyebrow::before { transform: scaleX(0); }
.sec-head.in .eyebrow::before { transition: transform .8s var(--ease-out) .2s; }

.sec-title, .contact-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.25rem, 6.2vw, 4.25rem);
  line-height: 1;
  letter-spacing: -.04em;
}
/* Pencil underline that draws when the heading arrives. */
.scribble { position: relative; display: inline-block; }
.scribble svg {
  position: absolute;
  left: -2%; bottom: -.16em;
  width: 104%; height: .22em;
  overflow: visible;
  pointer-events: none;
}
.scribble path {
  fill: none;
  stroke: var(--pencil);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 1;
}
.js .sec-head:not(.in) .scribble path { stroke-dashoffset: 1; }
.sec-head.in .scribble path { stroke-dashoffset: 0; transition: stroke-dashoffset .9s var(--ease-in-out) .35s; }

/* Scroll reveal. The attribute is removed once it has played, so it never
   interferes with an element's own hover transitions. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- Work ---------- */
.project {
  --tint-text: color-mix(in oklab, var(--tint) 55%, var(--ink));
  --card-pad: clamp(1.25rem, 3.4vw, 2.75rem);
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 1.25rem;
  padding: var(--card-pad);
  border: 1px solid var(--line-soft);
  border-radius: clamp(20px, 3vw, 30px);
  background: var(--paper);
  transition: background-color .6s ease, border-color .6s ease;
}
.project:hover, .project:focus-within {
  background: color-mix(in oklab, var(--tint) 5%, var(--paper));
  border-color: color-mix(in oklab, var(--tint) 32%, var(--line-soft));
}
.project > * { min-width: 0; }
.p-text { display: grid; gap: 1.25rem; }
.p-text > * { min-width: 0; }

.p-num {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  color: var(--tint-text);
}
.p-num::before {
  content: "";
  width: .6rem; height: .6rem;
  border-radius: 50%;
  background: var(--tint);
  transition: scale .6s var(--spring);
}
.project:hover .p-num::before { scale: 1.45; }
.p-title {
  margin: .7rem 0 1.1rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.125rem, 5vw, 3.25rem);
  line-height: 1;
  letter-spacing: -.04em;
}
.p-sub {
  display: block;
  margin-top: .5rem;
  font-size: .42em;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--muted);
}
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.tags li {
  padding: .2rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: color .45s ease, border-color .45s ease, background-color .45s ease;
}
.project:hover .tags li, .project:focus-within .tags li {
  color: var(--tint-text);
  border-color: color-mix(in oklab, var(--tint) 45%, transparent);
  background: color-mix(in oklab, var(--tint) 9%, transparent);
}
.tags li:nth-child(2) { transition-delay: .06s; }
.tags li:nth-child(3) { transition-delay: .12s; }

.p-body p { max-width: 58ch; margin: 0; color: var(--muted); line-height: 1.65; text-wrap: pretty; }
.p-body .p-cta { margin-top: 1.1rem; color: var(--ink); }
.project .link-arrow { --u: var(--tint-text); }

/* Screens: equal heights, widths follow each image's ratio, capped by --shot-h. */
.shelf {
  --shot-h: 232px;
  display: flex;
  align-items: flex-start;
  gap: clamp(.75rem, 1.6vw, 1.25rem);
}
.shelf.is-mid { --shot-h: 270px; }
.shelf.is-tall { --shot-h: 330px; }
.shot {
  position: relative;
  display: block;
  flex: var(--ar) 1 0px;
  min-width: 0;
  max-width: calc(var(--ar) * var(--shot-h));
  border-radius: 10px;
  background: var(--paper);
  line-height: 0;
  cursor: zoom-in;
  transform: rotate(var(--r, 0deg));
  box-shadow:
    0 0 0 1px rgb(var(--shadow) / .09),
    0 1px 2px rgb(var(--shadow) / .08),
    0 10px 22px -10px rgb(var(--shadow) / .28);
  transition: transform .6s var(--spring), box-shadow .4s ease, opacity .3s ease;
}
.shot.is-phone { border-radius: 14px; }
.shot img { display: block; width: 100%; height: auto; border-radius: inherit; }
.shot:hover, .shot:focus-visible {
  z-index: 2;
  transform: rotate(0deg) translateY(-8px) scale(1.035);
  box-shadow:
    0 0 0 1px rgb(var(--shadow) / .1),
    0 2px 4px rgb(var(--shadow) / .08),
    0 28px 44px -18px rgb(var(--shadow) / .42);
}
.shelf:has(.shot:hover) .shot:not(:hover) { opacity: .78; }
:root[data-theme="dark"] .shot { box-shadow: 0 0 0 1px rgb(255 255 255 / .1), 0 14px 30px -12px rgb(0 0 0 / .7); }

/* Dealt onto the card, one after another. */
.js .project:not(.in) .shot { opacity: 0; }
.project.in .shot { animation: deal .9s var(--spring) backwards; }
.project.in .shot:nth-child(1) { animation-delay: .18s; }
.project.in .shot:nth-child(2) { animation-delay: .27s; }
.project.in .shot:nth-child(3) { animation-delay: .36s; }
.project.in .shot:nth-child(4) { animation-delay: .45s; }
@keyframes deal {
  from { opacity: 0; transform: translateY(36px) rotate(calc(var(--r, 0deg) * 4)) scale(.94); }
}

@media (min-width: 60rem) {
  .project:not(.is-side) .p-text { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; }
  .project.is-side { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; align-items: center; }
  .project.is-side .shelf { justify-content: center; }
  .project:not(.is-side) .p-body { padding-top: 2.1rem; }
}

/* Below that the shelf scrolls sideways, with the next screen peeking in. */
@media (max-width: 59.99rem) {
  .project { overflow: clip; }
  .shelf {
    --shot-h: 176px;
    margin: -.5rem calc(var(--card-pad) * -1) -1rem;
    padding: 1rem var(--card-pad) 1.5rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--card-pad);
    scrollbar-width: none;
  }
  .shelf::-webkit-scrollbar { display: none; }
  .shelf.is-mid { --shot-h: 196px; }
  .shelf.is-tall { --shot-h: 280px; }
  .shot {
    flex: none;
    width: calc(var(--ar) * var(--shot-h));
    max-width: none;
    scroll-snap-align: start;
  }
}

.cursor-chip {
  position: fixed;
  left: 0; top: 0;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .42rem .75rem .42rem .6rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  scale: .5;
  transform-origin: left top;
  transition: opacity .2s ease, scale .45s var(--spring);
}
.cursor-chip.on { opacity: 1; scale: 1; }
.cursor-chip svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 2.5rem; }
.about-grid > * { min-width: 0; }
@media (min-width: 60rem) {
  .about-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; align-items: start; }
  .prose { position: sticky; top: 2rem; }
}
.prose p { max-width: 46ch; margin: 0 0 1.1rem; font-size: 1.0625rem; line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.prose p:first-child {
  margin-bottom: 1.5rem;
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.8vw, 1.75rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--ink);
}
.prose p:last-child { margin-bottom: 0; }

.caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: .9rem; margin: 0; padding: 0; list-style: none; }
.cap {
  padding: 1.35rem 1.35rem 1.5rem;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: var(--paper);
  transition: translate .6s var(--spring), border-color .3s ease;
}
.cap:hover { translate: 0 -5px; border-color: var(--line); }
.cap h3 { margin: 0 0 .3rem; font-family: var(--display); font-size: 1.125rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.cap p { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--muted); }

/* Capability icons. Each one plays once on arrival and once per hover (.play). */
.ic { display: block; width: 3rem; height: 3rem; margin-bottom: 1.1rem; overflow: visible; }
.ic .s { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic .s.p { fill: var(--paper); }
.ic .s.a { stroke: var(--pencil); stroke-width: 2.4; }
.ic .f { fill: currentColor; }
.ic .af { fill: var(--pencil); }
.ic .t, .ic .star, .ic .an, .ic .hd { transform-box: fill-box; transform-origin: center; }
.ic-wire .f, .ic-a11y .f { opacity: .2; }
.ic-tools .hl { stroke-width: 1.25; opacity: .45; }
.ic-ai .check, .ic-tools .curve { stroke-dasharray: 1; }

.cap.play .ic-research .b2 { transform-origin: 38px 42px; animation: ic-pop .7s var(--spring) both; }
.cap.play .ic-research .d { animation: ic-dot 1.1s ease-in-out .5s both; }
.cap.play .ic-research .d2 { animation-delay: .62s; }
.cap.play .ic-research .d3 { animation-delay: .74s; }
@keyframes ic-pop { from { transform: scale(.2); opacity: 0; } }
@keyframes ic-dot { 0%, 50%, 100% { transform: none; } 25%, 75% { transform: translateY(-3.5px); } }

.cap.play .ic-wire .blk-l { animation: ic-swap-l 1.9s var(--ease-in-out) both; }
.cap.play .ic-wire .blk-r { animation: ic-swap-r 1.9s var(--ease-in-out) both; }
.cap.play .ic-wire .bar { transform-box: fill-box; transform-origin: left; animation: ic-bar 1.9s var(--ease-in-out) both; }
@keyframes ic-swap-l { 0%, 100% { transform: none; } 32%, 68% { transform: translateX(18px); } }
@keyframes ic-swap-r { 0%, 100% { transform: none; } 32%, 68% { transform: translateX(-16px); } }
@keyframes ic-bar { 0%, 100% { transform: none; } 32%, 68% { transform: scaleX(.55); } }

.cap.play .ic-sys .t { animation: ic-snap 1.5s both; }
.cap.play .ic-sys .t1 { --sx: -4px; --sy: -3px; --sr: -22deg; }
.cap.play .ic-sys .t2 { --sx: 4px; --sy: -5px; --sr: 18deg; animation-delay: .05s; }
.cap.play .ic-sys .t3 { --sx: -5px; --sy: 4px; --sr: 14deg; animation-delay: .1s; }
.cap.play .ic-sys .t4 { --sx: 5px; --sy: 5px; --sr: -30deg; animation-delay: .15s; }
@keyframes ic-snap {
  0% { transform: none; animation-timing-function: ease-out; }
  28% { transform: translate(var(--sx), var(--sy)) rotate(var(--sr)) scale(.9); animation-timing-function: var(--spring); }
  100% { transform: none; }
}

.cap.play .ic-a11y .ring { animation: ic-focus 2.1s both; }
@keyframes ic-focus {
  0% { transform: none; animation-timing-function: var(--spring); }
  30% { transform: translateY(13px); animation-timing-function: var(--spring); }
  60% { transform: translateY(26px); animation-timing-function: var(--spring); }
  100% { transform: none; }
}

.cap.play .ic-ai .star { animation: ic-twinkle 1.5s ease-in-out both; }
.cap.play .ic-ai .star-s { animation-delay: .18s; }
.cap.play .ic-ai .check { animation: ic-draw .6s var(--ease-out) .8s both; }
@keyframes ic-twinkle {
  0%, 100% { transform: none; }
  30% { transform: scale(.72) rotate(-20deg); }
  60% { transform: scale(1.1) rotate(8deg); }
}
@keyframes ic-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

.cap.play .ic-tools .curve { animation: ic-draw 1s var(--ease-in-out) .15s both; }
.cap.play .ic-tools .an, .cap.play .ic-tools .hd { animation: ic-pop .6s var(--spring) both; }
.cap.play .ic-tools .an2 { animation-delay: .9s; }
.cap.play .ic-tools .hd1 { animation-delay: .2s; }
.cap.play .ic-tools .hd2 { animation-delay: 1s; }

/* ---------- Publications ---------- */
.pubs { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.pub {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) 2.75rem;
  gap: 0 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}
/* A sheet of paper slides under the row you point at. */
.pub::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -1px -1.25rem;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--line-soft), 0 18px 36px -22px rgb(var(--shadow) / .35);
  opacity: 0;
  scale: .985;
  transition: opacity .3s ease, scale .6s var(--spring);
}
.pub.has-link:hover::before, .pub.has-link:focus-within::before { opacity: 1; scale: 1; }
.pub-year { padding-top: .4rem; font-size: .875rem; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--muted); }
.pub-title {
  max-width: 38ch;
  margin: 0 0 .55rem;
  font-family: var(--display);
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.pub-title a { text-decoration: none; outline-offset: 6px; }
.pub-title a::after { content: ""; position: absolute; inset: 0; }
.pub-venue, .pub-note { max-width: 58ch; margin: 0; font-size: .9rem; color: var(--muted); }
.pub-note { margin-top: .5rem; text-wrap: pretty; }
.pub-note strong { font-weight: 600; color: var(--ink); }
.pub-go {
  display: grid;
  place-items: center;
  align-self: start;
  width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, scale .6s var(--spring);
}
.pub.has-link:hover .pub-go, .pub.has-link:focus-within .pub-go {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  scale: 1.08;
}
.pill {
  display: inline-block;
  margin-left: .4rem;
  padding: .2rem .6rem;
  border: 1px dashed var(--muted);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  vertical-align: .3em;
}
.orcid { display: flex; align-items: center; gap: .75rem; margin: 1.75rem 0 0; font-size: .9rem; color: var(--muted); }
.orcid .link-arrow { color: var(--ink); }
.orcid .link-arrow:hover { color: var(--accent); }
@media (max-width: 40rem) {
  .pub { grid-template-columns: minmax(0, 1fr) 2.75rem; gap: 0 1rem; }
  .pub-year { grid-column: 1 / -1; padding: 0 0 .4rem; }
  .pub:not(.has-link) > div { grid-column: 1 / -1; }
  .pub::before { inset-inline: -.75rem; }
}

/* ---------- Background ---------- */
.bg-grid { display: grid; gap: 3rem; }
.bg-grid > * { min-width: 0; }
.cv-side { display: grid; gap: 3rem; align-content: start; }
@media (min-width: 60rem) {
  .bg-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 4rem; }
}
.cv-h { margin: 0 0 1.5rem; font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tl { margin: 0; padding: 0; list-style: none; }
.tl-item { position: relative; padding: 0 0 1.6rem 1.9rem; }
.tl-item:last-child { padding-bottom: 0; }
/* line down to the next entry */
.tl-item::before {
  content: "";
  position: absolute;
  left: 4.5px; top: 1.1rem; bottom: -.25rem;
  width: 1.5px;
  background: var(--line);
  transform-origin: top;
}
.tl-item:last-child::before { display: none; }
.tl-item::after {
  content: "";
  position: absolute;
  left: 0; top: .42rem;
  width: 10.5px; height: 10.5px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  background: var(--bg);
}
.tl-item.is-now::after {
  border-color: var(--ok);
  background: var(--ok);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent);
}
.tl-when { font-size: .8125rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.tl-what { margin: .1rem 0 0; font-family: var(--display); font-size: 1.125rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.3; }
.tl-org { margin: .1rem 0 0; font-size: .9375rem; }
.tl-where { max-width: 54ch; margin: .3rem 0 0; font-size: .9rem; color: var(--muted); text-wrap: pretty; }

.js .tl-item:not(.in)::before { transform: scaleY(0); }
.js .tl-item:not(.in)::after { scale: 0; }
.js .tl-item:not(.in) > * { opacity: 0; translate: -10px 0; }
.tl-item.in::before { transition: transform .9s var(--ease-out) .2s; }
.tl-item.in::after { transition: scale .6s var(--spring); }
.tl-item.in > * { transition: opacity .6s ease .08s, translate .8s var(--ease-out) .08s; }

/* ---------- Contact ---------- */
.contact-title { font-size: clamp(3.25rem, 12vw, 8.5rem); line-height: .9; letter-spacing: -.05em; }
.contact-title .scribble path { stroke-width: 3.2; }
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; }
.mail {
  padding-bottom: .15em;
  font-family: var(--display);
  font-size: clamp(1.375rem, 5vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.15;
  text-decoration: none;
  overflow-wrap: anywhere;
  background:
    linear-gradient(var(--accent), var(--accent)) left bottom / 0 2px no-repeat,
    linear-gradient(var(--line), var(--line)) left bottom / 100% 2px no-repeat;
  transition: background-size .6s var(--ease-out), color .25s ease;
}
.mail:hover, .mail:focus-visible { background-size: 100% 2px, 100% 2px; color: var(--accent); }

.copy {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem .95rem .6rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color .25s ease, background-color .25s ease, color .25s ease, scale .2s ease;
}
.copy:hover { border-color: var(--ink); }
.copy:active { scale: .96; }
.copy.done { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.copy-ic { overflow: visible; }
.copy-ic rect, .copy-ic path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ic-copy { transform-origin: 8px 8px; transition: transform .35s var(--ease-out), opacity .2s ease; }
.copy-ic .ic-check { stroke: var(--ok); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .2s ease; }
.copy.done .ic-copy { transform: scale(.4) rotate(-30deg); opacity: 0; }
.copy.done .ic-check { stroke-dashoffset: 0; transition: stroke-dashoffset .4s var(--ease-out) .12s; }
/* Label rolls like a counter. */
.copy-label { display: inline-grid; overflow: hidden; }
.copy-label span { grid-area: 1 / 1; transition: transform .5s var(--spring), opacity .25s ease; }
.copy-label span:last-child { transform: translateY(110%); opacity: 0; }
.copy.done .copy-label span:first-child { transform: translateY(-110%); opacity: 0; }
.copy.done .copy-label span:last-child { transform: none; opacity: 1; }

.contact-time { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .8rem; margin: 1.75rem 0 0; color: var(--muted); }
.contact-time .hand { font-size: 1.5rem; rotate: -1.5deg; }
.links { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-top: 2.25rem; }

/* ---------- Footer ---------- */
.foot { padding-block: 2.5rem 6rem; border-top: 1px solid var(--line); }
@media (min-width: 72rem) { .foot { padding-bottom: 3rem; } }
.foot-in { display: grid; gap: 1.25rem; }
.foot-note { width: max-content; max-width: 100%; margin: 0; font-size: 1.6rem; rotate: -1.5deg; transform-origin: left; }
.foot-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; font-size: .8125rem; color: var(--muted); }
.foot-meta a { text-decoration: none; border-bottom: 1px solid var(--line); transition: color .2s ease, border-color .2s ease; }
.foot-meta a:hover { color: var(--ink); border-color: var(--ink); }
.foot-meta a:last-child { margin-left: auto; }

/* ---------- Screen viewer ---------- */
.lb {
  position: fixed;
  inset: 0;
  width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none;
  margin: 0; padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: hidden;
}
.lb::backdrop { background: transparent; }
.lb-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
          backdrop-filter: blur(16px) saturate(120%);
  opacity: 0;
  transition: opacity .35s ease;
}
.lb.is-open .lb-backdrop { opacity: 1; }
.lb-stage {
  position: absolute;
  inset: 1.25rem 1.25rem 5.25rem;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  overflow: hidden;
}
.lb-img {
  display: block;
  width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgb(var(--shadow) / .1), 0 40px 80px -30px rgb(var(--shadow) / .5);
  transform-origin: 0 0;
  -webkit-user-drag: none;
  touch-action: pan-y;
}
.lb[data-zoomable="true"] .lb-img { cursor: zoom-in; }
.lb.is-zoomed .lb-stage { grid-template-rows: auto; place-items: start center; overflow-y: auto; overscroll-behavior: contain; }
.lb.is-zoomed .lb-img { width: min(100%, var(--nw, 100%)); max-height: none; cursor: zoom-out; }

.lb-bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 2rem;
  padding: 0 1.25rem max(1.1rem, env(safe-area-inset-bottom));
  opacity: 0;
  translate: 0 12px;
  transition: opacity .25s ease, translate .5s var(--ease-out);
}
.lb.is-open .lb-bar { opacity: 1; translate: 0 0; transition-delay: .15s; }
.lb-cap {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-width: 64ch;
  margin: 0;
  font-size: .875rem;
  line-height: 1.45;
  color: var(--muted);
}
.lb-ctrl { display: flex; flex: none; align-items: center; gap: .4rem; }
.lb-btn {
  display: grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .2s ease, scale .5s var(--spring);
}
.lb-btn:hover { border-color: var(--ink); scale: 1.06; }
.lb-btn:active { scale: .92; }
.lb-btn svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { margin-left: .6rem; background: var(--ink); border-color: var(--ink); color: var(--bg); }
.lb-count { min-width: 3.25rem; font-size: .8125rem; font-variant-numeric: tabular-nums; text-align: center; color: var(--muted); }
@media (max-width: 46rem) {
  .lb-stage { inset: 1rem 1rem 9rem; }
  .lb-bar { flex-direction: column; align-items: stretch; }
  .lb-cap { -webkit-line-clamp: 3; }
  .lb-ctrl { justify-content: center; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal], .js [data-intro], .js .headline .w { transform: none; filter: none; }
}
