:root {
  --bg: #0d0d0c;
  --bg-alt: #121211;
  --panel: #171715;
  --panel-2: #1f1f1c;
  --border: #2c2c28;
  --text: #edebe5;
  --text-dim: #a3a199;
  --text-faint: #6e6d66;
  --ink-rgb: 237, 235, 229;
  --accent: #ff5a1f;
  --accent-bright: #ff7d4d;
  --accent-rgb: 255, 90, 31;
  --accent-2: var(--accent);
  --danger: #ff4d4d;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Archivo", "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 0;
  --radius-sm: 0;
  --max: 1160px;
  --header-h: 100px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--header-h) - 1px); }
html { scrollbar-gutter: stable; }
main { overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

input, textarea {
  user-select: text;
  -webkit-user-select: text;
}

img { max-width: 100%; display: block; -webkit-user-drag: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.accent { color: var(--accent); }

.btn {
  --wipe: var(--text);
  --wipe-ink: var(--bg);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: 0;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color 0.3s cubic-bezier(0.7, 0, 0.2, 1), border-color 0.3s ease, background-color 0.3s ease;
}
.btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: var(--wipe);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.38s cubic-bezier(0.7, 0, 0.2, 1);
}
.btn:hover::before,
.btn:focus-visible::before { transform: scaleX(1); transform-origin: left center; }
.btn:hover,
.btn:focus-visible { color: var(--wipe-ink); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary::before { display: none; }
.btn-primary:hover,
.btn-primary:focus-visible { background: transparent; border-color: var(--border); color: var(--accent); }
.btn-outline { border-color: var(--border); color: var(--text); }
.btn-outline:hover,
.btn-outline:focus-visible { border-color: var(--text); }
.btn-ghost { border-color: var(--border); color: var(--text-dim); }
.btn-hire { --wipe: var(--accent); border-color: var(--accent); color: var(--accent); }
.btn-hire:hover,
.btn-hire:focus-visible { border-color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: 0.88rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 12, 0);
  border-bottom: 1px solid rgba(44, 44, 40, 0);
}
.header-inner {
  height: calc(var(--header-h) - 1px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-text { font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; white-space: nowrap; }
.logo:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 0; }

.nav { display: flex; gap: 28px; }
.nav a {
  position: relative;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--text); }
.nav a.is-active { color: var(--text); }
.nav a:focus-visible { color: var(--text); }
.nav-underline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.2s ease;
  pointer-events: none;
}
.nav a:hover .nav-underline,
.nav a:focus-visible .nav-underline { transform: scaleX(1); }
.nav a.is-active .nav-underline { transform: scaleX(1); background: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  justify-content: safe center;
  gap: 28px;
  padding: 24px clamp(24px, 8vw, 56px) calc(24px + env(safe-area-inset-bottom));
  background: rgba(13, 13, 12, 0.97);
  border-top: 1px solid var(--border);
  overflow-y: auto;
  z-index: 99;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav-links { display: flex; flex-direction: column; }
.mobile-nav-links a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: clamp(10px, 2.2vh, 16px) 0;
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 700;
  font-size: clamp(1.6rem, 7vw, 2.3rem);
  letter-spacing: -0.01em;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-nav-links a.is-active { color: var(--accent); }
.mobile-nav-links a.is-active::after {
  content: "";
  align-self: center;
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 0;
  background: var(--accent);
}
.mobile-nav-cta { align-self: flex-start; }
.site-header.is-nav-open {
  background-color: rgba(13, 13, 12, 0.97) !important;
  border-bottom-color: var(--border) !important;
}

@media (max-width: 900px), (max-aspect-ratio: 4/5) {
  .nav { display: none; }
  .header-actions .btn-sm { display: none; }
  .nav-toggle { display: flex; }
  :root { --header-h: 56px; }
}

@media (max-width: 420px) {
  :root { --header-h: 50px; }
  .logo-text { font-size: 1.08rem; }
}

@media (orientation: landscape) and (max-height: 520px) {
  :root { --header-h: 52px; }
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 4vh, 56px);
  align-items: center;
  align-content: center;
  padding: clamp(24px, 5vh, 64px) 24px;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
}
.hero-bg-wrap {
  position: absolute;
  top: calc(-1 * var(--header-h));
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
}
.hero-bg { display: block; width: 100%; height: 100%; }
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
}
.hero-copy, .hero-portrait { position: relative; z-index: 1; }
.hero-copy { display: flex; flex-direction: column; gap: clamp(12px, 2.4vh, 24px); min-height: 0; }
.hero-portrait { min-height: 0; }
@media (prefers-reduced-motion: reduce) {
  .hero-bg-wrap { display: none; }
}
.eyebrow {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dim);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
}

