/* Section 9 Digital. Brand tokens come from 08 Brand / PROJECT_BRIEF.md */
:root {
  --bg: #0B0F12;
  --panel: #10161B;
  --panel-2: #141C22;
  --line: #1F2A32;
  --line-2: #2B3943;
  --text: #F4F7F8;
  --muted: #9FB0BA;
  --accent: #33E1E6;
  --accent-soft: rgba(51, 225, 230, 0.12);
  --ink: #0B0F12;
  --sans: "Inter", "Inter Display", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--ink); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--accent); color: var(--ink); padding: 10px 14px; border-radius: 8px; }

.accent { color: var(--accent); }
.link { color: var(--accent); text-underline-offset: 3px; }
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  color: var(--accent); font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
}
.eyebrow .num { color: var(--muted); }
.eyebrow .num::after { content: " /"; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* Buttons */
.btn {
  display: inline-block; padding: 14px 24px; border: 1px solid var(--accent); border-radius: 10px;
  background: var(--accent); color: var(--ink); font: inherit; font-weight: 600; font-size: 16px;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, box-shadow .2s, transform .15s;
}
.btn:hover { background: #6BEBEF; border-color: #6BEBEF; box-shadow: 0 8px 28px rgba(51, 225, 230, 0.22); transform: translateY(-1px); }
.btn-ghost { background: rgba(255, 255, 255, 0.02); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--muted); box-shadow: none; }
.btn-small { padding: 9px 16px; font-size: 15px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 15, 18, 0.78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; min-height: 68px; }
.brand img { height: 58px; width: auto; margin-left: -10px; }
.nav-toggle {
  background: transparent; color: var(--text); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 8px 14px; font: inherit; font-size: 15px; cursor: pointer;
}
nav { display: none; flex-direction: column; width: 100%; padding: 8px 0 18px; gap: 4px; }
nav.open { display: flex; }
nav a:not(.btn) { color: var(--text); text-decoration: none; padding: 10px 0; }
nav .btn { align-self: flex-start; margin-top: 8px; }

/* Hero */
.hero { position: relative; padding: 56px 0 0; border-bottom: 1px solid var(--line); isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 56px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 100%;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 10%, transparent 75%);
  opacity: 0.7;
}
.hero::after {
  content: ""; position: absolute; z-index: -1; top: -10%; right: -10%; width: 70%; height: 80%;
  background: radial-gradient(closest-side, rgba(51, 225, 230, 0.13), transparent);
  pointer-events: none;
}
h1 { font-size: clamp(36px, 6.2vw, 64px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; margin: 18px 0 20px; max-width: 15ch; }
.lede { color: var(--muted); font-size: clamp(17px, 2vw, 20px); max-width: 50ch; margin-bottom: 32px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-visual { position: relative; margin-top: 48px; }
.hero-mark { display: none; }
.terminal {
  position: relative; background: rgba(13, 19, 24, 0.92); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(51, 225, 230, 0.05), 0 0 60px rgba(51, 225, 230, 0.07);
  font-family: var(--mono); font-size: 14px; overflow: hidden;
}
.terminal-bar, .shot-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.terminal-bar i, .shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.terminal-bar span, .shot-bar span { margin-left: 8px; color: var(--muted); font-family: var(--mono); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.terminal-body { padding: 18px 18px 20px; }
.terminal-body p { line-height: 1.9; white-space: nowrap; }
.terminal-body .prompt { color: var(--accent); margin-right: 6px; }
.terminal-body .ok { color: var(--muted); }
.terminal-body .ok span { color: var(--accent); margin-right: 6px; }
.terminal-body .done { margin-top: 6px; color: var(--text); }
.cursor { display: inline-block; width: 8px; height: 1.05em; margin-left: 6px; background: var(--accent); vertical-align: text-bottom; animation: blink 1.1s steps(1) infinite; }
.js .terminal-body p { opacity: 0; animation: line-in .35s ease forwards; }
.js .terminal-body p:nth-child(1) { animation-delay: .3s; }
.js .terminal-body p:nth-child(2) { animation-delay: .9s; }
.js .terminal-body p:nth-child(3) { animation-delay: 1.3s; }
.js .terminal-body p:nth-child(4) { animation-delay: 1.7s; }
.js .terminal-body p:nth-child(5) { animation-delay: 2.1s; }
.js .terminal-body p:nth-child(6) { animation-delay: 2.7s; }
@keyframes line-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }

.facts { display: grid; grid-template-columns: 1fr 1fr; margin-top: 56px; border-top: 1px solid var(--line); }
.facts li { padding: 20px 16px 22px 0; }
.facts li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.facts strong { display: block; font-size: 17px; letter-spacing: -0.01em; }
.facts span { display: block; color: var(--muted); font-size: 14px; line-height: 1.4; margin-top: 2px; }

/* Sections */
section:not(.hero) { padding: 76px 0; border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.12; letter-spacing: -0.03em; margin: 12px 0 12px; }
h3 { font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; }
.sub { color: var(--muted); max-width: 60ch; margin-bottom: 40px; }
.tag { color: var(--accent); font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }

/* Cards with a pointer-following glow */
.glow { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, transform .2s; }
.glow::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(51, 225, 230, 0.10), transparent 60%);
}
.glow:hover { border-color: rgba(51, 225, 230, 0.45); transform: translateY(-3px); }
.glow:hover::before { opacity: 1; }
.glow > * { position: relative; }

