/* ============================================================
   The Sensei's Dojo — Lo-fi Full Stack Portfolio
   Night/neon palette · Shippori Mincho + Zen Kaku + Space Mono
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* night (default) */
  --bg-0: oklch(0.16 0.035 285);
  --bg-1: oklch(0.20 0.045 287);
  --bg-2: oklch(0.24 0.05 288);
  --panel: oklch(0.23 0.045 288 / 0.55);
  --panel-solid: oklch(0.22 0.045 288);
  --line: oklch(0.42 0.04 290 / 0.45);
  --line-soft: oklch(0.45 0.035 290 / 0.22);

  --ink: oklch(0.93 0.018 290);
  --ink-soft: oklch(0.80 0.025 290);
  --muted: oklch(0.66 0.03 290);
  --faint: oklch(0.54 0.03 290);

  --teal: oklch(0.80 0.13 195);
  --violet: oklch(0.74 0.15 305);
  --teal-glow: oklch(0.80 0.13 195 / 0.35);
  --violet-glow: oklch(0.74 0.15 305 / 0.35);

  /* sky for hero */
  --sky-top: oklch(0.15 0.04 290);
  --sky-mid: oklch(0.21 0.06 295);
  --sky-low: oklch(0.30 0.07 320);
  --moon: oklch(0.93 0.04 95);
  --silhouette: oklch(0.11 0.03 285);
  --mountain: oklch(0.18 0.04 290);
  --mountain-2: oklch(0.22 0.05 300);

  --font-display: "Shippori Mincho", Georgia, serif;
  --font-body: "Zen Kaku Gothic New", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;

  --maxw: 1180px;
  --radius: 16px;
}

[data-theme="day"] {
  --bg-0: oklch(0.94 0.018 290);
  --bg-1: oklch(0.91 0.022 292);
  --bg-2: oklch(0.88 0.026 294);
  --panel: oklch(0.97 0.012 290 / 0.7);
  --panel-solid: oklch(0.97 0.012 290);
  --line: oklch(0.55 0.04 295 / 0.4);
  --line-soft: oklch(0.55 0.03 295 / 0.2);

  --ink: oklch(0.26 0.04 290);
  --ink-soft: oklch(0.38 0.04 290);
  --muted: oklch(0.48 0.04 292);
  --faint: oklch(0.6 0.03 292);

  --teal: oklch(0.58 0.12 200);
  --violet: oklch(0.55 0.15 305);
  --teal-glow: oklch(0.58 0.12 200 / 0.25);
  --violet-glow: oklch(0.55 0.15 305 / 0.22);

  --sky-top: oklch(0.86 0.04 280);
  --sky-mid: oklch(0.84 0.06 320);
  --sky-low: oklch(0.88 0.07 50);
  --moon: oklch(0.97 0.05 70);
  --silhouette: oklch(0.30 0.05 290);
  --mountain: oklch(0.62 0.05 300);
  --mountain-2: oklch(0.72 0.05 320);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.6s ease, color 0.6s ease;
}

::selection { background: var(--violet-glow); color: var(--ink); }

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- Ambient canvas ---------- */
#petals {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}