h1 {
  font-family: var(--display);
  font-stretch: 72%;
  font-weight: 800;
  font-size: clamp(2.8rem, min(7vw, 14svh), 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.005em;
  margin: 0;
  margin-left: -0.04em;
  text-box: trim-both cap alphabetic;
}
#heroHeadline .accent { color: #85837b; }

#heroHeadline .glitch { position: relative; display: inline-block; }
#heroHeadline .glitch::before,
#heroHeadline .glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  background: none;
  opacity: 0;
  pointer-events: none;
}
#heroHeadline .glitch::before {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  transform: translateX(var(--gx1, 0px));
  clip-path: inset(var(--gt1, 0%) 0 var(--gb1, 100%) 0);
}
#heroHeadline .glitch::after {
  color: var(--text-dim);
  -webkit-text-fill-color: var(--text-dim);
  transform: translateX(var(--gx2, 0px));
  clip-path: inset(var(--gt2, 0%) 0 var(--gb2, 100%) 0);
}
#heroHeadline .glitch.is-glitching::before,
#heroHeadline .glitch.is-glitching::after { opacity: 0.9; }

.scroll-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(16px, 3.4vh, 32px);
  z-index: 1;
  width: max-content;
  margin-inline: auto;
  padding: 6px;
}
.scroll-hint-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0.75;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.scroll-hint:hover .scroll-hint-inner,
.scroll-hint:focus-visible .scroll-hint-inner { opacity: 1; }
.scroll-hint.is-away .scroll-hint-inner { opacity: 0; transform: translateY(8px); pointer-events: none; }
.scroll-hint-label {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--text-dim);
}
.scroll-hint-track {
  position: relative;
  width: 2px;
  height: 40px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.scroll-hint-fill {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(var(--accent), var(--accent));
  animation: scroll-hint-pulse 2s ease-in-out infinite;
}
@keyframes scroll-hint-pulse {
  0%, 100% { clip-path: inset(0 0 100% 0); }
  50% { clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint-fill { animation: none; clip-path: none; }
}
@media (max-width: 900px), (max-aspect-ratio: 4/5), (max-height: 640px) {
  .scroll-hint { display: none; }
}
.lede {
  color: var(--text-dim);
  max-width: 52ch;
  margin: clamp(10px, 2.2vh, 22px) 0;
  text-box: trim-both cap alphabetic;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.portrait-card {
    position: relative;
    --wire-r: 0px;
    --wire-x: 50%;
    --wire-y: 50%;
}
.portrait-card .portrait-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.portrait-card img.portrait-photo { position: relative; z-index: 1; }
.portrait-card img.portrait-fw { z-index: 2; }
.portrait-card .portrait-draw { z-index: 4; }

.portrait-frame path { fill: none; stroke-linejoin: miter; }
.portrait-frame .pf-panel { fill: #121211; fill-opacity: 0.15; stroke: none; }
.pf-halo { stroke: var(--text); stroke-width: 1; opacity: 0.28; }
.pf-offset { stroke: var(--text); stroke-width: 1; stroke-dasharray: 3 5; opacity: 0.16; }
.portrait-frame .pf-nodes { fill: var(--text); stroke: none; opacity: 0.55; }
.pf-runner {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 0.07 0.93;
  animation: pf-run 12s linear infinite;
}
@keyframes pf-run { to { stroke-dashoffset: -1; } }

.portrait-card img {
  width: 100%;
  aspect-ratio: 620 / 620;
  max-height: min(72vh, 620px);
  object-fit: contain;
  object-position: center;
}

.portrait-card img.portrait-fw {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  max-height: none;
  pointer-events: none;
  filter: grayscale(1) brightness(1.4);
  -webkit-mask-image: radial-gradient(circle var(--wire-r) at var(--wire-x) var(--wire-y), #000 0%, #000 58%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(circle var(--wire-r) at var(--wire-x) var(--wire-y), #000 0%, #000 58%, rgba(0, 0, 0, 0) 100%);
}
.portrait-card img.portrait-fw.is-intro {
  -webkit-mask-image: none;
  mask-image: none;
}

.portrait-card .portrait-draw {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--text);
  pointer-events: none;
}

.js .portrait-card img.portrait-photo { opacity: 0; }
.js .portrait-card .portrait-draw { opacity: 0; }

@supports not ((-webkit-mask-image: radial-gradient(#000, #fff)) or (mask-image: radial-gradient(#000, #fff))) {
  .portrait-fw { display: none; }
}

@media (max-width: 900px), (max-aspect-ratio: 4/5) {
  .hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2.2svh, 26px);
    padding-block: clamp(14px, 3svh, 40px);
    height: calc(100vh - var(--header-h));
    height: calc(100svh - var(--header-h));
    min-height: 0;
    text-align: center;
  }
  .hero-copy { display: contents; }
  .eyebrow { order: 0; align-self: center; }
  h1 { order: 1; font-size: clamp(2.4rem, min(13vw, 7.5svh), 4.4rem); margin-left: 0; }
  .hero-portrait {
    order: 2;
    flex: 0 1 min(460px, 100vw - 48px);
    min-height: 120px;
    width: 100%;
    max-width: 460px;
    margin-block: clamp(20px, 3.4svh, 34px) 0;
  }
  .portrait-card { height: 100%; }
  .portrait-card img { height: 100%; max-height: none; aspect-ratio: auto; }
  .lede { order: 3; margin-inline: auto; max-width: 46ch; font-size: clamp(0.84rem, 2svh, 1rem); }
  .hero-actions { order: 4; justify-content: center; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: clamp(16px, 4vw, 40px);
    padding-block: 12px;
    height: auto;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
    text-align: left;
  }
  .hero-copy { display: flex; gap: clamp(8px, 2.4svh, 14px); }
  .eyebrow { align-self: flex-start; }
  h1 { font-size: clamp(1.8rem, 11svh, 3.2rem); margin-left: -0.04em; }
  .lede { margin-inline: 0; font-size: clamp(0.76rem, 3.4svh, 0.92rem); }
  .hero-actions { justify-content: flex-start; }
  .hero-portrait { min-height: 0; max-width: none; margin-block: 0; }
  .portrait-card { height: auto; }
  .portrait-card img {
    height: auto;
    aspect-ratio: 1 / 1;
    max-height: calc(100vh - var(--header-h) - 64px);
    max-height: calc(100svh - var(--header-h) - 64px);
  }
  .mobile-nav { gap: 14px; padding-block: 12px; }
  .mobile-nav-links a { padding-block: 7px; }
}

@media (max-width: 420px) {
  .btn { padding: 11px 16px; font-size: 0.82rem; }
}

.section { padding: 88px 0; border-top: 1px solid var(--border); }
#experience { position: relative; overflow-x: hidden; overflow-x: clip; }
#experience::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(var(--ink-rgb), 0.05) 1px, transparent 1px) calc(50% + 60px) 0 / 120px 120px,
    linear-gradient(90deg, rgba(var(--ink-rgb), 0.05) 1px, transparent 1px) calc(50% + 60px) 0 / 120px 120px,
    linear-gradient(rgba(var(--ink-rgb), 0.022) 1px, transparent 1px) calc(50% + 12px) 0 / 24px 24px,
    linear-gradient(90deg, rgba(var(--ink-rgb), 0.022) 1px, transparent 1px) calc(50% + 12px) 0 / 24px 24px;
  -webkit-mask-image: linear-gradient(transparent, #000 160px, #000 calc(100% - 160px), transparent);
  mask-image: linear-gradient(transparent, #000 160px, #000 calc(100% - 160px), transparent);
}
.section-alt { background: var(--bg-alt); }

#projects { overflow-x: hidden; overflow-x: clip; }
.section-title {
  --rule: 1;
  display: flex;
  align-items: baseline;
  gap: clamp(14px, 2vw, 26px);
  margin: 0 0 56px;
  font-family: var(--display);
  font-stretch: 72%;
  font-weight: 800;
  font-size: clamp(2.8rem, 6.4vw, 5.2rem);
  line-height: 0.9;
  letter-spacing: -0.005em;
}

.section-title .section-name { white-space: nowrap; }
.section-title::after {
  content: "";
  flex: 1;
  min-width: 24px;
  height: 1px;
  background: var(--border);
  transform: scaleX(var(--rule));
  transform-origin: left;
}
.js .section-title { opacity: 0; }
@media (max-width: 600px) {
  .section-title { margin-bottom: 36px; }
}
.title-box { position: relative; display: inline-block; }
.title-block {
  position: absolute;
  inset: 0.02em -0.06em;
  background: var(--accent);
  pointer-events: none;
}

.ly,
.mix { border-top: 1px solid var(--text); }
.ly-bar,
.mix-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-dim);
}
.ly-hint { color: var(--text-faint); }
.ly-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding-top: 24px;
}

.ly-scene {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 500px;
  perspective: 1600px;
}
.ly-stack {
  --plate: 250px;
  --gap: 36px;
  position: relative;
  width: var(--plate);
  height: var(--plate);
  transform: translateY(calc(var(--gap) * var(--n) / 2)) rotateX(58deg) rotateZ(-42deg);
  transform-style: preserve-3d;
}
.ly-plate {
  --z: calc((var(--n) - 1 - var(--i)) * var(--gap));
  --lift: 0px;
  --drop: 0px;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 14px 16px;
  border: 1px solid rgba(var(--ink-rgb), 0.3);
  background: rgba(13, 13, 12, 0.72);
  transform: translateZ(calc(var(--z) + var(--lift) + var(--drop)));
  cursor: pointer;
}
.ly.is-built .ly-plate { transition: transform 0.5s cubic-bezier(0.7, 0, 0.2, 1), border-color 0.3s ease, background-color 0.3s ease, opacity 0.3s ease; }
.ly-plate::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 6px;
  height: 6px;
  background: rgba(var(--ink-rgb), 0.35);
}
.ly-plate-name {
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--text-dim);
  transition: color 0.3s ease;
}
.ly-plate.is-above { --lift: 84px; }
.ly-plate.is-active {
  --lift: 28px;
  border-color: var(--accent);
  background: rgba(24, 16, 12, 0.92);
}
.ly-plate.is-active::before { background: var(--accent); }
.ly-plate.is-active .ly-plate-name { color: var(--text); }
.ly-plate.is-active ~ .ly-plate { opacity: 0.6; }

