@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

/* Arial resized to Inter's metrics so the swap does not move text. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 107.12%;
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
}

:root {
  --bg: #F5F8FC;
  --surface: #FFFFFF;
  --tint: #EAF2FF;
  --tint-border: #C5D9FA;
  --border: #D6E0EC;
  --text: #0F1B2D;
  --text-2: #3D4B5F;
  --accent: #1657C7;
  --accent-hover: #0E3F96;
  --accent-bright: #2563EB;
  --on-accent: #FFFFFF;
  --tag-text: #1B4A99;
  --brand: #5AA2FF;
  --glow-border: #9DBFF5;
  --sans: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --measure: 38rem;
  --col: 8rem;
}

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

/* The page colour sits on html so the z-index: -1 backdrop paints above it. */
html { background: var(--bg); color-scheme: light; -webkit-text-size-adjust: 100%; }

body {
  position: relative;
  margin: 0;
  border-top: 4px solid var(--brand);
  border-image: linear-gradient(90deg, var(--accent), var(--brand) 50%, var(--accent)) 1;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { --pad: 1.25rem; max-width: 51rem; margin: 0 auto; padding: 0 var(--pad); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 3;
  background: var(--accent); color: var(--on-accent);
  padding: 0.625rem 0.875rem; border-radius: 0.5rem; font-weight: 600; text-decoration: none;
}
.skip:hover { color: var(--on-accent); }
.skip:focus { top: 1rem; }
main:focus { outline: none; }

/* Backdrop. Decorative, aria-hidden, never under a pointer. */
.bg-art {
  position: absolute; inset: 0; z-index: -1;
  overflow: hidden; overflow: clip;
  contain: layout paint style;
  pointer-events: none;
}
.bg-stage { position: relative; height: 100%; max-width: 66rem; margin: 0 auto; }

.bg-blob { position: absolute; border-radius: 50%; }
.bg-blob-a {
  top: -10rem; right: -10rem; width: 26rem; height: 26rem;
  background: radial-gradient(closest-side, rgba(90, 162, 255, 0.22) 0%, rgba(90, 162, 255, 0.16) 35%,
    rgba(90, 162, 255, 0.06) 68%, rgba(90, 162, 255, 0) 100%);
}
.bg-blob-c {
  top: 52%; right: -12rem; width: 24rem; height: 24rem;
  background: radial-gradient(closest-side, rgba(90, 162, 255, 0.18) 0%, rgba(90, 162, 255, 0.13) 35%,
    rgba(90, 162, 255, 0.05) 68%, rgba(90, 162, 255, 0) 100%);
}
.bg-blob-b, .bg-blob-d { display: none; }
.bg-blob-b {
  top: 12rem; left: -20rem; width: 38rem; height: 38rem;
  background: radial-gradient(closest-side, rgba(124, 156, 255, 0.16) 0%, rgba(124, 156, 255, 0.12) 35%,
    rgba(124, 156, 255, 0.04) 68%, rgba(124, 156, 255, 0) 100%);
}
.bg-blob-d {
  top: 76%; left: -18rem; width: 36rem; height: 36rem;
  background: radial-gradient(closest-side, rgba(124, 156, 255, 0.14) 0%, rgba(124, 156, 255, 0.10) 35%,
    rgba(124, 156, 255, 0.04) 68%, rgba(124, 156, 255, 0) 100%);
}

.bg-grid {
  position: absolute; top: 0; right: -4rem; width: 30rem; height: 26rem;
  background-image: radial-gradient(circle, rgba(90, 162, 255, 0.24) 1px, rgba(90, 162, 255, 0) 1.5px);
  background-size: 1.5rem 1.5rem;
  -webkit-mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, 0) 100%);
}

/* Hero art: a clipped box in the empty right of the hero. No text ever sits over it. */
.hero-art { display: none; }

