/* SuperTechNinja demo site — design tokens per README.md spec */
:root {
  --bg: #08090b;
  --surface: #0a0b0e;
  --surface-hover: #0d1116;
  --code-bg: #0b0d11;
  --search-bg: #0a0c10;
  --text: #f4f5f7;
  --body: #c8ccd2;
  --secondary: #e8e9ec;
  --muted: #9aa0a9;
  --dim: #868c95;
  --dim2: #8b9099;
  --faint: #6f757e;
  --faintest: #4e545c;
  --cyan: #35d2ff;
  --cyan-deep: #0088b0;
  --cyan-light: #8ce6ff;
  --code-text: #a9e8ff;
  --magenta: #ff2f92;
  --magenta-light: #ff6aae;
  --hairline: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.10);
  --mono: 'JetBrains Mono', monospace;
  --serif: 'Source Serif 4', Georgia, serif;
}

html, body { margin: 0; padding: 0; background: var(--bg); }
body { -webkit-font-smoothing: antialiased; color: var(--secondary); font-family: var(--serif); overflow-x: hidden; }
* { box-sizing: border-box; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--cyan-light); }
::selection { background: rgba(53,210,255,0.3); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #23272e; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-deep); }

@keyframes stn-grid { from { transform: translate3d(0,0,0); } to { transform: translate3d(0,-64px,0); } }
@keyframes stn-drift-a { 0% { transform: translate3d(-6%,0,0) scale(1); } 50% { transform: translate3d(8%,6%,0) scale(1.15); } 100% { transform: translate3d(-6%,0,0) scale(1); } }
@keyframes stn-drift-b { 0% { transform: translate3d(4%,4%,0) scale(1.1); } 50% { transform: translate3d(-8%,-4%,0) scale(1); } 100% { transform: translate3d(4%,4%,0) scale(1.1); } }
@keyframes stn-scan { from { transform: translate3d(0,-100%,0); } to { transform: translate3d(0,100vh,0); } }
@keyframes stn-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes stn-ticker { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }
@keyframes stn-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes stn-rise { from { opacity: 0; transform: translate3d(0,14px,0); } to { opacity: 1; transform: none; } }
@keyframes stn-sweep { from { transform: translate3d(-120%,0,0); } to { transform: translate3d(320%,0,0); } }

/* ---------- ambient background ---------- */
.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.45; }
.ambient .grid-layer { position: absolute; inset: -10%; background-image: linear-gradient(rgba(255,255,255,0.035) 1px,transparent 1px), linear-gradient(90deg,rgba(255,255,255,0.035) 1px,transparent 1px); background-size: 64px 64px; animation: stn-grid 6s linear infinite; mask-image: radial-gradient(120% 80% at 50% 0%, #000 10%, transparent 72%); -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 10%, transparent 72%); }
.ambient .blob-a { position: absolute; top: -30vh; left: -10vw; width: 70vw; height: 70vw; border-radius: 50%; background: radial-gradient(circle, rgba(0,136,176,0.30), transparent 62%); filter: blur(30px); animation: stn-drift-a 26s ease-in-out infinite; }
.ambient .blob-b { position: absolute; top: 10vh; right: -20vw; width: 60vw; height: 60vw; border-radius: 50%; background: radial-gradient(circle, rgba(255,47,146,0.16), transparent 62%); filter: blur(40px); animation: stn-drift-b 34s ease-in-out infinite; }
.ambient .scanband { position: absolute; left: 0; right: 0; height: 180px; background: linear-gradient(180deg, transparent, rgba(53,210,255,0.055), transparent); animation: stn-scan 9s linear infinite; }
.ambient .crt { position: absolute; inset: 0; background-image: repeating-linear-gradient(180deg, rgba(0,0,0,0.28) 0px, rgba(0,0,0,0.28) 1px, transparent 1px, transparent 3px); opacity: 0.55; }
.ghost { position: absolute; font-family: var(--mono); font-size: 12.5px; line-height: 1.35; color: var(--cyan); text-shadow: 0 0 14px rgba(53,210,255,0.5); max-width: 34vw; opacity: 0.16; transition: opacity 1.6s ease; }
.ghost.fading { opacity: 0 !important; }
.ghost .gline { white-space: pre; overflow: hidden; text-overflow: ellipsis; animation: stn-rise 0.35s ease both; }
.ghost .gcursor { display: flex; gap: 8px; }
.ghost .gcursor .block { width: 8px; height: 14px; background: var(--cyan); display: inline-block; animation: stn-blink 1.1s step-end infinite; }
@media (prefers-reduced-motion: reduce) {
  .ambient .grid-layer, .ambient .blob-a, .ambient .blob-b, .ambient .scanband { animation: none; }
  .ghost { display: none; }
}

/* ---------- progress bar ---------- */
.progress { position: fixed; top: 0; left: 0; height: 2px; background: linear-gradient(90deg, var(--cyan-deep), var(--cyan), var(--magenta)); z-index: 60; box-shadow: 0 0 12px rgba(53,210,255,0.8); width: 0; }

/* ---------- header ---------- */
header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(8,9,11,0.72); border-bottom: 1px solid var(--hairline); }
.header-inner { max-width: 1240px; margin: 0 auto; padding: 18px 32px; display: flex; align-items: center; gap: 28px; }
.logo-link { display: flex; align-items: center; flex-shrink: 0; filter: drop-shadow(0 0 14px rgba(53,210,255,0.35)); }
.logo-link:hover { filter: drop-shadow(0 0 22px rgba(53,210,255,0.7)); }
.logo-link img { width: 270px; height: auto; display: block; }
nav { display: flex; align-items: center; gap: 22px; margin-left: auto; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
nav a { color: var(--dim2); padding: 6px 0; border-bottom: 1px solid transparent; }
nav a:hover, nav a.active { color: var(--cyan); border-bottom: 1px solid var(--cyan); }
.search-btn { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--dim2); font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; padding: 7px 12px; cursor: pointer; border-radius: 2px; }
.search-btn:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 18px rgba(53,210,255,0.25); }
.search-btn .kbd { opacity: 0.55; }
.header-rule { height: 1px; background: linear-gradient(90deg, transparent, rgba(53,210,255,0.55), rgba(255,47,146,0.35), transparent); }

