/* ------------------------------------------------------------------
   Theme — warm beige / deep dark blue, Japanese-minimal restraint
------------------------------------------------------------------ */
:root {
  --bg:        #0F0E0C;
  --bg-alt:    #14120F;
  --panel:     #1A1713;
  --panel-2:   #201C16;
  --ink:       #ECE8E0;
  --ink-soft:  #B7B1A6;
  --ink-faint: rgba(236, 232, 224, .58);
  --ink-ghost: rgba(236, 232, 224, .34);
  --line:      rgba(236, 232, 224, .14);
  --line-soft: rgba(236, 232, 224, .08);
  --accent:    #E0884E;
  --accent-dim: rgba(224, 136, 78, .32);
  --serif: "Geist", -apple-system, "Helvetica Neue", sans-serif;
  --sans:  "Geist", -apple-system, "Helvetica Neue", sans-serif;
  --mono:  "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --nav-h: 68px;
  --ease:  cubic-bezier(.22, .61, .21, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* faint paper grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

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

a { color: inherit; text-decoration: none; }

/* heading kept for document structure and search results, not shown */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(1120px, 100% - 3rem);
  margin-inline: auto;
}

section { scroll-margin-top: calc(var(--nav-h) + 8px); }

/* ---------------- typography ---------------- */
.kicker {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
}
.kicker::before {
  content: "";
  width: 2.6rem;
  height: 1px;
  background: var(--ink-ghost);
  flex: none;
  transform: translateY(-3px);
}
.kicker .idx { color: var(--ink-ghost); font-variant-numeric: tabular-nums; }

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -.03em;
}
h1 em, h2 em { font-style: normal; }

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
  margin-bottom: clamp(3rem, 7vw, 5.5rem);
}
.section-head h2 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  max-width: 14em;
}
.section-head h2 em { color: var(--ink-soft); }
.section-head p {
  max-width: 44ch;
  color: var(--ink-faint);
  font-size: .95rem;
}
@media (min-width: 820px) {
  .section-head { grid-template-columns: 1fr 1.4fr; align-items: end; }
  .section-head .kicker { grid-column: 1; align-self: start; padding-top: .9em; }
  .section-head h2 { grid-column: 2; }
  .section-head p  { grid-column: 2; }
}

/* ---------------- nav ---------------- */
.site-head {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease);
}
.site-head.scrolled { border-bottom-color: var(--line-soft); }

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 2rem;
}
.brand {
  font-family: var(--serif);
  font-size: 1.06rem;
  letter-spacing: .01em;
  margin-right: auto;
}
.brand span { color: var(--ink-ghost); }
.nav-links {
  display: flex;
  gap: clamp(1rem, 3vw, 2.2rem);
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--ink-faint);
  padding: .35rem 0;
  position: relative;
  transition: color .3s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--ink);
  transition: right .35s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active::after, .nav-links a:hover::after { right: 0; }

/* ---------------- working index ---------------- */
.index-list {
  margin-top: clamp(2.2rem, 6vh, 4.2rem);
  border-top: 1px solid var(--line-soft);
}
.index-row {
  display: grid;
  grid-template-columns: 3rem 1fr auto 2.2rem;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.5rem, 3.6vh, 2.4rem) .4rem;
  border-bottom: 1px solid var(--line-soft);
  transition: background .35s var(--ease), padding .35s var(--ease);
}
.index-row:hover {
  background: var(--panel);
  padding-left: 1.2rem;
  padding-right: 1.2rem;
}
.i-idx {
  font-size: .72rem;
  letter-spacing: .26em;
  color: var(--ink-ghost);
  font-variant-numeric: tabular-nums;
}
.i-title {
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.05;
  transition: color .3s var(--ease);
}
.index-row:hover .i-title { color: var(--accent); }
.i-note {
  font-size: .88rem;
  color: var(--ink-faint);
  text-align: right;
}
.i-arrow {
  font-size: 1.3rem;
  color: var(--ink-ghost);
  justify-self: end;
  transition: transform .35s var(--ease), color .35s var(--ease);
}
.index-row:hover .i-arrow { transform: translateX(8px); color: var(--ink); }
@media (max-width: 700px) {
  .index-row { grid-template-columns: 2.4rem 1fr 2rem; gap: 1rem; }
  .i-note { display: none; }
}

/* ---------------- hero / about ---------------- */
.hero { position: relative; }
.ripple-wrap { position: relative; overflow: hidden; }
#ripple-content {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
}
#ripple-output {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-inner { width: min(1120px, 100% - 3rem); margin-inline: auto; position: relative; }