/* Header / nav */
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0 1.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem;
  position: relative; border-bottom: 1px solid transparent;
}
.site-header::after {
  content: ""; position: absolute; left: var(--pad); right: var(--pad); bottom: -1px;
  border-bottom: 1px solid var(--border);
}
.brand {
  color: var(--text); font-size: 1rem; font-weight: 700; letter-spacing: -0.01em;
  line-height: 1.5rem; text-decoration: none; display: inline-block; padding: 0.625rem 0;
}
.brand::before {
  content: ""; display: inline-block; width: 0.625rem; height: 0.625rem; margin-right: 0.5rem;
  border-radius: 0.1875rem; background: linear-gradient(135deg, var(--brand), var(--accent));
}
.brand:hover { color: var(--accent-hover); }
.site-header ul {
  list-style: none; margin: 0 -0.75rem; padding: 0; display: flex; flex-wrap: wrap;
}
.site-header nav a {
  display: inline-block; padding: 0.625rem 0.75rem; border-radius: 0.5rem;
  color: var(--text-2); font-size: 0.9375rem; font-weight: 500; line-height: 1.5rem;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}
.site-header nav a:hover { color: var(--text); background: var(--tint); }

/* Typography */
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 {
  font-size: clamp(2.5rem, 1.5rem + 4.4vw, 4.25rem); line-height: 1.1; font-weight: 700;
  letter-spacing: -0.035em; width: fit-content; max-width: 100%;
}
h2 { font-size: 1.5rem; line-height: 1.25; font-weight: 650; letter-spacing: -0.02em; margin-bottom: 1.5rem; }
h3 { font-size: 1.1875rem; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  h1 {
    background: linear-gradient(100deg, var(--text) 0%, var(--accent-hover) 55%, var(--accent) 100%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    padding-bottom: 0.08em; margin-bottom: -0.08em;
  }
  h1::selection { color: var(--on-accent); }
}

section { padding: 3rem 0; scroll-margin-top: 1rem; }
section + section { border-top: 1px solid var(--border); }

/* Section numbers. Generated, with empty alt text so heading names stay as written. */
main { counter-reset: section; }
main > section:not(.intro) > h2 { counter-increment: section; }
main > section:not(.intro) > h2::before {
  content: counter(section, decimal-leading-zero);
  content: counter(section, decimal-leading-zero) / "";
  display: block; width: fit-content; margin-bottom: 0.5rem; padding-right: 2.5rem;
  color: var(--accent-hover); font-size: 0.8125rem; line-height: 1.25rem; font-weight: 600;
  letter-spacing: 0.08em; font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, var(--accent), rgba(90, 162, 255, 0)) right center / 1.75rem 1px no-repeat;
}

/* Intro */
.intro { padding: 3.5rem 0 3rem; }
.role { color: var(--text-2); font-size: 1.0625rem; line-height: 1.5; font-weight: 500; margin: 0.875rem 0 1.5rem; }
.role-title { color: var(--text); font-weight: 600; }
.lede { font-size: 1.125rem; line-height: 1.55; letter-spacing: -0.005em; max-width: 40rem; margin-bottom: 2rem; }
.intro-links { margin: 0; }
.section-lede { color: var(--text-2); max-width: var(--measure); margin-bottom: 2rem; }

/* Buttons */
.button, .intro-links a {
  display: inline-block; color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  font-size: 1rem; font-weight: 600; line-height: 1.5rem; text-decoration: none;
  padding: 0.75rem 1.25rem; border-radius: 0.625rem;
  box-shadow: 0 1px 2px rgba(15, 27, 45, 0.12), 0 0.5rem 1.25rem -0.5rem rgba(22, 87, 199, 0.55);
}
.button:hover, .intro-links a:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent)); color: var(--on-accent);
  box-shadow: 0 1px 2px rgba(15, 27, 45, 0.12), 0 0.75rem 1.5rem -0.5rem rgba(22, 87, 199, 0.6);
}
.button:focus-visible, .intro-links a:focus-visible { border-radius: 0.625rem; }