/* ---------- ticker ---------- */
.ticker { position: relative; overflow: hidden; border-bottom: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.015); z-index: 2; }
.ticker-track { display: flex; width: max-content; animation: stn-ticker 42s linear infinite; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--faint); padding: 9px 0; }
.ticker-track span { padding-right: 40px; white-space: pre; }

/* ---------- layout ---------- */
main { position: relative; z-index: 2; max-width: 1240px; margin: 0 auto; padding: 0 32px 120px; }
.rise { animation: stn-rise 0.45s ease both; }

/* ---------- promo banner (rotating concepts: lock / hijack / decrypt) ---------- */
@keyframes hz-tear { 0%, 100% { clip-path: inset(0 0 0 0); transform: none; } 20% { clip-path: inset(18% 0 62% 0); transform: translate3d(-9px,0,0); } 40% { clip-path: inset(70% 0 12% 0); transform: translate3d(7px,0,0); } 60% { clip-path: inset(44% 0 40% 0); transform: translate3d(-5px,0,0); } 80% { clip-path: inset(8% 0 80% 0); transform: translate3d(4px,0,0); } }
@keyframes hz-reticle { 0%, 100% { opacity: 0.85; } 50% { opacity: 0.35; } }
@keyframes hz-crawl { from { transform: translate3d(0,0,0); } to { transform: translate3d(0,-50%,0); } }

