:root {
  --bg: #f1ede4;
  --ink: #0a0a0a;
  --paper: #e6e0d2;
  --accent: #ff2e00;
  --accent-2: #1a4dff;
  --muted: #6b6660;
  --grid: rgba(10, 10, 10, 0.08);
  --noise-opacity: 0.06;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Space Mono', monospace;
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  cursor: crosshair;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(0deg,
      transparent 0px,
      transparent 3px,
      rgba(10, 10, 10, 0.018) 3px,
      rgba(10, 10, 10, 0.018) 4px);
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

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

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 24px;
  background: var(--bg);
  border-bottom: 2px solid var(--ink);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.topbar .left {
  display: flex;
  gap: 18px;
}

.topbar .center {
  font-weight: 700;
}

.topbar .right {
  display: flex;
  gap: 18px;
  justify-content: flex-end;
}

.topbar .blink {
  animation: blink 1.1s steps(2) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.topbar a:hover {
  background: var(--ink);
  color: var(--bg);
}

.hero {
  min-height: 100vh;
  padding: 80px 24px 40px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  position: relative;
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-marker {
  grid-column: 1 / 3;
  align-self: start;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1.5px solid var(--ink);
  padding: 4px 8px;
  display: inline-block;
  width: fit-content;
  background: var(--bg);
}

.hero-meta {
  grid-column: 10 / 13;
  align-self: start;
  font-size: 10px;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.7;
}

.hero-meta .pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  margin-right: 6px;
  animation: pulse 1.4s ease-in-out infinite;
  vertical-align: middle;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}

.hero-title {
  grid-column: 1 / 13;
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: clamp(80px, 18vw, 280px);
  line-height: 0.82;
  letter-spacing: -0.02em;
  margin-top: 20px;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
}

.hero-title .word {
  display: block;
  position: relative;
}

.hero-title .w2 {
  text-align: right;
  color: var(--bg);
  -webkit-text-stroke: 2px var(--ink);
  font-style: italic;
  font-family: 'Fraunces', serif;
  font-weight: 700;
}

.hero-title .glitch {
  position: relative;
  display: inline-block;
}

.hero-title .glitch::before,
.hero-title .glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}

.hero-title .glitch::before {
  color: var(--accent);
  animation: glitchA 4s infinite steps(1);
  clip-path: inset(0 0 70% 0);
}

.hero-title .glitch::after {
  color: var(--accent-2);
  animation: glitchB 5.2s infinite steps(1);
  clip-path: inset(70% 0 0 0);
}

@keyframes glitchA {

  0%,
  92%,
  100% {
    transform: translate(0);
  }

  93% {
    transform: translate(-3px, 1px);
  }

  94% {
    transform: translate(2px, -1px);
  }

  95% {
    transform: translate(-1px, 2px);
  }
}

@keyframes glitchB {

  0%,
  88%,
  100% {
    transform: translate(0);
  }

  89% {
    transform: translate(2px, -2px);
  }

  90% {
    transform: translate(-2px, 1px);
  }

  91% {
    transform: translate(1px, 1px);
  }
}

.hero-strap {
  grid-column: 1 / 8;
  margin-top: 30px;
  font-size: 14px;
  line-height: 1.55;
  max-width: 540px;
}

.hero-strap .lead {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 14px;
}

.hero-id {
  grid-column: 9 / 13;
  margin-top: 30px;
  border: 1.5px solid var(--ink);
  padding: 12px 14px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.9;
  background: var(--bg);
  align-self: end;
}

.hero-id strong {
  font-weight: 700;
}

.hero-id .row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed var(--ink);
  padding: 4px 0;
}

.hero-id .row:last-child {
  border-bottom: 0;
}

.marquee {
  grid-column: 1 / 13;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  margin-top: 40px;
  overflow: hidden;
  white-space: nowrap;
  background: var(--ink);
  color: var(--bg);
  padding: 14px 0;
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  max-height: 65px;
}

.marquee-track {
  display: inline-block;
  animation: marquee 40s linear infinite;
}

.marquee span {
  margin: 0 20px;
}

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

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.cursor-dot {
  position: fixed;
  width: 14px;
  height: 14px;
  background: var(--accent);
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.2s, height 0.2s;
}

section {
  padding: 60px 24px;
  border-bottom: 2px solid var(--ink);
  position: relative;
}

