@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400;1,9..40,600&display=swap');

:root {
  --void: #060609;
  --charcoal: #0f1118;
  --surface: #151822;
  --elevated: #1c2130;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e8eaf0;
  --muted: #9aa3b8;
  --accent: #7cf5c6;
  --accent-dim: #4ad0a3;
  --accent-glow: rgba(124, 245, 198, 0.22);
  --hot: #ff5c6c;
  --radius: 12px;
  --radius-lg: 20px;
  --header-h: 4rem;
  --max: 68rem;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--void);
  background-image:
    radial-gradient(ellipse 120% 70% at 80% -20%, var(--accent-glow), transparent 50%),
    radial-gradient(ellipse 80% 50% at 0% 100%, rgba(255, 92, 108, 0.07), transparent 45%),
    linear-gradient(180deg, var(--charcoal) 0%, var(--void) 42%);
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #9ff7d6;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--void);
  font-weight: 600;
  z-index: 1000;
  border-radius: var(--radius);
}

.skip-link:focus {
  left: 0.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 6, 9, 0.82);
  backdrop-filter: blur(14px);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.brand:hover {
  opacity: 0.9;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-accent {
  color: var(--accent);
  font-style: italic;
}

.nav-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-label {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  padding: 0 0.55rem;
}

.nav-toggle-label span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.4rem;
}

.site-nav a {
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--elevated);
  border-color: var(--border-strong);
}

.site-nav a[aria-current="page"] {
  color: var(--void);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}

@media (max-width: 820px) {
  .nav-toggle-label {
    display: flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.25rem;
    background: rgba(15, 17, 24, 0.97);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.35s ease, opacity 0.2s ease, visibility 0.2s;
  }

  .nav-toggle-input:checked ~ .site-nav {
    max-height: 24rem;
    opacity: 1;
    visibility: visible;
  }

  .site-header {
    position: relative;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .site-nav a {
    text-align: center;
    border-radius: var(--radius);
  }
}

.age-banner {
  margin: 0;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--void);
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, var(--accent-dim), var(--accent), var(--accent-dim));
}

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 4.5rem;
}

.home-layout {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 960px) {
  .home-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
    gap: 3rem;
  }
}

.home-hero-panel {
  position: relative;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background:
    linear-gradient(145deg, rgba(28, 33, 48, 0.92), rgba(15, 17, 24, 0.6)),
    radial-gradient(80% 60% at 100% 0%, var(--accent-glow), transparent);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.home-hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent 40%, rgba(124, 245, 198, 0.04) 100%);
  pointer-events: none;
}

.home-hero-panel > * {
  position: relative;
}

.mesh-deco {
  position: absolute;
  inset: -20% -10% auto auto;
  width: min(42vw, 280px);
  aspect-ratio: 1;
  background: repeating-linear-gradient(
    -18deg,
    transparent,
    transparent 8px,
    rgba(124, 245, 198, 0.06) 8px,
    rgba(124, 245, 198, 0.06) 9px
  );
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  opacity: 0.5;
  pointer-events: none;
}

.page-hero {
  margin-bottom: 2rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 5.4vw, 3.65rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 1rem;
  max-width: 20ch;
}

.home-hero-panel .page-hero h1 {
  max-width: none;
}

.eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--hot);
  margin-bottom: 0.85rem;
}

.lead {
  margin: 0;
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 48ch;
}

.prose {
  background: rgba(21, 24, 34, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.prose > *:first-child {
  margin-top: 0;
}

.prose > *:last-child {
  margin-bottom: 0;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  font-weight: 400;
  margin: 2rem 0 0.65rem;
  letter-spacing: -0.02em;
}

.prose h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.35rem 0 0.45rem;
}

.prose p,
.prose li {
  color: #b4bcc8;
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.callout {
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 92, 108, 0.35);
  background: rgba(255, 92, 108, 0.08);
}

.callout p {
  margin: 0;
  color: var(--text);
}

.hub-intro {
  margin-bottom: 1.75rem;
}

.hub-intro p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 52ch;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1rem;
}

.hub-card {
  display: flex;
  flex-direction: column;
  padding: 1.35rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, var(--surface), var(--charcoal));
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  min-height: 8.5rem;
}

.hub-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--accent-glow);
}

.hub-card h2 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 400;
  margin: 0 0 0.45rem;
}

.hub-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  flex-grow: 1;
}

.hub-card .hub-arrow {
  margin-top: 1.1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.92rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}

.prose th,
.prose td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.85rem;
  text-align: left;
}

.prose th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--elevated);
  color: var(--accent);
}

.site-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.site-footer nav a {
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-footer nav a:hover {
  color: var(--accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.code-inline {
  font-family: ui-monospace, monospace;
  font-size: 0.88em;
  background: var(--void);
  padding: 0.12em 0.35em;
  border-radius: 4px;
  border: 1px solid var(--border);
}