.promo { position: relative; overflow: hidden; border: 1px solid var(--border); background: var(--surface); margin-top: 34px; }
.promo .p-scanlines { position: absolute; inset: 0; background-image: repeating-linear-gradient(180deg, rgba(0,0,0,0.3) 0px, rgba(0,0,0,0.3) 1px, transparent 1px, transparent 3px); pointer-events: none; }
.promo .p-blob-c { position: absolute; top: -20%; left: -10%; width: 55%; height: 150%; background: radial-gradient(circle, rgba(0,136,176,0.28), transparent 62%); filter: blur(46px); pointer-events: none; }
.promo .p-blob-m { position: absolute; top: -15%; right: -12%; width: 50%; height: 140%; background: radial-gradient(circle, rgba(255,47,146,0.16), transparent 62%); filter: blur(46px); pointer-events: none; }
.promo .p-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; margin-bottom: 16px; color: var(--cyan); text-transform: uppercase; }
.promo h2.p-title { font-size: 58px; line-height: 1.02; letter-spacing: -0.03em; font-weight: 700; margin: 0 0 18px; color: var(--text); text-shadow: 0 0 44px rgba(53,210,255,0.3); }
.promo h2.p-title.scrambling { font-family: var(--mono); }
.promo .p-line { font-size: 19px; line-height: 1.55; color: var(--muted); margin: 0 0 26px; max-width: 46ch; text-wrap: pretty; }
.promo .p-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 26px; }
.promo .p-chip { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--dim2); border: 1px solid rgba(255,255,255,0.14); padding: 6px 12px; border-radius: 2px; text-transform: uppercase; }
.promo .p-cta-row { display: flex; align-items: center; gap: 18px; }
.promo .p-stat { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--faint); }
.promo .p-status { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; margin-bottom: 20px; text-transform: uppercase; }
.promo .p-reveal { opacity: 0; transform: translate3d(0,10px,0); transition: opacity 0.45s ease, transform 0.45s ease; }
.promo.settled .p-reveal { opacity: 1; transform: none; }
.promo .tear { animation: hz-tear 0.24s steps(2) 3; }
.promo .p-ticks { display: flex; gap: 8px; margin-top: 26px; }
.promo .p-tick { display: block; width: 22px; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.18); transition: width 0.4s ease, background 0.3s ease; }
.promo .p-tick.on { width: 58px; background: var(--cyan); box-shadow: 0 0 14px rgba(53,210,255,0.8); }

/* hijack layout */
.promo-hijack .p-grid { position: relative; display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 44px; padding: 48px 52px 42px; }
.promo-hijack .p-readout { display: flex; flex-direction: column; justify-content: center; gap: 9px; font-family: var(--mono); font-size: 11.5px; line-height: 1.9; color: #5f656e; border-left: 1px solid var(--hairline); padding-left: 32px; }
.promo-hijack .p-readout .r-row { display: flex; justify-content: space-between; gap: 16px; white-space: pre; }
.promo-hijack .p-readout .r-row span:last-child { color: var(--cyan); }
.promo-hijack .p-trace { color: var(--magenta); letter-spacing: 0.14em; margin-top: 12px; }
.promo-hijack .p-gridbg { position: absolute; inset: 0; background-image: linear-gradient(rgba(53,210,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(53,210,255,0.05) 1px, transparent 1px); background-size: 52px 52px; pointer-events: none; }

/* decrypt layout */
.promo-decrypt .p-grid { position: relative; display: grid; grid-template-columns: 0.55fr 1.45fr; }
.promo-decrypt .p-term { padding: 32px 30px; border-right: 1px solid var(--hairline); font-family: var(--mono); font-size: 12.5px; line-height: 1.75; color: var(--faint); display: flex; flex-direction: column; min-height: 340px; }
.promo-decrypt .p-term .t-bar { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; font-size: 10px; letter-spacing: 0.18em; color: var(--faintest); }
.promo-decrypt .p-term .t-dot { width: 7px; height: 7px; border-radius: 50%; }
.promo-decrypt .p-term .t-line { white-space: pre; overflow: hidden; text-overflow: ellipsis; animation: stn-rise 0.3s ease both; }
.promo-decrypt .p-term .t-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--hairline); font-size: 10.5px; letter-spacing: 0.14em; color: var(--faintest); }
.promo-decrypt .p-payload { position: relative; padding: 48px 46px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.promo-decrypt .p-flash { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 30% 50%, rgba(255,47,146,0.45), transparent 70%); opacity: 0; transition: opacity 0.5s ease; }
.promo-decrypt .p-flash.on { opacity: 1; }
.promo-decrypt .p-kicker { color: var(--magenta); }
.promo-decrypt .cta { background: var(--magenta); box-shadow: 0 0 28px rgba(255,47,146,0.4); }
.promo-decrypt .cta:hover { background: var(--magenta-light); box-shadow: 0 0 44px rgba(255,47,146,0.75); }