/* ---------- Nav ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: oklch(0.16 0.035 285 / 0);
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: oklch(0.16 0.035 285 / 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
[data-theme="day"] nav.scrolled { background: oklch(0.94 0.018 290 / 0.78); }

.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-mono); }
.brand .seal {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 11px;
  font-family: var(--font-display); font-size: 21px; color: var(--teal);
  background: var(--panel);
  box-shadow: 0 0 18px var(--teal-glow) inset;
}
.brand b { font-weight: 700; letter-spacing: 0.04em; font-size: 14px; }
.brand span { color: var(--faint); font-size: 11px; }

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
  letter-spacing: 0.02em; transition: color 0.25s; position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 1px; width: 0;
  background: var(--teal); transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

.nav-right { display: flex; align-items: center; gap: 14px; }

.toggle {
  width: 40px; height: 40px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--ink-soft); display: grid; place-items: center;
  font-size: 16px; transition: all 0.25s;
}
.toggle:hover { color: var(--teal); border-color: var(--teal); box-shadow: 0 0 16px var(--teal-glow); }

.btn {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.03em;
  padding: 11px 20px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--teal); color: var(--teal);
  background: transparent; transition: all 0.25s; white-space: nowrap;
}
.btn:hover { background: var(--teal); color: var(--bg-0); box-shadow: 0 0 24px var(--teal-glow); }
.btn.solid { background: var(--teal); color: var(--bg-0); }
.btn.solid:hover { box-shadow: 0 0 30px var(--teal-glow); transform: translateY(-1px); }
.btn.ghost { border-color: var(--line); color: var(--ink-soft); }
.btn.ghost:hover { border-color: var(--violet); color: var(--violet); background: transparent; box-shadow: 0 0 20px var(--violet-glow); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center;
  padding-top: 90px; overflow: hidden; }

.hero-sky { position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 48%, var(--sky-low) 100%);
  transition: background 0.6s ease; }

.stars { position: absolute; inset: 0; z-index: 0; opacity: 0.7; }
[data-theme="day"] .stars { opacity: 0; }

.scene { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }

/* CSS moon — reliably placed regardless of viewport aspect */
.hero-moon {
  position: absolute; z-index: 0; top: 13%; right: 13%;
  width: 190px; height: 190px; border-radius: 50%;
  background:
    radial-gradient(circle at 38% 36%, oklch(0.96 0.03 95) 0%, var(--moon) 58%, oklch(0.86 0.05 80) 100%);
  box-shadow:
    0 0 80px 30px var(--moon),
    0 0 160px 60px oklch(0.9 0.05 90 / 0.25),
    inset -18px -10px 40px oklch(0.7 0.05 280 / 0.35);
  opacity: 0.9;
}
.hero-moon::after {
  content: ""; position: absolute; width: 34px; height: 34px; border-radius: 50%;
  top: 26%; left: 58%; background: oklch(0.86 0.04 280 / 0.18);
  box-shadow: -42px 30px 0 -8px oklch(0.86 0.04 280 / 0.14), -18px 58px 0 -12px oklch(0.86 0.04 280 / 0.12);
}
[data-theme="day"] .hero-moon {
  background: radial-gradient(circle at 40% 38%, oklch(0.99 0.04 80), oklch(0.95 0.06 70) 70%);
  box-shadow: 0 0 90px 36px oklch(0.95 0.07 70 / 0.6), 0 0 180px 70px oklch(0.92 0.08 60 / 0.3);
  opacity: 0.95;
}
@media (max-width: 900px) { .hero-moon { top: 8%; right: 8%; width: 130px; height: 130px; } }

.hero-inner { position: relative; z-index: 3; width: 100%; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 50px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12px; color: var(--teal);
  letter-spacing: 0.05em; padding: 7px 14px; border-radius: 99px;
  border: 1px solid var(--teal); background: oklch(0.8 0.13 195 / 0.06);
  margin-bottom: 26px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 10px var(--teal); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(48px, 7vw, 92px); line-height: 0.98;
  letter-spacing: -0.01em; margin-bottom: 8px;
}
.hero h1 .ln2 { color: var(--teal); }
.hero .role-line {
  font-family: var(--font-mono); font-size: clamp(15px, 1.6vw, 19px);
  color: var(--ink-soft); letter-spacing: 0.02em; margin: 14px 0 22px;
}
.hero .role-line .kana { color: var(--violet); }
.hero .tagline { font-size: 17px; color: var(--muted); max-width: 540px; margin-bottom: 30px; text-wrap: pretty; }

.hero-meta { display: flex; flex-direction: column; gap: 9px; margin-bottom: 30px; }
.hero-meta .row { display: flex; align-items: center; gap: 11px; font-size: 14px; color: var(--ink-soft); }
.hero-meta .row .mk { font-family: var(--font-mono); color: var(--teal); font-size: 13px; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-cta .btn { padding: 14px 24px; font-size: 13px; }

.socials { display: flex; gap: 9px; flex-wrap: wrap; }
.socials .sl {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted);
  padding: 7px 13px; border: 1px solid var(--line-soft); border-radius: 9px;
  transition: all 0.22s;
}
.socials .sl:hover { color: var(--ink); border-color: var(--violet); box-shadow: 0 0 14px var(--violet-glow); transform: translateY(-2px); }