.ly-list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--border); }
.ly-item { position: relative; border-top: 1px solid var(--border); }
.ly-item::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.7, 0, 0.2, 1);
}
.ly-item.is-active::before { width: 56px; }
.ly-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  padding: 16px 0;
  text-align: left;
}
.ly-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ly-name {
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 800;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  line-height: 1;
  color: var(--text-dim);
  transition: color 0.25s ease;
}
.ly-tools { font-size: 0.85rem; color: var(--text-faint); }
.ly-item:hover .ly-name,
.ly-item.is-active .ly-name { color: var(--text); }
.ly-item.is-active .ly-tools { color: var(--text-dim); }
.ly-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s cubic-bezier(0.7, 0, 0.2, 1); }
.ly-item.is-active .ly-detail { grid-template-rows: 1fr; }
.ly-detail-inner { min-height: 0; overflow: hidden; }
.ly-detail p { margin: 0; padding: 0 0 18px; max-width: 56ch; font-size: 0.98rem; line-height: 1.65; color: var(--text-dim); }

.js .ly:not(.is-in) .ly-plate { opacity: 0; }

@media (max-width: 900px) {
  .ly-body { grid-template-columns: 1fr; gap: 16px; }
  .ly-scene { min-height: 360px; }
  .ly-stack { --plate: 170px; --gap: 26px; }
  .ly-plate { padding: 10px 12px; }
  .ly-plate-name { font-size: 0.9rem; }
  .ly-plate.is-above { --lift: 58px; }
  .ly-plate.is-active { --lift: 20px; }
  .ly-hint { display: none; }
}

