/* =========================================================
   Zac Matthias — Portfolio
   White Sanctuary
   ========================================================= */

:root {
  --bg: #fafaf7;
  /* off-white, warm */
  --bg-soft: #f3f2ec;
  /* whisper panel */
  --ink: #111111;
  /* near-black */
  --ink-soft: #3f3f3d;
  /* secondary text — bumped for WCAG */
  --ink-mute: #6c6c68;
  /* tertiary, eyebrows — bumped for WCAG */
  --rule: #e6e4dc;
  /* hairlines */
  --accent: #b08a5b;
  --accent-rgb: 176, 138, 91;
  /* warm sand — single, quiet accent */
  --accent-energy: 1;
  --lotus-glow-alpha: .36;
  --lotus-glow-alpha-dark: .5;
  --lotus-base-opacity: .5;
  --lotus-user-scale: 1;
  --lotus-spin-mult: 1;

  --max: 1120px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --f-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #121315;
  --bg-soft: #1a1c20;
  --ink: #efefea;
  --ink-soft: #c8c8c2;
  --ink-mute: #9a9b95;
  --rule: #2a2d33;
  --accent: #cfab74;
  --accent-rgb: 207, 171, 116;
  --lotus-base-opacity: .7;
  color-scheme: dark;
}

html[data-accent="sand"] {
  --accent: #b08a5b;
  --accent-rgb: 176, 138, 91;
}

html[data-accent="ember"] {
  --accent: #e06343;
  --accent-rgb: 224, 99, 67;
}

html[data-accent="ocean"] {
  --accent: #5a9bb2;
  --accent-rgb: 90, 155, 178;
}

html[data-accent="violet"] {
  --accent: #8c70d8;
  --accent-rgb: 140, 112, 216;
}

html[data-accent="forest"] {
  --accent: #4f8a63;
  --accent-rgb: 79, 138, 99;
}

html[data-accent="mono"] {
  --accent: #777777;
  --accent-rgb: 119, 119, 119;
}

::selection {
  background: color-mix(in oklab, var(--accent) 34%, transparent);
  color: var(--ink);
}

@view-transition {
  navigation: auto;
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

/* ---------- a11y ---------- */
.skip {
  position: absolute;
  left: 1rem;
  top: 1rem;
  transform: translateY(calc(-100% - 2rem));
  background: var(--ink);
  color: var(--bg);
  padding: .5rem .75rem;
  z-index: 1000;
}

.skip:focus {
  transform: none;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gutter);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}

.nav.is-scrolled {
  border-bottom-color: var(--rule);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
}

.nav__brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}

.nav__mark {
  width: 48px;
  height: 34px;
  box-sizing: border-box;
  padding: 7px 6px;
  display: block;
  border: 1px solid var(--ink);
  color: var(--ink);
  fill: currentColor;
}

.theme-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid var(--rule);
  background: var(--bg);
  color: var(--ink-soft);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--ink-mute);
  background: var(--bg-soft);
}

.theme-toggle__icon {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  line-height: 0;
}

.theme-toggle__icon svg {
  width: 17px;
  height: 17px;
  display: block;
}

.settings-toggle {
  text-decoration: none;
}

.settings-toggle[aria-current="page"] {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--bg-soft);
}

/* hamburger — mobile only */
.nav__burger {
  display: none;
  background: none;
  border: 0;
  padding: .4rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 70;
}

.nav__burger-bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  margin: 5px auto;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
  transform-origin: center;
}

.nav__burger[aria-expanded="true"] .nav__burger-bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav__burger[aria-expanded="true"] .nav__burger-bar:nth-child(2) {
  opacity: 0;
}

.nav__burger[aria-expanded="true"] .nav__burger-bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav__links {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.nav__links>a {
  font-size: .9rem;
  color: var(--ink-soft);
  position: relative;
  transition: color .2s var(--ease);
}

.nav__links>a:hover {
  color: var(--ink);
}

.nav__links>a[aria-current="page"] {
  color: var(--ink);
}

.nav__links>a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}

.nav__links>a:hover::after,
.nav__links>a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* dropdown group */
.nav__group {
  position: relative;
}

.nav__toggle {
  font-family: inherit;
  font-size: .9rem;
  color: var(--ink-soft);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  position: relative;
  transition: color .2s var(--ease);
}

.nav__toggle:hover,
.nav__toggle[aria-expanded="true"] {
  color: var(--ink);
}

.nav__toggle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}

.nav__toggle:hover::after,
.nav__toggle[aria-expanded="true"]::after {
  transform: scaleX(1);
}

