/* ─────────────────────────────────────────────────────────────
   Summer Ocean Breeze — Real-Time WebSocket Engineering
   ───────────────────────────────────────────────────────────── */

/* ── Variables ────────────────────────────────────────────── */
:root {
  /* Palette */
  --crimson:        #C41E3A;
  --crimson-dark:   #9B1530;
  --crimson-light:  #E8274F;
  --ocean-blue:     #1565C0;
  --ocean-blue-light: #1E88E5;
  --aqua:           #00ACC1;
  --aqua-light:     #26C6DA;
  --foam:           #F0F8FF;
  --snow:           #FAFEFF;
  --midnight:       #0D1B3E;
  --midnight-light: #1A2F5A;
  --slate:          #334155;
  --slate-light:    #64748B;
  --border:         #CBD5E1;
  --border-light:   #E2E8F0;
  --code-bg:        #F1F5F9;
  --code-border:    #CBD5E1;

  /* Spacing */
  --header-height:  68px;
  --max-width:      1300px;
  --content-width:  1100px;
  --gap:            1.5rem;
  --gap-lg:         2.5rem;

  /* Typography */
  --font-sans:   'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:   'Fira Code', 'Cascadia Code', 'JetBrains Mono', 'Consolas', monospace;
  --radius:      8px;
  --radius-lg:   14px;
  --shadow:      0 1px 3px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg:   0 4px 16px rgba(0,0,0,.15), 0 8px 32px rgba(0,0,0,.10);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--snow);
  color: var(--slate);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main#main-content { flex: 1; }

img, svg { display: block; max-width: 100%; }

a {
  color: var(--ocean-blue);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color .2s, text-decoration-color .2s;
}
a:hover {
  color: var(--crimson);
  text-decoration-color: var(--crimson);
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--midnight);
  line-height: 1.25;
}

h1 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 2.2vw, 2rem); margin-top: 2.8rem; padding-bottom: .4rem; border-bottom: 2px solid var(--border-light); }
h3 { font-size: clamp(1.1rem, 1.6vw, 1.45rem); margin-top: 2rem; color: var(--midnight-light); }
h4 { font-size: 1.1rem; margin-top: 1.6rem; color: var(--slate); }

.article-content > h1:first-child,
.article-content h1 {
  background: linear-gradient(135deg, var(--midnight) 0%, var(--ocean-blue) 60%, var(--aqua) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.8rem;
  padding-bottom: .5rem;
  border-bottom: 3px solid var(--aqua);
}

h2 { color: var(--midnight-light); }

p { margin-bottom: 1.1rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
li { margin-bottom: .35rem; }
li > ul, li > ol { margin-top: .35rem; margin-bottom: .35rem; }

strong { color: var(--midnight); font-weight: 600; }

hr { border: none; border-top: 2px solid var(--border-light); margin: 2.5rem 0; }

/* Inline code */
:not(pre) > code {
  font-family: var(--font-mono);
  font-size: .875em;
  background: var(--code-bg);
  color: var(--crimson-dark);
  padding: .15em .4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ── Layout containers ────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.content-wrapper {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--gap-lg) var(--gap);
}

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--midnight);
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
  height: var(--header-height);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.header-logo svg { transition: transform .25s; }
.header-logo:hover svg { transform: scale(1.08); }

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

.logo-primary {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--aqua);
  letter-spacing: -.02em;
}