/* ---------------- sections as full pages ---------------- */
/* Sections size to their content. Only pages that genuinely hold a single
   short block (contact) opt into viewport centring via .section--center. */
.section {
  display: flex;
  flex-direction: column;
  padding: clamp(3.5rem, 8vh, 6rem) 0;
  border-top: 1px solid var(--line-soft);
}
.section:first-of-type { border-top: 0; padding-top: calc(var(--nav-h) + clamp(2rem, 5vh, 3.4rem)); }
.section--center {
  min-height: 100vh;
  min-height: 100svh;
  justify-content: center;
}
.section-alt { background: var(--bg-alt); }
.live-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: var(--ink);
  color: var(--bg);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  transition: background .35s var(--ease), transform .35s var(--ease);
}
.live-link:hover { background: var(--ink-soft); transform: translateY(-2px); }
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #9DBE8C;
  box-shadow: 0 0 0 0 rgba(157, 190, 140, .5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(157,190,140,.45); }
  70% { box-shadow: 0 0 0 8px rgba(157,190,140,0); }
  100% { box-shadow: 0 0 0 0 rgba(157,190,140,0); }
}
.text-link {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line);
  padding-bottom: .2rem;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.text-link:hover { color: var(--ink); border-color: var(--ink); }
.edu-label {
  font-size: .68rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-ghost);
  margin-bottom: 1.6rem;
}

/* ---------------- contact ---------------- */
/* Email sits alongside LinkedIn and the CV as one of three equal ways in,
   rather than a raw address printed on the page. */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.4rem;
  margin-top: 2.6rem;
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.contact-links a,
.contact-links .copy-mail {
  color: var(--ink-faint);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: .4rem;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.contact-links a:hover,
.contact-links .copy-mail:hover { color: var(--ink); border-color: var(--ink); }
.copy-mail {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  background: none;
  border: 0;
  padding: 0 0 .4rem;
  cursor: pointer;
}
.copy-mail.copied { color: #9DBE8C; border-color: rgba(157, 190, 140, .5); }

/* ---------------- sound: always on, interaction cues only ---------------- */

body { opacity: 0; animation: pageIn .55s var(--ease) forwards; }
@keyframes pageIn { to { opacity: 1; } }
body.leaving { opacity: 0; transition: opacity .18s var(--ease); }

/* ---------------- contact opener ---------------- */
.contact-h {
  font-size: clamp(2.2rem, 5.2vw, 3.8rem);
  margin: 1.8rem 0 0;
  max-width: 16ch;
}
.contact-sub {
  margin-top: 1.4rem;
  max-width: 46ch;
  font-size: clamp(.98rem, 1.4vw, 1.1rem);
  color: var(--ink-faint);
}

/* ---------------- reveal on scroll ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 640px) {
  .nav { gap: 1rem; }
  /* the links stay — on a subpage they are the only way around the site */
  .nav-links { gap: .95rem; font-size: .62rem; letter-spacing: .08em; }
  .brand { font-size: .95rem; }
  .kicker { font-size: .62rem; letter-spacing: .22em; gap: .8rem; }
  .kicker::before { width: 1.6rem; }
}
@media (max-width: 360px) {
  .nav.container { width: calc(100% - 1.6rem); }
  .nav-links { gap: .7rem; font-size: .58rem; letter-spacing: .04em; }
  .brand { font-size: .88rem; }
}

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body { animation: none; opacity: 1; }
  body.leaving { transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .live-dot { animation: none; }
  .now-status::before { animation: none; }
  .f-loop { animation: none; }
  .flow-dot { display: none; }
  .flow .f-node, .flow .f-loop-wrap { opacity: 1; transform: none; transition: none; }
  .live-link:hover { transform: none; }
  .pd-nextrow { transition: none; }
  .pd-nextrow:hover { padding-inline: .4rem; }
  .pd-nextrow:hover .n-arrow { transform: none; }
}

/* ---------------- projects: cover card grid ---------------- */
.proj-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin: clamp(1.8rem, 4vw, 3rem) 0 clamp(2.2rem, 5vw, 3.6rem);
}
.proj-head > p:first-child {
  max-width: 44ch;
  color: var(--ink-faint);
  font-size: clamp(.98rem, 1.4vw, 1.1rem);
}
.proj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.4rem, 2.8vw, 2.2rem);
}
@media (max-width: 1000px) { .proj-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .proj-grid { grid-template-columns: 1fr; } }
.proj-card { display: block; }
.proj-cover {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: var(--panel);
  transition: border-color .4s var(--ease);
}
.proj-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(.92);
  transition: transform .6s var(--ease), filter .6s var(--ease);
}
.proj-card:hover .proj-cover { border-color: var(--line); }
.proj-card:hover .proj-cover img { transform: scale(1.035); filter: saturate(1.05); }
.proj-name {
  display: block;
  font-family: "Geist Pixel", ui-monospace, monospace;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-top: 1.1rem;
  transition: color .3s var(--ease);
}
.proj-card:hover .proj-name { color: var(--accent); }
.proj-open {
  display: block;
  font-family: "Geist Pixel", ui-monospace, monospace;
  font-size: .76rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-ghost);
  margin-top: .45rem;
}