.nav__caret {
  display: inline-block;
  width: .42rem;
  height: .42rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  font-size: 0;
  transition: transform .25s var(--ease);
  transform-origin: center;
  transform: translateY(-.12rem) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__caret {
  transform: translateY(.08rem) rotate(225deg);
}

.nav__menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 320px;
  background: var(--bg);
  border: 1px solid var(--rule);
  padding: .35rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  pointer-events: none;
  z-index: 60;
}

.nav__menu:not([hidden]) {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.nav__menu[hidden] {
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.nav__menu-head {
  display: block;
  padding: .9rem 1rem 1rem;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  transition: background .2s var(--ease);
}

.nav__menu-head:hover {
  background: var(--bg-soft);
}

.nav__menu-title {
  display: block;
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: .25rem;
}

.nav__menu-sub {
  display: block;
  font-size: .78rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.nav__menu-kind {
  display: block;
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: .35rem;
}

.nav__menu-section {
  margin: 0;
  padding: .85rem 1rem .25rem;
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.nav__menu-list {
  display: flex;
  flex-direction: column;
  padding: .35rem 0;
}

.nav__menu-list a {
  display: block;
  padding: .55rem 1rem;
  font-size: .88rem;
  color: var(--ink-soft);
  transition: background .15s var(--ease), color .15s var(--ease);
}

.nav__menu-list a:hover {
  background: var(--bg-soft);
  color: var(--ink);
}

.nav__menu-list a[aria-current="page"] {
  color: var(--ink);
  background: var(--bg-soft);
  position: relative;
}

.nav__menu-list a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
}

/* ---- mobile nav drawer ---- */
@media (max-width: 820px) {
  .nav {
    padding: .9rem var(--gutter);
  }

  .nav__burger {
    display: block;
  }

  .nav__links {
    position: fixed;
    inset: 0;
    background: var(--bg);
    padding: 6rem var(--gutter) 2rem;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
    overflow-y: auto;
    z-index: 60;
  }

  .nav__links.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .nav__links>a,
  .nav__group {
    border-top: 1px solid var(--rule);
  }

  .nav__links>a {
    padding: 1.1rem 0;
    font-size: 1.05rem;
    color: var(--ink);
  }

  .nav__links>a::after {
    display: none;
  }

  .nav__group {
    display: block;
    padding: 0;
  }

  .nav__toggle {
    width: 100%;
    padding: 1.1rem 0;
    font-size: 1.05rem;
    color: var(--ink);
    justify-content: space-between;
  }

  .nav__toggle::after {
    display: none;
  }

  /* on mobile, the submenu becomes an inline expanded list, not a popover */
  .nav__menu {
    position: static;
    min-width: 0;
    width: 100%;
    border: 0;
    padding: 0 0 .75rem;
    background: transparent;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    max-height: none;
    overflow: visible;
  }

  .nav__menu[hidden] {
    display: none;
  }

  .nav__menu-head {
    padding: .5rem 0 .75rem;
    border-bottom: 1px solid var(--rule);
  }

  .nav__menu-section {
    padding: .85rem 0 .25rem;
  }

  .nav__menu-list a {
    padding: .65rem 0 .65rem 1rem;
    font-size: .95rem;
  }

  .nav__menu-list {
    max-height: none;
    overflow: visible;
  }

  .nav__menu-list a[aria-current="page"] {
    background: transparent;
  }

  .nav__menu-list a[aria-current="page"]::before {
    left: 0;
    width: 2px;
  }
}

@media (max-width: 480px) {

  .nav__links>a,
  .nav__toggle {
    font-size: 1rem;
  }
}

/* ---------- shared section ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(5rem, 11vw, 9rem) var(--gutter);
}

.section__head {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section__num {
  font-family: var(--f-mono);
  font-size: .78rem;
  color: var(--ink-mute);
  letter-spacing: .18em;
  display: inline-block;
  margin-bottom: 1rem;
}

.section__title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
}

.section__kicker {
  margin-top: .9rem;
  color: var(--ink-soft);
  max-width: 52ch;
}

.section__external {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  color: var(--ink);
  font-weight: 500;
  position: relative;
  white-space: nowrap;
}

.section__external::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}

.section__external:hover::after,
.section__external:focus-visible::after {
  transform: scaleX(1);
}

.section__external span {
  display: inline-block;
  transition: transform .25s var(--ease);
}

.section__external:hover span,
.section__external:focus-visible span {
  transform: translate(1px, -1px);
}

.prose p {
  max-width: 62ch;
  color: var(--ink-soft);
  margin: 0 0 1.1em;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--ink);
  font-weight: 500;
}

.ares-intro {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center;
  margin-bottom: 1.5rem;
}

.ares-intro__body p {
  max-width: 56ch;
  margin-bottom: 0;
}

.ares-intro__model {
  margin-top: 1rem;
  font-family: var(--f-mono);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.ares-badge {
  margin: 0;
  width: min(100%, 170px);
  view-transition-name: ares-mark;
  contain: layout paint;
}

.ares-badge__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.ares-badge__outer,
.ares-badge__inner {
  fill: url(#ares-glow);
}

.ares-badge__outer {
  stroke: url(#ares-edge);
  stroke-width: 2.2;
}

.ares-badge__inner {
  stroke: rgba(198, 207, 255, .55);
  stroke-width: 1.15;
}

.ares-badge__glow {
  fill: url(#ares-glow);
  opacity: .72;
  animation: aresPulse 7s ease-in-out infinite;
  transform-origin: center;
}

.ares-badge__stars circle {
  fill: rgba(241, 245, 255, .92);
  animation: aresTwinkle 4.5s ease-in-out infinite;
  transform-origin: center;
}

.ares-badge__stars circle:nth-child(2n) {
  animation-duration: 5.8s;
}

.ares-badge__stars circle:nth-child(3n) {
  animation-duration: 6.7s;
}

.ares-badge__mark {
  animation: aresFloat 8s ease-in-out infinite;
  transform-origin: center;
}

.ares-badge__monolith {
  fill: url(#ares-core);
}

.ares-badge__cut {
  fill: #2a2b46;
  opacity: .9;
}

.ares-badge__base {
  fill: none;
  stroke: rgba(223, 230, 255, .95);
  stroke-width: 2.2;
  stroke-linecap: round;
}

.ares-badge__base--short {
  opacity: .72;
}

.ares-badge__dot {
  fill: rgba(223, 230, 255, .95);
}

.ares-badge__dot--small {
  opacity: .72;
}

.ares-badge__text {
  fill: #e8ecff;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  opacity: .9;
}

@keyframes aresFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes aresPulse {
  0%, 100% { opacity: .62; transform: scale(1); }
  50% { opacity: .88; transform: scale(1.035); }
}

@keyframes aresTwinkle {
  0%, 100% { opacity: .45; transform: scale(1); }
  40% { opacity: 1; transform: scale(1.25); }
  70% { opacity: .7; transform: scale(.95); }
}

@media (max-width: 640px) {
  .ares-intro {
    grid-template-columns: 1fr;
    align-items: start;
    margin-bottom: 1.7rem;
  }

  .ares-badge {
    width: min(100%, 240px);
  }
}

.about__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.about__portrait {
  margin: 0;
  position: sticky;
  top: 6.5rem;
}

.about__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: grayscale(15%) contrast(1.02);
  background: var(--bg-soft);
}

.about__portrait::before {
  content: "";
  position: absolute;
  inset: 12px -12px -12px 12px;
  border: 1px solid var(--rule);
  z-index: -1;
  pointer-events: none;
}

.about__portrait-cap {
  margin: .9rem 0 0;
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  color: var(--ink-mute);
  text-transform: uppercase;
  text-align: right;
}

@media (max-width: 900px) {
  .about__layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about__portrait {
    position: relative;
    top: auto;
    max-width: 220px;
  }

  .about__portrait-cap {
    text-align: left;
  }
}

/* ---------- hero ---------- */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: visible;
}

.hero__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ambient lotus mandala — anchored behind the title, spins in place */
.hero__lotus {
  --lotus-frame-scale: 1.22;
  --lotus-inner-scale: 0.8197;
  position: fixed;
  left: 0;
  top: 0;
  width: calc(clamp(360px, 38vw, 520px) * var(--lotus-frame-scale) * var(--lotus-user-scale));
  height: calc(clamp(360px, 38vw, 520px) * var(--lotus-frame-scale) * var(--lotus-user-scale));
    transform: translate(calc(var(--lotus-x, 61vw) - 50%),
      calc(var(--lotus-y, 47vh) - 50%)) rotate(var(--lotus-rot, 0deg)) scale(calc(var(--lotus-scale, 1) * var(--lotus-inner-scale)));
  transform-origin: center;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
  color: var(--accent);
  opacity: 0;
  animation: lotusFadeIn .8s var(--ease) .05s forwards;
  filter: drop-shadow(0 0 26px rgba(196, 42, 24, var(--lotus-glow-alpha)));
  mix-blend-mode: multiply;
  will-change: transform;
  transition: opacity .4s var(--ease);
}

html[data-theme="dark"] .hero__lotus {
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 34px rgba(255, 76, 48, var(--lotus-glow-alpha-dark)));
}

html[data-theme="dark"] .lotus__ring {
  stroke: #e8896a;
  opacity: .45;
}

html[data-theme="dark"] .lotus__ticks line {
  stroke: #e8896a;
  opacity: .55;
}

html[data-theme="dark"] .lotus__petal {
  opacity: .92;
}

/* halo, rings, petals, ticks, core */
.lotus__halo {
  fill: rgba(var(--accent-rgb), .18);
  transform-origin: center;
  transform-box: fill-box;
  animation: lotusHalo 5s ease-in-out infinite;
}

.lotus__ring {
  fill: none;
  stroke: rgba(var(--accent-rgb), .56);
  stroke-width: 1;
  opacity: .38;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1700;
  stroke-dashoffset: 1700;
  animation: lotusRingDraw 2.3s var(--ease) forwards;
}

.lotus__ring--gold {
  stroke: rgba(var(--accent-rgb), .92);
  opacity: .88;
  stroke-width: 1.7;
  animation-duration: 2.6s;
  animation-delay: .12s;
}

.lotus__ticks line {
  stroke: rgba(var(--accent-rgb), .5);
  stroke-width: .85;
  opacity: .5;
  vector-effect: non-scaling-stroke;
}

.lotus__petal {
  fill: none;
  stroke: rgba(var(--accent-rgb), .78);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .04;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 860;
  stroke-dashoffset: 860;
  animation: lotusDraw 2.75s cubic-bezier(.2, .7, .15, 1) forwards;
}

.lotus__petal--gold {
  stroke-width: 2;
  animation-duration: 3s;
  animation-delay: .18s;
}

.lotus__core {
  fill: rgba(var(--accent-rgb), .95);
  stroke: none;
  opacity: 1;
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), .85));
  transform-origin: center;
  transform-box: fill-box;
  animation: lotusCorePulse 2.4s ease-in-out infinite;
}

