/* ══════════════════════════════════════════
   BYTIMIZE — MOBILE CSS (personal)
   Single column, 16px side gutter, no sideways scrolling
══════════════════════════════════════════ */

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

:root {
  --bg:          #000000;
  --surface:     #111111;
  --surface-2:   #121212;
  --surface-3:   #0c0c0c;
  --line:        #262626;
  --line-2:      #333333;
  --line-3:      #4a4a4a;
  --text:        #f5f5f5;
  --soft:        #c9c9c9;
  --muted:       #a3a3a3;
  --muted-2:     #8f8f8f;
  --accent:      #ee7b30;
  --accent-hover:#ff9a57;
  --accent-dark: #b4561a;
  --paper:       #f3f3f3;
  --ink:         #0a0a0a;
  --display:     'Space Grotesk', system-ui, sans-serif;
  --mono:        'VT323', ui-monospace, monospace;
  --px:          16px;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--display); font-size: 16px; line-height: 1.55; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, blockquote { overflow-wrap: break-word; }
a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.accent { color: var(--accent); }
.wrap { margin: 0 var(--px); }
.skip-link { position: absolute; left: -9999px; top: 12px; z-index: 100; padding: 10px 14px; background: var(--accent); color: var(--ink); border-radius: 6px; font-weight: 600; }
.skip-link:focus { left: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ══ NAV ══ */
.nav-wrap { position: sticky; top: 8px; z-index: 50; margin-top: 12px; }
[id] { scroll-margin-top: 84px; }
.nav { padding: 8px 8px 8px 14px; background: #1f1f1f; border: 1px solid #383838; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; position: relative; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.nav-logo { font-family: var(--mono); font-size: 28px; line-height: 1; color: var(--text); }
.nav-logo span { color: var(--accent); }
.nav-toggle { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid #383838; border-radius: 8px; color: var(--text); cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-links { display: none; list-style: none; margin: 0; padding: 8px; position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); background: #1f1f1f; border: 1px solid #383838; border-radius: 10px; flex-direction: column; gap: 2px; }
.nav.open .nav-links { display: flex; }
.nav-links a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 6px; font-size: 17px; color: #e5e5e5; }
.nav-links a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav-links a.nav-cta { justify-content: center; margin-top: 6px; background: var(--accent); color: var(--ink); font-weight: 600; }

/* ══ BUTTONS ══ */
.btn { display: flex; width: 100%; align-items: center; justify-content: center; min-height: 52px; padding: 0 20px; border-radius: 8px; border: 1px solid transparent; font-family: inherit; font-size: 16px; font-weight: 600; text-align: center; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--ink); }
.btn-ghost { background: #121212; border-color: var(--line-3); color: var(--text); font-weight: 500; }
.btn-dark { background: var(--ink); color: var(--text); }
.btn-row { display: flex; flex-direction: column; gap: 12px; width: 100%; }

/* ══ SECTIONS ══ */
.section { margin-top: 88px; }
.section.after-band { margin-top: 56px; }
.eyebrow { margin: 0 0 10px; font-family: var(--mono); font-size: 20px; line-height: 1.2; color: var(--accent); }
.h2 { margin: 0; font-size: clamp(27px, 8.8vw, 32px); line-height: 1.12; font-weight: 700; letter-spacing: -.5px; }
.section-head { margin-bottom: 28px; }
.section-head p { margin: 12px 0 0; font-size: 16px; line-height: 1.55; color: var(--muted); }
.grid-2, .grid-3, .grid-4 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.card { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.card h3 { margin: 0 0 6px; font-size: 19px; font-weight: 600; line-height: 1.3; }
.card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.check-list li::before { content: "\2713\00a0"; }

/* ══ SUB-PAGE HERO ══ */
.page-hero { padding-top: 48px; }
.page-hero h1 { margin: 0 0 18px; font-size: clamp(34px, 11vw, 42px); line-height: 1.05; font-weight: 700; letter-spacing: -1px; }
.lead { margin: 0; font-size: 17px; line-height: 1.6; color: var(--soft); }
.page-hero .lead { margin-bottom: 24px; }

/* ══ PIXEL BAND (scaled evenly so the grid spacing stays uniform) ══ */
.band { width: 100%; aspect-ratio: 480 / 72; margin-top: 64px; background: url(../static/backgrounds/band-grid-mobile.png) 0 0 / 100% 100% no-repeat; }

/* ══ TERMINAL WINDOW ══ */
.term { background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.term-bar { padding: 10px 14px; background: #1a1a1a; border-bottom: 1px solid #2a2a2a; display: flex; align-items: center; gap: 7px; }
.term-dot { width: 9px; height: 9px; border-radius: 99px; background: #3a3a3a; }
.term-dot.on { background: var(--accent); }
.term-title { margin-left: 8px; font-family: var(--mono); font-size: 17px; color: var(--muted-2); }
.term-body { padding: 18px 16px; font-family: var(--mono); font-size: 20px; line-height: 1.35; color: #d4d4d4; overflow-wrap: anywhere; }
.term-body p { margin: 0 0 4px; }
.term-gap { height: 10px; }
.cursor { color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ══ FAQ ══ */
.faq-item { padding: 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.faq-item h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.faq-item p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

/* ══ CLOSING CTA ══ */
.cta { margin-top: 88px; padding: 40px 20px 150px; border: 1px solid #2a2a2a; border-radius: 16px; background: #121212 url(../static/backgrounds/cta-glow.png) no-repeat center calc(100% + 110px) / 700px 275px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.cta .eyebrow { margin: 0; font-size: 22px; }
.cta h2 { margin: 0; font-size: clamp(27px, 8.8vw, 32px); line-height: 1.1; font-weight: 700; letter-spacing: -.5px; }

/* ══ FOOTER ══ */
.footer { margin-top: 64px; padding: 28px 0 40px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 22px; font-size: 14px; color: var(--muted-2); }
.footer-logo img { width: auto; height: 40px; }
.footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
}

/* ══ PERSONAL: IDEA NOTES (2 x 2 grid on phones) ══ */
.ideas { margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 6px; }
.idea { padding: 16px; border-radius: 10px; display: flex; flex-direction: column; gap: 6px; }
.idea small { font-family: var(--mono); font-size: 16px; }
.idea p { margin: 0; font-family: var(--mono); font-size: 20px; line-height: 1.05; overflow-wrap: anywhere; }
.idea-1 { background: var(--paper); color: var(--ink); transform: rotate(-2deg); }
.idea-1 small { color: var(--accent-dark); }
.idea-2 { background: #151515; border: 1px solid var(--line-2); color: #e5e5e5; transform: rotate(2deg); }
.idea-2 small { color: var(--accent); }
.idea-3 { background: var(--accent); color: var(--ink); transform: rotate(1.5deg); }
.idea-3 small { color: #3a1a06; }
.idea-4 { background: #1f1f1f; border: 1px dashed var(--line-3); color: var(--text); transform: rotate(-1.5deg); }
.idea-4 small { color: var(--muted-2); }

/* ══ PERSONAL: PROJECTS ══ */
.project .eg { margin-top: 10px; font-family: var(--mono); font-size: 18px; color: var(--muted-2); }

/* ══ PERSONAL: STEPS ══ */
.step { padding: 22px; background: var(--surface-3); border-top: 2px solid #3a3a3a; }
.step.first { border-top-color: var(--accent); }
.step-num { font-family: var(--mono); font-size: 42px; line-height: 1; color: var(--muted-2); }
.step.first .step-num { color: var(--accent); }
.step h3 { margin: 10px 0 6px; font-size: 20px; font-weight: 600; }
.step p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

/* ══ GLOW ══ */
:root { --glow: rgba(238, 123, 48, .45); --glow-soft: rgba(238, 123, 48, .18); }
.nav-logo span, .cursor, .term-body .accent { text-shadow: 0 0 12px var(--glow); }
.term-dot.on { box-shadow: 0 0 10px var(--glow); }
.eyebrow, .principle h3, .fork-tag { text-shadow: 0 0 18px var(--glow-soft); }
.hero h1 .accent, .page-hero h1 .accent, .h2 .accent, .cta h2 .accent { text-shadow: 0 0 32px var(--glow); }
.btn-primary, .nav-links a.nav-cta { box-shadow: 0 0 22px var(--glow-soft); transition: background .15s, box-shadow .2s; }
.btn-primary:hover, .nav-links a.nav-cta:hover { box-shadow: 0 0 30px var(--glow); }
.prompt:focus-within { box-shadow: 0 0 0 1px var(--accent), 0 0 36px var(--glow-soft); }
.term { box-shadow: 0 0 0 6px #141414, 0 0 60px var(--glow-soft); }
.principle { box-shadow: 0 -12px 24px -16px var(--glow); }
.card { transition: border-color .2s, box-shadow .2s; }
.card:hover { border-color: rgba(238, 123, 48, .5); box-shadow: 0 0 32px var(--glow-soft); }
.cta { box-shadow: 0 0 80px var(--glow-soft); }
.fork-panel { box-shadow: 0 0 48px var(--glow-soft); }
.service-icon { filter: drop-shadow(0 0 8px var(--glow)); }

/* glow on page-specific elements, matching the home page */
.step.first { box-shadow: 0 -12px 24px -16px var(--glow); }
.step.first .step-num, .idea-2 small { text-shadow: 0 0 18px var(--glow-soft); }
.idea-3 { box-shadow: 0 0 32px var(--glow-soft); }

/* steps light up in turn: 1, 2, 3, repeat */
.step, .step-num { animation: 6s infinite; }
.step { animation-name: step-line; }
.step-num { animation-name: step-num; animation-delay: inherit; }
.step:nth-child(2) { animation-delay: 2s; }
.step:nth-child(3) { animation-delay: 4s; }
@keyframes step-line { 0%, 37%, 100% { border-top-color: #3a3a3a; box-shadow: none; } 5%, 30% { border-top-color: var(--accent); box-shadow: 0 -12px 24px -16px var(--glow); } }
@keyframes step-num { 0%, 37%, 100% { color: var(--muted-2); text-shadow: none; } 5%, 30% { color: var(--accent); text-shadow: 0 0 18px var(--glow); } }
@media (prefers-reduced-motion: reduce) { .step, .step-num { animation: none; } }
