:root {
  --bg: #000;
  --bg-rgb: 0 0 0;
  --fg: #ededed;
  --fg-rgb: 237 237 237;
  --fg-2: #a3a3a3;
  --fg-3: #8a8a8a;
  --line: #1f1f1f;
  --line-2: #363636;
  --line-3: #6a6a6a;
  --thumb: #2c2c2c;
  --thumb-hover: #4a4a4a;
  --on-fg-muted: #3a3a3a;
  --panel-rgb: 12 12 12;
  --panel-line: #2e2e2e;
  --media-bg: #050505;
  --panel-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 24px 48px -28px rgb(0 0 0 / 0.9);
  --panel-shadow-hover: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 30px 60px -28px rgb(0 0 0 / 1);
  --mono: "Azeret Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display: "Martian Mono", "Azeret Mono", ui-monospace, monospace;
  --gut: clamp(16px, 4vw, 56px);
  --bar-h: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --step--1: 0.75rem;
  --step-0: 0.9375rem;
  --step-1: clamp(1.05rem, 0.9rem + 0.6vw, 1.3rem);
  --step-2: clamp(1.25rem, 0.95rem + 1.25vw, 1.9rem);
  --step-4: clamp(2.4rem, 1.2rem + 5vw, 5.75rem);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f2f2f2;
  --bg-rgb: 242 242 242;
  --fg: #121212;
  --fg-rgb: 18 18 18;
  --fg-2: #4a4a4a;
  --fg-3: #616161;
  --line: #dddddd;
  --line-2: #bcbcbc;
  --line-3: #7a7a7a;
  --thumb: #c9c9c9;
  --thumb-hover: #9a9a9a;
  --on-fg-muted: #bdbdbd;
  --panel-rgb: 255 255 255;
  --panel-line: #cfcfcf;
  --media-bg: #f7f7f7;
  --panel-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 20px 44px -24px rgb(0 0 0 / 0.28);
  --panel-shadow-hover: 0 1px 2px rgb(0 0 0 / 0.08), 0 28px 56px -24px rgb(0 0 0 / 0.36);
  color-scheme: light;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar-h) + 24px);
  scrollbar-color: var(--thumb) var(--bg);
  scrollbar-width: thin;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--fg); color: var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--thumb); border: 3px solid var(--bg); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--thumb-hover); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, dl, dd, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

:focus-visible { outline: 1px solid var(--fg); outline-offset: 5px; border-radius: 2px; }

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

.skip {
  position: fixed; top: 12px; left: 12px; z-index: 50;
  padding: 10px 14px; background: var(--fg); color: var(--bg); font-size: var(--step--1);
  transform: translateY(-160%); transition: transform 0.3s var(--ease);
}
.skip:focus-visible { transform: none; outline-color: var(--bg); }

/* ---------- field + progressive blur edges ---------- */

#field {
  position: fixed; inset: 0 auto auto 0;
  width: 100vw; height: 100vh;
  z-index: 0; display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.6s var(--ease);
}
.field-ready #field { opacity: 1; }

.edge {
  position: fixed; left: 0; right: 0; z-index: 5;
  pointer-events: none;
}
.edge i { position: absolute; inset: 0; display: block; }
.edge--top { top: 0; height: 132px; }
.edge--bottom { bottom: 0; height: 84px; }