.lotus__spin-slow {
  transform-origin: center;
  transform-box: fill-box;
  animation: lotusSpin calc(55s / var(--lotus-spin-mult)) linear infinite;
}

.lotus__spin-rev {
  transform-origin: center;
  transform-box: fill-box;
  animation: lotusSpin calc(85s / var(--lotus-spin-mult)) linear infinite reverse;
}

@keyframes lotusFadeIn {
  to {
    opacity: min(calc(var(--lotus-base-opacity) * var(--accent-energy)), .95);
  }
}

@keyframes lotusDraw {
  0% {
    stroke-dashoffset: 860;
    opacity: .02;
  }

  62% {
    opacity: .95;
  }

  100% {
    stroke-dashoffset: 0;
    opacity: .82;
  }
}

@keyframes lotusRingDraw {
  0% {
    stroke-dashoffset: 1700;
    opacity: .05;
  }

  70% {
    opacity: .62;
  }

  100% {
    stroke-dashoffset: 0;
    opacity: .38;
  }
}

@keyframes lotusSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes lotusCorePulse {

  0%,
  100% {
    transform: scale(1);
    opacity: .8;
  }

  50% {
    transform: scale(1.32);
    opacity: 1;
  }
}

@keyframes lotusHalo {

  0%,
  100% {
    opacity: .6;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.14);
  }
}

