/* ==========================================================================
   PYXIS NOCTURNA
   stylesheet // v2 — sharper black, electric accents, heavier glitch
   ========================================================================== */

:root {
  /* color // sharper nocturnal palette */
  --bg:         #04030a;
  --bg-lift:    #0a0812;
  --bg-deeper:  #000000;
  --ink:        #f4f2ff;
  --ink-dim:    #8a8fa8;
  --ink-faint:  #4d5268;

  --cyan:       #22d3ee;
  --cyan-hi:    #67e8f9;
  --magenta:    #ec4899;
  --magenta-hi: #f472b6;
  --red:        #ff2e4d;
  --red-hi:     #ff5172;
  --yellow:     #facc15;
  --violet:     #a855f7;

  --border:      rgba(34, 211, 238, 0.12);
  --border-lift: rgba(236, 72, 153, 0.35);
  --border-red:  rgba(255, 46, 77, 0.45);

  /* type */
  --f-display: 'Orbitron', 'JetBrains Mono', sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, monospace;
  --f-serif:   'Cormorant Garamond', 'Georgia', serif;

  /* spacing */
  --pad-x: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1280px;
}

* { box-sizing: border-box; }
*::selection { background: var(--red); color: var(--bg); }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  cursor: none;

  /* restrained wash — accent only, no soft bloom */
  background-image:
    radial-gradient(ellipse 70% 40% at 10% 0%,   rgba(236, 72, 153, 0.06), transparent 65%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(34, 211, 238, 0.05), transparent 65%);
}

@media (hover: none) {
  body { cursor: auto; }
}

a { color: inherit; text-decoration: none; }

/* ==========================================================================
   GRAIN OVERLAY + scanlines
   ========================================================================== */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(255, 255, 255, 0.012) 3px,
    rgba(255, 255, 255, 0.012) 3px
  );
}

/* ==========================================================================
   CUSTOM CURSOR
   ========================================================================== */
.cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
}
.cursor__dot {
  position: absolute;
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--red);
}
.cursor__ring {
  position: absolute;
  width: 36px; height: 36px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease;
}
.cursor--hover .cursor__ring {
  width: 52px; height: 52px;
  border-color: var(--magenta);
}
@media (hover: none) {
  .cursor { display: none; }
}

/* ==========================================================================
   STARFIELD
   ========================================================================== */
#stars {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 1rem var(--pad-x);
  background: linear-gradient(to bottom, rgba(4, 3, 10, 0.92), rgba(4, 3, 10, 0));
  backdrop-filter: blur(8px);
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
}
.nav__mark {
  width: 26px; height: 26px;
  color: var(--cyan);
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.6));
}
.nav__wordmark {
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  gap: 1.8rem;
  justify-content: center;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}