.logo-secondary {
  font-size: .72rem;
  color: rgba(255,255,255,.65);
  font-weight: 500;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .9rem;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 600;
  color: rgba(255,255,255,.82);
  text-decoration: none;
  transition: background .2s, color .2s, transform .15s;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  background: rgba(255,255,255,.1);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.nav-link--backend:hover   { color: var(--crimson-light); }
.nav-link--frontend:hover  { color: var(--aqua-light); }
.nav-link--protocol:hover  { color: var(--ocean-blue-light); }

.nav-link svg { flex-shrink: 0; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb-nav {
  margin-bottom: 1.5rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem;
  list-style: none;
  padding: .6rem 0;
  font-size: .82rem;
}

.breadcrumb__item { display: flex; align-items: center; gap: .25rem; }

.breadcrumb__item a {
  color: var(--slate-light);
  text-decoration: none;
  transition: color .2s;
}
.breadcrumb__item a:hover { color: var(--ocean-blue); text-decoration: underline; }

.breadcrumb__item--current span { color: var(--midnight); font-weight: 600; }

.breadcrumb__sep { color: var(--border); font-size: .8rem; }

/* ── Article content ─────────────────────────────────────── */
.article-content {
  color: var(--slate);
}

.article-content h1 { scroll-margin-top: calc(var(--header-height) + 1rem); }
.article-content h2 { scroll-margin-top: calc(var(--header-height) + 1rem); }
.article-content h3 { scroll-margin-top: calc(var(--header-height) + 1rem); }
.article-content h4 { scroll-margin-top: calc(var(--header-height) + 1rem); }

.article-content a { color: var(--ocean-blue); }
.article-content a:hover { color: var(--crimson); }

/* Blockquote */
.article-content blockquote {
  border-left: 4px solid var(--aqua);
  background: var(--foam);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--midnight-light);
  font-style: italic;
}

/* ── Tables ───────────────────────────────────────────────── */
.article-content table, table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  margin: 1.5rem 0;
}

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}

.article-content table {
  width: 100%;
  display: table;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* Responsive table wrapper */
.table-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 1.5rem 0;
}
.table-scroll-wrapper table {
  border: none;
  border-radius: 0;
  margin: 0;
  width: 100%;
  min-width: 480px;
}

th {
  background: var(--midnight);
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: .75rem 1rem;
  font-size: .85rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}

td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--foam); }
tr:hover td { background: rgba(0,172,193,.07); }

/* Heading anchor links */
.heading-anchor {
  opacity: 0;
  margin-left: .4rem;
  font-size: .75em;
  color: var(--aqua);
  text-decoration: none;
  transition: opacity .2s;
  vertical-align: middle;
}

.article-content h1:hover .heading-anchor,
.article-content h2:hover .heading-anchor,
.article-content h3:hover .heading-anchor,
.article-content h4:hover .heading-anchor { opacity: 1; }

/* Responsive table fix — override display:block for inner elements */
.article-content table thead,
.article-content table tbody,
.article-content table tr { display: table; width: 100%; table-layout: auto; }

/* ── Code blocks ──────────────────────────────────────────── */
pre[class*="language-"] {
  position: relative;
  background: var(--code-bg) !important;
  border: 1px solid var(--code-border);
  border-radius: var(--radius-lg);
  padding: 2.4rem 1.2rem 1.2rem 1.2rem; /* top padding makes room for badge row */
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .82rem;
  line-height: 1.65;
  margin: 1.25rem 0 1.75rem;
  box-shadow: var(--shadow);
  tab-size: 2;
}

code[class*="language-"] {
  font-family: var(--font-mono);
  font-size: inherit;
  background: transparent !important;
  color: var(--midnight);
  padding: 0;
  border: none;
}

/* Language badge — top LEFT of code block */
pre[class*="language-"]::before {
  content: attr(data-lang);
  position: absolute;
  top: .55rem;
  left: .75rem;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--slate-light);
  background: var(--border-light);
  padding: .15rem .5rem;
  border-radius: 4px;
  pointer-events: none;
  line-height: 1.5;
}

/* Copy button */
.copy-btn {
  position: absolute;
  top: .55rem;
  right: .55rem;
  background: var(--midnight);
  color: rgba(255,255,255,.8);
  border: none;
  border-radius: 6px;
  padding: .3rem .6rem;
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
  letter-spacing: .03em;
  z-index: 2;
}

