:root {
  --bg0: #050c17;
  --bg1: #0c1d33;
  --ice: #8be0ff;
  --ice2: #d8f4ff;
  --text: #eef8ff;
  --soft: #b4c6d8;
  --muted: #7d95b0;
  --frost: 225, 245, 255;
  --line: rgba(139, 224, 255, .14);
  --glass: rgba(139, 224, 255, .045);
  --signal: #ff5b3a;
  --f-head: "Barlow Condensed", Bahnschrift, "Arial Narrow", sans-serif;
  --f-body: Inter, system-ui, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scrollbar-color: rgba(139, 224, 255, .22) transparent; }
body {
  min-height: 100vh;
  background: radial-gradient(1200px 800px at 80% -10%, var(--bg1), transparent 65%),
              radial-gradient(900px 700px at -10% 40%, #081a2e, transparent 60%), var(--bg0);
  color: var(--text);
  font: 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* frost dot grid, fades out towards the bottom */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: radial-gradient(rgba(var(--frost), .07) 1.2px, transparent 1.6px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code { font-family: var(--f-mono); }

#snow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* slow aurora glow */
.aurora { position: fixed; inset: -20% -10% auto; height: 80vh; z-index: -3; pointer-events: none; filter: blur(70px); opacity: .55; }
.aurora i { position: absolute; border-radius: 50%; }
.aurora i:nth-child(1) { width: 46vw; height: 30vh; left: 38%; top: 10%; background: rgba(70, 184, 255, .22); animation: drift 26s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 34vw; height: 24vh; left: 62%; top: 28%; background: rgba(120, 255, 230, .10); animation: drift 34s ease-in-out infinite alternate-reverse; }
.aurora i:nth-child(3) { width: 30vw; height: 26vh; left: 8%; top: 40%; background: rgba(60, 110, 255, .12); animation: drift 40s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(-6vw, 4vh) scale(1.15); } }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 48px);
  background: linear-gradient(to bottom, rgba(5, 12, 23, .85), rgba(5, 12, 23, 0));
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ice); }
.brand b { font: 700 24px/1 var(--f-head); color: var(--text); letter-spacing: .01em; }
.mark { display: grid; filter: drop-shadow(0 0 8px rgba(139, 224, 255, .5)); }

.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: rgba(5, 12, 23, .6); }
.lang button { font: 700 12px var(--f-mono); letter-spacing: .1em; padding: 5px 11px; border-radius: 999px; color: var(--muted); transition: .2s; }
.lang button[aria-pressed="true"] { background: var(--ice); color: var(--bg0); }
.lang button:not([aria-pressed="true"]):hover { color: var(--text); }

main { max-width: 1120px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 48px); }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(24px, 5vw, 72px);
  min-height: min(760px, calc(100vh - 70px)); padding: 30px 0 60px;
}
.eyebrow { font: 700 13px var(--f-mono); letter-spacing: .24em; text-transform: uppercase; color: var(--ice); display: flex; align-items: center; gap: 12px; }
.word {
  font: 800 clamp(72px, 12vw, 156px)/.86 var(--f-head); letter-spacing: -.01em; margin-top: 18px;
  background: linear-gradient(180deg, #fff 0%, var(--ice2) 45%, #7fcff5 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 30px rgba(139, 224, 255, .25));
}
.tagline { font: 600 clamp(26px, 3.2vw, 40px)/1.1 var(--f-head); color: var(--ice); margin-top: 18px; }
.lead { color: var(--soft); max-width: 540px; margin-top: 16px; font-size: 17px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 14px;
  font-weight: 600; font-size: 15px; border: 1px solid var(--line); transition: transform .2s, box-shadow .2s, border-color .2s, background .2s;
}
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--ice); color: var(--bg0); border-color: var(--ice); box-shadow: 0 8px 30px -8px rgba(139, 224, 255, .6); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px -8px rgba(139, 224, 255, .8); }
.btn.ghost { background: var(--glass); }
.btn.ghost:hover { border-color: var(--ice); }