/* Projects */
.project {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: 0.875rem;
  padding: 1.25rem; margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(15, 27, 45, 0.05);
}
.project:last-child { margin-bottom: 0; }
/* Glow and top hairline live on pseudo-elements so hover only changes opacity. */
.project::before, .project::after {
  content: ""; position: absolute; pointer-events: none; opacity: 0;
}
.project::before {
  left: 1.25rem; right: 1.25rem; top: -1px; height: 2px; border-radius: 1px;
  background: linear-gradient(90deg, var(--accent), var(--brand) 60%, rgba(90, 162, 255, 0));
}
.project::after {
  inset: -1px; border-radius: inherit;
  box-shadow: 0 0 0 1px var(--glow-border), 0 1.25rem 2.5rem -1.25rem rgba(22, 87, 199, 0.35),
    0 0.25rem 0.75rem rgba(15, 27, 45, 0.05);
}
.project:hover::before, .project:hover::after,
.project:focus-within::before, .project:focus-within::after { opacity: 1; }
.project p { max-width: var(--measure); }
.project .summary { color: var(--text-2); font-size: 1rem; line-height: 1.5; font-weight: 500; margin: 0.25rem 0 0.75rem; }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.tags li {
  font-size: 0.8125rem; line-height: 1.4; font-weight: 500; letter-spacing: 0.005em;
  color: var(--tag-text); background: var(--tint); border: 1px solid var(--tint-border);
  border-radius: 999px; padding: 0.1875rem 0.625rem;
}

/* Experience timeline */
.jobs { list-style: none; margin: 0; padding: 0; position: relative; }
.jobs::before {
  content: ""; position: absolute; top: 0.625rem; bottom: 0; left: 0.3125rem; width: 2px; border-radius: 1px;
  background: linear-gradient(to bottom, var(--accent) 0, var(--tint-border) 7rem, var(--border) 75%, rgba(214, 224, 236, 0) 100%);
}
.job { position: relative; padding: 0 0 2.25rem 1.75rem; }
.job:last-child { padding-bottom: 0; }
.job::before {
  content: ""; position: absolute; left: 0; top: 0.28rem; width: 0.75rem; height: 0.75rem;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--accent);
}
.job:first-child::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(22, 87, 199, 0.16); }
.job-dates {
  font-size: 0.875rem; line-height: 1.5; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--text-2); margin: 0 0 0.25rem;
}
.job-org { color: var(--text-2); font-size: 0.9375rem; line-height: 1.5; font-weight: 500; margin: 0.125rem 0 0.75rem; }
.job-body p, .job li { max-width: var(--measure); }
.job ul { margin: 0; padding-left: 1.125rem; }
.job li { margin-bottom: 0.375rem; }
.job li:last-child { margin-bottom: 0; }
.job li::marker { color: var(--accent); }

/* Stack */
.stack { margin: 0; display: grid; gap: 0.75rem; }
.stack div {
  background: var(--surface); border: 1px solid var(--border); border-radius: 0.875rem;
  padding: 1rem 1.125rem 0.625rem;
  box-shadow: 0 1px 2px rgba(15, 27, 45, 0.05);
}
.stack dt {
  font-size: 0.75rem; line-height: 1.25rem; font-weight: 650; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-2); margin-bottom: 0.625rem;
}
/* Each value is a span chip. The ", " separators stay in the markup at zero size. */
.stack dd { margin: 0; font-size: 0; line-height: 0; }
.stack dd span {
  display: inline-block; margin: 0 0.375rem 0.375rem 0; padding: 0.25rem 0.6875rem;
  font-size: 0.875rem; line-height: 1.4; font-weight: 500; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
}