.cards, .projects { display: grid; gap: 20px; }
.card { padding: 28px; display: flex; flex-direction: column; }
.icon { width: 44px; height: 44px; padding: 10px; margin-bottom: 20px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--accent-soft); fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card > p:not(.tag):not(.price) { color: var(--muted); margin: 8px 0 18px; font-size: 16px; }
.card ul { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.card li { position: relative; padding: 4px 0 4px 18px; font-size: 15.5px; }
.card li::before { content: ""; position: absolute; left: 0; top: 14px; width: 8px; height: 2px; background: var(--accent); }
.price { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 13.5px; }
.price strong { color: var(--text); font-family: var(--sans); font-size: 26px; letter-spacing: -0.02em; margin: 0 4px; }

/* Work */
.project { overflow: hidden; }
.shot { border-bottom: 1px solid var(--line); }
.shot-screen { min-height: 170px; padding: 26px 22px; display: flex; flex-direction: column; justify-content: center; gap: 9px; }
.shot-screen b { font-size: 23px; line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 6px; }
.shot-screen em { display: block; height: 7px; border-radius: 4px; background: currentColor; opacity: 0.16; width: 62%; }
.shot-screen em:nth-of-type(2) { width: 44%; }
.shot-screen em:nth-of-type(3) { width: 22%; opacity: 0.45; height: 16px; margin-top: 6px; }
.shot-img { display: block; width: 100%; aspect-ratio: 1000 / 604; object-fit: cover; object-position: top; }
.shot-d .shot-screen { background: linear-gradient(135deg, #0E2A30, #0B0F12); color: var(--accent); }
.project-body { padding: 22px 26px 26px; }
.project-body > p:not(.tag) { color: var(--muted); font-size: 16px; margin-top: 8px; }
.project-body .tagline { color: var(--text); font-weight: 600; font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.chips li { font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 3px 9px; border: 1px solid var(--line-2); border-radius: 999px; }

/* Process */
.steps { margin-top: 36px; display: grid; gap: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 30px 60px; }
.steps li::before {
  content: "0" counter(step); position: absolute; left: 0; top: 0; width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--accent); border-radius: 50%; background: var(--bg); color: var(--accent); font-family: var(--mono); font-size: 13px;
}
.steps li::after { content: ""; position: absolute; left: 20px; top: 40px; bottom: 0; width: 1px; background: linear-gradient(var(--accent), var(--line)); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps h3 { padding-top: 6px; margin-bottom: 4px; }
.steps p { color: var(--muted); font-size: 16px; }

/* About */
.about-body { border-left: 2px solid var(--accent); padding-left: 22px; margin-top: 20px; }
.about-body p { color: var(--muted); max-width: 62ch; }
.about-body p:first-child { color: var(--text); font-size: 19px; }
.about-body p + p { margin-top: 16px; }

.alias {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 26px; padding: 10px 20px 10px 10px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); color: var(--muted);
  text-decoration: none; font-size: 15.5px; line-height: 1.35; transition: border-color .2s, transform .2s;
}
.alias:hover { border-color: rgba(51, 225, 230, 0.45); transform: translateY(-2px); }
.alias img { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-2); }
.alias strong { color: var(--text); font-family: var(--mono); font-weight: 500; }
.alias small { display: block; color: var(--accent); font-size: 13px; }

/* 404 */
.lost { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; text-align: center; }
.lost img { width: min(260px, 60vw); margin: 0 auto 28px; border-radius: var(--radius); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.lost .eyebrow { justify-content: center; }
.lost h1 { max-width: none; font-size: clamp(32px, 6vw, 52px); margin: 14px 0 12px; }
.lost p { color: var(--muted); margin-bottom: 28px; }

/* Contact */
#contact { position: relative; isolation: isolate; }
#contact::before {
  content: ""; position: absolute; z-index: -1; left: -10%; bottom: 0; width: 60%; height: 80%;
  background: radial-gradient(closest-side, rgba(51, 225, 230, 0.08), transparent); pointer-events: none;
}
.contact { display: grid; gap: 36px; }
form { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4); }
.field { margin-bottom: 16px; }
.row { display: grid; gap: 0 16px; }
label { display: block; font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.optional { color: var(--muted); font-weight: 400; }
input, textarea, select {
  width: 100%; padding: 12px 14px; background: var(--bg); color: var(--text);
  border: 1px solid #33424D; border-radius: 8px; font: inherit; font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 14px; font-size: 15px; color: var(--muted); min-height: 1.5em; }
.form-status.error { color: #FF9C8A; }

/* Footer */
.site-footer { padding: 28px 0; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.built-by { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; }
.built-by img { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease, border-color .2s; }
.js .reveal.in { opacity: 1; transform: none; }
.js .glow.reveal.in:hover { transform: translateY(-3px); }

@media (min-width: 620px) {
  .row { grid-template-columns: 1fr 1fr; }
  .projects { grid-template-columns: 1fr 1fr; }
  .terminal { max-width: 440px; }
  .facts { grid-template-columns: repeat(4, 1fr); }
  .facts li { padding: 22px 20px 26px; border-bottom: 0 !important; border-left: 1px solid var(--line); }
  .facts li:first-child { padding-left: 0; border-left: 0; }
}

@media (min-width: 940px) {
  .nav-toggle { display: none; }
  nav { display: flex; flex-direction: row; align-items: center; width: auto; padding: 0; gap: 28px; }
  nav a:not(.btn) { color: var(--muted); font-size: 15.5px; padding: 0; transition: color .15s; }
  nav a:not(.btn):hover { color: var(--text); }
  nav .btn { align-self: auto; margin: 0; }

  .hero { padding-top: 96px; }
  .hero-grid { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 48px; }
  .hero-visual { margin-top: 0; min-height: 420px; display: flex; align-items: flex-end; justify-content: flex-end; }
  .hero-mark { display: block; position: absolute; top: -30px; left: -10px; width: 330px; opacity: 0.55; animation: float 9s ease-in-out infinite; }
  .terminal { width: 400px; }
  .facts { margin-top: 88px; }

  section:not(.hero) { padding: 108px 0; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { padding: 60px 24px 0 0; }
  .steps li::after { left: 40px; right: 0; top: 20px; bottom: auto; width: auto; height: 1px; background: linear-gradient(90deg, var(--accent), var(--line)); }
  .about { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; }
  .about-body { margin-top: 8px; }
  .contact { grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
  form { padding: 32px; }
}
@keyframes float { 50% { transform: translateY(-12px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .terminal-body p { opacity: 1; transform: none; }
}
