/* ==========================================================================
   Manasse Jalloh — portfolio
   Colours, type and shape come from src/_data/design.json (editable in the
   CMS under Settings > Design). The values below are only fallbacks.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg: #14181d;
  --surface: #1b2027;
  --ink: #eef2f8;
  --muted: #a7aeb8;
  --line: #2a3037;
  --accent: #74a9eb;
  --accent-ink: #0b1524;
  color-scheme: dark;
  --head-wdth: 100;
  --head-wght: 680;
  --base: 17px;
  --radius: 8px;
  --card-media: 16 / 10;

  --font-head: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --font-code: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --line-strong: color-mix(in oklab, var(--ink) 22%, var(--line));
  --ink-soft: color-mix(in oklab, var(--ink) 82%, var(--bg));
  --tint: color-mix(in oklab, var(--ink) 4%, var(--bg));
  /* glass panels: the surface, a little see-through, with a cool hairline */
  --glass: color-mix(in oklab, var(--surface) 82%, transparent);
  --glass-line: color-mix(in oklab, var(--ink) 10%, transparent);
  --tile: color-mix(in oklab, var(--accent) 9%, var(--surface));
  --shadow-rest: 0 1px 2px rgb(0 0 0 / 0.25);
  --shadow-lift: 0 12px 28px -16px rgb(0 0 0 / 0.7);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 44px);
  --space-section: clamp(72px, 10vw, 136px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
  color-scheme: dark;
  background: var(--bg);
  scrollbar-color: var(--line-strong) var(--bg);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  /* soft cold light from the top-left, like the mountain backdrop */
  background:
    radial-gradient(1100px 700px at 6% -10%, color-mix(in oklab, var(--accent) 5%, transparent), transparent 70%),
    radial-gradient(900px 700px at 100% 18%, color-mix(in oklab, var(--accent) 2.5%, transparent), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--base);
  line-height: var(--lh, 1.6);
  font-stretch: 100%;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  caret-color: var(--accent);
}
main { flex: 1; outline: none; overflow-x: clip; }

::selection { background: color-mix(in oklab, var(--accent) 22%, transparent); color: var(--ink); }

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
picture { display: contents; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-stretch: calc(var(--head-wdth) * 1%);
  font-weight: var(--head-wght);
  line-height: 1.08;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(1.7rem, 2.8vw, 2.35rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); letter-spacing: -0.01em; font-weight: calc(var(--head-wght) - 60); }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in oklab, currentColor 40%, transparent);
  transition: color 160ms ease, text-decoration-color 160ms ease;
}
a:hover { text-decoration-color: currentColor; }

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

.ico { width: 1.15em; height: 1.15em; flex: none; stroke-width: 2; }
.ico--file { object-fit: contain; }

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

.skip {
  position: absolute;
  left: 12px; top: -100px;
  z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Labels: the box-back "small print" voice ---------- */
.spec dt,
.toc__title,
.challenge__label,
.filters__label,
.code__file,
.controls__table thead th,
.pager__dir,
.card__date,
.spec__sub,
.status {
  font-family: var(--font-body);
  font-stretch: 78%;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  transition: background-color 200ms ease;
}
.site-header__inner { border-bottom: 1px solid var(--line); }
.site-header.is-scrolled { background: color-mix(in oklab, var(--bg) 90%, transparent); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 68px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 650;
  min-height: 44px;
}
.wordmark__mark {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--ink); color: var(--bg);
  font-family: var(--font-head); font-stretch: 100%; font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.wordmark__name {
  font-family: var(--font-head); font-stretch: 100%; font-weight: 650;
  letter-spacing: -0.01em; font-size: 1.08rem;
}
.site-nav ul { list-style: none; display: flex; gap: 6px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: 0 16px; border-radius: 6px;
  text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--muted);
  position: relative;
  transition: color 160ms ease, background-color 160ms ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current] { color: var(--ink); }
.site-nav a[aria-current]::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 4px;
  height: 2px; background: var(--accent);
}

@media (max-width: 720px) {
  .wordmark__name { font-size: 0.98rem; }
  .site-nav ul { gap: 2px; }
  .site-nav a { padding: 0 10px; }
  .site-nav a[aria-current]::after { left: 10px; right: 10px; }
}
@media (max-width: 560px) {
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: 0; padding-top: 6px; padding-bottom: 6px; }
  .wordmark { min-height: 36px; }
  .site-nav { margin-inline: -10px; }
}
@media (max-width: 360px) {
  .site-nav ul { gap: 0; }
  .site-nav a { padding: 0 9px; font-size: 0.92rem; }
  .site-nav a[aria-current]::after { left: 9px; right: 9px; }
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 18px;
  border-radius: var(--btn-radius, 6px);
  border: 1px solid transparent;
  background: var(--btn-bg); color: var(--btn-fg);
  font: inherit; font-weight: 600; font-size: 0.95rem; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 120ms ease, box-shadow 160ms ease;
}
.btn:active { transform: translateY(1px); }
.btn .ico { width: 1.1em; height: 1.1em; }
.btn--primary {
  --btn-bg: var(--accent); --btn-fg: var(--accent-ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
}
.btn--primary:hover { --btn-bg: color-mix(in oklab, var(--accent) 90%, white); }
.btn--primary .ico { transition: transform 200ms var(--ease-out); }
.btn--primary:hover .ico:last-child { transform: translateX(3px); }
.btn--play { --btn-bg: var(--play, var(--accent)); --btn-fg: var(--play-ink, var(--accent-ink)); box-shadow: 0 1px 2px rgb(0 0 0 / 0.3); }
.btn--play:hover { --btn-bg: color-mix(in oklab, var(--play, var(--accent)) 80%, black); }
.btn--ghost { border-color: color-mix(in oklab, var(--ink) 22%, transparent); --btn-bg: color-mix(in oklab, var(--bg) 55%, transparent); }
.btn--ghost:hover { border-color: color-mix(in oklab, var(--ink) 45%, transparent); --btn-bg: color-mix(in oklab, var(--ink) 5%, var(--bg)); }
.btn--ghost .ico:last-child:not(:first-child) { transition: transform 200ms var(--ease-out); }
.btn--ghost:hover .ico:last-child:not(:first-child) { transform: translateX(3px); }
.btn--icon { padding: 0; width: 46px; border-color: var(--line-strong); --btn-bg: var(--surface); }
.btn--icon:hover { border-color: var(--ink); }
.btn--icon .ico { width: 1.2em; height: 1.2em; }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 0.9rem; }
.btn--icon.btn--sm { width: 40px; padding: 0; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 620; text-decoration: none; min-height: 44px;
}
.link-arrow .ico { transition: transform 200ms var(--ease-out); }
.link-arrow:hover .ico { transform: translateX(3px); }