/* ==================================================================
   project detail — case study
   A document page, not a centred hero: header + media, a band of
   hard facts, narrative in side-labelled sections, and a sticky
   spec ledger carrying role, period, stack and access.
================================================================== */

/* document section: starts at the top, no viewport centring */
.section--doc {
  display: block;
  min-height: 0;
  border-top: 0;
  padding: calc(var(--nav-h) + clamp(2rem, 5vh, 3.4rem)) 0 clamp(3.5rem, 8vh, 5.5rem);
}
.pd-wrap {
  width: min(1280px, 100% - 3rem);
  margin-inline: auto;
}

.pd-back {
  display: inline-block;
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: clamp(1.8rem, 4vh, 2.8rem);
  transition: color .3s var(--ease);
}
.pd-back:hover { color: var(--ink); }

/* eyebrow: what this is, and where it sits in the set of four */
.pd-eyebrow {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: .9rem;
  margin-bottom: clamp(1.8rem, 3.5vw, 2.6rem);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-ghost);
}
.pd-pos {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  letter-spacing: .2em;
}
.pd-pos b { color: var(--ink-soft); font-weight: 400; }

/* header: title and tagline left, the one real visual right */
.pd-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 4.5vw, 4rem);
  align-items: start;
}
.pd-title {
  font-family: "Geist Pixel", ui-monospace, monospace;
  font-weight: 400;
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  letter-spacing: .02em;
  text-transform: uppercase;
  line-height: 1;
}
.pd-tagline {
  font-size: clamp(1.05rem, 1.8vw, 1.32rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-top: 1.4rem;
  max-width: 30ch;
}

/* media plate — video runs at its own height, cover art is framed
   and scaled past its burnt-in caption so only the monogram shows */
.pd-media {
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  overflow: hidden;
  background: var(--panel);
}
.pd-media video { width: 100%; height: auto; display: block; }
.pd-plate { aspect-ratio: 4 / 3; }
.pd-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.4);
}
@media (max-width: 900px) {
  .pd-hero { grid-template-columns: 1fr; }
  .pd-tagline { max-width: 46ch; }
  .pd-plate { aspect-ratio: 16 / 9; }
}

/* band of hard facts — numbers where they exist, short mono phrases
   where the honest answer isn't a number */
.pd-band {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border-block: 1px solid var(--line-soft);
  margin-top: clamp(2.6rem, 6vw, 4rem);
}
.pd-band li {
  background: var(--bg);
  padding: clamp(1.3rem, 2.4vw, 1.8rem) clamp(1rem, 1.8vw, 1.5rem);
}
.pd-band b {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.6vw, 1.95rem);
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pd-band span {
  display: block;
  margin-top: .55rem;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--ink-faint);
}

/* body: narrative left, ledger right */
.pd-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: clamp(2.4rem, 5vw, 4.5rem);
  align-items: start;
  margin-top: clamp(2.8rem, 6vw, 4.5rem);
}
@media (max-width: 900px) { .pd-body { grid-template-columns: 1fr; } }

.pd-sec {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1.6rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 1.5rem;
  margin-top: 2.6rem;
}
.pd-sec:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.pd-sec h2 {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  line-height: 1.7;
  color: var(--ink-ghost);
}
.pd-sec p {
  color: var(--ink-faint);
  font-size: 1rem;
  max-width: 62ch;
}
.pd-sec p + p { margin-top: 1.1rem; }
.pd-sec p strong { font-weight: 500; color: var(--ink); }
@media (max-width: 640px) {
  .pd-sec { grid-template-columns: 1fr; gap: .8rem; }
}