/* lock layout */
.promo-lock .p-grid { position: relative; display: grid; grid-template-columns: 0.72fr 1.28fr; }
.promo-lock .p-sweep { position: relative; padding: 34px 30px; display: flex; flex-direction: column; min-height: 360px; }
.promo-lock .p-sweep-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; color: var(--faintest); margin-bottom: 16px; text-transform: uppercase; }
.promo-lock .p-sweep-head span:first-child { white-space: nowrap; }
.promo-lock .p-sweep-head .s-state { color: var(--cyan); text-align: right; }
.promo-lock .p-tiles { display: grid; grid-template-columns: repeat(8, 1fr); grid-auto-rows: 1fr; gap: 6px; flex: 1; }
.promo-lock .p-tile { display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; min-height: 32px; border-radius: 1px; color: transparent; transition: background 0.18s ease, box-shadow 0.25s ease; }
.promo-lock .p-tile.cursor { background: rgba(53,210,255,0.28); box-shadow: 0 0 18px rgba(53,210,255,0.55); animation: hz-reticle 0.4s ease-in-out infinite; }
.promo-lock .p-tile.target { background: var(--cyan); color: var(--bg); box-shadow: 0 0 26px var(--cyan); outline: 1px solid var(--cyan); outline-offset: 3px; }
.promo-lock .p-log { margin-top: 16px; height: 58px; overflow: hidden; font-family: var(--mono); font-size: 10.5px; line-height: 1.8; color: #4a5058; border-top: 1px solid var(--hairline); padding-top: 10px; }
.promo-lock .p-log .crawl { animation: hz-crawl 9s linear infinite; }
.promo-lock .p-log .crawl div { white-space: pre; }
.promo-lock .p-panel { position: relative; padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; border-left: 1px solid var(--hairline); background: rgba(255,255,255,0.015); }
.promo-lock .p-corner { position: absolute; width: 22px; height: 22px; pointer-events: none; }
.promo-lock .p-corner.tl { top: 30px; left: 30px; border-top: 1px solid var(--cyan); border-left: 1px solid var(--cyan); }
.promo-lock .p-corner.tr { top: 30px; right: 30px; border-top: 1px solid var(--cyan); border-right: 1px solid var(--cyan); }
.promo-lock .p-corner.bl { bottom: 30px; left: 30px; border-bottom: 1px solid var(--cyan); border-left: 1px solid var(--cyan); }
.promo-lock .p-corner.br { bottom: 30px; right: 30px; border-bottom: 1px solid var(--cyan); border-right: 1px solid var(--cyan); }
.promo-lock h2.p-title { filter: blur(6px); opacity: 0.25; transition: opacity 0.45s ease, filter 0.45s ease; }
.promo.settled.promo-lock h2.p-title { filter: none; opacity: 1; }

@media (max-width: 920px) {
  .promo-hijack .p-grid, .promo-decrypt .p-grid, .promo-lock .p-grid { grid-template-columns: 1fr; }
  .promo-hijack .p-readout { border-left: 0; padding-left: 0; }
  .promo-decrypt .p-term { border-right: 0; border-bottom: 1px solid var(--hairline); min-height: 0; }
  .promo-lock .p-panel { border-left: 0; border-top: 1px solid var(--hairline); }
  .promo h2.p-title { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .promo .tear, .promo-lock .p-tile.cursor, .promo-lock .p-log .crawl { animation: none; }
}

/* featured post card (wide, replaces the old hero) */
.card.featured { grid-column: 1 / -1; min-height: 170px; }
.card.featured h3 { font-size: 32px; line-height: 1.12; max-width: 30ch; }
.card.featured .card-dek { font-size: 17px; max-width: 72ch; }

/* ---------- kickers / labels ---------- */
.kicker { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 22px; }
.kicker.cyan { color: var(--cyan); }
.kicker.magenta { color: var(--magenta); }
.dot { width: 7px; height: 7px; border-radius: 50%; animation: stn-pulse 1.8s ease-in-out infinite; }
.dot.cyan { background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.dot.magenta { background: var(--magenta); box-shadow: 0 0 12px var(--magenta); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; padding: 76px 0 64px; }
.hero h1 { font-size: 60px; line-height: 1.02; letter-spacing: -0.025em; font-weight: 700; margin: 0 0 24px; color: var(--text); text-wrap: pretty; text-shadow: 0 0 44px rgba(53,210,255,0.28); }
.hero .dek { font-size: 19px; line-height: 1.6; color: var(--muted); margin: 0 0 30px; max-width: 56ch; text-wrap: pretty; }
.hero-cta-row { display: flex; align-items: center; gap: 18px; }
.cta { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bg); background: var(--cyan); padding: 13px 22px; border-radius: 2px; box-shadow: 0 0 26px rgba(53,210,255,0.4); cursor: pointer; border: 0; }
.cta:hover { background: var(--cyan-light); color: var(--bg); box-shadow: 0 0 40px rgba(53,210,255,0.75); }
.hero-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--faint); }