/* the live snowflake */
.flake-stage { position: relative; display: grid; justify-items: center; gap: 18px; }
.flake-stage .halo {
  position: absolute; top: 50%; left: 50%; width: 120%; aspect-ratio: 1; transform: translate(-50%, -58%);
  background: radial-gradient(circle, rgba(139, 224, 255, .22), rgba(139, 224, 255, .06) 40%, transparent 68%);
  pointer-events: none;
}
.hexring { position: absolute; top: 0; width: min(100%, 420px); aspect-ratio: 1; fill: none; stroke: rgba(139, 224, 255, .13); stroke-width: .6; stroke-dasharray: 2 3; animation: spin 240s linear infinite reverse; }
.hexring polygon + polygon { stroke-dasharray: none; stroke: rgba(139, 224, 255, .07); }
#flake { position: relative; width: min(100%, 420px) !important; height: auto !important; aspect-ratio: 1; filter: drop-shadow(0 0 14px rgba(139, 224, 255, .55)) drop-shadow(0 0 40px rgba(139, 224, 255, .25)); animation: spin 180s linear infinite; }
#flake.grow { animation: grow 1.1s cubic-bezier(.2, .8, .2, 1), spin 180s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes grow { from { transform: scale(.35) rotate(-40deg); opacity: 0; filter: blur(6px) drop-shadow(0 0 14px rgba(139, 224, 255, .55)); } }

/* ---------- sections ---------- */
.block { padding: 56px 0 24px; scroll-margin-top: 60px; }
.label { font: 700 12.5px var(--f-mono); letter-spacing: .24em; text-transform: uppercase; color: var(--ice); display: flex; align-items: center; gap: 12px; }
.block-title { font: 700 clamp(34px, 4.4vw, 52px)/1 var(--f-head); margin-top: 12px; }
.block-sub { color: var(--soft); margin-top: 12px; max-width: 720px; }

/* channels */
.links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 26px; }
.link {
  position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: 20px 22px; border-radius: 20px; background: var(--glass); border: 1px solid var(--line);
  transition: transform .25s, border-color .25s, background .25s;
}
/* frost sheen sweeping over on hover */
.link::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-110%);
  background: linear-gradient(105deg, transparent 35%, rgba(var(--frost), .09) 50%, transparent 65%);
  transition: transform .7s;
}
.link:hover { transform: translateY(-3px); border-color: rgba(139, 224, 255, .45); background: rgba(139, 224, 255, .07); }
.link:hover::after { transform: translateX(110%); }
.ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: var(--ice); background: radial-gradient(circle at 30% 20%, #12304d, #091627); border: 1px solid var(--line); }
.ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tx { display: grid; gap: 2px; font-size: 14.5px; color: var(--soft); line-height: 1.45; }
.tx b { font: 700 22px/1.1 var(--f-head); color: var(--text); letter-spacing: .01em; display: flex; align-items: center; gap: 8px; }
.tx small { font: 500 12px var(--f-mono); color: var(--ice); margin-bottom: 4px; }
.tx em { font: 700 10.5px var(--f-mono); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--bg0); background: var(--ice); border-radius: 6px; padding: 2px 7px; }
.go { font-size: 20px; color: var(--muted); transition: color .25s, transform .25s; }
.link:hover .go { color: var(--ice); transform: translate(2px, -2px); }
.link.soon { opacity: .62; }
.link.soon:hover { transform: none; }