/* the ledger — a datasheet for the project */
.pd-ledger {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel);
  padding: 1.4rem;
}
@media (min-width: 901px) {
  .pd-ledger { position: sticky; top: calc(var(--nav-h) + 24px); }
}
.pd-ledger dt {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-ghost);
  border-top: 1px solid var(--line-soft);
  margin-top: 1.2rem;
  padding-top: 1.2rem;
}
.pd-ledger dt:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.pd-ledger dd {
  margin-top: .5rem;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.pd-ledger .pd-specs {
  list-style: none;
  font-family: var(--mono);
  font-size: .76rem;
  line-height: 1.95;
  color: var(--ink-soft);
  margin-top: .55rem;
}
.pd-ledger .live-link { margin-top: .7rem; width: 100%; justify-content: center; }

/* next project — echoes the index rows on the landing page */
.pd-nextrow {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 2rem;
  align-items: center;
  gap: 1.4rem;
  margin-top: clamp(3.5rem, 8vw, 6rem);
  padding: clamp(1.5rem, 3vw, 2.1rem) .4rem;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  transition: background .35s var(--ease), padding .35s var(--ease);
}
.pd-nextrow:hover { background: var(--panel); padding-inline: 1.2rem; }
.pd-nextrow .n-label {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-ghost);
}
.pd-nextrow .n-name {
  font-family: "Geist Pixel", ui-monospace, monospace;
  font-size: clamp(1.3rem, 2.8vw, 2rem);
  letter-spacing: .03em;
  text-transform: uppercase;
  line-height: 1.05;
  transition: color .3s var(--ease);
}
.pd-nextrow:hover .n-name { color: var(--accent); }
.pd-nextrow .n-arrow {
  justify-self: end;
  font-size: 1.3rem;
  color: var(--ink-ghost);
  transition: transform .35s var(--ease), color .35s var(--ease);
}
.pd-nextrow:hover .n-arrow { transform: translateX(8px); color: var(--ink); }
@media (max-width: 560px) {
  .pd-nextrow { grid-template-columns: minmax(0, 1fr) 2rem; gap: .5rem 1rem; }
  .pd-nextrow .n-label { grid-column: 1 / -1; }
}

/* ---------------- experience rail timeline ---------------- */
.tl { position: relative; }
.tl::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.2rem;
  bottom: 1.2rem;
  width: 1px;
  background: var(--line);
}
.tl-row {
  position: relative;
  display: grid;
  grid-template-columns: 7rem 1fr 2rem;
  align-items: center;
  gap: 1.4rem;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  padding: 1.7rem .5rem 1.7rem 1.7rem;
  cursor: pointer;
  transition: background .35s var(--ease);
}
.tl-row:first-child { border-top: 1px solid var(--line-soft); }
.tl-row::before {
  content: "";
  position: absolute;
  left: -4.5px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-ghost);
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.tl-row:hover { background: var(--panel); }
.tl-row:hover::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.tl-when {
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.tl-co { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.tl-name {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -.01em;
  transition: color .3s var(--ease);
}
.tl-row:hover .tl-name { color: var(--accent); }
.tl-sub { font-size: .8rem; color: var(--ink-ghost); }
.tl-arrow {
  justify-self: end;
  font-size: 1.25rem;
  color: var(--ink-ghost);
  transition: transform .35s var(--ease), color .35s var(--ease);
}
.tl-row:hover .tl-arrow { transform: translateX(6px); color: var(--ink); }
@media (max-width: 640px) {
  .tl-row { grid-template-columns: 1fr 2rem; padding-left: 1.4rem; }
  .tl-when { display: none; }
}

/* ---------------- experience sidebar ---------------- */
.xp-overlay { position: fixed; inset: 0; z-index: 80; }
.xp-overlay[hidden] { display: none; }
.xp-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 5, 4, .62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .45s var(--ease);
}
.xp-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(600px, 94vw);
  background: var(--bg);
  border-left: 1px solid var(--line);
  transform: translateX(102%);
  transition: transform .5s var(--ease);
  overflow-y: auto;
}
.xp-overlay.open .xp-backdrop { opacity: 1; }
.xp-overlay.open .xp-panel { transform: none; }
.xp-top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.8rem;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.xp-chapter {
  font-size: .66rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-ghost);
}
.xp-close {
  font-family: var(--sans);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .55rem .9rem;
  cursor: pointer;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.xp-close:hover { color: var(--ink); border-color: var(--ink-ghost); }
.xp-doc { display: none; padding: 2.2rem 1.8rem 3.5rem; }
.xp-doc.show { display: block; }
.xp-dochead { display: flex; align-items: center; gap: 1rem; }
.xp-dochead h3 { font-size: 1.3rem; font-weight: 500; letter-spacing: -.01em; }
.xp-dochead h3 em { font-style: normal; color: var(--ink-ghost); font-size: 1rem; letter-spacing: 0; }
.xp-role { border-top: 1px solid var(--line-soft); padding: 1.7rem 0; }
.xp-role h4 {
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.xp-role .xp-when {
  font-size: .76rem;
  color: var(--ink-ghost);
  letter-spacing: .06em;
  margin-top: .4rem;
}
.xp-role ul { margin: 1.1rem 0 0; padding-left: 1.1rem; }
.xp-role li { color: var(--ink-faint); font-size: .93rem; margin-bottom: .6rem; }
.xp-role li:last-child { margin-bottom: 0; }
.xp-role li::marker { color: var(--accent); }

/* ---------------- Geist Mono accents ---------------- */
.kicker,
.i-idx,
.tl-when,
.tl-sub,
.xp-chapter,
.xp-when,
.xp-close,
.edu-label,
.j-when,
.now-status,
.tool-name { font-family: var(--mono); }

/* ---------------- about: the curiosity (mini timeline) ---------------- */
.journey {
  list-style: none;
  max-width: 860px;
  border-top: 1px solid var(--line-soft);
}
.j-row {
  display: grid;
  grid-template-columns: 9rem 3rem 1fr;
  align-items: baseline;
  gap: 1.4rem;
  padding: 2rem .4rem;
  border-bottom: 1px solid var(--line-soft);
  transition: background .35s var(--ease);
}
.j-row:hover { background: var(--panel); }
.j-when {
  display: flex;
  align-items: center;
  gap: .85rem;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.j-when::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-ghost);
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.j-row:hover .j-when::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.j-line { position: relative; height: 1px; }
.j-dash {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--line);
}
.j-row p:last-child {
  color: var(--ink-faint);
  font-size: .98rem;
  line-height: 1.65;
  max-width: 58ch;
}
.j-row p strong { font-weight: 500; color: var(--ink); }
@media (max-width: 640px) {
  .j-row { grid-template-columns: 1fr; gap: .55rem; padding: 1.7rem .2rem; }
  .j-line { display: none; }
}
.now-status {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin-top: 2.6rem;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color .3s var(--ease);
}
.now-status:hover { color: var(--ink); }
.now-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9DBE8C;
  animation: pulse 2.4s infinite;
}
.now-status .arrow { font-family: var(--serif); text-transform: none; letter-spacing: 0; }