/* ---------- Status labels ---------- */
.status {
  --tone: #b3b8c2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px 4px 8px;
  border-radius: 4px;
  background: color-mix(in oklab, var(--tone) 12%, var(--surface));
  font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--tone);
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: nowrap;
}
.status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
}
.status--green { --tone: #6fd6a1; }
.status--amber { --tone: #f3bd55; }
.status--slate { --tone: #b3b8c2; }
.status--rose { --tone: #ff8f9f; }
.status--blue { --tone: #93adff; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- Technology tags ---------- */
.tech { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tech__tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px 4px 7px;
  border-radius: 4px;
  background: color-mix(in oklab, var(--c, #666) 22%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--c, #666) 30%, var(--line));
  color: var(--ink);
  font-size: 0.8rem; font-weight: 560; line-height: 1.3;
  white-space: nowrap;
}
.tech__tag img { width: 15px; height: 15px; flex: none; }

/* ==========================================================================
   Project card — media-led, title printed on the art (after Lucas Kinoo),
   accent ring drawn on the card edge on hover/focus.
   ========================================================================== */
.card {
  --ring: var(--card-accent, var(--hover, var(--accent)));
  position: relative;
  display: flex; flex-direction: column;
  --card-bg: color-mix(in oklab, var(--surface) 88%, var(--bg));
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--glass-line), var(--shadow-rest);
  overflow: hidden;
  isolation: isolate;
  transition: box-shadow 200ms ease, transform 260ms var(--ease-out);
}
.card:hover,
.card:has(.card__link:focus-visible) {
  box-shadow: 0 0 0 var(--ring-w, 2px) var(--ring), var(--shadow-lift);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translateY(-2px); }
}
.card:has(.card__link:focus-visible) { transform: none; box-shadow: 0 0 0 3px var(--ring), var(--shadow-lift); }

.card__media {
  position: relative;
  aspect-ratio: var(--card-media);
  overflow: hidden;
  background: var(--surface);
  flex: none;
}
.card__img,
.card__preview {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out), opacity 240ms ease;
}
.card__preview { opacity: 0; }
.card.is-previewing .card__preview { opacity: 1; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card:hover .card__img,
  .card:hover .card__preview { transform: scale(1.03); }
}
.card__media::after {
  content: "";
  position: absolute; inset: 0;
  /* the art fades into the card, so the title sits on both */
  background: linear-gradient(180deg, rgb(0 0 0 / 0) 38%, color-mix(in oklab, var(--card-bg) 70%, transparent) 78%, var(--card-bg) 100%);
  pointer-events: none;
}
.card__media--empty { background: color-mix(in oklab, var(--accent) 22%, var(--surface)); }
.card__media--empty::after { background: none; }
.card__flags {
  position: absolute; z-index: 2; top: 12px; right: 12px;
  display: flex; gap: 6px;
}
.card__flags .status {
  background: rgb(12 12 11 / 0.82);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08);
}
.card__title {
  position: absolute; z-index: 2; left: 20px; right: 20px; bottom: 6px;
  color: #fff;
  color: var(--card-title, #fff);
  text-align: left; text-transform: var(--card-case, uppercase);
  font-size: clamp(1.35rem, 1.9vw, 1.65rem);
  font-weight: var(--head-wght);
  letter-spacing: -0.015em; line-height: 1.05;
  text-shadow: 0 2px 18px rgb(0 0 0 / 0.55);
}
.card__link { text-decoration: none; color: inherit; }
.card__link:focus-visible { outline: none; }
/* the whole card is the link to the project page */
.card__link::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
}
.card__title .card__link::after { position: fixed; }
.card { contain: paint; }

.card__body {
  display: flex; flex-direction: column; align-items: stretch; gap: 12px;
  padding: 10px 20px 20px;
  flex: 1;
  text-align: left;
}
.card__tech { justify-content: flex-start; }
.card__date {
  display: flex; align-items: center; justify-content: flex-start; gap: 7px;
  color: var(--accent); letter-spacing: 0.1em;
}
.card__date .ico { width: 14px; height: 14px; }
.card__dot::before { content: "·"; margin: 0 6px 0 2px; }
.card__desc { color: var(--ink-soft); font-size: 0.97rem; line-height: 1.55; }
.card__actions {
  display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 8px;
  margin-top: auto; padding-top: 4px;
}
.card__actions .btn--icon { margin-left: auto; }
.card__actions .btn { position: relative; z-index: 3; }
/* reads as an outlined button; the whole card is the actual link */
.card__view {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--btn-radius, 6px);
  font-weight: 600; font-size: 0.9rem;
  color: var(--ink);
  transition: border-color 160ms ease, color 160ms ease;
}
.card:hover .card__view { border-color: var(--ring); }
.card__view .ico { width: 16px; height: 16px; transition: transform 200ms var(--ease-out); }
.card:hover .card__view .ico { transform: translateX(3px); }


/* Large card (home feature) */
.card--lg .card__media { aspect-ratio: 16 / 9; }
@media (min-width: 1001px) {
  /* the featured card takes the height of the two stacked cards beside it */
  .shelf__grid > .card--lg .card__media { aspect-ratio: auto; flex: 1 1 0; min-height: 240px; }
}
.card--lg .card__title { font-size: clamp(1.7rem, 3vw, 2.5rem); left: 24px; bottom: 20px; }
.card--lg .card__flags { top: 16px; left: 16px; }
.card--lg .card__body { padding: 20px 24px 24px; flex: none; }
.card--lg .card__desc { font-size: 1.02rem; max-width: 56ch; }

/* ---------- Page heads (404, privacy) ---------- */
.page-head { padding-top: clamp(48px, 8vw, 104px); padding-bottom: clamp(28px, 4vw, 48px); }
.page-head__title {
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.page-head__lead { margin-top: 20px; max-width: 60ch; font-size: 1.12rem; color: var(--ink-soft); }
.page-head .btn { margin-top: 28px; }

/* ==========================================================================
   Shared pieces: eyebrow labels, glass panels, icon tiles, chips
   ========================================================================== */
.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-body); font-stretch: 100%; font-weight: 600;
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  line-height: 1.2;
  color: color-mix(in oklab, var(--accent) 40%, var(--muted));
}
.eyebrow--sm { font-size: 0.74rem; letter-spacing: 0.14em; color: var(--accent); }
/* "About me" heading inside a card, set in the heading face */
.eyebrow--title {
  font-family: var(--font-head); font-stretch: calc(var(--head-wdth) * 1%); font-weight: var(--head-wght);
  font-size: clamp(1.35rem, 2vw, 1.6rem); letter-spacing: -0.015em; text-transform: none;
  color: var(--ink);
}
.accent-word { color: var(--accent); }

.panel {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow-rest);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.panel--pad { padding: clamp(20px, 2.4vw, 30px); }

.tile {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 8px;
  background: color-mix(in oklab, var(--accent) 7%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--accent) 22%, var(--line));
  color: var(--accent);
}
.tile .ico { width: 22px; height: 22px; stroke-width: 1.75; }
.tile--lg { width: clamp(60px, 6vw, 80px); height: clamp(60px, 6vw, 80px); border-radius: 10px; }
.tile--lg .ico { width: 42%; height: 42%; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips .chip { min-height: 38px; padding: 0 14px 0 12px; background: color-mix(in oklab, var(--surface) 70%, transparent); border-color: color-mix(in oklab, var(--ink) 16%, transparent); }

/* ---------- Page hero: text left, blurred graphite mountain behind ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-top: clamp(20px, 2.6vw, 36px);
  padding-bottom: clamp(20px, 2.4vw, 32px);
}
.hero__main { position: relative; z-index: 1; max-width: 720px; }
.hero__title {
  margin-top: 12px;
  font-size: clamp(2.4rem, 4.6vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: var(--head-wght);
}
.hero__title::after {
  content: ""; display: block;
  width: 56px; height: 3px; margin-top: 14px; border-radius: 2px;
  background: var(--accent);
}
.hero__lead { margin-top: 14px; max-width: 58ch; font-size: clamp(1.04rem, 1.3vw, 1.16rem); line-height: 1.55; color: var(--ink-soft); }
.hero__lead strong { color: var(--ink); font-weight: 650; }
.hero__bio { margin-top: 12px; color: var(--ink-soft); max-width: 62ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero__actions .ico { width: 18px; height: 18px; }
.hero__chips { margin-top: 18px; }

.backdrop {
  position: absolute; z-index: -1; pointer-events: none;
  top: -68px;
  right: calc(var(--gutter) * -1);
  width: min(1180px, 74%);
  aspect-ratio: 2.3;
  overflow: hidden;
}
.backdrop img {
  width: 100%; height: 100%; max-width: none;
  display: block;
  object-fit: cover; object-position: 50% 30%;
  filter: blur(2px) saturate(0.55) brightness(0.8);
  transform: scale(1.04);
  opacity: 0.8;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%, #000 82%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 22%, #000 62%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 34%, #000 82%, transparent 100%), linear-gradient(180deg, transparent 0%, #000 22%, #000 62%, transparent 100%);
  mask-composite: intersect;
}
.backdrop--center { right: auto; left: 24%; width: min(940px, 58%); aspect-ratio: 1.9; }
.backdrop--center img {
  object-position: 62% 30%;
  -webkit-mask-image: radial-gradient(62% 72% at 56% 40%, #000 34%, transparent 80%);
  mask-image: radial-gradient(62% 72% at 56% 40%, #000 34%, transparent 80%);
}
@media (max-width: 900px) {
  .backdrop, .backdrop--center { left: auto; right: calc(var(--gutter) * -1); width: 100%; aspect-ratio: 1.7; opacity: 0.6; }
}

/* ---------- Section heads: title, drawn line, action ---------- */
.section { padding-top: 0; padding-bottom: clamp(48px, 6vw, 88px); }
.section-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 6px 32px;
  margin-bottom: clamp(16px, 1.8vw, 22px);
  padding-top: clamp(16px, 2vw, 24px);
  border-top: 1px solid var(--line);
}
.section-title {
  display: flex; align-items: center; gap: 24px;
  font-size: clamp(1.5rem, 2.3vw, 1.95rem);
}
.section-title::after {
  content: ""; flex: 1; height: 1px; min-width: 40px;
  background: var(--line);
}
.section-head__lead { grid-column: 1; color: var(--ink-soft); max-width: 70ch; }
.section-head__action { grid-column: 2; grid-row: 1; }
.section-head__count { grid-column: 2; grid-row: 1; color: var(--muted); font-size: 0.92rem; white-space: nowrap; }
@media (max-width: 640px) {
  .section-head { grid-template-columns: 1fr; }
  .section-head__action, .section-head__count { grid-column: 1; grid-row: auto; justify-self: start; }
}