/* Contact */
.contact-card {
  color: var(--on-accent);
  background:
    radial-gradient(60% 140% at 100% 0%, rgba(90, 162, 255, 0.22) 0%, rgba(90, 162, 255, 0) 70%),
    linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-radius: 1rem; padding: 1.5rem 1.25rem;
  display: flex; flex-direction: column; gap: 1rem;
  box-shadow: 0 1.25rem 2.5rem -1.5rem rgba(14, 63, 150, 0.6);
}
.contact-card p { margin: 0; }
.contact-card ::selection { background: var(--on-accent); color: var(--accent-hover); }
.contact-card a, .contact-card a:hover { color: var(--on-accent); }
.contact-card a:focus-visible { outline-color: var(--on-accent); }
.contact-card .button {
  display: block; text-align: center;
  background: var(--surface); color: var(--accent-hover);
  box-shadow: 0 1px 2px rgba(15, 27, 45, 0.2);
}
.contact-card .button:hover { background: var(--tint); color: var(--accent-hover); box-shadow: 0 1px 2px rgba(15, 27, 45, 0.2); }

/* Footer */
.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1.5rem;
  position: relative;
  padding-top: 1.25rem; padding-bottom: 2.5rem; margin-top: 2rem;
  color: var(--text-2); font-size: 0.875rem; line-height: 1.5rem;
}
.site-footer::before {
  content: ""; position: absolute; left: var(--pad); right: var(--pad); top: 0; height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--brand) 25%, var(--border) 60%, rgba(214, 224, 236, 0));
}
.site-footer p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.site-footer .sep { display: none; }
.site-footer a { display: inline-block; padding: 0.625rem 0; color: var(--accent-hover); font-weight: 500; }
.site-footer a:hover { color: var(--text); }
.site-footer a[href="#top"] {
  margin-left: 0.25rem; padding: 0.625rem 0.875rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); text-decoration: none;
}
.site-footer a[href="#top"]:hover { border-color: var(--glow-border); background: var(--tint); }
.site-footer a[href="#top"]::after {
  content: ""; display: inline-block; width: 0.4375rem; height: 0.4375rem; margin-left: 0.5rem;
  border-top: 1.5px solid currentColor; border-left: 1.5px solid currentColor;
  transform: translateY(0.125rem) rotate(45deg);
}

/* 404 */
.notfound { padding-block: 4rem; min-height: calc(100vh - 4px); min-height: calc(100svh - 4px); }

@media (max-width: 23.4375rem) {
  .site-header ul { margin: 0 -0.4375rem; }
  .site-header nav a { padding-inline: 0.4375rem; }
}

@media (min-width: 30rem) {
  .contact-card { flex-direction: row; align-items: center; justify-content: space-between; padding: 1.75rem; }
  .contact-card .button { display: inline-block; }
}

@media (min-width: 48rem) {
  .wrap { --pad: 1.5rem; }
  .intro { padding: 4.5rem 0 4rem; }
  .role { font-size: 1.125rem; }
  .lede { font-size: 1.25rem; }
  .project { padding: 1.5rem; }
  .project::before { left: 1.5rem; right: 1.5rem; }

  .bg-blob-a { top: -16rem; right: -14rem; width: 46rem; height: 46rem; }
  .bg-blob-b, .bg-blob-d { display: block; }
  .bg-blob-c { top: 46%; right: -18rem; width: 40rem; height: 40rem; }
  .bg-grid { right: -6rem; width: 44rem; height: 36rem; }

  .jobs::before { left: calc(var(--col) + 1.25rem - 1px); top: 0.75rem; }
  .job {
    display: grid; grid-template-columns: var(--col) minmax(0, 1fr); column-gap: 2.5rem;
    align-items: baseline; padding-left: 0;
  }
  .job::before { left: calc(var(--col) + 1.25rem - 0.375rem); top: 0.4375rem; }
  .job-dates { margin: 0; text-align: right; }

  .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notfound { padding-block: 6rem; }
}