.copy-btn:hover { background: var(--ocean-blue); color: #fff; transform: scale(1.05); }
.copy-btn.copied { background: var(--aqua); color: #fff; }

/* ── Custom Prism Theme — Summer Ocean Breeze Light ──────── */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata           { color: #7B8D9E; font-style: italic; }
.token.punctuation     { color: #5A6B7C; }
.token.namespace       { opacity: .7; }
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted         { color: #8040A0; }
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted        { color: #0E7B56; }
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string   { color: var(--crimson); }
.token.atrule,
.token.attr-value,
.token.keyword         { color: var(--crimson-dark); font-weight: 600; }
.token.function,
.token.class-name      { color: var(--ocean-blue); font-weight: 600; }
.token.regex,
.token.important,
.token.variable        { color: #D17A00; }
.token.important,
.token.bold            { font-weight: bold; }
.token.italic          { font-style: italic; }

/* ── Task lists / checkboxes ─────────────────────────────── */
.task-list-item {
  list-style: none;
  margin-left: -1.5rem;
  padding-left: 1.75rem;
  position: relative;
}

.task-list-item input[type="checkbox"] {
  position: absolute;
  left: 0;
  top: .3em;
  width: 1rem;
  height: 1rem;
  accent-color: var(--crimson);
  cursor: pointer;
}

/* ── FAQ Accordions ───────────────────────────────────────── */
details.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .75rem;
  overflow: hidden;
  transition: box-shadow .2s;
}

details.faq-item:hover { box-shadow: var(--shadow); }
details.faq-item[open] { border-color: var(--aqua); box-shadow: 0 0 0 2px rgba(0,172,193,.15); }

summary.faq-question {
  padding: 1rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--midnight);
  background: var(--foam);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background .2s;
  user-select: none;
}

summary.faq-question:hover { background: rgba(0,172,193,.08); }
summary.faq-question::-webkit-details-marker { display: none; }

summary.faq-question::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--aqua);
  font-weight: 300;
  flex-shrink: 0;
  transition: transform .25s;
}
details.faq-item[open] summary.faq-question::after { content: "−"; transform: rotate(0); }

.faq-answer {
  padding: 1rem 1.2rem;
  background: #fff;
  border-top: 1px solid var(--border-light);
  animation: fadeIn .2s ease;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ── Homepage ─────────────────────────────────────────────── */
.homepage { }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--midnight) 0%, var(--midnight-light) 40%, #1a3a6b 70%, #154870 100%);
  color: #fff;
  padding: 5rem var(--gap) 4.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 50%, rgba(0,172,193,.18) 0%, transparent 70%),
              radial-gradient(ellipse 50% 50% at 20% 80%, rgba(196,30,58,.12) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--aqua);
  background: rgba(0,172,193,.12);
  border: 1px solid rgba(0,172,193,.3);
  padding: .3rem .85rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 1.5rem;
  color: #fff;
  background: none;
  -webkit-text-fill-color: unset;
  -webkit-background-clip: unset;
  background-clip: unset;
  border-bottom: none;
}

.hero h1 span { color: var(--aqua); }

.hero-desc {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: rgba(255,255,255,.8);
  max-width: 720px;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.hero-text-block {
  max-width: 760px;
  margin-bottom: 2.5rem;
}

.hero-text-block p {
  color: rgba(255,255,255,.72);
  font-size: .97rem;
  margin-bottom: .75rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .8rem 1.6rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, background .2s;
  cursor: pointer;
  white-space: nowrap;
}

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

.btn--crimson {
  background: var(--crimson);
  color: #fff;
  box-shadow: 0 4px 15px rgba(196,30,58,.35);
}
.btn--crimson:hover { background: var(--crimson-light); color: #fff; box-shadow: 0 6px 20px rgba(196,30,58,.45); }

.btn--blue {
  background: var(--ocean-blue);
  color: #fff;
  box-shadow: 0 4px 15px rgba(21,101,192,.3);
}
.btn--blue:hover { background: var(--ocean-blue-light); color: #fff; box-shadow: 0 6px 20px rgba(21,101,192,.4); }

.btn--aqua {
  background: var(--aqua);
  color: var(--midnight);
  box-shadow: 0 4px 15px rgba(0,172,193,.3);
}
.btn--aqua:hover { background: var(--aqua-light); color: var(--midnight); box-shadow: 0 6px 20px rgba(0,172,193,.4); }

.btn--ghost {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.3);
}
.btn--ghost:hover { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.6); }

/* Category section */
.categories-section {
  padding: 4rem var(--gap);
  background: var(--foam);
}

.categories-section .container { }

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-header h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  border: none;
  margin: 0 0 .6rem;
}
.section-header p { color: var(--slate-light); font-size: 1rem; }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 2rem;
  color: inherit;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative; /* needed for stretched-link */
}