/* terminal card */
.terminal {
  background: oklch(0.13 0.03 287 / 0.78); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; backdrop-filter: blur(8px);
  box-shadow: 0 24px 60px oklch(0 0 0 / 0.4), 0 0 40px var(--violet-glow);
  font-family: var(--font-mono);
}
[data-theme="day"] .terminal { background: oklch(0.2 0.04 288 / 0.92); }
.terminal .bar { display: flex; align-items: center; gap: 8px; padding: 12px 15px; border-bottom: 1px solid var(--line-soft); }
.terminal .bar .dots { display: flex; gap: 7px; }
.terminal .bar .dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.terminal .bar .dots i:nth-child(1) { background: oklch(0.7 0.18 25); }
.terminal .bar .dots i:nth-child(2) { background: oklch(0.82 0.15 90); }
.terminal .bar .dots i:nth-child(3) { background: oklch(0.78 0.15 150); }
.terminal .bar .ttl { color: oklch(0.7 0.03 290); font-size: 11.5px; margin-left: 6px; }
.terminal .body { padding: 18px 17px 20px; font-size: 13px; line-height: 1.9; color: oklch(0.85 0.02 290); }
.terminal .body .pr { color: var(--teal); }
.terminal .body .cm { color: oklch(0.6 0.03 290); }
.terminal .body .st { color: var(--violet); }
.terminal .body .ok { color: oklch(0.8 0.14 150); }
.terminal .avail { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); color: oklch(0.8 0.14 150); font-size: 12px; }
.terminal .avail .blip { width: 8px; height: 8px; border-radius: 50%; background: oklch(0.8 0.14 150); box-shadow: 0 0 8px oklch(0.8 0.14 150); animation: pulse 1.8s infinite; }
.cursor { display: inline-block; width: 8px; height: 15px; background: var(--teal); vertical-align: text-bottom; animation: blink 1.1s step-end infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

.scroll-hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 4;
  font-family: var(--font-mono); font-size: 11px; color: var(--faint); letter-spacing: 0.2em;
  text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.scroll-hint .ln { width: 1px; height: 38px; background: linear-gradient(var(--teal), transparent); animation: drop 2s ease-in-out infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Section scaffolding ---------- */
section.chapter { position: relative; z-index: 2; padding: 110px 0; background: var(--bg-0); }
section.chapter.alt { background: var(--bg-1); }

.divider { position: relative; height: 1px; background: var(--line-soft); max-width: var(--maxw); margin: 0 auto; }
.divider::before { content: "✦"; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  background: var(--bg-0); padding: 0 16px; color: var(--teal); font-size: 13px; }
section.chapter.alt + .divider::before, .divider.on-alt::before { background: var(--bg-1); }

.sec-head { margin-bottom: 56px; max-width: 720px; }
.sec-head .kicker {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--teal); display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.sec-head .kicker .kj { font-family: var(--font-display); font-size: 18px; color: var(--violet); letter-spacing: 0; }
.sec-head h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.04; letter-spacing: -0.01em; margin-bottom: 16px; }
.sec-head p { color: var(--muted); font-size: 16px; max-width: 600px; text-wrap: pretty; }

/* reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

/* ---------- Cards generic ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 26px; backdrop-filter: blur(6px); transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.card:hover { border-color: var(--line); transform: translateY(-4px); box-shadow: 0 20px 44px oklch(0 0 0 / 0.28); }

/* ---------- Tech Arsenal ---------- */
.arsenal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 28px; }
.stack-block h3 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--violet); margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 11px; }
.chip {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 15px;
  border: 1px solid var(--line-soft); border-radius: 11px; background: var(--bg-2);
  transition: all 0.25s; min-width: 96px;
}
.chip:hover { border-color: var(--teal); box-shadow: 0 0 18px var(--teal-glow); transform: translateY(-3px); }
.chip .nm { font-family: var(--font-body); font-weight: 700; font-size: 14px; }
.chip .rl { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); letter-spacing: 0.04em; }
.chip-icon { width: 28px; height: 28px; object-fit: contain; margin-bottom: 4px; }
[data-theme="night"] .chip-invert { filter: invert(0.85) brightness(1.6); }
[data-theme="day"]   .chip-invert { filter: none; }
.chip-letter {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  margin-bottom: 4px; letter-spacing: 0.02em;
}

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pillar { text-align: left; }
.pillar .glyph { font-size: 26px; color: var(--teal); margin-bottom: 12px; display: block; }
.pillar h4 { font-family: var(--font-display); font-size: 19px; margin-bottom: 8px; }
.pillar p { font-size: 13.5px; color: var(--muted); }

