:root {
  --bg: #071018;
  --bg-elev: #0d1a24;
  --bg-card: #10202c;
  --line: rgba(120, 190, 220, 0.16);
  --line-strong: rgba(80, 210, 230, 0.35);
  --text: #eef4f8;
  --muted: #93a8b8;
  --faint: #6d8294;
  --cyan: #3ee0f0;
  --cyan-dim: #1aa8b8;
  --blue: #2b7fd6;
  --accent: #3ee0f0;
  --danger-soft: #f0d08a;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font-ui: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-serif: "IBM Plex Serif", "Georgia", "Times New Roman", serif;
  --max: 1120px;
  --header-h: 72px;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Serif";
  src: url("/assets/fonts/plex-serif-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Serif";
  src: url("/assets/fonts/plex-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Serif";
  src: url("/assets/fonts/plex-serif-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  font-optical-sizing: auto;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(20, 110, 180, 0.22), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(20, 160, 180, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(80, 160, 200, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 160, 200, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 80%);
  z-index: 0;
}
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; }
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--cyan);
  color: #041016;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus { top: 1rem; }

.wrap { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; position: relative; z-index: 1; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(7, 16, 24, 0.82);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
}
.brand img { width: 40px; height: 40px; display: block; }
.nav {
  display: flex;
  gap: 0.2rem 1.15rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav-toggle {
  display: none;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.4rem 0.6rem;
  font: inherit;
}

main { flex: 1; position: relative; z-index: 1; padding: 2.2rem 0 4rem; }

.hero { padding: 2.4rem 0 1.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}
.kicker {
  color: var(--cyan);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 0.8rem;
}
h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.15; margin: 0 0 0.7rem; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.lede {
  font-size: 1.15rem;
  color: #c9d7e2;
  max-width: 42rem;
  margin: 0 0 1.4rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1.2rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.65rem 1.05rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(20, 50, 70, 0.4);
}
.btn:hover { background: rgba(40, 120, 150, 0.35); color: #fff; }
.btn-primary {
  background: linear-gradient(135deg, #19c5d6, #1a73c7);
  border-color: transparent;
  color: #041018;
}
.btn-primary:hover { color: #041018; filter: brightness(1.08); }
.social-row { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; color: var(--muted); font-size: 0.95rem; }
.social-row a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--cyan-dim); }
.hero-visual {
  background: radial-gradient(circle at 50% 40%, rgba(62, 224, 240, 0.16), transparent 60%), var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 28px;
  min-height: 280px;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.hero-visual img { width: 210px; height: 210px; }
.hero-visual .orb {
  position: absolute;
  width: 320px; height: 320px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin: 2.8rem 0 1.1rem;
}
.section-head p { margin: 0; color: var(--muted); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); color: inherit; }
.thumb {
  aspect-ratio: 16/9;
  background: #081018;
  overflow: hidden;
  position: relative;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.35); }
.card-body { padding: 0.95rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.meta { color: var(--faint); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
.card-body h3 { font-size: 1.05rem; margin: 0; }
.card-body p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.filters { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0 0 1.2rem; }
.filter, .search {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font: inherit;
  font-size: 0.88rem;
}
.filter[aria-pressed="true"], .filter:hover { border-color: var(--cyan-dim); background: rgba(62, 224, 240, 0.1); }
.search { border-radius: 12px; min-width: 220px; flex: 1; }

.prose, .article {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.7;
  color: #dce6ee;
  max-width: 42rem;
}
.prose p, .article p { margin: 0 0 1rem; }
.prose h2, .article-page h2 { font-family: var(--font-ui); margin-top: 2rem; }

.page-intro { max-width: 46rem; margin-bottom: 1.5rem; }
.page-intro h1 { margin-bottom: 0.8rem; }

.explainer {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 2.2rem;
  align-items: start;
}
.video-col { position: sticky; top: calc(var(--header-h) + 1rem); }
.device {
  background: #050b10;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 0.7rem;
  box-shadow: var(--shadow);
}
.yt-facade, .yt-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: block;
}
.yt-facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-facade .play {
  position: absolute;
  inset: auto 50% 42% auto;
  transform: translateX(50%);
  width: 68px; height: 68px;
  border-radius: 50%;
  background: rgba(8, 16, 24, 0.72);
  border: 2px solid var(--cyan);
  color: var(--cyan);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.yt-facade .play::before {
  content: "";
  width: 0; height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent var(--cyan);
  margin-bottom: 2px;
}
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.watch-link { display: inline-block; margin-top: 0.8rem; font-size: 0.92rem; }
.ai-note, .pending, .placeholder-box {
  background: var(--bg-elev);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.placeholder-box h2 { font-size: 1.05rem; margin: 0 0 0.45rem; font-family: var(--font-ui); }
.placeholder-box ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.pending strong { color: var(--danger-soft); }
.sources { font-size: 0.92rem; }
.sources li { margin: 0.25rem 0; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; color: var(--muted); }
.pager a:hover { color: var(--text); }
.pager small { display: block; color: var(--faint); }

.site-footer {
  border-top: 1px solid var(--line);
  background: #050b11;
  padding: 2rem 0 1.4rem;
  color: var(--muted);
  font-size: 0.88rem;
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.4rem;
}
.site-footer h2 { font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.3rem 0; }
.site-footer a { color: #c9d7e2; text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }
.disclosure {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  color: var(--faint);
  max-width: 70rem;
}
.disclosure p { margin: 0 0 0.5rem; }

.legal { max-width: 46rem; }
.legal h2 { margin-top: 2rem; }

@media (max-width: 900px) {
  .hero-grid, .explainer, .card-grid, .footer-grid { grid-template-columns: 1fr; }
  .video-col { position: static; max-width: 360px; }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    right: 1rem;
    top: calc(var(--header-h) - 8px);
    background: #0c1822;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    min-width: 200px;
  }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .card-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 1.2rem; }
}