/* ---------- Home ---------- */
.hero--home {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.95fr);
  gap: 32px clamp(28px, 4vw, 64px);
  align-items: center;
}
.hero--home .hero__title { font-size: clamp(2.3rem, 4.3vw, 3.7rem); }
@media (max-width: 1000px) {
  .hero--home { grid-template-columns: 1fr; }
  .hero--home .hero__main { max-width: none; }
}

.about-card { padding: clamp(18px, 2vw, 24px); display: grid; gap: 14px; z-index: 1; }
.about-card__top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; }
.about-card__photo {
  width: clamp(96px, 9vw, 124px); aspect-ratio: 1;
  border-radius: 50%; overflow: hidden;
  border: 1px solid var(--glass-line);
  background: var(--surface);
}
.about-card__img, .about-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.about-card__text p { margin-top: 10px; color: var(--ink-soft); font-size: 0.98rem; line-height: 1.55; }
.about-card__facts {
  margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line); padding-top: 16px;
}
.fact { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; padding-right: 12px; }
.fact + .fact { border-left: 1px solid var(--line); padding-left: 16px; padding-right: 0; }
.fact__icon { grid-row: span 2; color: var(--ink); }
.fact__icon .ico { width: 30px; height: 30px; stroke-width: 1.6; }
.fact dt { font-weight: 650; font-size: 0.95rem; line-height: 1.3; }
.fact dd { margin: 0; color: var(--ink-soft); font-size: 0.88rem; line-height: 1.35; }
.about-card__link { color: var(--accent); justify-self: start; }
@media (max-width: 460px) {
  .about-card__top { grid-template-columns: 1fr; }
  .about-card__facts { grid-template-columns: 1fr; gap: 14px; }
  .fact + .fact { border-left: 0; padding-left: 0; }
}