/* ---------- Architecture ---------- */
.arch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 34px; }
.arch-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.arch-glyph { font-size: 28px; color: var(--teal); line-height: 1; }
.arch-card .ix { font-family: var(--font-mono); font-size: 11px; color: var(--faint); letter-spacing: 0.1em; }
.arch-card h3 { font-family: var(--font-display); font-size: 22px; margin-bottom: 10px; }
.arch-card p { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.arch-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.arch-tags span { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-soft);
  padding: 5px 10px; border: 1px solid var(--line-soft); border-radius: 7px; }

.cap-banner { font-family: var(--font-display); font-size: 20px; color: var(--ink-soft); margin-bottom: 22px; }
.cap-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cap { padding: 22px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--bg-2); transition: all 0.3s; }
.cap:hover { border-color: var(--violet); box-shadow: 0 0 22px var(--violet-glow); }
.cap h4 { font-size: 15px; margin-bottom: 8px; }
.cap p { font-size: 13px; color: var(--muted); }

/* ---------- The Path (timeline) ---------- */
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--teal), var(--violet), transparent); opacity: 0.5; }
.tl-item { position: relative; padding-left: 64px; padding-bottom: 40px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-node { position: absolute; left: 8px; top: 4px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-0); border: 2px solid var(--teal); display: grid; place-items: center;
  box-shadow: 0 0 16px var(--teal-glow); z-index: 2; }
.tl-node i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.tl-item.current .tl-node { border-color: var(--violet); box-shadow: 0 0 18px var(--violet-glow); }
.tl-item.current .tl-node i { background: var(--violet); animation: pulse 2s infinite; }

.tl-card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 26px 28px; backdrop-filter: blur(6px); transition: border-color 0.3s, transform 0.3s; }
.tl-card:hover { border-color: var(--line); transform: translateX(4px); }
.co-logo { width: 18px; height: 18px; object-fit: contain; border-radius: 4px; margin-right: 6px; vertical-align: middle; }
.tl-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.tl-role { font-family: var(--font-display); font-size: 23px; }
.tl-period { font-family: var(--font-mono); font-size: 11.5px; color: var(--teal); padding: 4px 11px;
  border: 1px solid var(--teal); border-radius: 99px; letter-spacing: 0.04em; }