.section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--accent);
}

.section-title {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 40px;
}

.about {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.about .label-col {
  grid-column: 1 / 4;
}

.about .body {
  grid-column: 4 / 13;
  font-family: 'Fraunces', serif;
  font-size: 28px;
  line-height: 1.3;
  font-weight: 300;
}

.about .body em {
  background: var(--accent);
  color: var(--bg);
  padding: 0 6px;
  font-style: italic;
  font-family: 'Fraunces', serif;
}

.about .body .strike {
  text-decoration: line-through;
  text-decoration-thickness: 3px;
  color: var(--muted);
}

.about .body strong {
  font-weight: 700;
  border-bottom: 3px solid var(--ink);
}

.stack-tabs {
  display: flex;
  gap: 0;
  margin-bottom: -2px;
  flex-wrap: wrap;
}

.stack-tab {
  background: var(--bg);
  border: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 8px 16px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: crosshair;
  margin-right: -2px;
  transition: background 0.1s;
  position: relative;
  z-index: 1;
  color: inherit;
}

.stack-tab.active {
  background: var(--ink);
  color: var(--bg);
  border-bottom-color: var(--ink);
  z-index: 3;
}

.stack-tab:hover:not(.active) {
  background: var(--paper);
}

.stack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-left: 2px solid var(--ink);
  border-top: 2px solid var(--ink);
  position: relative;
  z-index: 2;
}

.stack-cell {
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 18px 16px;
  min-height: 120px;
  position: relative;
  overflow: hidden;
  transition: background 0.15s;
}

.stack-cell:hover {
  background: var(--ink);
  color: var(--bg);
}

.stack-cell:hover .num {
  color: var(--accent);
}

