/* ============================================================
   ByteDepth — Computer Science Blog
   Shared Stylesheet  |  css/style.css
   All pages link to this one file.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=JetBrains+Mono:wght@300;400;500;700&family=Outfit:wght@300;400;500;600&display=swap');

/* ---------- CSS custom properties (design tokens) ---------- */
:root {
  --ink:       #0d0d0d;
  --paper:     #f5f1eb;
  --cream:     #ede8e0;
  --accent:    #c8402a;      /* red  */
  --accent2:   #2a6ac8;      /* blue */
  --muted:     #7a7264;
  --border:    #d5cfc5;
  --code-bg:   #1a1a2e;
  --code-text: #a8dadc;
  --white:     #ffffff;

  --serif: 'DM Serif Display', Georgia, serif;
  --mono:  'JetBrains Mono', 'Courier New', monospace;
  --sans:  'Outfit', sans-serif;

  --header-h: 72px;
  --radius:   4px;
  --shadow:   0 2px 20px rgba(0,0,0,0.09);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent2); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }

/* =================== UTILITIES =================== */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* pill label, e.g. "Algorithms" */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 3px 10px;
  border-radius: 2px;
}
.tag.light { background: var(--cream); color: var(--muted); }

/* buttons */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .05em;
  padding: 10px 22px;
  border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: all .2s;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: #a8321f; border-color: #a8321f; color: #fff; }

/* section wrapper */
.section { padding: 64px 0; }

/* section heading row */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 36px;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 16px;
  gap: 16px;
}
.section-title { font-family: var(--serif); font-size: 28px; }
.section-link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

/* page fade-in animation */
main { animation: fadeUp .35s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =================== HEADER =================== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--accent);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

/* logo */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 16px; color: #fff;
  flex-shrink: 0;
}
.logo-text { font-family: var(--serif); font-size: 22px; color: var(--paper); line-height: 1; }
.logo-text span { color: var(--accent); }

/* desktop nav */
#main-nav { display: flex; align-items: center; gap: 4px; }
#main-nav a {
  font-family: var(--mono);
  font-size: 13px;
  color: rgba(245,241,235,.75);
  padding: 8px 14px;
  border-radius: var(--radius);
  letter-spacing: .04em;
  transition: all .2s;
  text-decoration: none;
}
#main-nav a:hover,
#main-nav a.active { background: rgba(255,255,255,.08); color: var(--paper); }
#main-nav a.active  { border-bottom: 2px solid var(--accent); }

/* search box */
.header-search {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 6px 12px;
}
.header-search input {
  background: none; border: none; outline: none;
  color: var(--paper); font-family: var(--mono); font-size: 13px; width: 140px;
}
.header-search input::placeholder { color: rgba(245,241,235,.4); }
.header-search svg { color: rgba(245,241,235,.4); flex-shrink: 0; }

/* hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px; background: none; border: none;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--paper); border-radius: 2px; transition: all .3s; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* mobile drawer */
#mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h); left: 0; right: 0;
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 24px 28px;
  z-index: 99;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
#mobile-nav.open { display: flex; }
#mobile-nav a {
  font-family: var(--mono); font-size: 14px;
  color: rgba(245,241,235,.8);
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-decoration: none;
}
#mobile-nav a:hover { color: var(--accent); }

/* =================== FOOTER =================== */
#site-footer { background: var(--ink); color: var(--paper); margin-top: auto; }

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding: 56px 0 40px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.footer-brand p {
  color: rgba(245,241,235,.5);
  font-size: 14px; line-height: 1.65;
  margin-top: 14px; max-width: 260px;
}
.footer-col h4 {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(245,241,235,.4); margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { color: rgba(245,241,235,.65); font-size: 14px; text-decoration: none; transition: color .2s; }
.footer-col ul a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
  font-family: var(--mono); font-size: 11px;
  color: rgba(245,241,235,.3); flex-wrap: wrap; gap: 12px;
}

/* =================== TICKER =================== */
.ticker-bar {
  background: var(--accent); color: #fff;
  padding: 9px 0; overflow: hidden;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
}
.ticker-track {
  display: flex; gap: 48px;
  animation: ticker 28s linear infinite;
  white-space: nowrap; width: max-content;
}
.ticker-item::before { content: '◆  '; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =================== HERO (home) =================== */
.hero {
  background: var(--ink); color: var(--paper);
  padding: 80px 0 88px; position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(200,64,42,.10) 0%, transparent 70%),
    repeating-linear-gradient(0deg,  rgba(255,255,255,.015) 0px,  rgba(255,255,255,.015) 1px,  transparent 1px,  transparent 40px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.015) 0px,  rgba(255,255,255,.015) 1px,  transparent 1px,  transparent 40px);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 800px; }