/* terminal panel */
.term { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 3px; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--hairline); font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 0.1em; }
.term-bar .tdot { width: 9px; height: 9px; border-radius: 50%; }
.term-body { padding: 18px 16px 22px; font-family: var(--mono); font-size: 12.5px; line-height: 1.9; color: var(--dim); }
.term-body .tline { white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.term-body .tline b { color: var(--cyan); font-weight: 500; }
.term-cursor { width: 8px; height: 14px; background: var(--cyan); display: inline-block; animation: stn-blink 1.1s step-end infinite; vertical-align: middle; }
.term-sweep { position: absolute; top: 0; left: 0; height: 2px; width: 40%; background: linear-gradient(90deg, transparent, rgba(53,210,255,0.8), transparent); animation: stn-sweep 4.5s linear infinite; }

/* ---------- filter row ---------- */
.filter-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px 0 26px; }
.filter-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; color: var(--faintest); text-transform: uppercase; margin-right: 6px; }
.pill { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim2); background: transparent; border: 1px solid var(--border); border-radius: 2px; padding: 7px 14px; cursor: pointer; position: relative; overflow: hidden;
  background-image: linear-gradient(115deg, transparent 42%, rgba(255,255,255,0.12) 50%, rgba(255,47,146,0.18) 54%, transparent 62%); background-size: 260% 100%; background-position: 0 0; }
.pill:hover { border-color: var(--magenta); color: var(--magenta); box-shadow: 0 0 18px rgba(255,47,146,0.3); transition: background-position 0.65s ease; background-position: 100% 0; }
.pill.active { border-color: var(--cyan); background-color: rgba(53,210,255,0.12); color: var(--cyan); box-shadow: 0 0 18px rgba(53,210,255,0.3); }

/* ---------- post grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
.card { background: var(--surface); padding: 26px 24px 22px; cursor: pointer; display: flex; flex-direction: column; gap: 12px; min-height: 210px; position: relative; }
.card:hover { background: var(--surface-hover); box-shadow: inset 0 0 0 1px rgba(53,210,255,0.35), 0 0 40px rgba(0,136,176,0.18); }
.card .card-kicker { display: flex; gap: 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; }
.card .card-kicker .kind { color: var(--faintest); }
.card h3 { font-size: 24px; line-height: 1.16; margin: 0; color: var(--text); font-weight: 600; text-wrap: pretty; }
.card .card-dek { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; }
.card .card-meta { margin-top: auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--faintest); text-transform: uppercase; padding-top: 12px; }
.accent-cyan { color: var(--cyan); }
.accent-magenta { color: var(--magenta); }

/* hold badge (demo only) */
.hold-badge { position: absolute; top: 12px; right: 12px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; color: #ffb02f; border: 1px solid rgba(255,176,47,0.45); background: rgba(255,176,47,0.08); padding: 3px 8px; border-radius: 2px; }

/* ---------- section headers ---------- */
.section { padding-top: 90px; }
.section h2 { font-size: 36px; line-height: 1.1; margin: 0 0 14px; color: var(--text); font-weight: 700; letter-spacing: -0.015em; }
.section .section-intro { font-size: 17px; line-height: 1.65; color: var(--muted); max-width: 68ch; margin: 0 0 34px; }

/* ---------- projects ---------- */
.proj-grid { display: flex; flex-direction: column; gap: 14px; }
.proj-row { display: grid; grid-template-columns: minmax(340px, 2fr) 5fr; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
@media (max-width: 899px) { .proj-row { grid-template-columns: 1fr; } }
.proj-card { background: var(--surface); padding: 24px 26px 20px; cursor: pointer; display: flex; flex-direction: column; gap: 12px; height: 280px; overflow: hidden; }
.proj-card:hover { background: var(--surface-hover); box-shadow: inset 0 0 0 1px rgba(53,210,255,0.35), 0 0 40px rgba(0,136,176,0.18); }
.proj-top { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.badge { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; padding: 4px 9px; border-radius: 2px; text-transform: uppercase; }
.badge.live { color: var(--cyan); border: 1px solid rgba(53,210,255,0.45); background: rgba(53,210,255,0.1); }
.badge.beta { color: var(--magenta); border: 1px solid rgba(255,47,146,0.45); background: rgba(255,47,146,0.1); }
.badge.soon { color: var(--dim); border: 1px solid var(--border); }
.badge.sunset { color: var(--magenta-light); border: 1px solid rgba(255,106,174,0.4); background: rgba(255,47,146,0.06); }
.badge.active { color: var(--cyan); border: 1px solid rgba(53,210,255,0.45); background: rgba(53,210,255,0.1); }
.badge.parked { color: #ffb02f; border: 1px solid rgba(255,176,47,0.45); background: rgba(255,176,47,0.08); }
.proj-card h3 { font-size: 26px; margin: 0; color: var(--text); font-weight: 700; line-height: 1.14; }
.proj-tagline { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--cyan); }
.proj-body { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.proj-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--hairline); display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--faintest); text-transform: uppercase; }

/* project detail */
.proj-hero { padding: 66px 0 30px; max-width: 860px; }
.proj-hero h1 { font-size: 52px; line-height: 1.05; margin: 0 0 18px; color: var(--text); font-weight: 700; letter-spacing: -0.02em; text-shadow: 0 0 44px rgba(53,210,255,0.28); }
.proj-hero .dek { font-size: 20px; line-height: 1.55; color: var(--muted); font-style: italic; margin: 0 0 26px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); margin: 34px 0 10px; }
.fact { background: var(--surface); padding: 18px 18px 16px; }
.fact .fk { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.2em; color: var(--faintest); text-transform: uppercase; margin-bottom: 8px; }
.fact .fv { font-family: var(--mono); font-size: 13px; color: var(--cyan); line-height: 1.5; }
.stack-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 6px; }
.chip { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--dim); border: 1px solid var(--border); padding: 5px 10px; border-radius: 2px; }