.tl-item.current .tl-period { color: var(--violet); border-color: var(--violet); }
.tl-meta { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.tl-meta .co { color: var(--ink-soft); font-weight: 700; }
.tl-summary { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 18px; text-wrap: pretty; }
.tl-tech { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.tl-tech span { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); padding: 4px 9px;
  background: var(--bg-2); border-radius: 6px; }
.tl-ach { list-style: none; display: grid; gap: 9px; }
.tl-ach li { position: relative; padding-left: 22px; font-size: 13.5px; color: var(--muted); }
.tl-ach li::before { content: "⟶"; position: absolute; left: 0; color: var(--teal); font-family: var(--font-mono); }

/* ---------- Scrolls (projects) ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.proj { display: flex; flex-direction: column; position: relative; overflow: hidden; }
.proj.feat { grid-column: span 3; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 0; padding: 0; }
.proj .scroll-vis {
  position: relative; min-height: 200px; display: grid; place-items: center;
  background: linear-gradient(135deg, oklch(0.22 0.05 300), oklch(0.18 0.05 285));
  border-right: 1px solid var(--line-soft); overflow: hidden;
}
.proj .scroll-vis .kanji-bg { font-family: var(--font-display); font-size: 130px; color: var(--teal);
  opacity: 0.12; position: absolute; }
.proj .scroll-vis .pn { font-family: var(--font-display); font-size: 30px; color: var(--ink); position: relative; z-index: 2; padding: 20px; text-align: center; }
.proj .pad { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.proj .phead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.proj h3 { font-family: var(--font-display); font-size: 22px; }
.proj.feat h3 { font-size: 28px; }
.live-tag { font-family: var(--font-mono); font-size: 10px; color: oklch(0.8 0.14 150); padding: 3px 9px;
  border: 1px solid oklch(0.8 0.14 150 / 0.5); border-radius: 99px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.live-tag i { width: 6px; height: 6px; border-radius: 50%; background: oklch(0.8 0.14 150); box-shadow: 0 0 7px oklch(0.8 0.14 150); }
.proj p { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; flex: 1; text-wrap: pretty; }
.proj-tech { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.proj-tech span { font-family: var(--font-mono); font-size: 10px; color: var(--ink-soft); padding: 3px 8px; background: var(--bg-2); border-radius: 6px; }
.proj-links { display: flex; gap: 10px; }
.proj-links a { font-family: var(--font-mono); font-size: 11.5px; color: var(--teal); padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 9px; transition: all 0.22s; }
.proj-links a:hover { background: var(--teal); color: var(--bg-0); border-color: var(--teal); box-shadow: 0 0 16px var(--teal-glow); }

/* ---------- Testimonials ---------- */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.testi { position: relative; display: flex; flex-direction: column; }
.testi .mark { font-family: var(--font-display); font-size: 60px; color: var(--violet); opacity: 0.4; line-height: 0.5; height: 30px; margin-bottom: 18px; }
.testi-text { font-size: 14.5px; color: var(--ink-soft); line-height: 1.75; flex: 1; }
.testi-stars { font-size: 14px; color: var(--teal); letter-spacing: 2px; margin: 14px 0 16px; }
.testi .who { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.testi .who .av {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-2); border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--teal);
}
.testi .who .nm { font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--ink); }
.testi-project { font-family: var(--font-mono); font-size: 11px; color: var(--faint); margin-top: 2px; }

.testi-verify {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 22px 28px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(8px);
}
.testi-verify-icon { font-size: 18px; color: var(--teal); opacity: 0.7; }
.testi-verify p { font-size: 14px; color: var(--muted); }
.testi-verify p a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--teal-glow);
  transition: border-color 0.2s, color 0.2s;
}
.testi-verify p a:hover { color: var(--ink); border-color: var(--teal); }
.testi-verify-note { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; align-items: start; }
.contact-info .ci-block { margin-bottom: 26px; }
.contact-info .ci-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.contact-info .ci-val { font-size: 16px; color: var(--ink); }
.contact-info a.ci-val:hover { color: var(--teal); }
.connect-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.connect-list a { display: flex; flex-direction: column; padding: 14px 16px; border: 1px solid var(--line-soft);
  border-radius: 12px; background: var(--bg-2); transition: all 0.25s; }
.connect-list a:hover { border-color: var(--teal); box-shadow: 0 0 18px var(--teal-glow); transform: translateY(-2px); }
.connect-list a .cl-nm { font-weight: 700; font-size: 14px; }
.connect-list a .cl-note { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); }

.form { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 30px; backdrop-filter: blur(6px); }
.form .frow { margin-bottom: 18px; }
.form .frow.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.form input, .form textarea { width: 100%; background: var(--bg-0); border: 1px solid var(--line-soft);
  border-radius: 10px; padding: 13px 15px; color: var(--ink); font-family: var(--font-body); font-size: 14px; transition: border-color 0.25s, box-shadow 0.25s; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-glow); }