.close {
  margin-top: var(--space-section);
  margin-bottom: var(--space-section);
}
.close__title { font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -0.03em; }
.close__lead { margin-top: 14px; color: var(--ink-soft); max-width: 52ch; font-size: 1.08rem; }
.close__mail {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 22px;
  font-family: var(--font-head); font-stretch: 108%; font-weight: 700;
  font-size: clamp(1.25rem, 3.2vw, 2.1rem);
  letter-spacing: -0.015em;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--accent);
  overflow-wrap: anywhere;
}
.close__mail:hover { color: var(--accent); }
.close__mail .ico { width: 0.85em; height: 0.85em; transition: transform 200ms var(--ease-out); }
.close__mail:hover .ico { transform: translate(2px, -2px); }

/* ---------- Projects listing ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 14px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit; font-size: 0.88rem; font-weight: 500;
}
.chip img { width: 16px; height: 16px; }

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
}
/* a lone card does not stretch across the whole row */
.grid > .card:only-child { max-width: 480px; }
.card[hidden] { display: none; }
.empty { padding: 48px 0; display: grid; gap: 16px; justify-items: start; color: var(--ink-soft); }
.empty[hidden] { display: none; }

/* ==========================================================================
   Project page — the back of the box
   ========================================================================== */
.project-head { padding-top: clamp(28px, 4vw, 48px); }
.back {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  font-weight: 600; font-size: 0.95rem; color: var(--ink-soft);
  text-decoration: none;
}
.back:hover { color: var(--ink); }
.back .ico { transition: transform 200ms var(--ease-out); width: 18px; height: 18px; }
.back:hover .ico { transform: translateX(-3px); }