.nav__links a {
  position: relative;
  padding: 0.4rem 0.2rem;
  color: var(--ink-dim);
  transition: color 0.2s ease;
}
.nav__links a::before {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: linear-gradient(90deg, var(--red), var(--cyan));
  transition: width 0.3s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::before { width: 100%; }

.nav__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--ink-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav__led {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@media (max-width: 700px) {
  .nav { grid-template-columns: auto 1fr; gap: 1rem; }
  .nav__status { display: none; }
  .nav__links { justify-content: flex-end; gap: 1rem; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 8rem var(--pad-x) 4rem;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__constellation {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  max-width: 40vw;
  opacity: 0.95;
  pointer-events: none;
}

.constellation__lines line {
  stroke: url(#constellation-line);
  stroke-width: 1;
  stroke-dasharray: 4 6;
  opacity: 0.7;
  animation: dashFlow 20s linear infinite;
}
@keyframes dashFlow {
  to { stroke-dashoffset: -200; }
}

.star { fill: #fff; }
.star--alpha   { fill: var(--yellow);  animation: twinkle 3s   ease-in-out infinite; }
.star--beta    { fill: var(--magenta); animation: twinkle 4s   ease-in-out infinite 0.5s; }
.star--gamma   { fill: var(--cyan);    animation: twinkle 5s   ease-in-out infinite 1s; }
.star--delta   { fill: var(--red);     animation: twinkle 3.5s ease-in-out infinite 1.5s; }
.star--epsilon { fill: var(--violet);  animation: twinkle 4.5s ease-in-out infinite 0.8s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.5; transform: scale(1); transform-origin: center; }
  50%      { opacity: 1;   transform: scale(1.35); }
}

.constellation__labels text {
  fill: var(--ink-faint);
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.hero__meta {
  position: absolute;
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.2rem 0.8rem;
  font-size: 0.7rem;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero__meta--tl { top: 6rem; left: var(--pad-x); }
.hero__meta--tr { top: 6rem; right: var(--pad-x); text-align: right; }
.meta__label {
  grid-column: 1 / -1;
  margin: 0 0 0.35rem;
  color: var(--magenta);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}
.meta__key { color: var(--ink-faint); }
.meta__val { color: var(--cyan); }

@media (max-width: 900px) {
  .hero__meta--tr { display: none; }
  .hero__constellation { max-width: 60vw; opacity: 0.35; }
}
@media (max-width: 600px) {
  .hero__meta--tl { display: none; }
}

/* Email separators — subtle muted tokens in the fallback prose */
.mail-sep {
  color: var(--ink-faint);
  font-size: 0.85em;
  opacity: 0.7;
}

/* Keyboard focus states — visible ring for tab navigation */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}
input:focus-visible,
textarea:focus-visible {
  outline: none; /* we already have a custom focus style via border + box-shadow */
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  color: var(--red);
  margin-bottom: 2.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border-red);
  border-radius: 2px;
  background: rgba(255, 46, 77, 0.08);
}
.eyebrow__bracket { color: var(--red); }

/* ==========================================================================
   GLITCH TITLE — heavier weight, permanent chromatic aberration, aggressive
   ========================================================================== */
.hero__title {
  font-family: var(--f-display);
  font-size: clamp(2.8rem, 11vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  margin: 0 0 2rem;
  text-transform: uppercase;
  font-weight: 900;
}
.hero__title-line { display: block; }

.glitch {
  position: relative;
  display: inline-block;
  color: var(--ink);
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.4);
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.95;
}
.glitch::before {
  color: var(--red);
  transform: translate(-5px, 0);
  animation: glitchRed 4.4s infinite steps(1, end);
  text-shadow: 0 0 6px rgba(255, 46, 77, 0.55);
}
.glitch::after {
  color: var(--cyan);
  transform: translate(5px, 0);
  animation: glitchCyan 5s infinite steps(1, end);
  text-shadow: 0 0 6px rgba(34, 211, 238, 0.55);
}
.glitch--alt::before  { color: var(--magenta); }
.glitch--alt::after   { color: var(--cyan); }
.glitch--teal::before { color: var(--magenta); text-shadow: 0 0 6px rgba(236, 72, 153, 0.55); }
.glitch--teal::after  { color: var(--cyan);    text-shadow: 0 0 6px rgba(34, 211, 238, 0.55); }

/* Three spikes SPREAD across the 3.5s cycle — one near the start,
   one mid-cycle, one near the end. Each spike is a single frame step
   (~35ms), so it reads as a flash not a shake. Red and cyan channels
   are offset by 1% on each spike so they never snap in lockstep,
   which is what would create strobe. Static aberration ±5px. */
@keyframes glitchRed {
  0%   { transform: translate(-5px, 0);    clip-path: none; }
  25%  { transform: translate(-5px, 0);    clip-path: none; }
  26%  { transform: translate(-12px, -1px); clip-path: inset(18% 0 62% 0); }
  27%  { transform: translate(-5px, 0);    clip-path: none; }
  58%  { transform: translate(-5px, 0);    clip-path: none; }
  59%  { transform: translate(-9px, 1px);  clip-path: inset(42% 0 38% 0); }
  60%  { transform: translate(-5px, 0);    clip-path: none; }
  89%  { transform: translate(-5px, 0);    clip-path: none; }
  90%  { transform: translate(-13px, 0);   clip-path: inset(65% 0 14% 0); }
  91%  { transform: translate(-5px, 0);    clip-path: none; }
  100% { transform: translate(-5px, 0);    clip-path: none; }
}
@keyframes glitchCyan {
  0%   { transform: translate(5px, 0);    clip-path: none; }
  26%  { transform: translate(5px, 0);    clip-path: none; }
  27%  { transform: translate(12px, 1px); clip-path: inset(22% 0 58% 0); }
  28%  { transform: translate(5px, 0);    clip-path: none; }
  59%  { transform: translate(5px, 0);    clip-path: none; }
  60%  { transform: translate(9px, -1px); clip-path: inset(45% 0 35% 0); }
  61%  { transform: translate(5px, 0);    clip-path: none; }
  90%  { transform: translate(5px, 0);    clip-path: none; }
  91%  { transform: translate(13px, 0);   clip-path: inset(68% 0 11% 0); }
  92%  { transform: translate(5px, 0);    clip-path: none; }
  100% { transform: translate(5px, 0);    clip-path: none; }
}

/* terminal tagline */
.hero__tagline {
  margin: 0 0 3rem;
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
}
.terminal {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.1rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border);
  border-left: 2px solid var(--cyan);
  border-radius: 2px;
  font-family: var(--f-mono);
  font-size: 0.9rem;
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.1);
}
.terminal__prompt { color: var(--cyan); font-weight: 700; }
.terminal__text { color: var(--ink); }
.terminal__cursor {
  color: var(--red);
  animation: blink 1s steps(1, end) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1.4rem;
  border: 1px solid var(--border-lift);
  border-radius: 2px;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.5);
  cursor: none;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.btn--primary {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(255, 46, 77, 0.15));
  border-color: var(--magenta);
}
.btn--primary:hover {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.4), rgba(255, 46, 77, 0.3));
  box-shadow: 0 0 24px rgba(236, 72, 153, 0.45);
  transform: translateY(-1px);
  color: #fff;
}
.btn--ghost { border-color: rgba(34, 211, 238, 0.4); }
.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan-hi);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.25);
}
.btn--full { width: 100%; justify-content: center; }
.btn__arrow { transition: transform 0.2s ease; }
.btn:hover .btn__arrow { transform: translateX(4px); }
@media (hover: none) { .btn { cursor: pointer; } }

