/* ==========================================================================
   Allocraft — allocraft.co
   Hand-written stylesheet. Zero dependencies, no frameworks.
   ========================================================================== */

/* ------------------------------------------------------------------ Fonts */
@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/satoshi-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/satoshi-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/satoshi-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/satoshi-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  /* JetBrains Mono is a variable font; one file covers 400–500. */
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/jetbrainsmono.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

/* ----------------------------------------------------------------- Tokens */
:root {
  /* Colours */
  --charcoal: #0f1720;
  --charcoal-hover: #1a2530;
  --rust: #e07a3f;
  --sand: #eadfd4;
  --paper: #f6f2ec;
  --slate: #64748b;
  --sage: #a3b18a;
  --body-ink: #3a4553;
  --on-dark: #b5bdc8;
  --on-dark-muted: #94a0b0;
  --code-gutter: #3d4a59;
  --code-text: #d8dee6;
  --code-dot: #2a3542;
  --white: #ffffff;

  /* Hairlines */
  --line-light: rgba(15, 23, 32, 0.1);
  --line-light-2: rgba(15, 23, 32, 0.12);
  --line-light-strong: rgba(15, 23, 32, 0.15);
  --line-light-border: rgba(15, 23, 32, 0.2);
  --line-dark: rgba(234, 223, 212, 0.08);
  --line-dark-2: rgba(234, 223, 212, 0.12);

  /* Type */
  --font-ui: "Satoshi", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Layout — 80% of the viewport on desktop, full-width on smaller screens */
  --container: 80vw;
  --pad-x: clamp(20px, 5vw, 40px);

  /* Radii */
  --r-pill: 999px;
  --r-card: 16px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-cta: 28px;

  /* Shadow */
  --shadow-lift: 0 30px 60px -30px rgba(15, 23, 32, 0.5);
  --shadow-lift-strong: 0 30px 60px -30px rgba(15, 23, 32, 0.6);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--font-ui);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--charcoal);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--rust);
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
textarea {
  font-family: inherit;
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  text-wrap: pretty;
}

::selection {
  background: var(--rust);
  color: #fff;
}

/* Focus-visible in rust — accessible, keyboard-only */
:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--charcoal);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  font-size: 15px;
  font-weight: 500;
}
.skip-link:focus {
  left: 0;
}

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

/* --------------------------------------------------------------- Layout */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
  width: 100%;
}

.site-main {
  flex: 1;
}

/* Page-enter fade (progressive; disabled under reduced motion) */
.site-main {
  animation: page-enter 0.35s ease both;
}
@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate);
}

.mono {
  font-family: var(--font-mono);
}

/* --------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  padding: 16px 28px;
  line-height: 1;
  min-height: 44px;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.2s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--charcoal);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--rust);
  color: var(--paper);
}
.btn-outline {
  background: transparent;
  color: var(--charcoal);
  border-color: var(--line-light-border);
}
.btn-outline:hover {
  border-color: var(--charcoal);
  color: var(--charcoal);
}
.btn-rust {
  background: var(--rust);
  color: var(--charcoal);
}
.btn-rust:hover {
  background: var(--paper);
  color: var(--charcoal);
}

.arrow {
  color: var(--rust);
}

.text-link {
  color: var(--slate);
  font-size: 15px;
}
.text-link:hover {
  color: var(--rust);
}

/* Chips (filters + project-type multiselect) */
.chip {
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  color: var(--charcoal);
  border: 1px solid var(--line-light-border);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.chip[aria-pressed="true"],
.chip.is-active {
  background: var(--charcoal);
  color: var(--paper);
  border-color: var(--charcoal);
}
.chip-sm {
  padding: 9px 16px;
}

/* --------------------------------------------------------------- Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 242, 236, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
  border-bottom-color: rgba(15, 23, 32, 0.08);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px var(--pad-x);
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 46px;
  height: auto;
}
.brand-name {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.primary-nav {
  display: flex;
  gap: clamp(14px, 2.5vw, 32px);
  align-items: center;
  white-space: nowrap;
  margin-left: auto;
}
.nav-link {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--slate);
  padding: 6px 0;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--rust);
  transition: width 0.3s ease;
}
.nav-link:hover {
  color: var(--charcoal);
}
.nav-link[aria-current] {
  color: var(--charcoal);
}
.nav-link[aria-current]::after {
  width: 100%;
}

.header-cta {
  padding: 11px 20px;
  background: var(--charcoal);
  color: var(--paper);
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.header-cta:hover {
  background: var(--rust);
  color: var(--paper);
}

/* Mobile menu button */
.menu-toggle {
  margin-left: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-light-border);
  background: transparent;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.menu-toggle .bar {
  width: 16px;
  height: 1.5px;
  background: var(--charcoal);
  transition: transform 0.25s ease;
}
.menu-toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(3.25px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .bar:nth-child(2) {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* Mobile menu panel */
.mobile-menu {
  display: none;
  border-top: 1px solid rgba(15, 23, 32, 0.08);
  padding: 12px var(--pad-x) 28px;
  flex-direction: column;
  background: var(--paper);
  height: calc(100vh - 81px);
  box-sizing: border-box;
}
.mobile-menu.is-open {
  display: flex;
}
.mobile-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-light);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--charcoal);
  min-height: 44px;
}
.mobile-link .arrow {
  font-size: 22px;
}
.mobile-cta {
  margin-top: 28px;
  padding: 18px;
  text-align: center;
  background: var(--charcoal);
  color: var(--paper);
  border-radius: var(--r-pill);
  font-size: 16px;
  font-weight: 500;
}
.mobile-cta:hover {
  color: var(--paper);
  background: var(--rust);
}
.mobile-tag {
  margin-top: auto;
  padding-top: 24px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--slate);
}

