@font-face {
  font-family: 'Ioskeley';
  src: url('/fonts/IoskeleyMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Ioskeley';
  src: url('/fonts/IoskeleyMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Ioskeley';
  src: url('/fonts/IoskeleyMono-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/*
  Amber CRT palette — old phosphor terminal, modernized.
*/
:root {
  --bg:        #0d0905;
  --bg-soft:   #1a120a;
  --bg-panel:  #14100a;
  --bg-panel2: #1c140c;
  --fg:        #d4af7a;
  --fg-bright: #f5d088;
  --fg-dim:    #7a5a3a;
  --accent:    #ffaa00;
  --accent-2:  #d97706;
  --accent-3:  #92400e;
  --ok:        #b8d086;
  --warn:      #ffb84d;
  --line:      #2a1d12;
  --line-bright: #4a3320;
  --hl:        #fde68a;
  --glow:      0 0 18px rgba(255, 170, 0, .18);
  --glow-strong: 0 0 28px rgba(255, 170, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Ioskeley', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 18% 0%,   rgba(255, 170, 0, .07), transparent 42%),
    radial-gradient(circle at 82% 100%, rgba(217, 119, 6, .08), transparent 45%);
  position: relative;
  overflow-x: hidden;
}

/* faint scanline overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 170, 0, .025) 0px,
    rgba(255, 170, 0, .025) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 1;
}

/* ============================================================
   Top nav — sticky terminal toolbar
   ============================================================ */
.topnav {
  position: relative;
  z-index: 20;
  background: transparent;
}
.topnav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
}
.brand {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-shadow: 0 0 10px rgba(255, 170, 0, .35);
  white-space: nowrap;
}
.brand-bracket {
  color: var(--fg-dim);
  margin: 0 2px;
  font-weight: 400;
}
.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.nav-links a {
  color: var(--fg-dim);
  text-decoration: none;
  text-transform: lowercase;
  transition: color 180ms ease, text-shadow 180ms ease;
  position: relative;
}
.nav-links a:hover {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(255, 170, 0, .4);
}
.nav-links a.active {
  color: var(--fg-bright);
}
.nav-links a.active::before { content: '['; color: var(--accent); margin-right: 2px; }
.nav-links a.active::after  { content: ']'; color: var(--accent); margin-left: 2px; }
.nav-links a.ext::after {
  content: " ↗";
  font-size: 9px;
  opacity: 0.7;
}

@media (max-width: 640px) {
  .topnav-inner { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px 16px; }
  .nav-links { gap: 14px; font-size: 12px; }
}

/* ============================================================
   Hero — bigger, louder, "this is the way"
   ============================================================ */
.hero {
  min-height: calc(100vh - 50px);
  min-height: calc(100dvh - 50px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 60px;
  position: relative;
  z-index: 2;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 760px;
  width: 100%;
}

.ascii {
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(10px, 4vw, 24px);
  line-height: 1.05;
  letter-spacing: 0;
  margin: 0 0 18px;
  display: inline-block;
  white-space: pre;
  overflow: hidden;
  text-shadow: var(--glow-strong);
}

.ascii .g1 { color: #f5d088; }
.ascii .g2 { color: #ffc14d; }
.ascii .g3 { color: #ffaa00; }
.ascii .g4 { color: #ff8c00; }
.ascii .g5 { color: #d97706; }
.ascii .g6 { color: #92400e; }

.byline {
  margin: 0 0 28px;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--fg-dim);
  text-transform: lowercase;
}
.byline a {
  color: var(--fg-dim);
  text-decoration: none;
  border-bottom: 1px dotted var(--line);
  padding-bottom: 1px;
  transition: color 180ms ease, border-color 180ms ease;
}
.byline a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.hero-sub {
  margin: 4px 0 14px;
  font-size: clamp(26px, 5.6vw, 56px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-bright);
  text-shadow:
    0 0 18px rgba(255, 170, 0, .35),
    0 0 38px rgba(255, 170, 0, .18);
  line-height: 1.05;
}
.hero-sub .cursor {
  margin-left: 6px;
  font-weight: 400;
  color: var(--accent);
}

.hero-tag {
  margin: 4px 0 28px;
  font-size: clamp(13px, 1.6vw, 16px);
  color: var(--fg);
  letter-spacing: 0.02em;
  max-width: 560px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 4px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #1a0f04;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  border-radius: 3px;
  transition: all 180ms ease;
  box-shadow: 0 0 18px rgba(255, 170, 0, .25);
}
.cta:hover {
  background: var(--fg-bright);
  border-color: var(--fg-bright);
  box-shadow: 0 0 26px rgba(255, 170, 0, .5);
  transform: translateY(-1px);
}
.cta-ghost {
  background: transparent;
  color: var(--accent);
  box-shadow: none;
}
.cta-ghost:hover {
  background: rgba(255, 170, 0, 0.08);
  color: var(--fg-bright);
  border-color: var(--fg-bright);
  box-shadow: 0 0 14px rgba(255, 170, 0, .2);
}

.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-dim);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 180ms ease, color 180ms ease;
}
.scroll-hint:hover {
  opacity: 1;
  color: var(--accent);
}
.scroll-hint .chev {
  font-size: 10px;
  animation: chev-pulse 1.6s ease-in-out infinite;
}
@keyframes chev-pulse {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50%      { transform: translateY(4px); opacity: 1; }
}

/* ============================================================
   Body content
   ============================================================ */
.terminal {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  position: relative;
  z-index: 2;
}

.block {
  margin: 0;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.block::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 36px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
  box-shadow: 0 0 8px rgba(255, 170, 0, .4);
}
.block:first-of-type {
  border-top: none;
  padding-top: 12px;
}
.block:first-of-type::before { display: none; }

.block p { margin: 10px 0; }

.prompt {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-shadow: 0 0 10px rgba(255, 170, 0, .25);
}

.cursor {
  display: inline-block;
  margin-left: 4px;
  color: var(--accent);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

.bullets {
  margin: 12px 0;
  padding-left: 22px;
  color: var(--fg);
}
.bullets li { margin: 8px 0; }
.bullets li::marker { color: var(--accent-2); }

.code-block {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  padding: 14px 16px;
  border-radius: 4px;
  margin: 10px 0 8px;
  font-size: 14px;
  box-shadow: inset 0 0 24px rgba(255, 170, 0, .04);
}
.code-block code {
  font-family: inherit;
  display: inline-block;
  padding: 1px 0;
}

.dim    { color: var(--fg-dim); }
.ok     { color: var(--ok); font-weight: 700; }
.amber  { color: var(--accent); }
.hl     { color: var(--hl); font-style: italic; }

.meta {
  color: var(--fg-dim);
  font-size: 13px;
  margin: 12px 0 0;
}
.lede-meta { margin: -4px 0 14px; font-size: 13px; }

/* ---- problems list — numbered, terminal-doc feel ---- */
.problems {
  list-style: none;
  margin: 16px 0 8px;
  padding: 0;
  border-top: 1px dashed var(--line);
}
.problems li {
  position: relative;
  padding: 9px 12px 9px 56px;
  border-bottom: 1px dashed var(--line);
  font-size: 14.5px;
  transition: background 180ms ease, padding-left 180ms ease;
  color: var(--fg);
}
.problems li:hover {
  background: rgba(255, 170, 0, 0.035);
  padding-left: 60px;
  color: var(--fg-bright);
}
.problems .num {
  position: absolute;
  left: 12px;
  top: 9px;
  color: var(--accent-2);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
}
.problems li:hover .num {
  color: var(--accent);
  text-shadow: 0 0 8px rgba(255, 170, 0, .35);
}

/* ---- solution / lede ---- */
.lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--fg-bright);
  margin: 4px 0 22px;
  padding: 18px 22px;
  background: linear-gradient(180deg, rgba(255, 170, 0, .05), rgba(255, 170, 0, 0));
  border-left: 2px solid var(--accent);
  border-right: 1px solid var(--line);
  border-radius: 0 4px 4px 0;
}

.sol-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 14px 0;
}
.sol-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px 18px;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.sol-card:hover {
  border-color: var(--accent-3);
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(255, 170, 0, .08);
}
.sol-h {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 8px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.sol-card p {
  margin: 0;
  font-size: 14px;
  color: var(--fg);
  line-height: 1.55;
}
@media (max-width: 640px) {
  .sol-grid { grid-template-columns: 1fr; }
}

/* ---- ascii flow diagram ---- */
.flow {
  overflow-x: auto;
  margin: 12px 0;
  padding: 18px 14px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: inset 0 0 30px rgba(255, 170, 0, .03);
}
.ascii-flow {
  margin: 0;
  font-family: inherit;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--fg);
  white-space: pre;
}
.ascii-flow .amber { text-shadow: 0 0 6px rgba(255, 170, 0, .4); }

/* ---- roadmap chain ---- */
.rm-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: stretch;
  margin: 16px 0;
}
.rm-node {
  flex: 1 1 170px;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-panel);
  position: relative;
  transition: border-color 180ms ease, transform 180ms ease;
}
.rm-node:hover {
  border-color: var(--line-bright);
  transform: translateY(-1px);
}
.rm-node .rm-ver {
  color: var(--fg-dim);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
}
.rm-node .rm-label {
  color: var(--fg);
  font-size: 12.5px;
  line-height: 1.4;
  flex: 1;
}
.rm-node .rm-status {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-top: 2px;
}

.rm-node.rm-doing {
  border-color: var(--accent);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 170, 0, .12), transparent 60%),
    var(--bg-panel);
  box-shadow: 0 0 18px rgba(255, 170, 0, .18), inset 0 0 30px rgba(255, 170, 0, .04);
}
.rm-node.rm-doing .rm-ver,
.rm-node.rm-doing .rm-status {
  color: var(--accent);
}
.rm-node.rm-doing .rm-label { color: var(--fg-bright); }
.rm-node.rm-doing .rm-pulse {
  position: absolute;
  top: 10px;
  right: 12px;
  color: var(--accent);
  font-size: 12px;
  animation: pulse 1.6s ease-in-out infinite;
  text-shadow: 0 0 10px var(--accent);
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.15); }
}