/* ---------------- about: tools grid ---------------- */
.tool-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}
.tool {
  background: var(--panel);
  padding: clamp(1.6rem, 3vw, 2.2rem) 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: background .35s var(--ease);
}
.tool:hover { background: var(--panel-2); }
.tool-mark-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 1.25rem;
  flex: none;
}
.tool-mark {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  object-position: center;
  opacity: .8;
  transition: opacity .35s var(--ease);
}
/* skills slash is thin — slight optical bump */
.tool-mark--skills { width: 34px; height: 44px; }
.tool:hover .tool-mark { opacity: 1; }
.tool-name {
  font-size: .78rem;
  letter-spacing: .06em;
  color: var(--ink-soft);
  transition: color .3s var(--ease);
}
.tool:hover .tool-name { color: var(--accent); }
.tool-role { font-size: .78rem; color: var(--ink-ghost); margin-top: .3rem; }
@media (max-width: 900px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------------- about: workflow diagram ---------------- */
.flow { overflow-x: auto; scrollbar-width: thin; }
.flow-svg { display: block; width: 100%; min-width: 900px; height: auto; }
.f-link { stroke: var(--ink-ghost); stroke-width: 1; fill: none; }
.f-box { fill: var(--panel); stroke: var(--line); }
.f-title {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .18em;
  fill: var(--ink);
}
.f-desc { font-size: 12px; fill: var(--ink-faint); }
.f-node--accent .f-box { stroke: var(--accent); }
.f-node--accent .f-title { fill: var(--accent); }
.f-sub rect { fill: var(--panel-2); stroke: var(--line-soft); }
.f-sub text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  fill: var(--ink-soft);
}
.f-loop {
  stroke: var(--ink-ghost);
  stroke-width: 1;
  stroke-dasharray: 5 7;
  animation: flowdash 1.1s linear infinite;
}
.f-loop-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .3em;
  fill: var(--ink-ghost);
}
@keyframes flowdash { to { stroke-dashoffset: -12; } }