/* --------------------------------------------------------------- Sections */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(53px, 9vw, 96px) var(--pad-x);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.h2 {
  margin: 0;
  font-size: clamp(30px, 6vw, 40px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

/* --------------------------------------------------------------- Home hero */
.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(38px, 9vw, 88px) var(--pad-x) clamp(40px, 9vw, 72px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 56px;
  align-items: center;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.hero-title {
  margin: 0;
  font-size: clamp(56px, 7.5vw, 100px);
  line-height: 0.94;
  font-weight: 500;
  letter-spacing: -0.04em;
}
.hero-dash {
  display: inline-block;
  width: 0.55em;
  height: 0.035em;
  background: var(--rust);
  margin-left: 0.18em;
  vertical-align: middle;
}
.hero-lead {
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--body-ink);
  max-width: 460px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--slate);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 4px rgba(163, 177, 138, 0.25);
  flex: none;
}

/* Code window */
.code-window {
  background: var(--charcoal);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-dark);
}
.code-bar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--code-dot);
}
.code-file {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-dark-muted);
}
.code-body {
  padding: 22px 20px 22px 0;
  font-family: var(--font-mono);
  font-size: clamp(11.5px, 3.1vw, 13.5px);
  line-height: 1.85;
}
.code-line {
  display: grid;
  grid-template-columns: clamp(36px, 9vw, 52px) minmax(0, 1fr);
}
.code-no {
  color: var(--code-gutter);
  text-align: right;
  padding-right: clamp(12px, 3vw, 18px);
  -webkit-user-select: none;
  user-select: none;
}
.code-text {
  color: var(--code-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.code-text.is-comment {
  color: var(--slate);
}
.code-typed {
  /* visible portion during typing */
}
.code-rest {
  color: transparent;
}
.code-cursor {
  display: none;
  width: 0.6em;
  height: 1.1em;
  background: var(--rust);
  vertical-align: -0.2em;
  margin-left: 1px;
}
.code-line.is-current .code-cursor {
  display: inline-block;
}
.code-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-top: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--on-dark-muted);
}

/* Detail-page source block: horizontal scroll, no wrap */
.code-block .code-file-row {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-dark-muted);
}
.code-block .code-body {
  overflow-x: auto;
  font-size: clamp(11px, 2.9vw, 13.5px);
}
.code-block .code-line {
  grid-template-columns: 52px 1fr;
  white-space: pre;
}
.code-block .code-text {
  white-space: pre;
  overflow-wrap: normal;
}