@media (min-width: 64rem) {
  .wrap { max-width: 66rem; }
  section { padding: 4rem 0; }
  .intro { padding: 6rem 0 5.5rem; }
  main > section:not(.intro) {
    display: grid; grid-template-columns: 12rem minmax(0, 1fr); column-gap: 3rem; align-items: start;
  }
  main > section:not(.intro) > h2 {
    grid-column: 1; grid-row: 1 / span 3; margin: 0;
    position: sticky; top: 2rem;
    font-size: 1.25rem; line-height: 1.35; letter-spacing: -0.015em;
  }
  main > section:not(.intro) > :not(h2) { grid-column: 2; }

  .hero-art {
    display: block; position: absolute; top: 5.5rem; right: -2rem; width: 23.5rem; height: 31rem;
    overflow: hidden; overflow: clip;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, #000 3rem, #000 calc(100% - 5rem), rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, #000 3rem, #000 calc(100% - 5rem), rgba(0, 0, 0, 0) 100%);
  }
  .sh { position: absolute; transform: rotate(var(--rot, 0deg)); }
  .sh-ring {
    top: 5rem; left: 1rem; width: 17rem; height: 17rem; border-radius: 50%;
    border: 1px solid rgba(22, 87, 199, 0.28);
  }
  .sh-ring::after {
    content: ""; position: absolute; top: 2.125rem; left: 2.125rem; width: 0.625rem; height: 0.625rem;
    border-radius: 50%; background: var(--accent);
  }
  .sh-orb {
    top: 8rem; left: 4rem; width: 11rem; height: 11rem; border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #8FC0FF 0%, var(--brand) 35%, var(--accent) 100%);
    box-shadow: 0 2rem 3.5rem -1.5rem rgba(22, 87, 199, 0.55);
  }
  .sh-tile {
    --rot: 8deg;
    top: 15rem; left: 10.5rem; width: 8rem; height: 8rem; border-radius: 1.25rem;
    background:
      linear-gradient(var(--accent), var(--accent)) 1.25rem 1.5rem / 2.5rem 0.4375rem no-repeat,
      linear-gradient(var(--tint-border), var(--tint-border)) 1.25rem 2.75rem / 5.5rem 0.4375rem no-repeat,
      linear-gradient(var(--tint-border), var(--tint-border)) 1.25rem 4rem / 4rem 0.4375rem no-repeat,
      linear-gradient(var(--tint), var(--tint)) 1.25rem 5.25rem / 5rem 0.4375rem no-repeat,
      linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 1.25rem 2.5rem -1rem rgba(15, 27, 45, 0.22), 0 0 0 1px rgba(22, 87, 199, 0.08);
  }
  .sh-tile-sm {
    --rot: -10deg;
    top: 5.5rem; left: 13rem; width: 4.5rem; height: 4.5rem; border-radius: 1rem;
    background:
      radial-gradient(circle at 50% 50%, var(--brand) 0, var(--brand) 0.5rem, rgba(90, 162, 255, 0) calc(0.5rem + 1px)),
      linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 1rem 2rem -0.875rem rgba(15, 27, 45, 0.22), 0 0 0 1px rgba(22, 87, 199, 0.08);
  }
  .sh-plus {
    top: 24.5rem; left: 3rem; width: 1rem; height: 1rem;
    background:
      linear-gradient(var(--accent), var(--accent)) center / 100% 2px no-repeat,
      linear-gradient(var(--accent), var(--accent)) center / 2px 100% no-repeat;
    opacity: 0.55;
  }
  .sh-dot {
    top: 3.75rem; left: 6rem; width: 0.75rem; height: 0.75rem; border-radius: 50%;
    background: var(--brand);
  }
}