.category-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

/* Main card heading link — stretched to cover the whole card */
.card-main-link {
  color: var(--midnight);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  display: block;
}

.card-main-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  z-index: 0;
}

.card-main-link:hover { color: var(--ocean-blue); text-decoration: none; }

/* Sub-links and CTA must sit above the stretched overlay */
.card-links,
.card-cta {
  position: relative;
  z-index: 1;
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon--crimson { background: rgba(196,30,58,.1); color: var(--crimson); }
.card-icon--blue    { background: rgba(21,101,192,.1); color: var(--ocean-blue); }
.card-icon--aqua    { background: rgba(0,172,193,.1);  color: var(--aqua); }

.card-icon svg { width: 26px; height: 26px; }

/* h3 inside cards just wraps the link — strip default heading spacing */
.category-card h3 {
  margin: 0;
  line-height: 1.3;
  border: none;
}

.category-card p {
  color: var(--slate-light);
  font-size: .92rem;
  line-height: 1.6;
  margin: 0;
}

.card-links {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.card-links li a {
  font-size: .85rem;
  color: var(--ocean-blue);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.card-links li a::before { content: "→"; color: var(--slate-light); font-size: .75rem; }
.card-links li a:hover { color: var(--crimson); text-decoration: underline; }

.card-cta {
  margin-top: auto;
  font-size: .88rem;
  font-weight: 700;
  color: var(--ocean-blue);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  text-decoration: none;
  transition: color .2s;
}
.category-card:hover .card-cta { color: var(--crimson); }
.card-cta:hover { color: var(--crimson); text-decoration: none; }

/* Featured articles */
.featured-section {
  padding: 4rem var(--gap);
  background: #fff;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.article-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  background: var(--foam);
}

.article-card:hover {
  border-color: var(--aqua);
  box-shadow: 0 4px 16px rgba(0,172,193,.15);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.article-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .2rem .6rem;
  border-radius: 100px;
  background: rgba(0,172,193,.1);
  color: var(--aqua);
}

.article-card h4 { font-size: 1rem; margin: 0; color: var(--midnight); }
.article-card p { font-size: .85rem; color: var(--slate-light); margin: 0; line-height: 1.5; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--midnight);
  color: rgba(255,255,255,.7);
  padding: 3.5rem var(--gap) 1.5rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-tagline {
  font-size: .82rem;
  color: rgba(255,255,255,.5);
  line-height: 1.5;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-nav-heading {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--aqua);
  margin-bottom: .85rem;
}

.footer-nav ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .45rem; }

.footer-nav a {
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color .2s;
}
.footer-nav a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.25rem;
  font-size: .78rem;
  color: rgba(255,255,255,.35);
  text-align: center;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --content-width: 100%; }
  .categories-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-nav { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --header-height: 60px; }

  .header-logo-text .logo-secondary { display: none; }

  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--midnight);
    flex-direction: column;
    align-items: stretch;
    padding: .75rem var(--gap) 1.25rem;
    gap: .25rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    border-top: 1px solid rgba(255,255,255,.08);
  }

  .site-nav.is-open { display: flex; }

  .nav-link {
    padding: .75rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius);
  }

  .site-header { position: sticky; }

  .hero { padding: 3rem var(--gap) 2.5rem; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; justify-content: center; }

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

  .footer-nav { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-inner { gap: 2rem; }

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

@media (max-width: 480px) {
  .content-wrapper { padding: 1.25rem 1rem; }
  h2 { margin-top: 2rem; }
}

/* ── Utility ──────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