.mix-hint { color: var(--text-faint); }
.mix-body {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 20px;
  padding-top: 20px;
}
.mix-program { display: flex; flex-direction: column; border: 1px solid var(--border); background: var(--panel); }
.mix-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text);
}
.mix-src { margin-left: auto; color: var(--text-faint); }
.mix-tally { flex: none; width: 8px; height: 8px; background: var(--border); transition: background-color 0.2s ease; }
.mix-tally.is-on,
.mix-source.is-live .mix-tally { background: var(--accent); }

.mix-screen { position: relative; display: grid; flex: 1; overflow: hidden; }
.mix-show {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: clamp(24px, 3.4vw, 40px);
  background: var(--panel);
}
.js .mix-show:not(.is-active) { visibility: hidden; }
.mix-show.is-entering { z-index: 1; }
.js .mix:not(.is-in) .mix-show { clip-path: inset(0% 100% 0% 0%); }
.mix-kind { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--accent); }
.mix-title {
  margin: 0;
  font-family: var(--display);
  font-stretch: 72%;
  font-weight: 800;
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  line-height: 0.92;
}
.mix-blurb { margin: 0; max-width: 62ch; font-size: 1rem; line-height: 1.6; color: var(--text-dim); }
.mix-stats { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 0.86rem; color: var(--text-dim); }
.mix-stats b {
  display: block;
  font-family: var(--display);
  font-stretch: 72%;
  font-weight: 800;
  font-size: 2.2rem;
  line-height: 1;
  color: var(--text);
}
.mix-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  width: 100%;
  border-top: 1px solid var(--border);
}
.mix-features li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.86rem; line-height: 1.5; color: var(--text-dim); }
.mix-features strong { display: block; font-weight: 600; color: var(--text); }
.mix-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 11px 16px 11px 14px;
  border: 1px solid var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  transition: color 0.25s ease, background-color 0.25s ease;
}
.mix-cta::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  transition: background-color 0.25s ease;
}
.mix-cta:hover,
.mix-cta:focus-visible { color: var(--bg); background: var(--accent); }
.mix-cta:hover::before,
.mix-cta:focus-visible::before { background: var(--bg); animation: mix-cta-tally 0.9s steps(1) infinite; }
.mix-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@keyframes mix-cta-tally { 50% { background: transparent; } }
.mix-wipe {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  width: 2px;
  margin-left: -1px;
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
}