.hero__inner--split {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.hero__text {
  min-width: 0;
}

.hero__title {
  font-size: clamp(2.5rem, 9vw, 6.5rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0 .35em;
  position: relative;
  isolation: isolate;
}

/* frosted glass panel — hidden until the name is hovered, so it never sits
   permanently over the lotus behind it */
.hero__title::before {
  content: "";
  position: absolute;
  inset: -.32em -.5em;
  z-index: -1;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .06) 45%, rgba(255, 255, 255, .3) 70%, rgba(255, 255, 255, .06));
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .6),
    inset 0 -14px 26px rgba(255, 255, 255, .08),
    0 20px 44px rgba(20, 20, 15, .1);
  opacity: 0;
  transform: scale(.97);
  transition: opacity .32s var(--ease), transform .32s var(--ease);
  pointer-events: none;
}

.hero__title:hover::before,
.hero__title:focus-within::before {
  opacity: 1;
  transform: scale(1);
}

html[data-theme="dark"] .hero__title::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .02) 45%, rgba(255, 255, 255, .1) 70%, rgba(255, 255, 255, .02));
  border-color: rgba(255, 255, 255, .16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    inset 0 -14px 26px rgba(255, 255, 255, .04),
    0 20px 44px rgba(0, 0, 0, .4);
}