/* scroll hint */
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.7rem;
  color: var(--ink-faint);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--red), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0.3); transform-origin: top; }
  50%  { transform: scaleY(1);   transform-origin: top; }
  51%  { transform: scaleY(1);   transform-origin: bottom; }
  100% { transform: scaleY(0);   transform-origin: bottom; }
}

/* ==========================================================================
   SECTIONS // SHARED
   ========================================================================== */
.section {
  position: relative;
  padding: 8rem var(--pad-x);
  z-index: 1;
}
.section__frame {
  max-width: var(--max);
  margin: 0 auto;
}
.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.72rem;
  color: var(--ink-dim);
  margin-bottom: 3rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.eyebrow__num { color: var(--red); font-weight: 700; }
.eyebrow__divider {
  width: 60px; height: 1px;
  background: linear-gradient(90deg, var(--red), transparent);
}
.eyebrow__label { color: var(--ink-dim); }

.section__title {
  font-family: var(--f-display);
  font-size: clamp(2.3rem, 6.5vw, 5.2rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 2.5rem;
  text-transform: uppercase;
}
.section__title em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--magenta);
  text-transform: none;
  letter-spacing: 0;
}

/* ==========================================================================
   SECTION // SIGNAL
   ========================================================================== */
.section--signal {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.4), transparent);
}

.signal__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .signal__grid { grid-template-columns: 1fr; gap: 3rem; }
}

.signal__lede {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 2rem;
  max-width: 28ch;
}
.signal__body {
  color: var(--ink-dim);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 52ch;
  margin: 0 0 3rem;
}

.signal__facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 2rem;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}
.fact dt {
  font-size: 0.7rem;
  color: var(--ink-faint);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.fact dd {
  margin: 0;
  font-size: 0.9rem;
  color: var(--cyan);
}

/* code window */
.signal__code { position: relative; }
.code-window {
  background: var(--bg-deeper);
  border: 1px solid var(--border-lift);
  border-radius: 3px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(236, 72, 153, 0.1),
    0 20px 50px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(236, 72, 153, 0.12);
  transform: rotate(1.2deg);
  transition: transform 0.5s ease;
}
.signal__code:hover .code-window { transform: rotate(0deg); }

.code-window__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  background: rgba(236, 72, 153, 0.08);
  border-bottom: 1px solid var(--border);
}
.code-window__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.code-window__dot:nth-child(1) { background: var(--red); }
.code-window__dot:nth-child(2) { background: var(--yellow); }
.code-window__dot:nth-child(3) { background: var(--cyan); }
.code-window__title {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}
.code-window__body {
  margin: 0;
  padding: 1.4rem 1.6rem;
  font-family: var(--f-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--ink);
  overflow: auto;
}
.tk-c { color: var(--ink-faint); font-style: italic; }
.tk-k { color: var(--magenta); font-weight: 500; }
.tk-v { color: var(--cyan); }
.tk-p { color: var(--violet); }
.tk-s { color: var(--yellow); }
.tk-f { color: var(--red); }