.hero-eyebrow {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.hero-eyebrow::before { content:''; display:block; width:28px; height:1px; background:var(--accent); }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(38px,6vw,68px);
  line-height: 1.08; margin-bottom: 24px; letter-spacing: -.01em;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-desc {
  font-size: 18px; color: rgba(245,241,235,.7);
  max-width: 560px; margin-bottom: 36px; line-height: 1.65;
}
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn-ghost {
  display: inline-block; font-family: var(--mono); font-size: 13px;
  letter-spacing: .05em; padding: 10px 22px; border-radius: var(--radius);
  border: 1.5px solid rgba(245,241,235,.3); color: var(--paper);
  text-decoration: none; transition: all .2s;
}
.btn-ghost:hover { background: rgba(255,255,255,.08); color: var(--paper); }

/* =================== FEATURED GRID (home) =================== */
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px; background: var(--border);
  border: 1.5px solid var(--border);
}
.featured-card {
  background: var(--paper);
  padding: 36px; display: flex; flex-direction: column; gap: 14px;
  cursor: pointer; transition: background .2s;
  text-decoration: none; color: inherit;
}
.featured-card:hover { background: var(--cream); }

/* big left card */
.featured-card.large {
  grid-column: 1; grid-row: 1 / 3;
  justify-content: flex-end; min-height: 420px;
  background: var(--ink); color: var(--paper);
  padding: 40px; position: relative; overflow: hidden;
}
.featured-card.large:hover { background: #1a1a1a; }
.featured-card.large::before {
  content: '{  }';
  position: absolute; top: 24px; right: 28px;
  font-family: var(--mono); font-size: 48px; font-weight: 700;
  color: rgba(200,64,42,.15); pointer-events: none;
}
.featured-card.large .card-title { font-size: 26px; color: var(--paper); }
.featured-card.large .card-meta,
.featured-card.large .card-excerpt { color: rgba(245,241,235,.6); }
.featured-card.large .card-footer { border-top-color: rgba(255,255,255,.1); }

.card-title { font-family: var(--serif); font-size: 19px; line-height: 1.3; color: var(--ink); }
.card-meta {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  letter-spacing: .05em; display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.card-meta .sep { opacity: .4; }
.card-excerpt { font-size: 15px; color: var(--muted); line-height: 1.6; }
.card-footer {
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,.07);
  display: flex; align-items: center; justify-content: space-between;
}
.read-link {
  font-family: var(--mono); font-size: 12px; letter-spacing: .05em; color: var(--accent);
}
.read-link::after { content: ' →'; }

/* =================== POST CARD GRID =================== */
.posts-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }

.post-card {
  border: 1.5px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s, box-shadow .2s;
  background: var(--white); display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.post-card-img {
  height: 150px; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 26px; font-weight: 700;
  color: var(--code-text); position: relative; overflow: hidden; flex-shrink: 0;
}
.post-card-img .img-bg {
  position: absolute; inset: 0; opacity: .15;
  background: repeating-linear-gradient(45deg,transparent,transparent 8px,rgba(255,255,255,.05) 8px,rgba(255,255,255,.05) 16px);
}
.post-card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card-body .card-title { font-size: 16px; }
.post-card-body .card-excerpt { font-size: 14px; }
.post-card-body .read-link { margin-top: auto; padding-top: 12px; display: block; }

/* =================== SIDEBAR LAYOUT =================== */
.content-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px; align-items: start;
}
aside { position: sticky; top: calc(var(--header-h) + 24px); }

/* =================== SIDEBAR WIDGETS =================== */
.sidebar-widget {
  border: 1.5px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 28px; background: var(--white);
}
.widget-head {
  background: var(--ink); color: var(--paper);
  padding: 12px 20px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
}
.widget-body { padding: 20px; }

.topics-list { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--cream); border: 1px solid var(--border);
  border-radius: 2px; padding: 5px 12px;
  font-family: var(--mono); font-size: 12px; color: var(--ink);
  cursor: pointer; transition: all .18s; text-decoration: none;
}
.topic-chip:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.topic-count {
  background: var(--border); border-radius: 10px;
  padding: 1px 6px; font-size: 10px;
}
.topic-chip:hover .topic-count { background: rgba(255,255,255,.15); color: var(--paper); }