.mix-sources { display: flex; flex-direction: column; gap: 10px; }
.mix-source {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 16px;
  text-align: left;
  border: 1px solid var(--border);
  background: transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.mix-source:hover { border-color: rgba(var(--ink-rgb), 0.35); }
.mix-source:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mix-source.is-live { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.06); }
.mix-source-bar { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--text-faint); }
.mix-source-title {
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--text);
}
.mix-source-meta { font-size: 0.8rem; color: var(--text-dim); }
.js .mix-source { opacity: 0; }

@media (max-width: 900px) {
  .mix-body { grid-template-columns: 1fr; }
  .mix-sources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mix-hint { display: none; }
}
@media (max-width: 600px) {
  .mix-features { grid-template-columns: 1fr; }
  .mix-src { display: none; }
}

.timeline {
  --gap: 40px;
  --rail: 36.5px;
  position: relative;
  padding: 8px 0 4px;
}
.timeline-track {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--border) 4%, var(--border) 96%, transparent);
  transform: translateX(-50%);
}
.timeline-progress {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 0%;
  border-radius: 0;
  background: var(--accent);
  transform: translateX(-50%);
}
.timeline-progress::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 0 0 3px var(--bg);
}

.timeline-item {
  --tc: var(--ink-rgb);
  position: relative;
  width: calc(50% - var(--gap));
  margin-bottom: 56px;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item[data-side="left"] { margin-right: auto; }
.timeline-item[data-side="right"] { margin-left: auto; }

.timeline-node {
  position: absolute;
  top: calc(var(--rail) - 6px);
  width: 12px;
  height: 12px;
  border-radius: 0;
  background: var(--bg);
  border: 1.5px solid var(--border);
  z-index: 2;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.timeline-item[data-side="left"] .timeline-node { right: calc(-1 * var(--gap) - 6px); }
.timeline-item[data-side="right"] .timeline-node { left: calc(-1 * var(--gap) - 6px); }
.timeline-item.is-lit .timeline-node {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.timeline-ping {
  position: absolute;
  inset: -1.5px;
  border-radius: 0;
  border: 1px solid var(--accent);
  opacity: 0;
  pointer-events: none;
}

.timeline-branch {
  position: absolute;
  top: calc(var(--rail) - 0.5px);
  width: var(--gap);
  height: 1px;
  background: var(--border);
  transform-origin: left center;
}
.timeline-item[data-side="left"] .timeline-branch {
  right: calc(-1 * var(--gap));
  transform-origin: right center;
  background: var(--border);
}
.timeline-item[data-side="right"] .timeline-branch { left: calc(-1 * var(--gap)); }


.timeline-card {
  --mx: 50%;
  --my: 50%;
  --glow-x: 100%;
  position: relative;
  padding: 22px 26px 24px;
  border-radius: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  transition: border-color 0.35s ease;
}
.timeline-item[data-side="right"] .timeline-card { --glow-x: 0%; }
.timeline-item.is-lit .timeline-card { border-color: rgba(var(--ink-rgb), 0.2); }
.timeline-card:hover {
  border-color: rgba(var(--ink-rgb), 0.35);
}
.timeline-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 26px;
  width: 40px;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.6s ease;
}
.timeline-item.is-lit .timeline-card::before { opacity: 1; }
.timeline-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(220px circle at var(--mx) var(--my), rgba(var(--ink-rgb), 0.55), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.timeline-card:hover::after { opacity: 1; }

.timeline-date {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.timeline-card h3 {
  margin: 10px 0 4px;
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 800;
  font-size: clamp(1.15rem, 1.7vw, 1.35rem);
  line-height: 1.2;
}
.timeline-company { display: block; font-family: var(--sans); font-size: 0.9rem; font-weight: 500; color: var(--accent); margin-bottom: 12px; }
.timeline-card p { margin: 0; color: var(--text-dim); font-size: 0.9rem; line-height: 1.6; }

.js .timeline-node { transform: scale(0); }
.js .timeline-branch { transform: scaleX(0); }
.js .timeline-card { opacity: 0; visibility: hidden; }
.js .timeline-item[data-side="left"] .timeline-card { transform: translateX(16px); }
.js .timeline-item[data-side="right"] .timeline-card { transform: translateX(-16px); }

@media (max-width: 760px) {
  .timeline { --gap: 26px; --rail: 35px; }
  .timeline-track { left: 6.5px; transform: none; }
  .timeline-progress { left: 6px; transform: none; }
  .timeline-item,
  .timeline-item[data-side="left"],
  .timeline-item[data-side="right"] {
    width: auto;
    margin-left: calc(7px + var(--gap));
    margin-right: 0;
    margin-bottom: 36px;
  }
  .timeline-item:last-child { margin-bottom: 0; }
  .timeline-item[data-side="left"] .timeline-node,
  .timeline-item[data-side="right"] .timeline-node {
    left: calc(-1 * var(--gap) - 6px);
    right: auto;
  }
  .timeline-item[data-side="left"] .timeline-branch,
  .timeline-item[data-side="right"] .timeline-branch {
    left: calc(-1 * var(--gap));
    right: auto;
    transform-origin: left center;
    background: var(--border);
  }
  .timeline-item[data-side="left"] .timeline-card { --glow-x: 0%; }
  .timeline-card { padding: 20px 20px 22px; }
  .js .timeline-item[data-side="left"] .timeline-card { transform: translateX(-16px); }
}


.stack-key[data-cat="core"],  .stack-cell[data-cat="core"]  { --cat: var(--ink-rgb); }
.stack-key[data-cat="cloud"], .stack-cell[data-cat="cloud"] { --cat: var(--ink-rgb); }
.stack-key[data-cat="cms"],   .stack-cell[data-cat="cms"]   { --cat: var(--ink-rgb); }
.stack-key[data-cat="tools"], .stack-cell[data-cat="tools"] { --cat: var(--ink-rgb); }

.stack-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--border);
}
.stack-key {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: -1px;
  padding: 10px 0;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-dim);
  background: transparent;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.stack-key:hover,
.stack-key:focus-visible,
.stack-key.is-active {
  color: var(--text);
}
.stack-key.is-active { border-bottom-color: var(--accent); }
.stack-key:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.stack-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.stack-cell {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  align-items: center;
  padding: 12px 10px 16px;
  border-radius: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}
.stack-cell::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform-origin: left center;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i, 0) * 30ms);
}
.stack-cell::before {
  content: "";
  position: absolute;
  top: 17px;
  right: 12px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.js .stack:not(.is-powered) .stack-cell::after { transform: scaleX(0); }
.stack-num {
  position: relative;
  justify-self: start;
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--text-faint);
  transition: color 0.3s ease;
}
.stack-cell img {
  position: relative;
  width: clamp(30px, 3.6vw, 52px);
  height: auto;
  filter: grayscale(1);
  opacity: 0.7;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.3s ease, opacity 0.3s ease;
}
.stack-name {
  position: relative;
  font-family: var(--sans);
  font-size: 0.86rem;
  line-height: 1.25;
  color: var(--text);
  text-align: center;
}