.edge--top i:nth-child(1) { backdrop-filter: blur(1px); -webkit-backdrop-filter: blur(1px); mask: linear-gradient(to top, transparent 0%, #000 20%, #000 100%); }
.edge--top i:nth-child(2) { backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); mask: linear-gradient(to top, transparent 20%, #000 40%, #000 100%); }
.edge--top i:nth-child(3) { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); mask: linear-gradient(to top, transparent 40%, #000 60%, #000 100%); }
.edge--top i:nth-child(4) { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); mask: linear-gradient(to top, transparent 60%, #000 80%, #000 100%); }
.edge--top i:nth-child(5) { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); mask: linear-gradient(to top, transparent 78%, #000 100%); }
.edge--top::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--bg) 0, rgb(var(--bg-rgb) / 0.92) 52px, rgb(var(--bg-rgb) / 0.55) 72%, transparent);
}

.edge--bottom i:nth-child(1) { backdrop-filter: blur(1px); -webkit-backdrop-filter: blur(1px); mask: linear-gradient(to bottom, transparent 0%, #000 20%, #000 100%); }
.edge--bottom i:nth-child(2) { backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); mask: linear-gradient(to bottom, transparent 20%, #000 40%, #000 100%); }
.edge--bottom i:nth-child(3) { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); mask: linear-gradient(to bottom, transparent 40%, #000 60%, #000 100%); }
.edge--bottom i:nth-child(4) { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); mask: linear-gradient(to bottom, transparent 60%, #000 80%, #000 100%); }
.edge--bottom i:nth-child(5) { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); mask: linear-gradient(to bottom, transparent 78%, #000 100%); }
.edge--bottom::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgb(var(--bg-rgb) / 0.7), transparent);
}

/* ---------- bar ---------- */

.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  height: var(--bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gut);
  padding-top: env(safe-area-inset-top);
  font-size: var(--step--1);
  letter-spacing: 0.02em;
}
.bar__mark { color: var(--fg); font-weight: 500; padding: 8px 0; }
.bar__nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); }
.bar__nav a {
  color: var(--fg-2); padding: 8px 0; position: relative;
  transition: color 0.3s var(--ease);
}
.bar__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.bar__nav a:hover, .bar__nav a[aria-current="true"] { color: var(--fg); }
.bar__nav a:hover::after, .bar__nav a[aria-current="true"]::after { transform: scaleX(1); }

.motion {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 2px;
  color: var(--fg-2); font-size: var(--step--1); letter-spacing: 0.02em;
  transition: color 0.3s var(--ease);
}
.motion::before { content: "["; color: var(--fg-2); }
.motion::after { content: "]"; color: var(--fg-2); }
.motion:hover { color: var(--fg); }
.theme {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 2px;
  color: var(--fg-2); font-size: var(--step--1); letter-spacing: 0.02em;
  transition: color 0.3s var(--ease);
}
.theme::before { content: "["; color: var(--fg-2); }
.theme::after { content: "]"; color: var(--fg-2); }
.theme:hover { color: var(--fg); }
.theme__icon { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.bar__toggles { display: inline-flex; align-items: center; gap: clamp(8px, 1.4vw, 16px); }
.motion__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fg); box-shadow: 0 0 0 0 rgb(var(--fg-rgb) / 0.4);
  transition: background 0.3s var(--ease);
}
.motion[aria-pressed="true"] .motion__dot { animation: pulse 2.4s var(--ease) infinite; }
.motion[aria-pressed="false"] .motion__dot { background: transparent; box-shadow: inset 0 0 0 1px var(--fg-3); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgb(var(--fg-rgb) / 0.35); }
  70%, 100% { box-shadow: 0 0 0 7px rgb(var(--fg-rgb) / 0); }
}

/* ---------- layout ---------- */

main, .foot { position: relative; z-index: 2; }

.section {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(12px, 2vw, 28px);
  padding: clamp(96px, 16vh, 200px) var(--gut);
}

.display {
  font-family: var(--display);
  font-size: var(--step-4);
  font-weight: 300;
  font-variation-settings: "wdth" 87.5;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--fg);
  text-wrap: balance;
}
[data-weigh] .ch { display: inline-block; font-variation-settings: "wdth" var(--wd, 87.5); font-weight: var(--wg, 300); transition: font-weight 0.5s var(--ease); }

/* soft blurred veil so text stays readable over the field */
.veil { position: relative; isolation: isolate; }
.veil::before {
  content: ""; position: absolute; z-index: -1;
  inset: -48px -56px;
  background: rgb(var(--bg-rgb) / 0.62);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  mask: radial-gradient(closest-side, #000 62%, transparent);
  -webkit-mask: radial-gradient(closest-side, #000 62%, transparent);
  pointer-events: none;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 520px;
  padding: 0 var(--gut);
  --hero-b: clamp(100px, 12vh, 132px);
}
.hero__intro {
  position: absolute; left: var(--gut); bottom: var(--hero-b);
  max-width: 34ch;
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--fg);
  text-wrap: pretty;
  text-shadow: 0 0 18px var(--bg), 0 0 6px var(--bg);
}
.hero__readout {
  position: absolute; right: var(--gut); bottom: var(--hero-b);
  display: grid; justify-items: end; gap: 2px;
  font-size: var(--step--1); color: var(--fg-3);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px var(--bg);
}
.readout__row { display: inline-flex; gap: 8px; }
.readout__row b { color: var(--fg); font-weight: 400; min-width: 4ch; text-align: right; }
.readout__hint { margin-top: 8px; color: var(--fg-2); }
.hero__side {
  position: absolute; right: var(--gut); top: 50%;
  transform: translate(50%, -50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-size: var(--step--1); letter-spacing: 0.04em; color: var(--fg-3);
  white-space: nowrap;
  margin-right: 10px;
}
@media (max-height: 640px) { .hero__side { display: none; } }
.hero__scroll {
  position: absolute; left: 50%; bottom: calc(var(--hero-b) - 8px); transform: translateX(-50%);
  display: grid; justify-items: center; gap: 10px;
  font-size: var(--step--1); color: var(--fg-3);
  padding: 8px;
  transition: color 0.3s var(--ease);
}
.hero__scroll:hover { color: var(--fg); }
.hero__scroll i { width: 1px; height: 36px; background: linear-gradient(var(--fg-3), transparent); position: relative; overflow: hidden; }
.hero__scroll i::after {
  content: ""; position: absolute; left: 0; width: 1px; height: 12px; background: var(--fg);
  animation: drip 2.2s var(--ease) infinite;
}
@keyframes drip { from { top: -12px; } to { top: 36px; } }

/* ---------- about ---------- */

.about .display { grid-column: 1 / span 4; align-self: start; }
.about__body { grid-column: 6 / span 7; padding-top: clamp(4px, 1.4vw, 18px); }
.statement {
  font-size: var(--step-2);
  line-height: 1.42;
  letter-spacing: -0.01em;
  max-width: 38ch;
  text-wrap: pretty;
}
.facts {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 22px 28px;
  font-size: var(--step--1);
}
.facts div { border-top: 1px solid var(--line-2); padding-top: 12px; }
.facts dt { color: var(--fg-3); margin-bottom: 4px; }
.facts dd { color: var(--fg); }

/* ---------- practice ---------- */

.practice .display { grid-column: 1 / -1; margin-bottom: clamp(36px, 6vw, 72px); text-align: right; }
.disciplines { grid-column: 2 / -1; border-top: 1px solid var(--line-2); }
.discipline {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto;
  align-items: baseline; gap: 12px 32px;
  padding: clamp(18px, 2.4vw, 30px) 0;
  border-bottom: 1px solid var(--line-2);
  isolation: isolate;
}
.discipline::before {
  content: ""; position: absolute; inset: 0 -12px; z-index: -1;
  background: rgb(var(--bg-rgb) / 0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0.6;
  transition: opacity 0.5s var(--ease);
}
.discipline h3 {
  font-family: var(--display);
  font-size: clamp(1.35rem, 0.9rem + 2vw, 2.6rem);
  font-weight: 300;
  font-variation-settings: "wdth" 87.5;
  letter-spacing: -0.03em;
  line-height: 1.05;
  transition: font-weight 0.6s var(--ease), letter-spacing 0.6s var(--ease), transform 0.6s var(--ease);
}
.discipline p { color: var(--fg-2); max-width: 52ch; transition: color 0.4s var(--ease); }
.discipline__glyph { color: var(--fg-3); font-size: var(--step--1); min-width: 3ch; text-align: right; transition: color 0.4s var(--ease); }
.discipline:hover::before { opacity: 1; }
.discipline:hover h3 { font-weight: 700; letter-spacing: -0.04em; transform: translateX(10px); }
.discipline:hover p, .discipline:hover .discipline__glyph { color: var(--fg); }

/* ---------- work ---------- */

.work__head { grid-column: 1 / -1; display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(40px, 7vw, 96px); }
.work__note { color: var(--fg-2); font-size: var(--step--1); max-width: 32ch; text-align: right; }
.work__grid {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(12px, 2vw, 28px);
  row-gap: clamp(72px, 10vw, 140px);
  align-items: start;
}
.piece {
  position: relative;
  padding: clamp(10px, 1.1vw, 14px);
  background: rgb(var(--panel-rgb) / 0.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--panel-line);
  box-shadow: var(--panel-shadow);
  transition: border-color 0.5s var(--ease), box-shadow 0.6s var(--ease), translate 0.6s var(--ease);
}
.piece::before, .piece::after {
  position: absolute; font-size: 12px; line-height: 1; color: var(--fg-2); pointer-events: none;
}
.piece::before { content: "+"; top: -7px; left: -4px; }
.piece::after { content: "+"; bottom: -6px; right: -4px; }
.piece:hover { border-color: var(--line-3); box-shadow: var(--panel-shadow-hover); translate: 0 -3px; }
.piece__media {
  position: relative; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--media-bg);
  transition: border-color 0.5s var(--ease);
}
.piece__media canvas, .piece__media img, .piece__media video {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.piece__media img, .piece__media video { filter: grayscale(1) contrast(1.05) brightness(0.85); transition: filter 0.7s var(--ease), transform 1.2s var(--ease); }
.piece:hover .piece__media { border-color: var(--line-2); }
.piece:hover .piece__media img, .piece:hover .piece__media video { filter: grayscale(1) contrast(1.1) brightness(1); transform: scale(1.02); }

.piece figcaption {
  display: grid; grid-template-columns: 1fr; gap: 6px;
  padding: 16px 4px 4px;
}
.piece h3 {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-family: var(--display); font-weight: 400; font-variation-settings: "wdth" 87.5;
  font-size: var(--step-1); letter-spacing: -0.02em;
}
.piece__meta { color: var(--fg-3); font-size: var(--step--1); }
.piece figcaption p:not(.piece__meta):not(.piece__links) { color: var(--fg-2); font-size: 0.875rem; max-width: 52ch; text-wrap: pretty; }
.tag {
  font-family: var(--mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.02em;
  color: var(--fg-2);
}
.tag::before { content: "<"; color: var(--fg-3); }
.tag::after { content: ">"; color: var(--fg-3); }
.tag[hidden] { display: none; }
.piece__status { font-family: var(--mono); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.02em; color: var(--fg-2); }
.theme__icon--moon { display: none; }
[data-theme="light"] .theme__icon--sun { display: none; }
[data-theme="light"] .theme__icon--moon { display: block; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }
.tag--contact { display: block; margin-top: 10px; }

.piece--a { grid-column: 1 / span 8; }
.piece--a .piece__media { aspect-ratio: 16 / 10; }
.piece--b { grid-column: 10 / span 3; margin-top: clamp(80px, 16vw, 260px); }
.piece--b .piece__media { aspect-ratio: 3 / 4; }
.piece--c { grid-column: 1 / span 6; }
.piece--c .piece__media { aspect-ratio: 5 / 4; }
.piece--d { grid-column: 7 / span 6; margin-top: clamp(60px, 10vw, 160px); }
.piece--d .piece__media { aspect-ratio: 16 / 10; }
.piece--e { grid-column: 2 / span 4; }
.piece--e .piece__media { aspect-ratio: 4 / 5; }
.piece--f { grid-column: 7 / span 6; margin-top: clamp(60px, 12vw, 200px); }
.piece--f .piece__media { aspect-ratio: 16 / 9; }
.piece--g { grid-column: 3 / span 8; }
.piece--g .piece__media { aspect-ratio: 16 / 9; }

html.drawer-open { overflow: hidden; }

/* links under a caption */
.piece__links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 0 -10px; }
.piece figcaption .piece__links { color: inherit; font-size: inherit; }

/* ---------- photo drawer ---------- */

.drawer {
  position: fixed; inset: 0 0 0 auto;
  width: min(760px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--fg);
  overflow: visible;
}
.drawer::backdrop {
  background: rgb(var(--bg-rgb) / 0.55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity 0.5s var(--ease), overlay 0.5s allow-discrete, display 0.5s allow-discrete;
}
.drawer[open]::backdrop { opacity: 1; }
@starting-style { .drawer[open]::backdrop { opacity: 0; } }
.drawer__panel {
  position: relative; height: 100%;
  display: flex; flex-direction: column;
  background: var(--bg);
  border-left: 1px solid var(--line-2);
  transform: translateX(100%);
  transition: transform 0.6s var(--ease);
}
.drawer[open] .drawer__panel { transform: none; }
@starting-style { .drawer[open] .drawer__panel { transform: translateX(100%); } }
.drawer.is-closing .drawer__panel { transform: translateX(100%); }
.drawer.is-closing::backdrop { opacity: 0; }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px clamp(16px, 3vw, 28px);
  border-bottom: 1px solid var(--line-2);
}
.drawer__title {
  font-family: var(--display); font-weight: 400; font-variation-settings: "wdth" 87.5;
  font-size: var(--step-1); letter-spacing: -0.02em;
}
.drawer__title span { font-family: var(--mono); font-size: var(--step--1); color: var(--fg-2); letter-spacing: 0.02em; }
.drawer__sub::before { content: "· "; }
@media (max-width: 720px) {
  .drawer__sub { display: block; margin-top: 4px; }
  .drawer__sub::before { content: none; }
}
.gallery {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense; align-content: start; gap: clamp(10px, 1.6vw, 16px);
  padding: clamp(16px, 3vw, 28px);
}
.gallery__span { grid-column: 1 / -1; }
.gallery__span .gallery__item img { aspect-ratio: 16 / 10; }
.gallery__item {
  display: grid; gap: 8px; width: 100%; text-align: left;
  color: var(--fg-2); font-size: var(--step--1);
  transition: color 0.3s var(--ease);
}
.gallery__item img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  border: 1px solid var(--line-2);
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.6s var(--ease), border-color 0.3s var(--ease);
}
.gallery__item--wide img { aspect-ratio: 4 / 3; }
.gallery__item--tall img { aspect-ratio: 3 / 4; }
.gallery__item:hover, .gallery__item:focus-visible { color: var(--fg); }
.gallery__item:hover img, .gallery__item:focus-visible img { filter: none; border-color: var(--line-3); }
.gallery__item span::before { content: "> "; color: var(--fg-3); }
.viewer {
  position: absolute; inset: 0; top: 0;
  display: grid; grid-template-rows: minmax(0, 1fr) auto;
  margin: 0; background: var(--bg);
}
.viewer[hidden] { display: none; }
.viewer__img { width: 100%; height: 100%; object-fit: contain; padding: clamp(12px, 2vw, 24px); min-height: 0; }
.viewer__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px clamp(16px, 3vw, 28px) calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-2); font-size: var(--step--1); color: var(--fg-2);
}
.viewer__nav { display: inline-flex; gap: 4px; }
@media (prefers-reduced-motion: reduce) {
  .drawer__panel, .drawer::backdrop { transition: none; }
}

/* ---------- languages ---------- */

.stack .display { grid-column: 1 / span 5; align-self: start; position: sticky; top: calc(var(--bar-h) + 40px); }
.langs { grid-column: 6 / -1; }
.langs li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line-2);
  padding: clamp(10px, 1.6vw, 20px) 0;
}
.langs li:first-child { border-top: 1px solid var(--line-2); }
.lang {
  font-family: var(--display);
  font-size: clamp(2.4rem, 1.4rem + 4.6vw, 5.5rem);
  font-weight: 300;
  font-variation-settings: "wdth" 87.5;
  letter-spacing: -0.04em;
  line-height: 1;
  text-shadow: 0 0 24px var(--bg);
}
.lang__now { display: inline-flex; align-items: center; gap: 6px; color: var(--fg); font-size: var(--step--1); }
.caret { width: 0.6em; height: 1.1em; background: var(--fg); display: inline-block; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- contact ---------- */

.contact { padding-bottom: clamp(120px, 20vh, 220px); }
.contact .display { grid-column: 1 / -1; margin-bottom: clamp(32px, 5vw, 64px); }
.contact__body { grid-column: 3 / -1; }
.contact__lede { color: var(--fg-2); margin-bottom: 18px; }
.contact__mail {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(1.5rem, 0.6rem + 4.4vw, 5rem);
  font-weight: 300;
  font-variation-settings: "wdth" 87.5;
  letter-spacing: -0.04em;
  line-height: 1.1;
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 6px;
  transition: background-size 0.7s var(--ease);
}
.contact__mail:hover { background-size: 100% 1px; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.action {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 10px;
  color: var(--fg); font-size: var(--step--1); letter-spacing: 0.02em;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.action::before { content: "["; color: var(--fg-2); margin-right: 2px; transition: color 0.3s var(--ease); }
.action::after { content: "]"; color: var(--fg-2); margin-left: 2px; transition: color 0.3s var(--ease); }
.action svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.action:hover { background: var(--fg); color: var(--bg); }
.action:hover::before, .action:hover::after { color: var(--bg); }
.action:hover .tag { color: var(--on-fg-muted); }
.action[data-state="done"]::before, .action[data-state="done"]::after { color: var(--fg); }
.contact__actions { margin-left: -10px; }

/* ---------- footer ---------- */

.foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 28px var(--gut) calc(96px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: var(--step--1); color: var(--fg-3);
  background: rgb(var(--bg-rgb) / 0.6);
}
.foot a { color: var(--fg-2); padding: 8px 0; transition: color 0.3s var(--ease); }
.foot a:hover { color: var(--fg); }

/* ---------- reveal (only with JS, only with motion allowed) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0.08;
    filter: blur(14px);
    transform: translateY(18px);
    transition: opacity 1.1s var(--ease), filter 1.3s var(--ease), transform 1.3s var(--ease);
    transition-delay: var(--d, 0s);
  }
  .js [data-reveal].is-in { opacity: 1; filter: blur(0); transform: none; }
  .js [data-reveal].is-in.veil, .js [data-reveal].is-in.piece { filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .motion__dot, .caret, .hero__scroll i::after { animation: none !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .about .display { grid-column: 1 / -1; margin-bottom: 36px; }
  .about__body { grid-column: 1 / -1; }
  .disciplines { grid-column: 1 / -1; }
  .stack .display { grid-column: 1 / -1; position: static; margin-bottom: 32px; }
  .langs { grid-column: 1 / -1; }
  .contact__body { grid-column: 1 / -1; }
  .piece { grid-column: 1 / span 6; margin-top: 0; }
  .piece:nth-child(even) { grid-column: 7 / span 6; margin-top: clamp(40px, 8vw, 120px); }
  .piece--a, .piece--g { grid-column: 1 / -1; margin-top: 0; }
}

@media (max-width: 720px) {
  :root { --bar-h: 56px; }
  .bar__nav { gap: 14px; }
  .bar__nav a { padding: 12px 0; }
  .motion { gap: 6px; }
  .motion__state { display: none; }
  .bar__nav { gap: 12px; }
  .bar__mark-tld { display: none; }
  .theme__label { display: none; }
  .bar__toggles { gap: 6px; }
  .hero__side { display: none; }
  .hero { --hero-b: 96px; }
  .hero__intro { bottom: calc(var(--hero-b) + 40px); max-width: 30ch; }
  .hero__readout { left: var(--gut); right: auto; bottom: var(--hero-b); justify-items: start; }
  .hero__readout .readout__row:first-child { display: none; }
  .readout__row { display: none; }
  .readout__hint { margin-top: 0; }
  .hero__scroll { left: auto; right: calc(var(--gut) - 8px); transform: none; bottom: calc(var(--hero-b) - 12px); }
  .practice .display { text-align: left; }
  .discipline { grid-template-columns: 1fr auto; }
  .discipline p { grid-column: 1 / -1; grid-row: 2; }
  .discipline:hover h3 { transform: none; }
  .work__head { align-items: start; flex-direction: column; }
  .work__note { text-align: left; }
  .work__grid { row-gap: 64px; }
  .piece, .piece--a, .piece--g { grid-column: 1 / -1; margin-top: 0; }
  .gallery { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .drawer__panel { border-left: 0; }
  .piece:nth-child(even) { grid-column: 1 / -1; margin-top: 0; }
  .piece__media { aspect-ratio: 4 / 3 !important; }
  .veil::before { inset: -24px -16px; }
  .foot { flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (max-width: 400px) {
  .bar { font-size: 0.6875rem; gap: 10px; }
  .bar__nav { gap: 9px; }
  .bar__toggles { gap: 4px; }
  .motion, .theme { gap: 5px; }
}