/* ==========================================================================
   SECTION // WORKS
   ========================================================================== */
.section--works {
  border-top: 1px solid var(--border);
}

.works__lede {
  max-width: 52ch;
  color: var(--ink-dim);
  margin: 0 0 4rem;
  font-size: 1rem;
}

.works__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
@media (max-width: 900px) {
  .works__grid { grid-template-columns: 1fr; }
}

.work {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.5);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.work:hover {
  border-color: var(--border-lift);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(236, 72, 153, 0.1);
}

.work__art {
  position: relative;
  aspect-ratio: 1 / 1;
  max-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-deeper);
}
.work__art::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.7) 100%);
}

/* ——— mosaic sudoku preview ——— */
.mosaic-grid {
  width: 76%;
  height: 76%;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6));
  animation: mosaicBreathe 6s ease-in-out infinite;
}
@keyframes mosaicBreathe {
  0%, 100% { filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6)) brightness(1); }
  50%      { filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6)) brightness(1.08); }
}
.mosaic-cell-divider { stroke: rgba(0, 0, 0, 0.28); stroke-width: 1; fill: none; }
.mosaic-region-stroke { stroke: rgba(255, 255, 255, 0.9); stroke-width: 2.2; fill: none; stroke-linejoin: round; }
.mosaic-number {
  fill: rgba(0, 0, 0, 0.82);
  font-family: var(--f-mono);
  font-weight: 800;
  font-size: 24px;
  text-anchor: middle;
  dominant-baseline: central;
}

/* ——— cosmic knots preview ——— */
.knot-scene { width: 90%; height: 90%; }
.knot-edge {
  stroke-width: 2;
  stroke-linecap: round;
}
.knot-edge--red  { stroke: var(--red);  filter: drop-shadow(0 0 4px rgba(255, 46, 77, 0.65)); opacity: 0.9; }
.knot-edge--gray { stroke: #4a5170; opacity: 0.55; }
.knot-edges { animation: knotEdgesFlicker 4s ease-in-out infinite; }
@keyframes knotEdgesFlicker {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.85; }
}

.knot-node__glow { opacity: 0.55; }
.knot-node__ring { stroke: rgba(255, 255, 255, 0.3); stroke-width: 1.5; fill: none; }
.knot-node__dot  { fill: #ffffff; }
.knot-node { transform-origin: center; transform-box: fill-box; }
.knot-node-1 { animation: knotFloat 5.0s ease-in-out infinite; }
.knot-node-2 { animation: knotFloat 6.0s ease-in-out infinite 0.3s; }
.knot-node-3 { animation: knotFloat 5.4s ease-in-out infinite 0.6s; }
.knot-node-4 { animation: knotFloat 6.5s ease-in-out infinite 0.9s; }
.knot-node-5 { animation: knotFloat 5.8s ease-in-out infinite 1.2s; }
.knot-node-6 { animation: knotFloat 5.2s ease-in-out infinite 1.5s; }
.knot-node-7 { animation: knotFloat 6.2s ease-in-out infinite 1.8s; }
.knot-node-8 { animation: knotFloat 5.6s ease-in-out infinite 2.1s; }
@keyframes knotFloat {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(1px, -3px); }
}

.work__body {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex-grow: 1;
  background: var(--bg-lift);
  border-top: 1px solid var(--border);
}
.work__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
  margin: 0;
  text-transform: uppercase;
}
.work__status {
  color: var(--yellow);
  position: relative;
  padding-left: 1rem;
  font-weight: 500;
}
.work__status::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--yellow);
  transform: translateY(-50%);
  box-shadow: 0 0 6px var(--yellow);
  animation: pulse 2s infinite;
}
.work__title {
  font-family: var(--f-display);
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-transform: uppercase;
}
.work__desc {
  color: var(--ink-dim);
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0;
  flex-grow: 1;
}
.work__tags {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.work__tags li {
  font-size: 0.68rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--ink-dim);
  letter-spacing: 0.05em;
  font-family: var(--f-mono);
}

/* ==========================================================================
   SECTION // TRANSMISSION (contact)
   ========================================================================== */
.section--transmission {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.5));
}

.transmission__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
@media (max-width: 900px) {
  .transmission__grid { grid-template-columns: 1fr; gap: 3rem; }
}

.transmission__lede {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 2.5rem;
}