.rm-node.rm-next {
  border-color: var(--line-bright);
}
.rm-node.rm-next .rm-status { color: var(--ok); }
.rm-node.rm-next .rm-ver    { color: var(--fg); }

.rm-node.rm-launch {
  border-color: var(--accent-2);
  background:
    linear-gradient(135deg, rgba(217, 119, 6, .12), rgba(255, 170, 0, .04) 60%),
    var(--bg-panel);
}
.rm-node.rm-launch .rm-ver,
.rm-node.rm-launch .rm-status { color: var(--warn); }
.rm-node.rm-launch .rm-label  { color: var(--fg-bright); }

.rm-edge {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-dim);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 0 4px;
  user-select: none;
}

@media (max-width: 820px) {
  .rm-chain { flex-direction: column; gap: 4px; }
  .rm-node { flex: 0 0 auto; width: 100%; }
  .rm-edge { transform: rotate(90deg); align-self: center; padding: 4px 0; opacity: 0.6; }
}

/* ---- quote block ---- */
.quote {
  margin: 0 0 14px;
  padding: 4px 18px;
  border-left: 2px solid var(--accent-2);
  color: var(--fg);
}
.quote p:first-child { margin-top: 0; }
.quote p:last-child  { margin-bottom: 0; }

/* ---- footer ---- */
.footer {
  margin-top: 60px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--fg-dim);
  font-size: 13px;
  text-align: center;
}
.footer a {
  color: var(--accent);
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
  text-shadow: 0 0 8px rgba(255, 170, 0, .35);
}
.sep {
  margin: 0 8px;
  color: var(--line);
}