/* Each word is a liquid-glass surface: a soft blurred bloom sits behind a
   crisp glass-clipped fill whose highlight sweeps across on its own, and
   tracks the cursor whenever the pointer is near the word. */
.hero__title-word {
  position: relative;
  display: inline-block;
  --brush-x: 50%;
}

.hero__title-word__outline,
.hero__title-word__fill {
  white-space: nowrap;
}

.hero__title-word__outline {
  position: absolute;
  inset: 0;
  color: var(--ink);
  opacity: .16;
  filter: blur(9px);
  z-index: 0;
  pointer-events: none;
}

html[data-theme="dark"] .hero__title-word__outline {
  opacity: .3;
}

.hero__title-word__fill {
  position: relative;
  display: inline-block;
  z-index: 1;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-image:
    linear-gradient(115deg, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, .95) 48%, rgba(255, 255, 255, 0) 66%),
    linear-gradient(var(--ink), var(--ink));
  background-blend-mode: overlay;
  background-size: 240% 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: -30% 0, 0 0;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .3));
  animation: glassSheen 6.5s ease-in-out infinite;
  transition: background-position .18s linear;
}

html[data-glass="off"] .hero__title::before {
  display: none;
}

html[data-glass="off"] .hero__title-word__fill {
  animation: none;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-size: 100% 100%;
  background-position: 0 0;
}

html[data-theme="dark"] .hero__title-word__fill {
  background-image:
    linear-gradient(115deg, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, .55) 48%, rgba(0, 0, 0, 0) 66%),
    linear-gradient(var(--ink), var(--ink));
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .3));
}

.hero__title-word.is-hot .hero__title-word__fill {
  animation-play-state: paused;
  background-position: var(--brush-x) 0, 0 0;
}

@keyframes glassSheen {

  0%,
  100% {
    background-position: -30% 0, 0 0;
  }

  50% {
    background-position: 130% 0, 0 0;
  }
}

/* on-load fade-rise (per-element via --d) */
.reveal-up {
  opacity: 0;
  transform: translateY(14px);
  animation: revealUp .9s var(--ease) forwards;
  animation-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: none;
  }
}

.hero__portrait {
  margin: 0;
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 380px;
}

.hero__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: grayscale(15%) contrast(1.02);
  transition: filter .6s var(--ease);
  background: var(--bg-soft);
}

.hero__portrait:hover .hero__image {
  filter: none;
}

.hero__portrait::before {
  content: "";
  position: absolute;
  inset: 12px -12px -12px 12px;
  border: 1px solid var(--rule);
  z-index: -1;
  pointer-events: none;
}

.hero__portrait-cap {
  margin: .9rem 0 0;
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  color: var(--ink-mute);
  text-transform: uppercase;
  text-align: right;
}

/* ---- hero @ tablet & mobile ---- */
@media (max-width: 820px) {
  .hero {
    min-height: auto;
    padding: 5rem 0 4rem;
    overflow: clip;
  }

  .hero__inner--split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero__portrait {
    justify-self: start;
    max-width: 200px;
    order: -1;
  }

  .hero__portrait-cap {
    text-align: left;
  }

  .hero__lotus {
    position: absolute;
    transform: translate(-50%, -50%) scale(var(--lotus-inner-scale));
    /* sit just behind the title, smaller, anchored */
    left: 66%;
    top: 55%;
    width: calc(min(90vw, 460px) * var(--lotus-frame-scale) * var(--lotus-user-scale));
    height: calc(min(90vw, 460px) * var(--lotus-frame-scale) * var(--lotus-user-scale));
  }
}

@media (max-width: 480px) {
  .hero__lotus {
    width: calc(95vw * var(--lotus-frame-scale) * var(--lotus-user-scale));
    height: calc(95vw * var(--lotus-frame-scale) * var(--lotus-user-scale));
    left: 67%;
    top: 56%;
  }

  .hero__portrait {
    max-width: 160px;
  }
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: .78rem;
  color: var(--ink-mute);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin: 0 0 1.75rem;
}

.hero__role {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 42ch;
  margin: 0 0 2.5rem;
}

.hero__cta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero__rule {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 0;
  height: 1px;
  background: var(--rule);
}

.link {
  font-size: .95rem;
  position: relative;
  padding-bottom: 4px;
  transition: color .2s var(--ease);
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transition: transform .35s var(--ease);
}

.link--arrow {
  color: var(--ink);
}

.link--arrow::after {
  transform: scaleX(1);
}