/* --------------------------------------------------------------- Stats strip */
.stats {
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}
.stats-grid {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  column-gap: 24px;
}
.stat {
  padding: clamp(22px, 5vw, 36px) 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-value {
  font-size: clamp(30px, 7vw, 44px);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 14px;
  color: var(--slate);
}

/* --------------------------------------------------------------- Selected work */
.featured-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  background: var(--charcoal);
  color: var(--paper);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift-strong);
  color: var(--paper);
}
.featured-visual {
  position: relative;
  aspect-ratio: 16 / 11;
  min-height: 100%;
}
.featured-body {
  padding: clamp(24px, 5vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}
.featured-top {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.eyebrow-rust {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--rust);
  text-transform: uppercase;
}
.featured-name {
  font-size: clamp(40px, 8vw, 56px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}
.featured-summary {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--on-dark);
}
.featured-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(246, 242, 236, 0.12);
}
.meta-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.meta-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--slate);
}
.meta-val {
  font-size: 18px;
  font-weight: 500;
}
.featured-more {
  font-size: 15px;
  font-weight: 500;
  color: var(--paper);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 24px;
  margin-top: 24px;
}
.mini-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.3s ease;
}
.mini-card:hover {
  transform: translateY(-6px);
  color: var(--charcoal);
}
.mini-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-card);
  overflow: hidden;
}
.mini-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.mini-name {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.mini-lines {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
}
.mini-domain {
  font-size: 14px;
  color: var(--slate);
  margin-top: -8px;
}

/* --------------------------------------------------------------- Why it matters */
.split {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
}
.split-head {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.why-grid {
  flex: 2 1 480px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 40px 32px;
}
.why-point {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line-light-strong);
}
.why-title {
  font-size: 21px;
  font-weight: 500;
}
.why-body {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body-ink);
}

/* --------------------------------------------------------------- Working together */
.engage {
  background: var(--sand);
  border-radius: var(--r-xl);
  padding: clamp(32px, 5vw, 56px);
}
.engage-note {
  font-size: 15px;
  color: var(--body-ink);
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 32px;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.step-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.step-no {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  flex: none;
}
.step-rule {
  flex: 1;
  height: 1px;
  background: var(--line-light-border);
}
.step-title {
  font-size: 21px;
  font-weight: 500;
}
.step-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--body-ink);
}

/* --------------------------------------------------------------- Logs teaser */
.logs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.log-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 20px;
  border-top: 2px solid var(--charcoal);
  transition: border-color 0.2s ease;
}
.log-card:hover {
  border-color: var(--rust);
  color: var(--charcoal);
}
.log-card-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
}
.log-card-title {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.log-card-dek {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--body-ink);
}
.log-card-read {
  font-size: 14px;
  color: var(--slate);
}

/* --------------------------------------------------------------- CTA band */
.cta-band {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(53px, 9vw, 96px);
}
.cta-inner {
  background: var(--charcoal);
  color: var(--paper);
  border-radius: var(--r-cta);
  padding: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 40px;
  align-items: end;
  position: relative;
  overflow: hidden;
}
.cta-watermark {
  position: absolute;
  right: -40px;
  top: -30px;
  width: min(420px, 70%);
  opacity: 0.06;
  pointer-events: none;
}
.cta-title {
  margin: 0;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.035em;
  position: relative;
}
.cta-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  position: relative;
}
.cta-side p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--on-dark);
}

/* --------------------------------------------------------------- Footer */
.site-footer {
  background: var(--charcoal);
  color: var(--sand);
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(40px, 9vw, 72px) var(--pad-x) 32px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.footer-brand img {
  width: 80px;
  height: auto;
}
.footer-name {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.footer-tag {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--on-dark-muted);
}
.footer-links {
  display: flex;
  gap: 16px 32px;
  font-size: 15px;
  color: var(--on-dark);
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--on-dark);
}
.footer-links a:hover {
  color: var(--rust);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid rgba(234, 223, 212, 0.1);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
}

/* --------------------------------------------------------------- Work page */
.page-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 40px;
  align-items: end;
  margin-bottom: 56px;
}
.page-h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 80px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.04em;
}
.page-head .eyebrow {
  margin-bottom: 20px;
  display: block;
}
.page-intro {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--body-ink);
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-light-2);
}
.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 48px 28px;
}
.project-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.3s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  color: var(--charcoal);
}
.project-card .card-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-card);
  overflow: hidden;
}
.status-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  background: rgba(246, 242, 236, 0.92);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--charcoal);
}
.project-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.project-card-name {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.project-card-domain {
  font-size: 14px;
  color: var(--slate);
}
.project-card-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--body-ink);
}
.project-card-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
  padding-top: 12px;
  border-top: 1px solid var(--line-light);
}