/* ============================================================
   Inner-page styles (guide / know / insights)
   ============================================================ */
.page-hero {
  max-width: 860px;
  margin: 0 auto;
  padding: 60px 24px 24px;
  text-align: left;
  position: relative;
  z-index: 2;
}
.page-hero h1 {
  font-size: clamp(22px, 4vw, 36px);
  margin: 0 0 8px;
  color: var(--fg-bright);
  letter-spacing: 0.04em;
  text-shadow: var(--glow);
  font-weight: 700;
}
.page-hero h1 .amber { color: var(--accent); }
.page-hero .sub {
  color: var(--fg-dim);
  font-size: 14px;
  margin: 0 0 4px;
  letter-spacing: 0.04em;
}

.toc {
  list-style: none;
  margin: 18px 0 0;
  padding: 14px 18px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  font-size: 13px;
}
.toc li { padding: 4px 0; }
.toc li::before {
  content: '$ ';
  color: var(--accent-2);
}
.toc a {
  color: var(--fg);
  text-decoration: none;
  transition: color 180ms ease;
}
.toc a:hover { color: var(--accent); }

.coming {
  margin: 28px 0;
  padding: 22px 24px;
  background: var(--bg-panel);
  border: 1px dashed var(--line-bright);
  border-radius: 4px;
  text-align: center;
  color: var(--fg-dim);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.coming strong {
  display: block;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .terminal { padding: 24px 16px 60px; }
}