.transmission__mail {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.3rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-lift);
  border-radius: 3px;
  background: rgba(236, 72, 153, 0.05);
  transition: all 0.3s ease;
}
.transmission__mail:hover {
  background: rgba(236, 72, 153, 0.12);
  transform: translateX(4px);
  box-shadow: -4px 0 0 var(--red), 0 0 24px rgba(236, 72, 153, 0.2);
}
.transmission__mail-label {
  font-size: 0.7rem;
  color: var(--ink-faint);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.transmission__mail-addr {
  font-family: var(--f-mono);
  font-size: 1.05rem;
  color: var(--cyan);
  font-weight: 500;
}
.transmission__caveat {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin: 0;
  font-style: italic;
}

/* Terminal form */
.terminal-box {
  background: var(--bg-deeper);
  border: 1px solid var(--border-lift);
  border-radius: 3px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(236, 72, 153, 0.08),
    0 20px 50px rgba(0, 0, 0, 0.7);
}
.terminal-box__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  background: rgba(236, 72, 153, 0.08);
  border-bottom: 1px solid var(--border);
}
.terminal-box__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.terminal-box__dot:nth-child(1) { background: var(--red); }
.terminal-box__dot:nth-child(2) { background: var(--yellow); }
.terminal-box__dot:nth-child(3) { background: var(--cyan); }
.terminal-box__title {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--ink-faint);
}
.terminal-box__body {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.field__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--ink-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.field__prompt {
  color: var(--cyan);
  font-weight: 700;
}
.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 0.9rem;
  transition: all 0.25s ease;
  cursor: none;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-faint);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--magenta);
  background: rgba(0, 0, 0, 0.8);
  box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.18);
}
.field textarea { resize: vertical; min-height: 120px; }
@media (hover: none) {
  .field input, .field textarea { cursor: text; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 4rem var(--pad-x) 2rem;
  background: rgba(0, 0, 0, 0.7);
  position: relative;
  z-index: 1;
}
.footer__top {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 800px) {
  .footer__top { grid-template-columns: 1fr; }
}
.footer__brand { display: flex; flex-direction: column; gap: 0.8rem; }
.footer__wordmark {
  font-family: var(--f-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.footer__tagline {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--magenta);
  font-size: 1rem;
}
.footer__nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 600px) {
  .footer__nav { grid-template-columns: repeat(2, 1fr); }
}
.footer__col h4 {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 1rem;
  font-weight: 700;
}
.footer__col a {
  display: block;
  padding: 0.3rem 0;
  font-size: 0.85rem;
  color: var(--ink-dim);
  transition: color 0.2s ease;
}
.footer__col a:hover { color: var(--cyan); }

.footer__base {
  max-width: var(--max);
  margin: 0 auto;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer__coord { color: var(--cyan); }

/* ==========================================================================
   STANDALONE DOC PAGES (privacy / terms)
   ========================================================================== */
.doc-page {
  padding: 10rem var(--pad-x) 5rem;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}
.doc-page__frame {
  max-width: 780px;
  margin: 0 auto;
}
.doc-page__eyebrow {
  font-size: 0.75rem;
  color: var(--red);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 700;
}
.doc-page__eyebrow::before {
  content: '';
  width: 40px; height: 1px;
  background: var(--red);
}
.doc-page__title {
  font-family: var(--f-display);
  font-size: clamp(2.3rem, 6vw, 4.2rem);
  line-height: 1;
  margin: 0 0 1.5rem;
  text-transform: uppercase;
  font-weight: 900;
}
.doc-page__title em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--magenta);
  text-transform: none;
  letter-spacing: 0;
}
.doc-page__updated {
  color: var(--ink-faint);
  font-size: 0.85rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.doc-page h2 {
  font-family: var(--f-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cyan);
  margin: 2.5rem 0 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.doc-page h2::before {
  content: '§ ';
  color: var(--red);
}
.doc-page p,
.doc-page li {
  color: var(--ink);
  line-height: 1.75;
  font-size: 0.95rem;
}
.doc-page ul { padding-left: 1.2rem; }
.doc-page li { margin-bottom: 0.5rem; }
.doc-page a {
  color: var(--magenta);
  border-bottom: 1px dotted var(--magenta);
  transition: color 0.2s ease;
}
.doc-page a:hover { color: var(--cyan); border-color: var(--cyan); }
.doc-page__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 4rem;
  color: var(--ink-dim);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
}
.doc-page__back:hover { color: var(--red); }

/* ==========================================================================
   REVEAL (scroll-triggered)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .glitch::before { transform: translate(-5px, 0) !important; }
  .glitch::after  { transform: translate(5px, 0) !important; }
}