.stack-cell:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--ink-rgb), 0.35);
}
.stack-cell:hover img { transform: scale(1.1); filter: none; opacity: 1; }
.stack-cell:hover .stack-num { color: var(--text-dim); }
.stack-cell:hover::before { opacity: 1; }

.stack.is-focusing .stack-cell:not(.is-match) { opacity: 0.22; }
.stack.is-focusing .stack-cell.is-match { border-color: rgba(var(--ink-rgb), 0.35); }

.stack.is-entering .stack-cell { transition: none; }

@media (max-width: 900px) {
  .stack-grid { gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stack-cell { padding: 10px 8px 14px; border-radius: 0; }
  .stack-name { font-size: 0.8rem; }
  .stack-cell img { width: clamp(34px, 7vw, 52px); }
}
@media (max-width: 600px) {
  .stack-legend {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .stack-legend::-webkit-scrollbar { display: none; }
  .stack-key { flex: none; }
  .stack-legend::after { content: ""; flex: none; width: 8px; }
  .stack-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .stack-cell { padding: 8px 4px 12px; }
  .stack-cell::before { top: 12px; right: 7px; width: 5px; height: 5px; }
  .stack-cell img { width: 30px; }
  .stack-num { font-size: 0.58rem; }
  .stack-name { font-size: 0.6rem; }
}

.contact-card { border-top: 1px solid var(--text); }
.ct-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-dim);
}
.ct-field {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(circle, var(--border) 1px, transparent 1.4px) 0 0 / 48px 48px;
}