.project-head__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(300px, 4fr);
  gap: 32px clamp(28px, 4vw, 64px);
  align-items: start;
  margin-top: clamp(20px, 2.6vw, 32px);
}
.project-head__title {
  margin-top: clamp(16px, 2.4vw, 28px);
  font-size: clamp(2.7rem, 8vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
  font-weight: calc(var(--head-wght) + 60);
}
.project-head__summary {
  margin-top: 6px; max-width: 54ch;
  font-size: clamp(1.06rem, 1.5vw, 1.24rem);
  color: var(--ink-soft);
  line-height: 1.5;
}
.project-head__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.spec {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 6px 20px 8px;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 2px;
  background-repeat: no-repeat;
  padding-top: 10px;
  box-shadow: var(--shadow-rest);
}
.spec__list { margin: 0; }
.spec__row {
  display: grid; grid-template-columns: 6.4rem minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.spec__row:last-child { border-bottom: 0; }
.spec dt { color: var(--muted); padding-top: 3px; }
.spec dd { margin: 0; font-size: 0.97rem; line-height: 1.45; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.spec__sub { display: block; width: 100%; color: var(--muted); margin-top: 1px; text-transform: none; letter-spacing: 0.01em; font-stretch: 92%; font-weight: 500; font-size: 0.86rem; }
.spec__tech { display: inline-flex; align-items: center; gap: 7px; font-weight: 560; }
.spec__tech img { width: 18px; height: 18px; }

.project-hero {
  position: relative;
  margin: clamp(28px, 3vw, 40px) 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 16 / 9.6;
  box-shadow: 0 0 0 1px var(--line), var(--shadow-rest);
}
.project-hero__img,
.project-hero__preview {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.project-hero__preview { opacity: 0; transition: opacity 300ms ease; }
.project-hero.is-previewing .project-hero__preview { opacity: 1; }

@media (max-width: 900px) {
  .project-head__grid { grid-template-columns: 1fr; align-items: start; }
  .project-hero { aspect-ratio: 16 / 10; }
}

.project-body {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  padding-top: clamp(56px, 7vw, 96px);
  padding-bottom: clamp(56px, 7vw, 96px);
  align-items: start;
}
.project-body--plain { grid-template-columns: minmax(0, 1fr); }
.project-flow { display: grid; gap: clamp(64px, 8vw, 104px); min-width: 0; max-width: 820px; }
.project-body--plain .project-flow { max-width: 900px; }
.project-flow > section > h2 { margin-bottom: 26px; }

.toc { position: sticky; top: 100px; font-size: 0.92rem; }
.toc__title { color: var(--muted); margin-bottom: 12px; }
.toc ol { list-style: none; display: grid; gap: 2px; }
.toc ol ol { margin: 2px 0 6px 12px; padding-left: 10px; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 5px 0;
  text-decoration: none; color: var(--ink-soft);
  transition: color 160ms ease;
}
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--accent); font-weight: 600; }
@media (max-width: 1000px) {
  .project-body { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}

/* What I built */
.built__list { list-style: none; display: grid; gap: 0 40px; }
.built__list--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.built__item {
  display: grid; gap: 8px; align-content: start;
  padding: 20px 0 22px;
  border-top: 1px solid var(--line-strong);
}
.built__name { font-size: 1.2rem; }
.built__text { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.55; }
.built__text code, .prose code {
  font-family: var(--font-code); font-size: 0.86em;
  background: color-mix(in oklab, var(--ink) 6%, var(--surface));
  padding: 0.08em 0.36em; border-radius: 5px;
}
.link-code {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 4px; min-height: 36px; width: fit-content;
  font-weight: 600; font-size: 0.9rem;
  text-decoration: none;
  color: var(--accent);
}
.link-code:hover { text-decoration: underline; }
.built__team {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 18px; padding: 14px 16px;
  border-radius: 10px;
  background: var(--tint);
  border: 1px solid var(--line);
  color: var(--ink-soft); font-size: 0.95rem;
}
.built__team .ico { margin-top: 3px; color: var(--muted); }
@media (max-width: 700px) { .built__list--two { grid-template-columns: 1fr; } }

/* Breakdown blocks */
.breakdown { display: grid; gap: 28px; }
.breakdown > h2 { margin-bottom: 0 !important; }
.block { display: grid; gap: 18px; min-width: 0; }
.block__title { margin-top: 28px; font-size: clamp(1.4rem, 2.1vw, 1.75rem); scroll-margin-top: 100px; }
.breakdown > .block:first-of-type .block__title { margin-top: 0; }
.prose { max-width: 68ch; display: grid; gap: 1em; color: var(--ink); }
.prose p, .prose li { line-height: 1.68; }
.prose ul, .prose ol { padding-left: 1.2em; display: grid; gap: 0.35em; }
.prose a { color: var(--accent); }
.prose em { font-style: italic; }

.figure { margin: 0; display: grid; gap: 10px; }
.figure__media, .figure img {
  width: 100%;
  border-radius: calc(var(--radius) - 4px);
  box-shadow: 0 0 0 1px var(--line);
  background: var(--surface);
}
.figure figcaption, .shot figcaption {
  color: var(--muted); font-size: 0.88rem; line-height: 1.45;
}
.block--wide .figure { margin-top: 4px; }
@media (min-width: 860px) {
  .block--inset { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 32px; align-items: start; }
  .block--inset .block__title { grid-column: 1 / -1; }
  .block--inset .figure { margin-top: 6px; }
}

/* Code */
.code {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0d121b;
  color: #dfe4ee;
  box-shadow: 0 0 0 1px var(--line);
}
.code__file {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 0.72rem;
}
.code__file a { margin-left: auto; color: var(--accent); text-transform: none; letter-spacing: 0; font-stretch: 100%; }
.code { max-width: 100%; }
.code pre[class*="language-"] {
  max-width: 100%;
  margin: 0; padding: 18px 20px 20px;
  overflow-x: auto;
  font-family: var(--font-code); font-size: 0.84rem; line-height: 1.62;
  tab-size: 4;
  background: transparent;
  scrollbar-color: var(--line-strong) transparent;
}
.code code { font-family: inherit; }
.token.comment, .token.prolog { color: #7c8699; font-style: italic; }
.token.keyword { color: #b9a6ff; }
.token.class-name, .token.namespace { color: #f0d08a; }
.token.function { color: #9fc8ff; }
.token.string, .token.char { color: #b5d78a; }
.token.number, .token.boolean { color: #f0a7d8; }
.token.operator, .token.punctuation { color: #a9b2c4; }
.token.attr-name { color: #9fc8ff; }

/* Note */
.note {
  display: flex; gap: 12px;
  padding: 16px 18px; border-radius: 12px;
  background: color-mix(in oklab, var(--accent) 6%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--accent) 22%, var(--line));
}
.note .ico { color: var(--accent); margin-top: 4px; }

/* Pair */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .pair { grid-template-columns: 1fr; } }

/* YouTube facade */
.yt { position: relative; aspect-ratio: 16 / 9; border-radius: calc(var(--radius) - 4px); overflow: hidden; background: #111; box-shadow: 0 0 0 1px var(--line); }
.yt__poster, .yt img, .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; border-radius: 0; box-shadow: none; }
.yt__play {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 12px;
  color: #fff; text-decoration: none;
  background: radial-gradient(circle at center, rgb(0 0 0 / 0.15), rgb(0 0 0 / 0.5));
  transition: background-color 200ms ease;
}
.yt__btn {
  display: grid; place-items: center;
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 8px 24px -8px rgb(0 0 0 / 0.5);
  transition: transform 200ms var(--ease-out);
}
.yt__btn .ico { width: 30px; height: 30px; fill: currentColor; margin-left: 4px; }
.yt__label { font-weight: 650; text-shadow: 0 1px 8px rgb(0 0 0 / 0.5); }
.yt__play:hover .yt__btn { transform: scale(1.06); }

/* Challenges */
.challenges { display: grid; gap: 18px; }
.challenges > h2 { margin-bottom: 8px !important; }
.challenge {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  display: grid; gap: 16px;
}
.challenge__title { font-size: 1.25rem; }
.challenge__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.challenge__grid p { color: var(--ink-soft); line-height: 1.6; }
.challenge__label { color: var(--muted); margin-bottom: 6px; }
.challenge__grid > div:last-child .challenge__label { color: var(--accent); }
@media (max-width: 700px) { .challenge__grid { grid-template-columns: 1fr; } }

/* Controls */
.controls__table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.controls__table th, .controls__table td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.controls__table thead th { color: var(--muted); border-bottom-color: var(--line-strong); padding-top: 0; }
.controls__table tbody th { font-weight: 600; }
.controls__table td { white-space: nowrap; }
kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.1em; height: 2em; padding: 0 0.55em;
  margin: 2px 5px 2px 0;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-bottom-width: 3px;
  font-family: var(--font-body); font-stretch: 86%; font-weight: 650; font-size: 0.82rem;
  color: var(--ink);
  line-height: 1;
}
.pad { color: var(--ink-soft); font-size: 0.92rem; }
.keys { display: inline-flex; flex-wrap: nowrap; }
.keys kbd:last-child { margin-right: 0; }
.controls__play { margin-top: 22px; }
@media (max-width: 560px) {
  .controls__table td { white-space: normal; }
  .controls__table th, .controls__table td { padding-right: 8px; }
}

/* Gallery */
.gallery__grid { list-style: none; display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery__grid--1 { grid-template-columns: 1fr; }
.gallery__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shot { margin: 0; display: grid; gap: 8px; }
.shot__open {
  display: block; width: 100%; padding: 0; border: 0;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden; cursor: zoom-in;
  background: var(--surface);
  aspect-ratio: 4 / 3;
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow 200ms ease;
}
.shot__open:hover { box-shadow: 0 0 0 2px var(--accent); }
.shot__img, .shot__open img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out); }
@media (prefers-reduced-motion: no-preference) { .shot__open:hover img { transform: scale(1.03); } }
@media (max-width: 700px) { .gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .gallery__grid { grid-template-columns: 1fr; } }

.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 24px; border: 0;
  background: rgb(9 13 20 / 0.95);
  color: #e7ebf4;
}
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; gap: 16px; }
.lightbox::backdrop { background: transparent; }
.lightbox__frame { display: grid; place-items: center; gap: 12px; min-height: 0; }
.lightbox__img { max-width: min(1400px, 100%); max-height: calc(100vh - 150px); width: auto; border-radius: 8px; object-fit: contain; }
.lightbox__cap { color: #aab3c5; font-size: 0.95rem; min-height: 1.4em; text-align: center; }
.lightbox__bar { display: flex; align-items: center; justify-content: center; gap: 10px; }
.lightbox__bar .btn--icon { --btn-bg: rgb(255 255 255 / 0.06); --btn-fg: #e7ebf4; border-color: rgb(255 255 255 / 0.2); }
.lightbox__bar .btn--icon:hover { border-color: #fff; }
.lightbox__pos { min-width: 5ch; text-align: center; font-variant-numeric: tabular-nums; color: #aab3c5; }
.lightbox [data-lb-close] { margin-left: 18px; }

/* Outro band */
.outro {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
  padding: clamp(22px, 3vw, 32px) clamp(22px, 3vw, 36px);
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  color: var(--ink);
}
.outro__title { font-family: var(--font-head); font-stretch: calc(var(--head-wdth) * 1%); font-weight: var(--head-wght); font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -0.02em; line-height: 1.1; }
.outro__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Pager */
.pager {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 16px;
  padding-top: 28px; padding-bottom: var(--space-section);
  background: linear-gradient(var(--line-strong), var(--line-strong)) var(--gutter) 0 / calc(100% - var(--gutter) * 2) 1px no-repeat;
}
.pager__link {
  display: grid; gap: 6px; align-content: start;
  padding: 14px 0; text-decoration: none;
}
.pager__link--next { text-align: right; justify-items: end; }
.pager__dir { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.pager__dir .ico { width: 15px; height: 15px; transition: transform 200ms var(--ease-out); }
.pager__name {
  font-family: var(--font-head); font-stretch: calc(var(--head-wdth) * 1%); font-weight: var(--head-wght);
  font-size: clamp(1.3rem, 2.6vw, 2.1rem); letter-spacing: -0.02em; line-height: 1.1;
  transition: color 160ms ease;
}
.pager__link:hover .pager__name { color: var(--accent); }
.pager__link--prev:hover .ico { transform: translateX(-3px); }
.pager__link--next:hover .ico { transform: translateX(3px); }
.pager__all { align-self: center; font-weight: 600; font-size: 0.92rem; padding: 10px 6px; min-height: 44px; display: inline-flex; align-items: center; color: var(--ink-soft); }
@media (max-width: 600px) {
  .pager { grid-template-columns: 1fr 1fr; }
  .pager__all { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}

/* ---------- About ---------- */
.hero--about {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px clamp(32px, 5vw, 80px); align-items: center;
}
.hero--about .hero__main { max-width: 820px; }
.hero--about .hero__bio { max-width: 78ch; }
.hero--about { padding-top: clamp(18px, 2vw, 28px); padding-bottom: clamp(16px, 1.6vw, 22px); }
.hero--about .hero__actions { margin-top: 18px; }
.hero--about .hero__title { font-size: clamp(2.3rem, 4.2vw, 3.5rem); }
.hero--about .hero__lead { font-size: clamp(1rem, 1.2vw, 1.1rem); }
.hero--about .hero__bio { font-size: 0.97rem; line-height: 1.55; gap: 0.6em; }
.hero__photo { margin: 0; position: relative; z-index: 1; }
.about-photo, .hero__photo img {
  width: clamp(200px, 19vw, 270px); aspect-ratio: 1; object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--glass-line);
  box-shadow: 0 0 0 1px var(--glass-line), 0 0 0 6px color-mix(in oklab, var(--surface) 70%, transparent);
}
@media (max-width: 820px) {
  .hero--about { grid-template-columns: 1fr; }
  .hero__photo { grid-row: 1; }
  .about-photo, .hero__photo img { width: 140px; }
}

.about-cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  padding-top: clamp(16px, 1.6vw, 20px);
  background: linear-gradient(var(--line), var(--line)) var(--gutter) 0 / calc(100% - var(--gutter) * 2) 1px no-repeat;
}
.about-cards .panel--pad { padding: clamp(16px, 1.6vw, 20px) clamp(16px, 1.8vw, 22px); }
.about-cards .panel__head { margin-bottom: 12px; }
.about-cards .bullets li { font-size: 1rem; line-height: 1.3; }
.about-cards__wide { grid-column: 1 / -1; }
@media (max-width: 1000px) { .about-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .about-cards { grid-template-columns: 1fr; } }

.panel__head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.panel__title {
  display: flex; align-items: center; gap: 18px; flex: 1;
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
}
.panel__title::after {
  content: ""; flex: 1; height: 1px; min-width: 24px;
  background: var(--line);
}

.bullets { list-style: none; display: grid; gap: 7px; }
.bullets li { position: relative; padding-left: 28px; font-size: 1.04rem; line-height: 1.4; }
.bullets li::before {
  content: ""; position: absolute; left: 2px; top: 0.36em;
  width: 6px; height: 6px; border-radius: 1px; top: 0.6em; left: 4px;
  background: var(--accent);
}
.bullets__note { display: block; color: var(--muted); font-size: 0.88rem; margin-top: 2px; }

.tools { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tools__item {
  display: flex; align-items: center; gap: 12px;
  min-height: 46px; padding: 6px 12px;
  border-radius: var(--radius);
  background: color-mix(in oklab, var(--bg) 50%, transparent);
  border: 1px solid color-mix(in oklab, var(--ink) 12%, transparent);
  font-weight: 550; font-size: 0.97rem; line-height: 1.2;
}
/* dark brand marks (Unity, GitHub) need a light ground */
.tools__item img {
  width: 30px; height: 30px; flex: none; padding: 5px;
  object-fit: contain;
  border-radius: 6px; background: #eef0f6;
}
@media (max-width: 380px) { .tools { grid-template-columns: 1fr; } }

.timeline { list-style: none; display: grid; gap: 18px; }
.timeline__title { font-family: var(--font-head); font-stretch: 100%; font-weight: 650; font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.15; letter-spacing: -0.01em; }
.timeline__sub { margin-top: 8px; color: var(--ink-soft); }
.timeline__period { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: 0.95rem; margin-top: 14px; }
.timeline__period .ico { color: var(--accent); width: 18px; height: 18px; }

.band-wrap { padding-top: clamp(12px, 1.4vw, 16px); padding-bottom: clamp(40px, 5vw, 72px); }
.band {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  align-items: center; gap: 16px clamp(20px, 2.6vw, 36px);
  padding: clamp(12px, 1.2vw, 16px) clamp(18px, 2.6vw, 32px);
  border-color: color-mix(in oklab, var(--accent) 38%, var(--line));
  background: color-mix(in oklab, var(--accent) 6%, var(--glass));
}
.band__head { display: flex; align-items: center; gap: 18px; padding-right: clamp(20px, 2.6vw, 36px); border-right: 1px solid var(--line); align-self: stretch; }
.band__head .tile--lg { width: clamp(52px, 4.4vw, 64px); height: clamp(52px, 4.4vw, 64px); }
.band__title { font-size: clamp(1.25rem, 1.8vw, 1.55rem); white-space: nowrap; }
.band__body p { font-size: clamp(0.98rem, 1.15vw, 1.06rem); line-height: 1.45; color: var(--ink); max-width: 72ch; }
.band__body { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.band__body p { flex: 1 1 380px; }
.band__chips { margin-top: 0; }
.band__chips .chip { min-height: 32px; padding: 0 11px 0 9px; font-size: 0.84rem; }
@media (max-width: 760px) {
  .band { grid-template-columns: 1fr; }
  .band__head { border-right: 0; padding-right: 0; }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 24px);
}
.contact-card { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 32px); }
.contact-card__body { min-width: 0; display: grid; gap: 14px; }
.contact__address {
  font-family: var(--font-head); font-stretch: 100%; font-weight: 650;
  font-size: clamp(1.25rem, 2.1vw, 2rem); letter-spacing: -0.015em; line-height: 1.1;
  text-decoration: none;
  overflow-wrap: break-word;
}
.contact__address:hover { color: var(--accent); }
.contact-card__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.contact-card__text { color: var(--ink-soft); font-size: 1.04rem; line-height: 1.55; }
.contact-card__text strong { color: var(--ink); font-weight: 650; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .contact-card { flex-direction: column; align-items: flex-start; } }

.social-grid {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin-top: clamp(18px, 2vw, 26px);
  padding-top: clamp(18px, 2vw, 26px);
  padding-bottom: clamp(40px, 5vw, 72px);
  background: linear-gradient(var(--line), var(--line)) var(--gutter) 0 / calc(100% - var(--gutter) * 2) 1px no-repeat;
}
.social-card { display: flex; align-items: flex-start; gap: 20px; transition: border-color 200ms ease; }
.social-card:hover { border-color: color-mix(in oklab, var(--ink) 22%, transparent); }
.social-card .tile--lg { width: clamp(56px, 5vw, 72px); height: clamp(56px, 5vw, 72px); }
.social-card__body { display: grid; gap: 12px; min-width: 0; }
.social-card__text { color: var(--ink-soft); line-height: 1.5; }
.social-card__btn { justify-self: start; margin-top: 4px; }
@media (max-width: 1000px) { .social-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg) 70%, black);
  padding: 22px 0 26px; font-size: 0.92rem; color: var(--ink-soft);
}
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px; }
.site-footer__name strong { color: var(--ink); font-weight: 700; }
.site-footer__sep { margin: 0 10px; color: var(--muted); }
.site-footer__links { list-style: none; display: flex; flex-wrap: wrap; align-items: center; }
.site-footer__links li + li { border-left: 1px solid var(--line-strong); }
.site-footer__links a {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px;
  text-decoration: none; color: var(--ink-soft);
}
.site-footer__links a:hover { color: var(--accent); }
.site-footer__links .ico { width: 17px; height: 17px; }
.site-footer__links .ico--tiny { width: 13px; height: 13px; margin-left: -3px; opacity: 0.7; }
@media (max-width: 640px) {
  .site-footer__links li + li { border-left: 0; }
  .site-footer__links a { padding: 0 10px 0 0; }
}

/* ---------- Entrance (masthead / page heads only, once) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-enter] { animation: enter 520ms var(--ease-out) both; }
  .js [data-enter]:nth-child(2) { animation-delay: 70ms; }
  .js [data-enter]:nth-child(3) { animation-delay: 140ms; }
  .js [data-enter]:nth-child(4) { animation-delay: 210ms; }
  .js [data-enter]:nth-child(5) { animation-delay: 280ms; }
  .js .about-card[data-enter], .js .hero__photo[data-enter] { animation-delay: 240ms; }
  .js .spec[data-enter] { animation-delay: 160ms; }
  .js .project-hero[data-enter] { animation-delay: 220ms; }
}
@keyframes enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .site-footer, .toc, .pager, .card__actions .btn { display: none; }
  body { background: #fff; }
}


.controls__action { display: inline-flex; align-items: center; gap: 10px; }
.controls__action .ico { width: 20px; height: 20px; color: var(--accent); flex: none; }

/* Tech chips on the Projects page are labels, not filters */
.chip--static { cursor: default; }
.chip--static:hover { border-color: var(--line-strong); }
.chip--static:active { transform: none; }

/* ---------- Project feedback ---------- */
.feedback { margin-top: clamp(32px, 5vw, 56px); padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.feedback__q { font-family: var(--font-body); font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--ink); }
.feedback__opt { margin-left: 8px; font-weight: 400; font-size: .85rem; color: var(--muted); }
.feedback__opts { display: flex; flex-wrap: wrap; gap: 10px; }
.feedback__opts .btn[disabled] { opacity: .55; cursor: default; }
.feedback__opts .btn[aria-pressed="true"] { opacity: 1; border-color: var(--accent); }
.feedback__done { color: var(--muted); font-size: .95rem; }

/* ---------- Privacy page ---------- */
.legal { max-width: 68ch; padding-block: clamp(32px, 6vw, 72px); }
.legal h2 { font-size: 1.15rem; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 1.2em; display: grid; gap: 6px; }
.legal a { color: var(--ink); }