/* ---------- article / reader ---------- */
.article { max-width: 820px; margin: 0 auto; padding-top: 56px; }
.back-link { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--faint); text-transform: uppercase; cursor: pointer; display: inline-block; margin-bottom: 34px; }
.back-link:hover { color: var(--cyan); }
.article .art-kicker { display: flex; gap: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 20px; }
.article h1 { font-size: 50px; line-height: 1.06; margin: 0 0 22px; color: var(--text); font-weight: 700; letter-spacing: -0.02em; }
.article .art-dek { font-size: 20px; line-height: 1.55; color: var(--muted); font-style: italic; margin: 0 0 28px; }
.art-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--faintest); text-transform: uppercase; padding: 16px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); margin-bottom: 44px; display: flex; gap: 22px; }
.art-body p { font-size: 18.5px; line-height: 1.72; color: var(--body); margin: 0 0 26px; }
.art-body h2 { font-size: 29px; font-weight: 600; color: var(--text); margin: 48px 0 18px; line-height: 1.2; }
.codeblock { border: 1px solid var(--border); background: var(--code-bg); border-radius: 3px; margin: 0 0 28px; overflow: hidden; }
.codeblock .lang { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--cyan-deep); text-transform: uppercase; padding: 8px 14px; border-bottom: 1px solid var(--hairline); }
.codeblock pre { margin: 0; padding: 16px 18px; font-family: var(--mono); font-size: 13px; line-height: 1.75; color: var(--code-text); overflow-x: auto; }
.art-body blockquote { font-size: 24px; font-style: italic; color: var(--secondary); border-left: 2px solid var(--magenta); margin: 34px 0; padding: 4px 0 4px 28px; line-height: 1.5; }
.callout { display: grid; grid-template-columns: auto 1fr; gap: 16px; background: rgba(53,210,255,0.06); border: 1px solid rgba(53,210,255,0.25); border-radius: 3px; padding: 18px 20px; margin: 0 0 28px; }
.callout .note-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--cyan); text-transform: uppercase; padding-top: 3px; }
.callout .note-body { font-size: 16px; line-height: 1.65; color: #b8d9e6; }
.art-list { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.art-list li { display: flex; gap: 14px; font-size: 17.5px; line-height: 1.6; color: var(--body); }
.art-list li::before { content: "▸"; color: var(--magenta); flex-shrink: 0; }
.art-fig { margin: 0 0 28px; border: 1px solid var(--border); border-radius: 3px; overflow: hidden; background: var(--code-bg); }
.art-fig img, .art-fig video { display: block; width: 100%; height: auto; }
.art-fig figcaption { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--faint); text-transform: uppercase; padding: 10px 14px; border-top: 1px solid var(--hairline); }
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 44px 0 0; }
.tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--dim); border: 1px solid var(--border); padding: 5px 11px; border-radius: 2px; }
.next-card { display: block; border: 1px solid var(--border); border-radius: 3px; background: var(--surface); padding: 26px 28px; margin-top: 54px; cursor: pointer; }
.next-card:hover { border-color: rgba(53,210,255,0.45); box-shadow: 0 0 30px rgba(0,136,176,0.2); }
.next-card .nc-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em; color: var(--faint); text-transform: uppercase; margin-bottom: 10px; }
.next-card .nc-title { font-size: 24px; color: var(--text); font-weight: 600; line-height: 1.2; }