.no-results {
  font-size: 16px;
  color: var(--slate);
  padding: 24px 0;
}

/* --------------------------------------------------------------- Project detail */
.back-link {
  font-size: 15px;
  color: var(--slate);
  display: inline-block;
  margin-bottom: 48px;
}
.back-link:hover {
  color: var(--rust);
}
.detail-top {
  padding-top: clamp(31px, 9vw, 56px);
}
.detail-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 48px;
  align-items: end;
}
.detail-eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--rust);
  margin-bottom: 20px;
  display: block;
  text-transform: uppercase;
}
.detail-name {
  margin: 0;
  font-size: clamp(52px, 12vw, 120px);
  line-height: 0.9;
  font-weight: 500;
  letter-spacing: -0.045em;
}
.detail-summary {
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--body-ink);
}
.detail-metastrip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 56px;
  border-top: 1px solid var(--line-light-strong);
  border-bottom: 1px solid var(--line-light-strong);
}
.detail-metacell {
  padding: 22px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.detail-metacell .meta-key {
  letter-spacing: 0.14em;
}
.detail-hero {
  position: relative;
  margin: 48px 0;
  aspect-ratio: 16 / 8;
  border-radius: 20px;
  overflow: hidden;
}

.detail-cols {
  padding: 24px var(--pad-x) clamp(40px, 9vw, 72px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 48px;
}
.detail-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.detail-block .challenge {
  margin: 0;
  font-size: 22px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.detail-block .approach {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--body-ink);
}

.layers-section {
  padding: 0 var(--pad-x) clamp(40px, 9vw, 72px);
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}
.layers-head {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}
.layers-head .note {
  font-size: 15px;
  line-height: 1.6;
  color: var(--body-ink);
  max-width: 260px;
}
.layers-list {
  flex: 2 1 480px;
  min-width: 0;
}
.layer-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-light-2);
  align-items: center;
}
.layer-no {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--rust);
}
.layer-mid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.layer-name {
  font-size: 21px;
  font-weight: 500;
}
.layer-bar {
  height: 4px;
  background: var(--sand);
  border-radius: 2px;
  overflow: hidden;
}
.layer-fill {
  height: 100%;
  width: 0;
  background: var(--charcoal);
  border-radius: 2px;
  transition: width 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.layer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--slate);
}
.layer-right .lines {
  color: var(--charcoal);
}

.source-section {
  padding: 0 var(--pad-x) clamp(40px, 9vw, 72px);
}
.source-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.source-note {
  font-size: 14px;
  color: var(--slate);
}

.milestones-section {
  padding: 0 var(--pad-x) clamp(53px, 9vw, 96px);
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}
.milestones-list {
  flex: 2 1 480px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-left: 28px;
  border-left: 1px solid var(--line-light-border);
}
.milestone {
  position: relative;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 20px;
  align-items: baseline;
}
.milestone-dot {
  position: absolute;
  left: -34px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--charcoal);
  border: 2px solid var(--paper);
}
.milestone.is-last .milestone-dot {
  background: var(--rust);
}
.milestone-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--slate);
}
.milestone-text {
  font-size: 18px;
  line-height: 1.45;
}

.next-project {
  background: var(--charcoal);
  color: var(--paper);
  transition: background 0.3s ease;
  display: block;
}
.next-project:hover {
  background: var(--charcoal-hover);
  color: var(--paper);
}
.next-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 44px var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.next-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--on-dark-muted);
}
.next-name {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 500;
  letter-spacing: -0.025em;
}

