:root {
  --bg-canvas: #090c11;
  --bg-elevated: #11161f;
  --bg-card: #151b26;
  --bg-card-hover: #1b2332;
  --bg-code: #07090d;
  --border-subtle: #242c3b;
  --border-bright: #3a465e;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-blue: #3d9ee5;
  --accent-cyan: #72cbeb;
  --accent-violet: #dcadd7;
  --accent-green: #a3d246;
  --accent-gold: #f3b202;
  --glow-blue: rgba(61, 158, 229, 0.28);
  --glow-violet: rgba(220, 173, 215, 0.22);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(61, 158, 229, 0.14), transparent 70%),
    radial-gradient(ellipse 55% 40% at 85% 15%, rgba(220, 173, 215, 0.09), transparent 65%);
}

a {
  color: inherit;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 12, 17, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.18s ease;
}

.nav-links a:hover {
  color: var(--text-main);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(61, 158, 229, 0.12);
  border: 1px solid rgba(61, 158, 229, 0.35);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.38rem 0.75rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.lang-toggle:hover {
  background: rgba(61, 158, 229, 0.24);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

.lang-toggle .active-lang {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.header-gh {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 7px;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.header-gh:hover {
  border-color: var(--border-bright);
  background: var(--bg-card-hover);
}

/* Hero */
.hero {
  padding: 4.25rem 0 3.5rem;
  text-align: center;
}

.release-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.36rem 0.95rem;
  border-radius: 999px;
  background: rgba(163, 210, 70, 0.1);
  border: 1px solid rgba(163, 210, 70, 0.32);
  color: #d9f99d;
  font-size: 0.83rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s, background 0.2s;
}

.release-pill:hover {
  background: rgba(163, 210, 70, 0.18);
  border-color: var(--accent-green);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
}

.hero h1 {
  font-size: clamp(2.35rem, 5vw, 3.85rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  max-width: 880px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(180deg, #ffffff 35%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1.02rem, 1.8vw, 1.22rem);
  color: var(--text-muted);
  max-width: 730px;
  margin: 0 auto 2rem;
}

.hero-specs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2.25rem;
}

.spec-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
}

.hero-cta-group {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.55rem;
  border-radius: 10px;
  font-size: 0.96rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-win {
  background: linear-gradient(135deg, #3d9ee5, #2563eb);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(61, 158, 229, 0.32);
}

.btn-win:hover {
  box-shadow: 0 12px 30px rgba(61, 158, 229, 0.45);
}

.btn-linux {
  background: linear-gradient(135deg, #273244, #19212e);
  border-color: rgba(220, 173, 215, 0.45);
  color: #f8fafc;
  box-shadow: 0 8px 24px rgba(220, 173, 215, 0.14);
}

.btn-linux:hover {
  border-color: var(--accent-violet);
  box-shadow: 0 12px 28px rgba(220, 173, 215, 0.24);
}

.btn-ghost {
  background: var(--bg-card);
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

.btn-ghost:hover {
  border-color: var(--border-bright);
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.btn-highlight {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

.hero-subnote {
  font-size: 0.84rem;
  color: var(--text-dim);
  margin-bottom: 2.75rem;
}

.hero-subnote a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.hero-subnote a:hover {
  text-decoration: underline;
}

/* Showcase Frame */
.showcase-frame {
  position: relative;
  background: linear-gradient(160deg, rgba(61, 158, 229, 0.22), rgba(220, 173, 215, 0.16), rgba(36, 44, 59, 0.5));
  padding: 1px;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65), 0 0 60px rgba(61, 158, 229, 0.12);
}

.showcase-inner {
  background: #0b0e14;
  border-radius: calc(var(--radius-lg) - 1px);
  padding: 0.85rem;
}

.showcase-inner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.showcase-caption {
  margin-top: 0.85rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 0.35rem;
}

/* Sections */
.section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--border-subtle);
}

.section-head {
  margin-bottom: 2.25rem;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  margin-bottom: 0.55rem;
}

.section-head h2 {
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.6rem;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 720px;
}

/* Download Section */
.release-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.35rem;
  margin-bottom: 1.75rem;
}

.release-meta-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.version-tag {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: #090c11;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  padding: 0.25rem 0.7rem;
  border-radius: 6px;
}

.release-date {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.release-meta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
}

.release-meta-links a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
}

.release-meta-links a:hover {
  text-decoration: underline;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.os-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.os-card.recommended {
  border-color: rgba(163, 210, 70, 0.55);
  box-shadow: 0 0 0 1px rgba(163, 210, 70, 0.2), 0 18px 40px rgba(0, 0, 0, 0.35);
}

.os-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.os-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.os-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(61, 158, 229, 0.12);
  border: 1px solid rgba(61, 158, 229, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.os-card-linux .os-icon {
  background: rgba(220, 173, 215, 0.12);
  border-color: rgba(220, 173, 215, 0.28);
  color: var(--accent-violet);
}

.os-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.os-arch {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.rec-badge {
  display: none;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #090c11;
  background: var(--accent-green);
  padding: 0.24rem 0.55rem;
  border-radius: 5px;
  white-space: nowrap;
}

.os-card.recommended .rec-badge {
  display: inline-block;
}

.os-desc {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.dl-primary-btn {
  width: 100%;
  justify-content: space-between;
  padding: 0.95rem 1.2rem;
}

.dl-btn-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.dl-btn-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.9;
}

.dl-alt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.dl-alt-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.dl-alt-link:hover {
  border-color: var(--accent-cyan);
  color: #ffffff;
}

.install-snippet {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #e2e8f0;
  position: relative;
}

.install-snippet pre {
  overflow-x: auto;
  padding-right: 4rem;
  line-height: 1.55;
}

.copy-btn {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.28rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  color: #ffffff;
  border-color: var(--border-bright);
}

.os-notes {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: grid;
  gap: 0.35rem;
}

.os-notes li::before {
  content: "› ";
  color: var(--accent-cyan);
  font-weight: 700;
}

.os-notes code {
  font-family: var(--font-mono);
  font-size: 0.8em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  color: #e2e8f0;
}

/* Feature Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  transition: border-color 0.2s ease;
}

.feature-card:hover {
  border-color: var(--border-bright);
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(61, 158, 229, 0.12);
  border: 1px solid rgba(61, 158, 229, 0.28);
  padding: 0.28rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 0.9rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.55rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* Chemical Families Interactive Explorer */
.families-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.families-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.family-chip {
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  color: var(--text-main);
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.family-chip:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-bright);
  transform: translateY(-1px);
}

.family-chip.active {
  background: var(--bg-card-hover);
  border-color: var(--fam-color, var(--accent-cyan));
  box-shadow: 0 0 0 1px var(--fam-color, var(--accent-cyan));
}

.fam-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--fam-color);
  box-shadow: 0 0 10px var(--fam-color);
  flex-shrink: 0;
}

.fam-chip-title {
  font-size: 0.93rem;
  font-weight: 700;
  display: block;
}

.fam-chip-range {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.family-inspector {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}

.inspector-top {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-bottom: 1.2rem;
}

.element-tile {
  width: 84px;
  height: 84px;
  border-radius: 12px;
  background: #0c1017;
  border: 2px solid var(--fam-color, var(--accent-violet));
  box-shadow: 0 0 24px rgba(61, 158, 229, 0.16);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.5rem 0.6rem;
  flex-shrink: 0;
}

.tile-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--fam-color, var(--accent-violet));
}

.tile-sym {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.tile-mass {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
}

.inspector-cat {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fam-color, var(--accent-violet));
  margin-bottom: 0.25rem;
}

.inspector-name {
  font-size: 1.3rem;
  font-weight: 800;
}

.inspector-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.telemetry-bars {
  display: grid;
  gap: 0.65rem;
}

.telemetry-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.bar-track {
  height: 8px;
  background: #0b0e14;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--fam-color, var(--accent-violet));
  transition: width 0.28s ease;
}

/* Story & Docs */
.origin-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.5rem;
}

.story-card,
.docs-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.85rem;
}

.story-card h3,
.docs-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.85rem;
}

.story-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.story-card p:last-child {
  margin-bottom: 0;
}

.docs-list {
  display: grid;
  gap: 0.8rem;
}

.doc-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.doc-link-item:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
}

.doc-link-title {
  font-weight: 700;
  font-size: 0.95rem;
  display: block;
}

.doc-link-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.doc-arrow {
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.75rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-legal {
  margin-top: 0.55rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 920px) {
  .download-grid,
  .features-grid,
  .families-layout,
  .origin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .nav-links {
    display: none;
  }

  .families-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }
}