/* ---------- products ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
.prod-card { background: var(--surface); padding: 26px 24px 22px; min-height: 270px; display: flex; flex-direction: column; gap: 12px; }
.prod-top { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.prod-card h3 { font-size: 26px; margin: 0; font-weight: 700; color: var(--text); line-height: 1.14; }
.prod-tagline { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--cyan); }
.prod-body { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0; }
.prod-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--hairline); display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--faintest); }
.thr-panel { grid-column: 1 / -1; background: var(--surface); position: relative; min-height: 270px; }
@media (min-width: 760px) { .thr-panel { grid-column: 2 / -1; } }
.thr-panel video, .thr-panel img.poster { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.thr-panel img.poster { display: none; }
@media (prefers-reduced-motion: reduce) {
  .thr-panel video { display: none; }
  .thr-panel img.poster { display: block; }
}

/* Project demo panels: thin muted loop beside the card; sound-enabled
   panels expand to a full-width 16:9 with audio on click */
.sd-panel { background: var(--surface); position: relative; height: 280px; overflow: hidden; }
.sd-panel.expandable { cursor: pointer; }
@media (max-width: 899px) { .sd-panel { height: 200px; } }
.sd-panel video, .sd-panel img.poster { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.sd-panel img.poster { display: none; }
.sd-panel .sd-hint { position: absolute; right: 14px; bottom: 12px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; color: var(--text); background: rgba(8,9,11,0.72); border: 1px solid rgba(53,210,255,0.45); padding: 6px 11px; border-radius: 2px; pointer-events: none; }
.sd-panel:hover .sd-hint { color: var(--cyan); border-color: var(--cyan); }
.sd-panel .sd-close { display: none; position: absolute; right: 14px; top: 12px; z-index: 2; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; color: var(--text); background: rgba(8,9,11,0.72); border: 1px solid var(--border); padding: 6px 11px; border-radius: 2px; cursor: pointer; }
.sd-panel .sd-close:hover { color: var(--cyan); border-color: var(--cyan); }
.sd-panel.open { grid-column: 1 / -1; height: auto; min-height: 0; aspect-ratio: 16 / 9; cursor: default; }
.sd-panel.open video { object-fit: contain; background: #000; }
.sd-panel.open .sd-hint { display: none; }
.sd-panel.open .sd-close { display: block; }
@media (prefers-reduced-motion: reduce) {
  .sd-panel:not(.open) video { display: none; }
  .sd-panel:not(.open) img.poster { display: block; }
}

/* ---------- newsletter ---------- */
.newsletter { position: relative; border: 1px solid rgba(255,47,146,0.35); border-radius: 3px; background: linear-gradient(135deg, rgba(255,47,146,0.09), transparent 55%); padding: 44px 40px; margin-top: 100px; overflow: hidden; }
.news-sweep { position: absolute; top: 0; left: 0; height: 2px; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,47,146,0.8), transparent); animation: stn-sweep 6s linear infinite; }
.newsletter h2 { font-size: 34px; margin: 0 0 12px; color: var(--text); }
.newsletter p { font-size: 16.5px; line-height: 1.65; color: var(--muted); max-width: 62ch; margin: 0 0 26px; }
.news-form { display: flex; gap: 12px; max-width: 460px; }
.news-form input { flex: 1; background: rgba(255,255,255,0.03); border: 1px solid var(--border); color: var(--text); font-family: var(--mono); font-size: 13px; padding: 12px 14px; border-radius: 2px; outline: none; }
.news-form input:focus { border-color: var(--magenta); box-shadow: 0 0 24px rgba(255,47,146,0.35); }
.news-form button { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; color: var(--bg); background: var(--magenta); border: 0; padding: 12px 22px; border-radius: 2px; cursor: pointer; box-shadow: 0 0 24px rgba(255,47,146,0.35); }
.news-form button:hover { box-shadow: 0 0 38px rgba(255,47,146,0.7); }
.news-done { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.12em; color: var(--cyan); border: 1px solid rgba(53,210,255,0.45); padding: 14px 18px; border-radius: 2px; max-width: 460px; }
.news-caption { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--faintest); margin-top: 18px; text-transform: uppercase; }