.contact-body {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-areas: "intro target" "actions target";
  align-items: start;
  gap: 28px 64px;
  padding: clamp(36px, 6vw, 80px) clamp(20px, 5vw, 64px);
}
.contact-intro { grid-area: intro; display: flex; flex-direction: column; gap: 22px; }
.contact-body .contact-actions { grid-area: actions; }
.contact-headline {
  margin: 0;
  max-width: 12ch;
  font-family: var(--display);
  font-stretch: 72%;
  font-weight: 800;
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.005em;
}
.contact-accent { color: var(--accent); }
.contact-lede { margin: 0; max-width: 46ch; font-size: 1.02rem; color: var(--text-dim); }

.ct-target {
  grid-area: target;
  align-self: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: clamp(28px, 4vw, 56px) clamp(22px, 3vw, 44px);
  text-align: center;
  background: rgba(var(--ink-rgb), 0.02);
}
.ct-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 0 solid var(--text-faint);
  transition: transform 0.35s cubic-bezier(0.7, 0, 0.2, 1), border-color 0.25s ease;
}
.ct-corner--tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.ct-corner--tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.ct-corner--bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.ct-corner--br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.ct-target:hover .ct-corner,
.ct-target:focus-visible .ct-corner { border-color: var(--accent); }
.ct-target:hover .ct-corner--tl,
.ct-target:focus-visible .ct-corner--tl { transform: translate(-6px, -6px); }
.ct-target:hover .ct-corner--tr,
.ct-target:focus-visible .ct-corner--tr { transform: translate(6px, -6px); }
.ct-target:hover .ct-corner--bl,
.ct-target:focus-visible .ct-corner--bl { transform: translate(-6px, 6px); }
.ct-target:hover .ct-corner--br,
.ct-target:focus-visible .ct-corner--br { transform: translate(6px, 6px); }

.contact-mail-label { font-size: 0.85rem; color: var(--text-faint); }
.contact-address {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1rem, 1.75vw, 1.6rem);
  color: var(--text);
  overflow-wrap: anywhere;
  transition: color 0.25s ease;
}
.ct-target:hover .contact-address,
.ct-target:focus-visible .contact-address { color: var(--accent); }
.ct-target:focus-visible { outline: 2px solid var(--accent); outline-offset: 10px; }

.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.contact-copy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.contact-copy-icon { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: miter; }
.contact-copy:hover,
.contact-copy:focus-visible { color: var(--text); border-color: var(--text); }
.contact-copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.contact-copy.is-copied { color: var(--accent); border-color: var(--accent); }

@media (hover: none) {
  .ct-corner { border-color: var(--text-dim); }
}
@media (max-width: 900px) {
  .contact-body { grid-template-columns: 1fr; grid-template-areas: "intro" "target" "actions"; gap: 28px; }
  .ct-target { align-self: stretch; }
}

.section > .wrap { position: relative; }
.section > .wrap::before,
.section > .wrap::after {
  content: "";
  position: absolute;
  top: -94px;
  width: 11px;
  height: 11px;
  background:
    linear-gradient(var(--text-faint), var(--text-faint)) center / 1px 100% no-repeat,
    linear-gradient(var(--text-faint), var(--text-faint)) center / 100% 1px no-repeat;
  pointer-events: none;
}
.section > .wrap::before { left: 19px; }
.section > .wrap::after { right: 19px; }

.page-ruler {
  --p: 0;
  position: fixed;
  top: calc(var(--header-h) + 32px);
  bottom: 32px;
  left: calc((100vw - var(--max)) / 4 - 6px);
  z-index: 5;
  width: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background:
    linear-gradient(var(--border), var(--border)) left top / 1px 100% no-repeat,
    repeating-linear-gradient(to bottom, var(--text-faint) 0 1px, transparent 1px 10%) left top / 12px calc(100% + 1px) no-repeat,
    repeating-linear-gradient(to bottom, var(--border) 0 1px, transparent 1px 2%) left top / 6px calc(100% + 1px) no-repeat;
}
.page-ruler.is-on { opacity: 1; }
.page-ruler-mark {
  position: absolute;
  top: calc(var(--p) * 100%);
  left: 0;
  width: 20px;
  height: 2px;
  margin-top: -1px;
  background: var(--accent);
}
@media (max-width: 1279px) {
  .page-ruler { display: none; }
}