.form textarea { resize: vertical; min-height: 130px; }
.form .send { width: 100%; margin-top: 4px; padding: 15px; font-size: 13px; }
.form .sent-msg { font-family: var(--font-mono); font-size: 12.5px; color: oklch(0.8 0.14 150); text-align: center; margin-top: 14px; opacity: 0; transition: opacity 0.3s; }
.form .sent-msg.show { opacity: 1; }

/* CTA banner */
.cta-banner { text-align: center; padding: 56px 30px; border: 1px solid var(--line); border-radius: 22px;
  background: linear-gradient(135deg, oklch(0.22 0.05 300 / 0.5), oklch(0.2 0.05 285 / 0.5));
  position: relative; overflow: hidden; }
.cta-banner h3 { font-family: var(--font-display); font-size: clamp(26px, 3.5vw, 38px); margin-bottom: 10px; }
.cta-banner p { color: var(--muted); margin-bottom: 24px; }
.cta-banner .enso { position: absolute; right: -40px; top: -40px; font-family: var(--font-display); font-size: 200px; color: var(--violet); opacity: 0.08; }

/* ---------- Fixed Social Rail ---------- */
.social-rail {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.social-rail::before,
.social-rail::after {
  content: "";
  width: 1px;
  height: 48px;
  background: linear-gradient(transparent, var(--teal));
  opacity: 0.45;
}
.social-rail::after {
  background: linear-gradient(var(--teal), transparent);
  order: 99;
}
.sr-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
}
.sr-btn:hover {
  border-color: var(--teal);
  box-shadow: 0 0 14px var(--teal-glow);
  transform: translateX(3px);
}
/* inline SVG icons */
.sr-icon {
  width: 20px;
  height: 20px;
  fill: var(--muted);
  transition: fill 0.2s;
}
.sr-btn:hover .sr-icon { fill: var(--teal); }
[data-theme="day"] .sr-icon { fill: var(--faint); }
[data-theme="day"] .sr-btn:hover .sr-icon { fill: var(--teal); }
.sr-img { fill: unset; width: 20px; height: 20px; object-fit: contain; border-radius: 4px; }

/* ── Mobile: horizontal bottom bar ── */
@media (max-width: 1100px) {
  .social-rail {
    left: 50%;
    top: auto;
    bottom: 0;
    transform: translateX(-50%);
    flex-direction: row;
    gap: 6px;
    padding: 8px 14px;
    background: var(--panel-solid);
    border-top: 1px solid var(--line-soft);
    border-radius: 0;
    backdrop-filter: blur(16px);
    width: 100%;
    justify-content: center;
  }
  .social-rail::before, .social-rail::after { display: none; }
  .sr-btn { width: 40px; height: 40px; border-radius: 10px; }
  .sr-btn:hover { transform: translateY(-3px); }
}

/* ---------- Footer ---------- */
footer { background: var(--bg-1); border-top: 1px solid var(--line-soft); padding: 50px 0 36px; position: relative; z-index: 2; }
.foot-grid { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-brand { font-family: var(--font-display); font-size: 24px; }
.foot-brand span { color: var(--teal); }
.foot-tag { font-size: 13px; color: var(--muted); }
.foot-copy { font-family: var(--font-mono); font-size: 11px; color: var(--faint); margin-top: 24px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .terminal { max-width: 460px; }
  .arsenal-grid { grid-template-columns: 1fr; }
  .pillars, .cap-grid { grid-template-columns: 1fr 1fr; }
  .arch-grid { grid-template-columns: 1fr 1fr; }
  .proj-grid { grid-template-columns: 1fr 1fr; }
  .proj.feat { grid-column: span 2; grid-template-columns: 1fr; }
  .proj.feat .scroll-vis { border-right: none; border-bottom: 1px solid var(--line-soft); min-height: 150px; }
  .testi-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  nav { padding: 12px 18px; }
  section.chapter { padding: 72px 0; }
  .pillars, .cap-grid, .arch-grid, .proj-grid { grid-template-columns: 1fr; }
  .proj.feat { grid-column: span 1; }
  .form .frow.two { grid-template-columns: 1fr; }
  .connect-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