/* --------------------------------------------------------------- Build logs page */
.logs-featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  background: var(--sand);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 56px;
  transition: transform 0.3s ease;
}
.logs-featured:hover {
  transform: translateY(-4px);
  color: var(--charcoal);
}
.logs-featured-visual {
  position: relative;
  aspect-ratio: 16 / 10;
}
.logs-featured-body {
  padding: clamp(24px, 5vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.logs-featured-meta {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
}
.logs-featured-meta .project {
  color: var(--rust);
}
.logs-featured-title {
  font-size: clamp(26px, 5vw, 36px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.logs-featured-dek {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--body-ink);
}
.logs-featured-more {
  font-size: 15px;
  font-weight: 500;
}

.log-filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.log-row {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  row-gap: 10px;
  align-items: baseline;
  padding: 28px 16px;
  margin: 0 -16px;
  border-top: 1px solid var(--line-light);
  border-radius: 10px;
  transition: background 0.25s ease;
  color: inherit;
}
.log-row:hover {
  background: var(--sand);
  color: var(--charcoal);
}
.log-row-date {
  width: 120px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--slate);
}
.log-row-project {
  width: 110px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--rust);
}
.log-row-main {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.log-row-title {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.log-row-dek {
  font-size: 15px;
  line-height: 1.5;
  color: var(--body-ink);
}
.log-row-read {
  width: 70px;
  margin-left: auto;
  font-size: 14px;
  color: var(--slate);
  text-align: right;
}

/* --------------------------------------------------------------- Log detail (article) */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(31px, 9vw, 56px) var(--pad-x) clamp(53px, 9vw, 96px);
}
.article-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
  margin: 28px 0 20px;
}
.article-meta .project {
  color: var(--rust);
}
.article-title {
  margin: 0 0 20px;
  font-size: clamp(32px, 5.5vw, 56px);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.article-dek {
  margin: 0 0 40px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--body-ink);
}
.article-body p {
  margin: 0 0 24px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--body-ink);
}
.article-foot {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line-light-2);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* --------------------------------------------------------------- About page */
.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  border-top: 2px solid var(--charcoal);
}
.principle {
  padding: 32px 32px 32px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.principle-no {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--rust);
}
.principle-title {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.principle-body {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--body-ink);
}

.founder {
  background: var(--sand);
}
.founder-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(38px, 9vw, 88px) var(--pad-x);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 56px;
  align-items: center;
}
.founder-portrait {
  aspect-ratio: 4 / 5;
  max-width: 360px;
  border-radius: var(--r-lg);
  background: repeating-linear-gradient(135deg, #d9d0c5 0 10px, #e2dace 10px 20px);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  box-sizing: border-box;
}
.founder-portrait span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
}
.founder-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.founder-lead {
  margin: 0;
  font-size: 28px;
  line-height: 1.35;
  letter-spacing: -0.015em;
}
.founder-body {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--body-ink);
}
.founder-signoff {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line-light-strong);
}
.founder-name {
  font-size: 17px;
  font-weight: 500;
}
.founder-role {
  font-size: 14px;
  color: var(--slate);
}
.founder-email {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
}

.shelf {
  flex: 2 1 480px;
  min-width: 0;
}
.shelf-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-light-2);
  align-items: baseline;
}
.shelf-title {
  font-size: 18px;
  font-weight: 500;
}
.shelf-used {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
}
.split-head .shelf-lead {
  font-size: 28px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.takeon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.takeon-card {
  padding: 32px;
  border: 1px solid rgba(15, 23, 32, 0.14);
  border-radius: var(--r-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease, transform 0.3s ease;
}
.takeon-card:hover {
  border-color: var(--charcoal);
  transform: translateY(-4px);
}
.takeon-langs {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--rust);
}
.takeon-title {
  font-size: 22px;
  font-weight: 500;
}
.takeon-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--body-ink);
}

/* --------------------------------------------------------------- Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 64px;
}
.contact-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.contact-h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 80px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.04em;
}
.contact-lead {
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--body-ink);
  max-width: 440px;
}
.contact-avail {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--body-ink);
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  font-size: 17px;
}
.contact-social {
  color: var(--slate);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: clamp(24px, 5vw, 40px);
  background: var(--white);
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 32, 0.08);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--slate);
  text-transform: uppercase;
}
.field input,
.field textarea {
  padding: 14px 0;
  border: none;
  border-bottom: 1px solid var(--line-light-border);
  background: transparent;
  font-size: 17px;
  outline: none;
  color: var(--charcoal);
  transition: border-color 0.2s ease;
  border-radius: 0;
}
.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--rust);
}
.field textarea {
  resize: vertical;
  min-height: 96px;
}
.field.has-error input,
.field.has-error textarea {
  border-bottom-color: var(--rust);
}
.field-error {
  font-size: 13px;
  color: var(--rust);
  min-height: 0;
}
.type-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.form-submit {
  align-self: flex-start;
}

.contact-success {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: clamp(24px, 5vw, 40px);
  background: var(--charcoal);
  color: var(--paper);
  border-radius: 20px;
  min-height: 420px;
}
.contact-success img {
  width: 70px;
  height: auto;
}
.contact-success-title {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.contact-success-body {
  font-size: 17px;
  line-height: 1.55;
  color: var(--on-dark);
}

.next-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 32px;
}
.next-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 2px solid var(--charcoal);
}
.next-step-when {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--rust);
}
.next-step-title {
  font-size: 20px;
  font-weight: 500;
}
.next-step-body {
  font-size: 15px;
  line-height: 1.6;
  color: var(--body-ink);
}

/* --------------------------------------------------------------- Project visuals (CSS placeholders) */
.pv {
  width: 100%;
  height: 100%;
  container-type: size;
  position: absolute;
  inset: 0;
  overflow: hidden;
  font-family: var(--font-ui);
}