.stack-cell .num {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.stack-cell .name {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.stack-cell .desc {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.stack-cell:hover .desc {
  color: var(--bg);
}

.stack-cell .tag {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--accent);
  color: var(--bg);
  padding: 2px 5px;
}

.stack-pane {
  display: none;
}

.stack-pane.active {
  display: grid;
}

.terminal-wrap {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.terminal-wrap .lhs {
  grid-column: 1 / 5;
  padding-right: 20px;
}

.terminal-wrap .lhs h3 {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-style: italic;
  font-weight: 400;
  margin-bottom: 14px;
  line-height: 1.1;
}

.terminal-wrap .lhs p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.terminal-wrap .lhs .hint {
  margin-top: 16px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.terminal-wrap .lhs .hint kbd {
  background: var(--ink);
  color: var(--bg);
  padding: 2px 6px;
  margin: 0 2px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
}

.terminal {
  grid-column: 5 / 13;
  background: #0a0a0a;
  color: #e6e0d2;
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

.terminal-header {
  background: var(--accent);
  color: var(--bg);
  padding: 6px 10px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #0a0a0a;
}

.terminal-body {
  flex: 1;
  padding: 14px 14px 8px;
  overflow-y: auto;
  max-height: 320px;
}

.terminal-line {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}

.terminal-line .prompt {
  color: var(--accent);
  margin-right: 6px;
}

.terminal-line .out {
  color: #c8c0ad;
}

.terminal-line .ok {
  color: #6effa7;
}

.terminal-line .err {
  color: #ff6b6b;
}

.terminal-line .acc {
  color: #ffb84d;
}

.terminal-input-row {
  border-top: 1px solid #2a2a2a;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  background: #050505;
}

.terminal-input-row .prompt {
  color: var(--accent);
  margin-right: 6px;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: #e6e0d2;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  caret-color: var(--accent);
}

.void {
  background: var(--ink);
  color: var(--bg);
  border-bottom: 2px solid var(--ink);
  padding: 80px 24px 100px;
  position: relative;
  overflow: hidden;
}

.void .section-label {
  color: var(--bg);
}

.void .section-label::before {
  background: var(--accent);
}

.void .section-title {
  color: var(--bg);
}

.void-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}

.void-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  position: relative;
  z-index: 2;
}

.void-lead {
  grid-column: 1 / 9;
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 300;
  line-height: 1.25;
  margin-bottom: 30px;
}

.void-lead em {
  font-style: italic;
  color: var(--accent);
}

.void-lead .strike {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  opacity: 0.4;
}

.axioms {
  grid-column: 1 / 13;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0;
  margin-top: 30px;
  border-top: 1px solid var(--bg);
  border-left: 1px solid var(--bg);
}

.axiom {
  grid-column: span 4;
  border-right: 1px solid var(--bg);
  border-bottom: 1px solid var(--bg);
  padding: 18px 18px 22px;
  position: relative;
  min-height: 160px;
}

.axiom .n {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.axiom .t {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 22px;
  line-height: 1.05;
  margin-bottom: 10px;
  color: var(--accent);
}

.axiom .b {
  font-size: 13px;
  line-height: 1.55;
  color: var(--bg);
}

.void-tag {
  grid-column: 1 / 13;
  margin-top: 36px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 24px;
  text-align: right;
  color: var(--bg);
  line-height: 1.4;
}

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

.now {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.now-item {
  grid-column: span 4;
  border: 2px solid var(--ink);
  padding: 16px;
  background: var(--bg);
  position: relative;
  transform: rotate(-0.5deg);
  transition: transform 0.2s;
}

.now-item:nth-child(2) {
  transform: rotate(0.6deg);
}

.now-item:nth-child(3) {
  transform: rotate(-0.3deg);
}

.now-item:nth-child(4) {
  transform: rotate(0.4deg);
}

.now-item:nth-child(5) {
  transform: rotate(-0.6deg);
}

.now-item:nth-child(6) {
  transform: rotate(0.2deg);
}

.now-item:hover {
  transform: rotate(0) scale(1.02);
  z-index: 5;
}

.now-item .stamp {
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--accent);
  color: var(--bg);
  padding: 2px 8px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1.5px solid var(--ink);
}

.now-item .head {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 700;
  font-size: 22px;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 8px;
}

.now-item .body {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 400;
}

.now-item .meta {
  margin-top: 10px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-top: 1px dashed var(--ink);
  padding-top: 6px;
}

.heartbeat {
  background: var(--ink);
  color: var(--bg);
  padding: 80px 24px;
  border-bottom: 2px solid var(--ink);
  position: relative;
  overflow: hidden;
}

.heartbeat .section-label {
  color: var(--bg);
}

.heartbeat .section-label::before {
  background: var(--accent);
}

.heartbeat .section-title {
  color: var(--bg);
}

.heartbeat-quote {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.3;
  max-width: 900px;
  margin-bottom: 30px;
}

.heartbeat-quote em {
  color: var(--accent);
  font-style: italic;
}

.heartbeat-canvas {
  width: 100%;
  height: 120px;
  display: block;
}

.heartbeat-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 30px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.heartbeat-stats .stat .num {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: 48px;
  line-height: 1;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}

footer {
  padding: 40px 24px 30px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

footer .left {
  grid-column: 1 / 6;
}

footer .right {
  grid-column: 8 / 13;
  text-align: right;
}

footer .big {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: clamp(60px, 12vw, 180px);
  line-height: 0.85;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  grid-column: 1 / 13;
  text-transform: uppercase;
}

footer .big .strike {
  text-decoration: line-through;
  opacity: 0.3;
}

footer a:hover {
  color: var(--accent);
}

@media (max-width: 800px) {

  .hero-marker,
  .hero-meta,
  .hero-strap,
  .hero-id {
    grid-column: 1 / 13;
  }

  .hero-meta {
    text-align: left;
  }

  .about .label-col,
  .about .body {
    grid-column: 1 / 13;
  }

  .about .body {
    font-size: 20px;
  }

  .stack {
    grid-template-columns: repeat(2, 1fr);
  }

  .stack-tab {
    font-size: 9px;
    padding: 6px 10px;
  }

  .terminal-wrap .lhs,
  .terminal {
    grid-column: 1 / 13;
  }

  .now-item {
    grid-column: span 12;
  }

  .heartbeat-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .void-lead,
  .axiom {
    grid-column: 1 / 13;
  }

  footer .left,
  footer .right {
    grid-column: 1 / 13;
    text-align: left;
  }

  .topbar {
    grid-template-columns: 1fr 1fr;
    font-size: 9px;
    padding: 10px 14px;
  }

  .topbar .center {
    display: none;
  }

  body {
    cursor: auto;
  }

  .cursor-dot {
    display: none;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s, transform 0.8s;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}