.link--arrow::before {
  content: "→";
  margin-right: .5rem;
  display: inline-block;
  transition: transform .3s var(--ease);
}

.link--arrow:hover::before {
  transform: translateX(4px);
}

.link--muted {
  color: var(--ink-soft);
}

.link--muted::after {
  transform: scaleX(0);
}

.link--muted:hover {
  color: var(--ink);
}

.link--muted:hover::after {
  transform: scaleX(1);
}

/* ---------- feature section (TyreSense) ---------- */
.section--feature {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.case {
  display: grid;
  gap: clamp(2rem, 4vw, 3.25rem);
}

.case__row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: start;
}

.case__label {
  font-family: var(--f-mono);
  font-size: .78rem;
  letter-spacing: .18em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin: .35rem 0 0;
  font-weight: 400;
}

.case__body {
  color: var(--ink-soft);
}

.case__body p {
  margin: 0 0 1em;
  max-width: 62ch;
}

.case__body p:last-child {
  margin-bottom: 0;
}

.case__body strong {
  color: var(--ink);
  font-weight: 500;
}

.case__list {
  margin: 1em 0;
  padding: 0;
  display: grid;
  gap: .5rem;
  max-width: 62ch;
}

.case__list li {
  position: relative;
  padding-left: 1.25rem;
}

.case__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .7em;
  width: 8px;
  height: 1px;
  background: var(--ink-mute);
}

.case__aside {
  margin-top: 1.5em !important;
  padding: 1.25rem 1.5rem;
  background: var(--bg-soft);
  border-left: 2px solid var(--accent);
  font-size: .95rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 0 0 1.5rem;
  max-width: 62ch;
}

.metric {
  display: flex;
  flex-direction: column;
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
}

.metric__value {
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.metric__label {
  font-size: .8rem;
  color: var(--ink-mute);
  letter-spacing: .04em;
  margin-top: .35rem;
}

.metric__note {
  font-size: .7rem;
  color: var(--ink-mute);
  opacity: .55;
  margin-top: .2rem;
  font-style: italic;
}

@media (max-width: 720px) {
  .case__row {
    grid-template-columns: 1fr;
    gap: .6rem;
  }

  .case__label {
    margin: 0;
  }

  .metrics {
    grid-template-columns: 1fr;
  }
}

/* ---------- case index (TyreSense hub) ---------- */
.case-index {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.case-index__item {
  background: var(--bg);
}

.case-index__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 2rem 1.75rem 1.75rem;
  transition: background .35s var(--ease);
}

.case-index__link:hover {
  background: var(--bg-soft);
}

.case-index__link:hover .case-index__cta span {
  transform: translateX(5px);
}

.case-index__num {
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin: 0 0 1.25rem;
}

.case-index__title {
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 .85rem;
}

.case-index__desc {
  color: var(--ink-soft);
  font-size: .95rem;
  margin: 0 0 1.75rem;
  flex: 1;
}

.case-index__cta {
  font-size: .85rem;
  color: var(--ink);
  margin: 0;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}

.case-index__cta span {
  display: inline-block;
  margin-left: .25rem;
  transition: transform .3s var(--ease);
}

.case-index__note {
  margin: 1.75rem 0 0;
  font-size: .82rem;
  color: var(--ink-mute);
  font-style: italic;
}

@media (max-width: 900px) {
  .case-index {
    grid-template-columns: 1fr;
  }
}

/* ---------- ARES cards ---------- */
.cards {
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.card {
  background: var(--bg);
  padding: 1.55rem 1.4rem;
  display: flex;
  flex-direction: column;
  transition: background .3s var(--ease);
}

.card:hover {
  background: var(--bg-soft);
}

.card__tag {
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin: 0 0 1.25rem;
}

.card__title {
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 .9rem;
}

.card__body {
  color: var(--ink-soft);
  font-size: .95rem;
  margin: 0 0 1.5rem;
  flex: 1;
}

.card__link {
  font-size: .85rem;
  color: var(--ink);
  align-self: flex-start;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.card__link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 820px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

/* ---------- work list ---------- */
.work {
  display: grid;
}

.work__item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}

.work__item:last-child {
  border-bottom: 1px solid var(--rule);
}

.work__tag {
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin: 0 0 .75rem;
}

.work__title {
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 .65rem;
}

.work__desc {
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 .85rem;
}

.work__stack {
  font-family: var(--f-mono);
  font-size: .78rem;
  color: var(--ink-mute);
  margin: 0;
}

.work__links {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  align-items: flex-end;
  white-space: nowrap;
}

.work__links a {
  font-size: .88rem;
  color: var(--ink-soft);
  transition: color .2s var(--ease);
}

.work__links a:hover {
  color: var(--ink);
}

.work__more {
  margin-top: 2rem;
  font-size: .92rem;
  color: var(--ink-soft);
}

.work__more a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  transition: border-color .2s var(--ease);
}

.work__more a:hover {
  border-color: var(--ink);
}

@media (max-width: 720px) {
  .work__item {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .work__links {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.25rem;
  }
}

/* ---------- skills ---------- */
.skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 4vw, 3rem) clamp(2rem, 5vw, 4rem);
}