/* Motion. Everything that moves is inside this query; nothing below it hides content
   unless the browser also supports the scroll-driven animation that reveals it. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .button, .intro-links a { transition: transform 160ms ease, box-shadow 160ms ease; }
  .project { transition: transform 200ms ease; }
  .project::before, .project::after { transition: opacity 200ms ease; }

  @media (hover: hover) {
    .button:hover, .intro-links a:hover { transform: translateY(-2px); }
    .project:hover, .project:focus-within { transform: translateY(-3px); }
  }

  @supports (animation-timeline: view()) and (animation-range: entry 0% entry 100%) {
    /* Reading progress in the top bar. */
    body::after {
      content: ""; position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 2;
      background: linear-gradient(90deg, var(--accent-hover), var(--accent));
      transform: scaleX(0); transform-origin: 0 50%;
      animation: progress linear both; animation-timeline: scroll(root block);
      pointer-events: none;
    }

    /* Reveal. Uses translate, not transform, so the card hover lift still applies. */
    .project, .job, .stack div, .contact-card, .section-lede {
      animation: reveal linear both; animation-timeline: view(block);
      animation-range: entry 0% entry 5rem;
    }
  }

  @media (min-width: 48rem) {
    @supports (animation-timeline: view()) and (animation-range: entry 0% entry 100%) {
      /* Hero layers: offset grows over the first 60rem of scroll. speed = 1 - dy / 60rem. */
      .bg-blob-a, .bg-blob-b, .bg-grid, .sh {
        animation: drift linear both; animation-timeline: scroll(root block);
        animation-range: 0 60rem;
      }
      .bg-grid { --dy: 24rem; }                        /* 0.60x */
      .bg-blob-a { --dy: 15rem; }                      /* 0.75x */
      .bg-blob-b { --dy: 9rem; }                       /* 0.85x */
      .sh-ring { --dy: 18rem; --rot-end: 40deg; }      /* 0.70x */
      .sh-orb { --dy: 12rem; }                         /* 0.80x */
      .sh-tile { --dy: -9rem; --rot-end: 2deg; }       /* 1.15x */
      .sh-tile-sm { --dy: -18rem; --rot-end: -18deg; } /* 1.30x */
      .sh-dot { --dy: -24rem; }                        /* 1.40x */
      .sh-plus { --dy: -30rem; --rot-end: 90deg; }     /* 1.50x */

      /* Lower blobs: lag while they cross the viewport. */
      .bg-blob-c, .bg-blob-d { animation: lag linear both; animation-timeline: view(block); }
    }
  }
}

@keyframes progress { to { transform: scaleX(1); } }
@keyframes reveal {
  from { opacity: 0; translate: 0 1.25rem; }
  40% { opacity: 1; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg)); }
  to { transform: translate3d(0, var(--dy, 0rem), 0) rotate(var(--rot-end, var(--rot, 0deg))); }
}
@keyframes lag {
  from { transform: translate3d(0, -8rem, 0); }
  to { transform: translate3d(0, 8rem, 0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (forced-colors: active) {
  .bg-art { display: none; }
  h1 { background: none; color: CanvasText; }
  .contact-card { border: 1px solid CanvasText; }
  .job::before { border-color: CanvasText; }
}

@media print {
  html { background: #fff; }
  body { border-top: 0; font-size: 11pt; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bg-art, body::after, .skip, .site-header nav, .button, .intro-links,
  .site-footer a[href="#top"], .project::before, .project::after { display: none; }
  h1 { background: none; color: #000; }
  main > section:not(.intro) > h2 { position: static; }
  .project, .stack div { box-shadow: none; background: #fff; break-inside: avoid; }
  .contact-card { background: #fff; color: #000; box-shadow: none; border: 1px solid #999; }
  .job { break-inside: avoid; }
  .stack dd { font-size: inherit; line-height: inherit; }
  .stack dd span { display: inline; margin: 0; padding: 0; border: 0; background: none; font-size: inherit; line-height: inherit; font-weight: inherit; }
  a, .contact-card a { color: inherit; text-decoration: none; }
}