/* ---------- about ---------- */
.about { max-width: 860px; padding-top: 66px; }
.about h1 { font-size: 52px; line-height: 1.05; margin: 0 0 26px; color: var(--text); font-weight: 700; letter-spacing: -0.02em; }
.about p { font-size: 18.5px; line-height: 1.72; color: var(--body); margin: 0 0 24px; max-width: 66ch; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); margin-top: 44px; }
.stat { background: var(--surface); padding: 24px 20px; }
.stat .num { font-family: var(--mono); font-size: 34px; color: var(--cyan); text-shadow: 0 0 24px rgba(53,210,255,0.5); margin-bottom: 8px; }
.stat .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--faint); text-transform: uppercase; }

/* ---------- search ---------- */
.search-overlay { position: fixed; inset: 0; background: rgba(4,5,7,0.86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 100; display: none; }
.search-overlay.open { display: block; }
.search-panel { width: min(720px, 100%); margin: 12vh auto 0; background: var(--search-bg); border: 1px solid rgba(53,210,255,0.45); border-radius: 3px; box-shadow: 0 0 90px rgba(0,136,176,0.35); overflow: hidden; }
.search-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--hairline); }
.search-head .prompt { color: var(--cyan); font-family: var(--mono); }
.search-head input { flex: 1; background: transparent; border: 0; outline: none; color: var(--text); font-family: var(--mono); font-size: 14px; }
.search-head .esc { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--faint); border: 1px solid var(--border); padding: 4px 8px; border-radius: 2px; }
.search-results { max-height: 52vh; overflow-y: auto; }
.sr { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.04); }
.sr:hover { background: rgba(53,210,255,0.07); }
.sr .sr-cat { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; }
.sr .sr-title { font-size: 16.5px; color: var(--secondary); line-height: 1.35; }
.sr-empty { padding: 26px 18px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--faint); }

/* ---------- footer ---------- */
footer { position: relative; z-index: 2; border-top: 1px solid var(--hairline); margin-top: 40px; }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 44px 32px; display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.footer-inner img { width: 240px; height: auto; opacity: 0.65; }
.footer-links { display: flex; gap: 22px; margin-left: auto; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.footer-links a { color: var(--dim2); }
.footer-links a:hover { color: var(--cyan); }
.footer-links a.rss:hover { color: var(--magenta); }
.copyright { width: 100%; font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: var(--faintest); }

/* ---------- demo banner ---------- */
.demo-banner { position: fixed; bottom: 16px; right: 16px; z-index: 90; font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: #ffb02f; background: rgba(8,9,11,0.9); border: 1px solid rgba(255,176,47,0.45); padding: 8px 12px; border-radius: 2px; cursor: pointer; user-select: none; }
.demo-banner:hover { box-shadow: 0 0 18px rgba(255,176,47,0.3); }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { font-size: 42px; }
  .logo-link img { width: 200px; }
  nav { gap: 14px; }
  .article h1 { font-size: 36px; }
  .proj-hero h1, .about h1 { font-size: 38px; }
}
@media (max-width: 640px) {
  .header-inner { padding: 14px 18px; flex-wrap: wrap; }
  nav { flex-wrap: wrap; }
  main { padding: 0 18px 90px; }
  .hero h1 { font-size: 34px; }
}