/* news */
.live { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; padding: 3px 10px 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); letter-spacing: .08em; text-transform: none; font-weight: 500; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #6dffc9; box-shadow: 0 0 0 0 rgba(109, 255, 201, .6); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(109, 255, 201, 0); } 100% { box-shadow: 0 0 0 0 rgba(109, 255, 201, 0); } }
.news { list-style: none; padding: 0; margin-top: 26px; border-radius: 20px; border: 1px solid var(--line); background: rgba(5, 12, 23, .55); backdrop-filter: blur(4px); overflow: hidden; counter-reset: n; }
.news li { border-top: 1px solid rgba(139, 224, 255, .08); }
.news li:first-child { border-top: 0; }
.news a { display: grid; grid-template-columns: 34px 1fr auto; gap: 4px 16px; align-items: baseline; padding: 18px 22px; transition: background .2s; }
.news a:hover { background: rgba(139, 224, 255, .055); }
.news a:hover .t { color: #fff; }
.news .n { font: 700 13px var(--f-mono); color: rgba(139, 224, 255, .45); grid-row: span 2; }
.news .t { font-weight: 600; font-size: 16.5px; line-height: 1.35; color: var(--text); transition: color .2s; }
.news .when { font: 500 12px var(--f-mono); color: var(--muted); white-space: nowrap; }
.news .m { grid-column: 2 / 4; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.kind { font: 700 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; border: 1px solid currentColor; }
.k-article { color: #8be0ff; } .k-model { color: #6dffc9; } .k-paper { color: #c9b4ff; } .k-code { color: #b4c6d8; } .k-discussion { color: #ffb37a; }
.news .skel { height: 78px; background: linear-gradient(90deg, transparent, rgba(139, 224, 255, .05), transparent) 0 0/200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.news .err { padding: 22px; color: var(--muted); font-size: 14px; }
.btn.wide { width: 100%; justify-content: center; margin-top: 14px; padding: 16px; background: var(--glass); font-size: 16px; }
.btn.wide:hover { border-color: var(--ice); background: rgba(139, 224, 255, .08); }
.btn.wide .count { font: 500 12.5px var(--f-mono); color: var(--ice); }

/* formats */
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 26px; }
.fmt { padding: 20px 20px 22px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass); display: grid; align-content: start; gap: 8px; }
.fmt header { display: flex; justify-content: space-between; align-items: center; min-height: 20px; }
.fmt .tag { font: 700 10.5px var(--f-mono); letter-spacing: .16em; color: var(--ice); text-transform: uppercase; }
.fmt .badge { font: 700 10.5px var(--f-mono); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: var(--bg0); background: var(--ice); border-radius: 6px; padding: 2px 7px; }
.fmt h3 { font: 700 26px/1.05 var(--f-head); margin-top: 6px; }
.fmt p { font-size: 14px; color: var(--soft); line-height: 1.5; }
.fmt.later { border-style: dashed; opacity: .75; }
a.fmt { transition: transform .25s, border-color .25s, background .25s; }
a.fmt:hover { transform: translateY(-3px); border-color: rgba(139, 224, 255, .45); background: rgba(139, 224, 255, .07); }
a.fmt:hover .go { color: var(--ice); transform: translate(2px, -2px); }
.fmt .go { font-size: 18px; line-height: 1; }

/* blog: the newest posts, as cards like the formats (same frozen rim on hover, bytes.js) */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.posts .fmt { gap: 10px; }
.posts .fmt h3 { font-size: 25px; line-height: 1.08; text-wrap: balance; }
.posts .fmt time { font: 500 12px var(--f-mono); color: var(--muted); }
.posts .fmt p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#blog .btn.wide { margin-top: 14px; }

/* footer */
.foot { max-width: 1120px; margin: 70px auto 0; padding: 0 clamp(18px, 4vw, 48px) 28px; overflow: hidden; }
.foot-word {
  font: 800 clamp(90px, 20vw, 250px)/.8 var(--f-head); text-align: center; letter-spacing: -.01em;
  background: linear-gradient(180deg, rgba(139, 224, 255, .16), rgba(139, 224, 255, 0) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none;
}
.foot-row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; }
.foot-row a:hover { color: var(--ice); }
.grow { flex: 1; }

/* channels and blog cards side by side only where the cards stay wide enough */
@media (max-width: 1000px) {
  .posts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .links, .posts { grid-template-columns: 1fr; }
}

/* ---------- small screens: link-in-bio first ---------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 10px; gap: 8px; text-align: center; }
  .flake-stage { order: -1; }
  #flake, .hexring { width: min(52vw, 220px) !important; }
  .flake-stage { gap: 10px; }
  .word { margin-top: 12px; }
  .eyebrow { justify-content: center; }
  .lead { margin-inline: auto; }
  .cta { justify-content: center; }
  .block { padding-top: 44px; }
  .news a { grid-template-columns: 1fr auto; padding: 16px 18px; }
  .news .n { display: none; }
  .news .m { grid-column: 1 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