.skills__group {}

.skills__label {
  font-family: var(--f-mono);
  font-size: .78rem;
  letter-spacing: .18em;
  color: var(--ink-mute);
  text-transform: uppercase;
  font-weight: 400;
  margin: 0 0 1rem;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .55rem;
}

.pills li {
  font-size: .85rem;
  color: var(--ink);
  padding: .4rem .8rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}

.pills li:hover {
  border-color: var(--ink);
  background: var(--bg-soft);
}

@media (max-width: 640px) {
  .skills {
    grid-template-columns: 1fr;
  }
}

/* ---------- contact ---------- */
.section--contact {
  border-top: 1px solid var(--rule);
}

.contact {
  max-width: 720px;
}

.contact__line {
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 2.5rem;
  line-height: 1.3;
  max-width: 28ch;
}

.contact__list {
  display: grid;
  gap: 1rem;
}

.contact__list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
  align-items: center;
}

.contact__list li:last-child {
  border-bottom: 1px solid var(--rule);
}

.contact__label {
  font-family: var(--f-mono);
  font-size: .75rem;
  letter-spacing: .18em;
  color: var(--ink-mute);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: .55rem;
}
.contact__icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--ink-mute);
  transition: color .2s var(--ease);
}
.contact__list li:hover .contact__icon { color: var(--ink); }

.contact__list a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), color .2s var(--ease);
}

.contact__list a:hover {
  border-bottom-color: var(--ink);
}

@media (max-width: 520px) {
  .contact__list li {
    grid-template-columns: 1fr;
    gap: .25rem;
  }
}

/* ---------- footer ---------- */
/* ---------- download modal ---------- */
.dl-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.dl-modal[hidden] { display: none; }

.dl-modal__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in oklab, var(--ink) 28%, transparent);
  backdrop-filter: saturate(120%) blur(8px);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
}
.dl-modal__panel {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--rule);
  padding: 2.75rem 2.75rem 2.25rem;
  max-width: 400px;
  width: 100%;
  animation: modal-in .28s var(--ease) both;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.dl-modal__eyebrow {
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 .85rem;
}
.dl-modal__filename {
  font-family: var(--f-mono);
  font-size: 1rem;
  color: var(--ink);
  margin: 0 0 .3rem;
  word-break: break-all;
}
.dl-modal__meta {
  font-family: var(--f-mono);
  font-size: .78rem;
  color: var(--ink-mute);
  margin: 0 0 2.5rem;
  min-height: 1.2em;
  word-break: break-all;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.dl-modal__actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
}
.dl-modal__btn {
  font-family: var(--f-sans);
  font-size: .85rem;
  padding: .6rem 1.35rem;
  border: 1px solid var(--rule);
  background: none;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  letter-spacing: .01em;
}
.dl-modal__btn--cancel { color: var(--ink-soft); }
.dl-modal__btn--cancel:hover {
  background: var(--bg-soft);
  border-color: var(--ink-soft);
  color: var(--ink);
}
.dl-modal__btn--confirm {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.dl-modal__btn--confirm:hover {
  background: var(--ink-soft);
  border-color: var(--ink-soft);
}

/* ---------- footer ---------- */
.foot {
  text-align: center;
  padding: 2.5rem var(--gutter) 3.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-mute);
  font-family: var(--f-mono);
  font-size: .78rem;
  letter-spacing: .08em;
}

/* ---------- mobile shared polish ---------- */
@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .section {
    padding: clamp(3.5rem, 10vw, 5rem) var(--gutter);
  }

  .section__head {
    margin-bottom: 2rem;
  }

  .section__title {
    font-size: 1.7rem;
  }

  .case__list li,
  .case__body p {
    font-size: .95rem;
  }

  .work__title {
    font-size: 1.25rem;
  }

  .work__item {
    padding: 1.5rem 0;
  }

  .contact__line {
    font-size: 1.2rem;
  }

  .card {
    padding: 1.5rem 1.25rem;
  }

  .foot {
    padding: 2rem var(--gutter) 2.5rem;
  }

  .metrics {
    gap: 1rem;
  }

  .metric__value {
    font-size: 1.2rem;
  }
}