.site-footer { border-top: 1px solid var(--border); padding: 24px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--text-faint);
}
.footer-inner { align-items: center; }

.footer-top { color: var(--text-dim); transition: color 0.25s ease; }
.footer-top:hover,
.footer-top:focus-visible { color: var(--accent); }
.footer-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.to-top {
  position: fixed;
  right: max(20px, (100vw - var(--max)) / 4 - 22px);
  bottom: 32px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s, color 0.25s ease, border-color 0.25s ease;
}
.to-top svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }
.to-top:hover,
.to-top:focus-visible { color: var(--accent); border-color: var(--accent); }
.to-top:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.js .to-top:not(.is-on) {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}
@media (max-width: 600px) {
  .to-top { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 40px; height: 40px; }
}

.reveal-up { opacity: 1; }
.js .reveal-up { opacity: 0; transform: translateY(18px); }

.palette {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 20px 20px;
}
.palette[hidden] { display: none; }
.palette-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}
.palette-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: 60vh;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.palette-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.palette-prompt { font-family: var(--mono); color: var(--accent); font-weight: 600; }
.palette-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.95rem;
}
.palette-input::placeholder { color: var(--text-faint); }
.palette-esc {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 1px 6px;
}

.palette-results { overflow-y: auto; padding: 8px; }
.palette-group-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  padding: 8px 10px 4px;
}
.palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 0;
  cursor: pointer;
  color: var(--text-dim);
}
.palette-item strong { color: var(--text); font-weight: 500; }
.palette-item small { font-family: var(--mono); font-size: 0.72rem; color: var(--text-faint); }
.palette-item.is-active { background: var(--panel-2); color: var(--text); }
.palette-item.is-active strong { color: var(--accent); }
.palette-empty { padding: 20px 12px; text-align: center; color: var(--text-faint); font-size: 0.88rem; }

.loader { display: none; }
.js .loader {
  --p: 0;
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  animation: loader-failsafe 0.4s ease 12s forwards;
}
.loader.is-leaving { pointer-events: none; }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }

.loader-half {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  background: var(--bg);
  transition: transform 0.85s cubic-bezier(0.76, 0, 0.24, 1);
}
.loader-half--top { top: 0; border-bottom: 1px solid var(--border); }
.loader-half--bottom { bottom: 0; }
.loader.is-leaving .loader-half--top { transform: translateY(-100%); }
.loader.is-leaving .loader-half--bottom { transform: translateY(100%); }

.loader-center {
  position: relative;
  width: min(640px, 100vw - 48px);
  transition: opacity 0.3s ease;
}
.loader.is-leaving .loader-center { opacity: 0; }

.loader-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 42px;
}
.loader-brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.loader-scale {
  position: relative;
  height: 14px;
  background:
    linear-gradient(var(--border), var(--border)) left bottom / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--text-faint) 0 1px, transparent 1px 25%) left bottom / calc(100% + 1px) 14px no-repeat,
    repeating-linear-gradient(90deg, var(--border) 0 1px, transparent 1px 5%) left bottom / calc(100% + 1px) 6px no-repeat;
}
.loader-scale::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 14px;
  background: var(--text-faint);
}
.loader-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--text);
  transform: scaleX(var(--p));
  transform-origin: left;
}
.loader.is-complete .loader-fill { background: var(--accent); }
.loader-cursor {
  position: absolute;
  left: calc(var(--p) * 100%);
  bottom: 0;
  width: 1px;
  height: 36px;
  background: var(--accent);
}
.loader-count {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.loader-foot {
  position: relative;
  height: 1em;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-faint);
}
.loader-foot span {
  position: absolute;
  top: 0;
  left: calc(var(--at) * 1%);
  transform: translateX(-50%);
}

/* ==========================================================================
   Section Patterns (remove this block to revert)
   ========================================================================== */

#projects,
#skills { position: relative; }
#projects::before,
#skills::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 160px, #000 calc(100% - 160px), transparent);
  mask-image: linear-gradient(transparent, #000 160px, #000 calc(100% - 160px), transparent);
}
#projects::before {
  background: repeating-linear-gradient(to bottom, rgba(var(--ink-rgb), 0.022) 0 1px, transparent 1px 4px);
}
#skills::before {
  background: repeating-linear-gradient(45deg, rgba(var(--ink-rgb), 0.028) 0 1px, transparent 1px 14px);
}