.recent-list { display: flex; flex-direction: column; gap: 16px; }
.recent-item { display: flex; gap: 14px; align-items: flex-start; }
.recent-num { font-family: var(--serif); font-size: 28px; color: var(--border); line-height: 1; flex-shrink: 0; width: 32px; }
.recent-title { font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--ink); display: block; text-decoration: none; }
.recent-title:hover { color: var(--accent); }
.recent-date { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 3px; }

.nl-form { display: flex; flex-direction: column; gap: 10px; }
.nl-form p { font-size: 14px; color: var(--muted); line-height: 1.5; }
.nl-form input {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--sans); font-size: 14px; background: var(--paper); outline: none;
  transition: border-color .2s;
}
.nl-form input:focus { border-color: var(--accent2); }
.nl-form .btn { width: 100%; text-align: center; }

/* =================== CODE BLOCKS =================== */
.code-block {
  background: var(--code-bg); border-radius: var(--radius);
  overflow: hidden; font-family: var(--mono); margin: 28px 0;
}
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.code-dots { display: flex; gap: 6px; }
.code-dots span { width: 12px; height: 12px; border-radius: 50%; background: #3a3a4a; }
.code-dots span:nth-child(1) { background: #ff5f56; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #27c93f; }
.code-lang { font-size: 11px; color: rgba(168,218,220,.5); letter-spacing: .06em; }
.code-body { padding: 20px; overflow-x: auto; }
.code-body code { font-size: 13px; color: var(--code-text); line-height: 1.8; white-space: pre; display: block; }
/* syntax colours */
.kw  { color: #c792ea; }   /* keyword  */
.fn  { color: #82aaff; }   /* function */
.str { color: #c3e88d; }   /* string   */
.cm  { color: #546e7a; }   /* comment  */
.num { color: #f78c6c; }   /* number   */

/* =================== ARTICLE HERO =================== */
.article-hero {
  background: var(--ink); color: var(--paper);
  padding: 56px 0 48px;
}
.article-meta-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.article-title {
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 52px);
  line-height: 1.1; margin-bottom: 20px;
}
.article-subtitle {
  font-size: 18px; color: rgba(245,241,235,.65);
  max-width: 640px; line-height: 1.6; margin-bottom: 28px;
}
.author-bar {
  display: flex; align-items: center; gap: 14px;
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1);
}
.author-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 18px; color: #fff; flex-shrink: 0;
}
.author-info .author-name { font-weight: 600; color: var(--paper); font-size: 14px; }
.author-info .author-date { color: rgba(245,241,235,.5); font-family: var(--mono); font-size: 12px; }
.read-time { margin-left: auto; font-family: var(--mono); font-size: 12px; color: rgba(245,241,235,.4); }

/* =================== ARTICLE BODY =================== */
.article-body { max-width: 720px; }
.article-body h2 {
  font-family: var(--serif); font-size: 28px;
  margin: 44px 0 16px; color: var(--ink);
  border-left: 4px solid var(--accent); padding-left: 14px;
}
.article-body h3 { font-family: var(--serif); font-size: 21px; margin: 32px 0 12px; }
.article-body p { margin-bottom: 20px; color: #2a2520; line-height: 1.75; }
.article-body ul,
.article-body ol { margin: 0 0 20px 24px; }
.article-body li { margin-bottom: 6px; color: #2a2520; }
.article-body blockquote {
  border-left: 4px solid var(--accent2); margin: 28px 0;
  padding: 16px 24px; background: var(--cream);
  border-radius: 0 4px 4px 0; font-style: italic; color: var(--muted);
}
.article-tags { margin-top: 48px; padding-top: 24px; border-top: 1.5px solid var(--border); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.article-tags strong { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; }

/* =================== PAGE HERO (inner pages) =================== */
.page-hero {
  background: var(--ink); color: var(--paper);
  padding: 48px 0 40px;
}
.page-hero-eyebrow {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.page-hero-eyebrow::before { content:''; display:block; width:28px; height:1px; background:var(--accent); }
.page-hero h1 { font-family: var(--serif); font-size: clamp(28px,4vw,44px); }
.page-hero p { font-size: 17px; color: rgba(245,241,235,.65); margin-top: 12px; max-width: 560px; }

/* =================== ABOUT PAGE =================== */
.about-split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: start; padding: 72px 0;
}
.about-visual { position: sticky; top: calc(var(--header-h) + 24px); }
.about-card {
  background: var(--ink); color: var(--paper);
  border-radius: 8px; padding: 40px; position: relative; overflow: hidden;
}
.about-card::after {
  content: 'CS'; position: absolute; bottom: -20px; right: -8px;
  font-family: var(--serif); font-size: 120px; color: rgba(200,64,42,.1);
  line-height: 1; font-style: italic; pointer-events: none;
}
.about-card h2 { font-family: var(--serif); font-size: 36px; margin-bottom: 12px; }
.about-card p  { color: rgba(245,241,235,.65); font-size: 15px; line-height: 1.65; }
.stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.stat-box { background: rgba(255,255,255,.06); border-radius: 4px; padding: 16px; text-align: center; }
.stat-num   { font-family: var(--serif); font-size: 32px; color: var(--accent); display: block; }
.stat-label { font-family: var(--mono); font-size: 11px; color: rgba(245,241,235,.4); letter-spacing: .08em; }
.about-content h2 { font-family: var(--serif); font-size: 32px; margin-bottom: 16px; }
.about-content p  { color: #2a2520; line-height: 1.75; margin-bottom: 18px; }

.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 36px; }
.team-card {
  border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 20px; background: var(--white); text-align: center;
}
.team-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 22px; color: #fff; font-style: italic;
}
.team-name { font-weight: 600; font-size: 15px; }
.team-role { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 3px; }

/* =================== TOPICS PAGE =================== */
.topic-hero-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.topic-hero-card {
  background: var(--ink); color: var(--paper); border-radius: var(--radius);
  padding: 32px 28px; display: flex; flex-direction: column; gap: 10px;
  text-decoration: none; transition: background .2s; position: relative; overflow: hidden;
}
.topic-hero-card:hover { background: #1a1a1a; color: var(--paper); }
.topic-hero-card::after {
  content: attr(data-icon);
  position: absolute; bottom: -10px; right: 10px;
  font-family: var(--mono); font-size: 52px; font-weight: 700;
  opacity: .1; pointer-events: none;
}
.topic-hero-card h3 { font-family: var(--serif); font-size: 22px; }
.topic-hero-card p  { font-size: 14px; color: rgba(245,241,235,.6); line-height: 1.5; }
.topic-count-label { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: .08em; margin-top: auto; }

/* =================== CONTACT PAGE =================== */
.contact-grid { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: start; padding: 64px 0; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form-group label { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--sans); font-size: 15px;
  background: var(--white); outline: none; transition: border-color .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent2); }
.form-group textarea { resize: vertical; }
.contact-info-box {
  background: var(--ink); color: var(--paper);
  border-radius: var(--radius); padding: 32px;
  position: sticky; top: calc(var(--header-h) + 24px);
}
.contact-info-box h3 { font-family: var(--serif); font-size: 22px; margin-bottom: 20px; }
.info-row { padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.info-row:last-child { border-bottom: none; }
.info-label { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--accent); margin-bottom: 4px; }
.info-value { font-size: 14px; color: rgba(245,241,235,.75); }

/* =================== PAGINATION =================== */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 40px 0 0; }
.pagination a,
.pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--mono); font-size: 13px; color: var(--ink); text-decoration: none;
  transition: all .18s;
}
.pagination a:hover,
.pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* =================== SCROLL-TO-TOP =================== */
#scroll-top {
  position: fixed; bottom: 28px; right: 28px;
  width: 44px; height: 44px;
  background: var(--ink); color: var(--paper);
  border: none; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  font-size: 18px; opacity: 0; pointer-events: none;
  transition: opacity .3s; z-index: 90;
}
#scroll-top.visible { opacity: 1; pointer-events: auto; }

/* =================== RESPONSIVE =================== */
@media (max-width: 960px) {
  .featured-grid { grid-template-columns: 1fr; }
  .featured-card.large { grid-row: auto; min-height: 280px; }
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .content-sidebar { grid-template-columns: 1fr; }
  aside { position: static; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .about-split { grid-template-columns: 1fr; padding: 48px 0; }
  .about-visual { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-info-box { position: static; }
  .topic-hero-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  #main-nav, .header-search { display: none; }
  .hamburger { display: flex; }
  .posts-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 40px 0; }
  .team-grid { grid-template-columns: 1fr; }
  .topic-hero-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
}