/* node stagger, driven by the existing .reveal observer */
.flow .f-node,
.flow .f-loop-wrap {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.flow.in .f-node,
.flow.in .f-loop-wrap { opacity: 1; transform: none; }
.flow.in .f-node:nth-of-type(1) { transition-delay: .05s; }
.flow.in .f-node:nth-of-type(2) { transition-delay: .12s; }
.flow.in .f-node:nth-of-type(3) { transition-delay: .19s; }
.flow.in .f-node:nth-of-type(4) { transition-delay: .26s; }
.flow.in .f-node:nth-of-type(5) { transition-delay: .33s; }
.flow.in .f-node:nth-of-type(6) { transition-delay: .4s; }
/* the case-study diagrams run to 8 nodes; no-op on about.html, which has 6 */
.flow.in .f-node:nth-of-type(7) { transition-delay: .47s; }
.flow.in .f-node:nth-of-type(8) { transition-delay: .54s; }

/* horizontal swipe on the diagram shouldn't trigger browser back-navigation */
.flow { overscroll-behavior-x: contain; }

/* diagram as a case-study section — sits inside .pd-wrap, not .container */
.flow--pd { margin-top: clamp(2.6rem, 6vw, 4rem); }
.flow-cap {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-ghost);
  margin-bottom: 1.1rem;
}

/* off-axis nodes read as annotation, not as a stage on the main path.
   No dash pattern here — that would compete with the animated .f-loop. */
.f-node--aside .f-box { fill: none; stroke: var(--line-soft); }
.f-node--aside .f-title { fill: var(--ink-soft); }

/* hero without a media column, for pages where the diagram is the visual */
.pd-hero--solo { grid-template-columns: 1fr; }
.pd-hero--solo .pd-tagline { max-width: 52ch; }

/* ---------------- about ---------------- */
/* About borrows the case-study grammar so the site speaks one language:
   the same eyebrow rule, the same side-labelled sections. */
.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 1.8rem;
  margin-top: 2rem;
}
.about-portrait {
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  overflow: hidden;
  background: var(--panel);
  max-width: 300px;
  margin-left: auto;
}
.about-portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 7 / 9;
  object-fit: cover;
}
@media (max-width: 900px) {
  .about-portrait { max-width: 180px; margin-left: 0; order: -1; }
}
/* taller blocks than a paragraph, so they need more air than .pd-sec gives */
.pd-sec--block { margin-top: clamp(3.5rem, 8vw, 5.5rem); }
.pd-sec--block > div { min-width: 0; }

/* ---------------- quiet dither: canvas fields & cover monograms ---------------- */
.hero-dither,
.contact-dither {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero-dither { opacity: .5; }
.contact-dither {
  opacity: .45;
  -webkit-mask-image: radial-gradient(120% 95% at 20% 32%, #000 0%, transparent 72%);
  mask-image: radial-gradient(120% 95% at 20% 32%, #000 0%, transparent 72%);
}
.hero-dither canvas,
.contact-dither canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.section--center { position: relative; }
.section--center .container { position: relative; z-index: 1; }

.proj-cover { position: relative; }
.proj-cover canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.proj-cover.dithered img { visibility: hidden; }

/* ---------------- landing: kicker + availability ---------------- */
.hero-kicker { align-items: baseline; }
.k-avail {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink-faint);
  letter-spacing: .22em;
  transition: color .3s var(--ease);
}
.k-avail:hover { color: var(--ink); }
.k-avail::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9DBE8C;
  animation: pulse 2.4s infinite;
}
@media (max-width: 640px) {
  .hero-kicker { flex-wrap: wrap; row-gap: .7rem; }
  .k-avail { margin-left: 0; }
}

/* ---------------- projects: card meta line ---------------- */
.proj-meta {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-ghost);
  margin-top: .55rem;
}
.m-live {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--ink-faint);
}
.m-live::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9DBE8C;
  animation: pulse 2.4s infinite;
}

/* ---------------- contact: status line ---------------- */
.contact-status {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin-top: 2.2rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.contact-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9DBE8C;
  animation: pulse 2.4s infinite;
}

/* ---------------- experience: one-line role summary in the row ---------------- */
.tl-note {
  display: block;
  width: 100%;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--ink-ghost);
  margin-top: .3rem;
}

/* ---------------- about: the opener is a bio, let it breathe ---------------- */
.pd-tagline--wide { max-width: 46ch; }

@media (prefers-reduced-motion: reduce) {
  .k-avail::before,
  .m-live::before,
  .contact-status::before { animation: none; }
}