/* Ridge */
.pv-ridge {
  background: radial-gradient(120% 90% at 70% 0%, #223044 0%, #0f1720 60%);
}
.pv-ridge .pv-topbar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6cqh;
  background: rgba(246, 242, 236, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.4cqw;
  box-sizing: border-box;
  font-size: 1.5cqw;
  color: var(--on-dark);
}
.pv-ridge .pv-topbar .name {
  font-weight: 500;
  color: var(--paper);
}
.pv-ridge .pv-topbar .clock {
  font-family: var(--font-mono);
}
.pv-ridge .pv-shell {
  position: absolute;
  left: 6%;
  top: 15%;
  width: 52%;
  height: 58%;
  background: #16212d;
  border: 1px solid rgba(246, 242, 236, 0.08);
  border-radius: 1.2cqw;
  overflow: hidden;
  box-shadow: 0 2cqw 4cqw rgba(0, 0, 0, 0.35);
}
.pv-ridge .pv-winbar {
  height: 4.2cqw;
  display: flex;
  align-items: center;
  gap: 0.8cqw;
  padding: 0 1.4cqw;
  border-bottom: 1px solid rgba(246, 242, 236, 0.06);
}
.pv-ridge .pv-winbar .d {
  width: 1cqw;
  height: 1cqw;
  border-radius: 50%;
  background: #3d4a59;
}
.pv-ridge .pv-winbar .d.rust {
  background: var(--rust);
}
.pv-ridge .pv-winbar .lbl {
  margin-left: 1cqw;
  font: 1.2cqw var(--font-mono);
  color: var(--slate);
}
.pv-ridge .pv-term {
  padding: 1.8cqw;
  font: 1.35cqw / 1.75 var(--font-mono);
  color: var(--on-dark);
  white-space: pre;
}
.pv-ridge .pv-term .prompt {
  color: var(--sage);
}
.pv-ridge .pv-term .out {
  color: var(--paper);
}
.pv-ridge .pv-term .cur {
  display: inline-block;
  width: 0.8cqw;
  height: 1.6cqw;
  background: var(--rust);
  vertical-align: middle;
  animation: pv-blink 1s steps(1) infinite;
}
.pv-ridge .pv-files {
  position: absolute;
  right: 6%;
  top: 26%;
  width: 34%;
  height: 48%;
  background: var(--sand);
  border-radius: 1.2cqw;
  overflow: hidden;
  box-shadow: 0 2cqw 4cqw rgba(0, 0, 0, 0.35);
}
.pv-ridge .pv-files-bar {
  height: 4.2cqw;
  display: flex;
  align-items: center;
  padding: 0 1.6cqw;
  font-size: 1.3cqw;
  font-weight: 500;
  color: var(--charcoal);
  border-bottom: 1px solid rgba(15, 23, 32, 0.1);
}
.pv-ridge .pv-files-list {
  padding: 1.4cqw 1.6cqw;
  display: flex;
  flex-direction: column;
  gap: 1.2cqw;
}
.pv-ridge .pv-file {
  display: flex;
  align-items: center;
  gap: 1cqw;
}
.pv-ridge .pv-file .ic {
  width: 2cqw;
  height: 1.6cqw;
  border-radius: 0.3cqw;
  background: var(--slate);
}
.pv-ridge .pv-file .ic.rust {
  background: var(--rust);
}
.pv-ridge .pv-file .ic.sage {
  background: var(--sage);
}
.pv-ridge .pv-file .nm {
  height: 0.9cqw;
  background: rgba(15, 23, 32, 0.25);
  border-radius: 1cqw;
}
.pv-ridge .pv-dock {
  position: absolute;
  left: 50%;
  bottom: 5%;
  transform: translateX(-50%);
  display: flex;
  gap: 1.2cqw;
  padding: 1.2cqw 1.6cqw;
  background: rgba(246, 242, 236, 0.08);
  border-radius: 1.6cqw;
}
.pv-ridge .pv-dock span {
  width: 3.6cqw;
  height: 3.6cqw;
  border-radius: 0.9cqw;
}

/* Cutline */
.pv-cutline {
  background: #111a24;
}
.pv-cutline .pv-preview {
  position: absolute;
  left: 4%;
  top: 7%;
  width: 62%;
  height: 50%;
  border-radius: 1cqw;
  background: linear-gradient(180deg, #eadfd4 0%, #e3b793 62%, #b8764f 100%);
  overflow: hidden;
}
.pv-cutline .pv-preview .ridge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  background: #2a3542;
  clip-path: polygon(0 60%, 18% 20%, 34% 55%, 52% 0, 70% 45%, 84% 25%, 100% 55%, 100% 100%, 0 100%);
}
.pv-cutline .pv-tc {
  position: absolute;
  left: 4%;
  top: 60%;
  font: 1.3cqw var(--font-mono);
  color: var(--paper);
}
.pv-cutline .pv-panel {
  position: absolute;
  right: 4%;
  top: 7%;
  width: 26%;
  height: 50%;
  border-radius: 1cqw;
  background: #16212d;
  padding: 1.8cqw;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 2cqw;
}
.pv-cutline .pv-panel .h {
  font-size: 1.3cqw;
  font-weight: 500;
  color: var(--paper);
}
.pv-cutline .pv-slider {
  display: flex;
  flex-direction: column;
  gap: 0.8cqw;
}
.pv-cutline .pv-slider .lbl {
  font: 1cqw var(--font-mono);
  color: var(--slate);
}
.pv-cutline .pv-slider .track {
  height: 0.4cqw;
  background: #2a3542;
  border-radius: 1cqw;
  position: relative;
}
.pv-cutline .pv-slider .knob {
  position: absolute;
  top: -0.6cqw;
  width: 1.6cqw;
  height: 1.6cqw;
  border-radius: 50%;
  background: var(--sand);
}
.pv-cutline .pv-slider .knob.rust {
  background: var(--rust);
}
.pv-cutline .pv-timeline {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 7%;
  height: 26%;
  display: flex;
  flex-direction: column;
  gap: 1cqh;
}
.pv-cutline .pv-track {
  flex: 1;
  position: relative;
  background: rgba(246, 242, 236, 0.04);
  border-radius: 0.6cqw;
}
.pv-cutline .pv-clip {
  position: absolute;
  top: 12%;
  bottom: 12%;
  border-radius: 0.5cqw;
  background: var(--slate);
}
.pv-cutline .pv-clip.rust {
  background: var(--rust);
}
.pv-cutline .pv-clip.sage {
  background: var(--sage);
  opacity: 0.8;
}
.pv-cutline .pv-playhead {
  position: absolute;
  top: -8%;
  bottom: -4%;
  width: 2px;
  background: var(--paper);
  animation: pv-play 8s linear infinite alternate;
}

/* Facet */
.pv-facet {
  background: #b7c2a2;
  perspective: 90cqw;
}
.pv-facet .pv-floor {
  position: absolute;
  left: -40%;
  right: -40%;
  bottom: -30%;
  height: 80%;
  background-image: linear-gradient(rgba(15, 23, 32, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 32, 0.22) 1px, transparent 1px);
  background-size: 6cqw 6cqw;
  transform: rotateX(68deg);
  transform-origin: 50% 0;
}
.pv-facet .pv-cube-anchor {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}
.pv-facet .pv-cube {
  position: absolute;
  left: -11cqw;
  top: -11cqw;
  width: 22cqw;
  height: 22cqw;
  transform-style: preserve-3d;
  animation: pv-spin 14s linear infinite;
}
.pv-facet .pv-face {
  position: absolute;
  inset: 0;
  border: 2px solid var(--charcoal);
}
.pv-facet .f1 {
  background: rgba(246, 242, 236, 0.55);
  transform: translateZ(11cqw);
}
.pv-facet .f2 {
  background: rgba(246, 242, 236, 0.35);
  transform: rotateY(180deg) translateZ(11cqw);
}
.pv-facet .f3 {
  background: rgba(224, 122, 63, 0.75);
  transform: rotateY(90deg) translateZ(11cqw);
}
.pv-facet .f4 {
  background: rgba(15, 23, 32, 0.55);
  transform: rotateY(-90deg) translateZ(11cqw);
}
.pv-facet .f5 {
  background: rgba(246, 242, 236, 0.8);
  transform: rotateX(90deg) translateZ(11cqw);
}
.pv-facet .f6 {
  background: rgba(15, 23, 32, 0.3);
  transform: rotateX(-90deg) translateZ(11cqw);
}
.pv-facet .pv-label {
  position: absolute;
  left: 3cqw;
  top: 3cqw;
  font: 1.3cqw var(--font-mono);
  color: var(--charcoal);
}

/* Ledger */
.pv-ledger {
  background: var(--slate);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pv-ledger .pv-console {
  width: 80%;
  background: var(--charcoal);
  border-radius: 1.2cqw;
  padding: 3cqw;
  box-sizing: border-box;
  font: 1.5cqw / 1.8 var(--font-mono);
  color: var(--on-dark);
  box-shadow: 0 2cqw 5cqw rgba(15, 23, 32, 0.35);
}
.pv-ledger .prompt {
  color: var(--rust);
}
.pv-ledger .kw {
  color: var(--paper);
}
.pv-ledger .rule {
  margin: 1.6cqw 0;
  border-top: 1px solid rgba(246, 242, 236, 0.12);
}
.pv-ledger .row {
  display: grid;
  grid-template-columns: 1fr auto;
}
.pv-ledger .row.head {
  color: var(--slate);
}
.pv-ledger .row.data {
  color: var(--paper);
}
.pv-ledger .foot {
  margin-top: 1.4cqw;
  color: var(--sage);
}

/* Tessera */
.pv-tessera {
  background: var(--sand);
}
.pv-tessera .g {
  position: absolute;
  left: 0;
  right: 0;
}
.pv-tessera .g-cap {
  top: 25%;
  border-top: 1px dashed rgba(15, 23, 32, 0.3);
}
.pv-tessera .g-x {
  top: 44%;
  border-top: 1px dashed rgba(15, 23, 32, 0.3);
}
.pv-tessera .g-base {
  top: 75%;
  border-top: 1px solid var(--rust);
}
.pv-tessera .lbl {
  position: absolute;
  left: 3cqw;
  font: 1.2cqw var(--font-mono);
  color: var(--slate);
}
.pv-tessera .lbl-cap {
  top: calc(25% - 3cqh);
}
.pv-tessera .lbl-x {
  top: calc(44% - 3cqh);
}
.pv-tessera .lbl-base {
  top: calc(75% + 1cqh);
  color: var(--rust);
}
.pv-tessera .glyph {
  position: absolute;
  left: 0;
  right: 0;
  top: 16%;
  text-align: center;
  font: 500 68cqh/1 var(--font-ui);
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 0.3cqw var(--charcoal);
}

/* Visual keyframes */
@keyframes pv-spin {
  from {
    transform: rotateX(-24deg) rotateY(0deg);
  }
  to {
    transform: rotateX(-24deg) rotateY(360deg);
  }
}
@keyframes pv-play {
  0% {
    left: 18%;
  }
  100% {
    left: 86%;
  }
}
@keyframes pv-blink {
  50% {
    opacity: 0;
  }
}

/* --------------------------------------------------------------- Responsive */
/* Below 1024px, let the container fill the width (with side padding) so the
   80vw cap doesn't leave large gaps on tablets and phones. */
@media (max-width: 1023.98px) {
  :root {
    --container: 100%;
  }
}

@media (max-width: 759.98px) {
  .primary-nav,
  .header-cta {
    display: none;
  }
  .menu-toggle {
    display: flex;
  }
  /* Prevent body scroll when menu open */
  body.menu-open {
    overflow: hidden;
  }
}

@media (min-width: 760px) {
  .mobile-menu {
    display: none !important;
  }
}

/* --------------------------------------------------------------- Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .site-main {
    animation: none;
  }
  .pv-facet .pv-cube {
    animation: none;
    transform: rotateX(-24deg) rotateY(-30deg);
  }
  .pv-cutline .pv-playhead {
    animation: none;
    left: 50%;
  }
  .pv-ridge .pv-term .cur {
    animation: none;
  }
  .layer-fill {
    transition: none;
  }
}