/* ---------- scroll reveal ---------- */
/* Content stays readable if JavaScript is unavailable. main.js opts the page
   into the hidden starting state only after the observer can be installed. */
.reveal {
  opacity: 1;
  transform: none;
}

.has-reveal-js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .reveal-up {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .hero__lotus {
    opacity: .35;
    animation: none;
  }

  .lotus__breathe,
  .lotus__layer--outer,
  .lotus__layer--mid,
  .lotus__layer--inner,
  .lotus__core,
  .lotus__halo,
  .lotus__spin-slow,
  .lotus__spin-rev,
  .lotus__petal {
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }

  * {
    animation: none !important;
    transition: none !important;
  }
}

html[data-motion="reduced"] .hero__lotus,
html[data-motion="off"] .hero__lotus {
  animation: none !important;
}

html[data-motion="off"] .hero__lotus {
  display: none !important;
}

html[data-motion="reduced"] *,
html[data-motion="reduced"] *::before,
html[data-motion="reduced"] *::after {
  animation-duration: .001ms !important;
  animation-delay: 0ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
}

html[data-motion="off"] *,
html[data-motion="off"] *::before,
html[data-motion="off"] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

html[data-motion="reduced"] .reveal,
html[data-motion="reduced"] .reveal-up,
html[data-motion="off"] .reveal,
html[data-motion="off"] .reveal-up {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

/* ---------- not found ---------- */
.error-page {
  width: min(100%, calc(var(--max) + (var(--gutter) * 2)));
  min-height: calc(100vh - 8rem);
  margin-inline: auto;
  padding: 2rem var(--gutter) clamp(4rem, 8vw, 7rem);
}

.error-page__breadcrumb {
  display: flex;
  gap: .65rem;
  color: var(--ink-mute);
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.error-page__breadcrumb a {
  transition: color .2s var(--ease);
}

.error-page__breadcrumb a:hover {
  color: var(--ink);
}

.error-page__hero {
  padding: clamp(4rem, 9vw, 8rem) 0 clamp(3.5rem, 7vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: clamp(3rem, 9vw, 8rem);
  align-items: center;
}

.error-page__kicker {
  margin: 0 0 1.5rem;
  color: var(--ink-mute);
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.error-page__copy h1 {
  margin: 0;
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 500;
  letter-spacing: -.065em;
  line-height: .92;
}

.error-page__copy > p:not(.error-page__kicker) {
  max-width: 52ch;
  margin: 2rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.error-page__actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
}

.error-page__actions a {
  padding-bottom: .25rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: .82rem;
}

.error-page__actions a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.error-page__actions .error-page__primary {
  min-height: 46px;
  padding: .7rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.error-page__actions .error-page__primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.error-page__mark {
  width: min(100%, 390px);
  justify-self: end;
  overflow: visible;
  fill: none;
  stroke: var(--rule);
  stroke-width: 1;
}

.error-page__mark text {
  fill: var(--ink-mute);
  stroke: none;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 2px;
}

.error-page__mark .error-page__needle {
  fill: color-mix(in oklab, var(--accent) 10%, transparent);
  stroke: var(--accent);
}

.error-page__mark .error-page__core {
  fill: var(--accent);
  stroke: none;
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), .55));
}

.error-page__diagnostic {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.error-page__diagnostic > div {
  min-width: 0;
  padding: 1.1rem 1.25rem;
  border-right: 1px solid var(--rule);
}

.error-page__diagnostic > div:first-child {
  padding-left: 0;
}

.error-page__diagnostic > div:last-child {
  border-right: 0;
}

.error-page__diagnostic dt {
  color: var(--ink-mute);
  font-family: var(--f-mono);
  font-size: .65rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.error-page__diagnostic dd {
  margin: .45rem 0 0;
  color: var(--ink);
  font-size: .85rem;
}

.error-page__diagnostic a {
  border-bottom: 1px solid var(--accent);
}

.error-page__foot {
  border-top: 1px solid var(--rule);
}

@media (max-width: 760px) {
  .error-page {
    padding-top: 1.25rem;
  }

  .error-page__hero {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .error-page__mark {
    width: min(82vw, 340px);
    justify-self: center;
  }

  .error-page__diagnostic {
    grid-template-columns: 1fr;
  }

  .error-page__diagnostic > div,
  .error-page__diagnostic > div:first-child {
    padding: .9rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .error-page__diagnostic > div:last-child {
    border-bottom: 0;
  }
}
