/* ===== Future Engineers — design tokens ===== */
:root {
  --red: #1BA3E0;
  --red-dark: #147AAD;
  --ink: #12151a;
  --ink-soft: #33383f;
  --paper: #ffffff;
  --paper-soft: #f4f5f7;
  --line: #e3e5e9;
  --muted: #6b7280;
  --shadow: 0 8px 24px rgba(0,0,0,.08);
  --radius: 10px;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --header-h: 64px;
}

[data-theme="dark"] {
  --ink: #f4f5f7;
  --ink-soft: #d1d5db;
  --paper: #14161a;
  --paper-soft: #1b1e24;
  --line: #2b2f37;
  --muted: #9aa1ac;
  --shadow: 0 8px 24px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--paper-soft);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  transition: background .2s ease, color .2s ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
button { font-family: inherit; cursor: pointer; }

/* ===== Top utility bar ===== */
.utility-bar {
  background: var(--ink);
  color: #cfd2d8;
  font-size: 12px;
}
.utility-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
}
.utility-bar .date { opacity: .8; }
.utility-bar .utility-links { display: flex; gap: 14px; align-items: center; }
.theme-toggle {
  background: none;
  border: 1px solid #454b55;
  color: #cfd2d8;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
}
.theme-toggle:hover { border-color: var(--red); color: #fff; }

/* ===== Masthead ===== */
.masthead {
  background: var(--paper);
  border-bottom: 3px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 50;
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img.logo { height: 40px; width: auto; border-radius: 6px; }
.brand .brand-text {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -.3px;
}
.brand .brand-text span { color: var(--red); }

.search-form { display: flex; align-items: center; flex: 1; max-width: 340px; }
.search-form input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper-soft);
  color: var(--ink);
  border-radius: 20px 0 0 20px;
  padding: 8px 14px;
  font-size: 14px;
}
.search-form button {
  border: 1px solid var(--red);
  background: var(--red);
  color: #fff;
  border-radius: 0 20px 20px 0;
  padding: 8px 14px;
  font-size: 14px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 24px;
  padding: 4px 8px;
}

/* ===== Category nav ===== */
.category-nav {
  background: var(--ink);
}
.category-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.category-nav ul::-webkit-scrollbar { display: none; }
.category-nav li { flex-shrink: 0; }
.category-nav a {
  display: block;
  color: #dfe1e6;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 11px 16px;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.category-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.category-nav a.active { border-bottom-color: var(--red); color: #fff; }

/* ===== Breaking ticker ===== */
.breaking-bar {
  background: var(--red);
  color: #fff;
  overflow: hidden;
}
.breaking-bar .container { display: flex; align-items: stretch; padding: 0; height: 40px; }
.breaking-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--red-dark);
  padding: 0 14px;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .6px;
  flex-shrink: 0;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff;
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,.7); }
  70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.ticker-track-wrap { flex: 1; overflow: hidden; position: relative; display: flex; align-items: center; }
.ticker-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  animation: ticker 90s linear infinite;
  padding-left: 100%;
}
.ticker-track a { font-size: 13.5px; font-weight: 500; }
.ticker-track a:hover { text-decoration: underline; }
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.breaking-bar:hover .ticker-track { animation-play-state: paused; }

/* ===== Hero ===== */
.hero-section { padding: 20px 0; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.hero-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
}
.hero-main .hero-img-wrap { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.hero-main img { width: 100%; height: 100%; object-fit: cover; }
.brand-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--ink) 0%, var(--red-dark) 60%, var(--red) 100%);
}
.brand-placeholder img { width: 30%; height: auto; object-fit: contain; opacity: .85; }
.hero-main .hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,0) 75%);
}
.hero-main .hero-content {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 20px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 9px;
  border-radius: 3px;
  margin-bottom: 10px;
}
.badge.breaking { background: var(--red); color: #fff; }
.badge.live { background: #16a34a; color: #fff; }
.badge.category { color: #fff; }
.hero-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(22px, 5vw, 36px);
  line-height: 1.15;
  margin: 0 0 8px;
}
.hero-content p.summary { font-size: 15px; color: #e5e7eb; margin: 0 0 8px; max-width: 640px; }
.hero-meta { font-size: 12.5px; color: #c7cad1; }

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.side-card {
  display: flex;
  gap: 12px;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
}
.side-card .thumb { width: 92px; height: 68px; flex-shrink: 0; border-radius: 6px; overflow: hidden; background: var(--paper-soft); }
.side-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.side-card .thumb.placeholder { display:flex; align-items:center; justify-content:center; color: var(--muted); font-size: 20px; }
.side-card .meta { flex: 1; min-width: 0; }
.side-card .cat-label { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.side-card h3 {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.3;
  margin: 4px 0;
}
.side-card .time { font-size: 11.5px; color: var(--muted); }

/* ===== Main layout ===== */
.content-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 0 0 40px;
}
.section-block { margin-bottom: 8px; }
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.section-heading h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-heading .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.section-heading a.more { font-size: 12.5px; font-weight: 700; color: var(--red); text-transform: uppercase; }

.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.article-card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.article-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,.14); }
.article-card .thumb { aspect-ratio: 16/10; background: var(--paper-soft); overflow: hidden; position: relative; }
.article-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-card .thumb.placeholder { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 28px; }
.article-card .body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.article-card .cat-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.article-card h3 { font-family: var(--font-serif); font-size: 17px; line-height: 1.3; margin: 0; }
.article-card p.summary { font-size: 13.5px; color: var(--ink-soft); margin: 0; flex: 1; }
.article-card .time { font-size: 11.5px; color: var(--muted); }

/* ===== Sidebar ===== */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.trending-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.trending-list li { display: flex; gap: 12px; align-items: flex-start; }
.trending-list .rank {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--red);
  width: 30px;
  flex-shrink: 0;
  line-height: 1;
}
.trending-list h4 { font-size: 14px; margin: 0 0 4px; line-height: 1.3; }
.trending-list .views { font-size: 11.5px; color: var(--muted); }
.panel {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* ===== Article detail ===== */
.article-detail { max-width: 780px; margin: 0 auto; }
.article-detail .breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.article-detail .breadcrumb a:hover { color: var(--red); }
.article-detail h1 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 4.5vw, 40px);
  line-height: 1.15;
  margin: 8px 0 12px;
}
.article-detail .lede { font-size: 17px; color: var(--ink-soft); margin: 0 0 14px; }
.article-detail .byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--muted);
}
.share-links { display: flex; gap: 8px; }
.share-links a {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--paper-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  border: 1px solid var(--line);
}
.share-links a:hover { background: var(--red); color: #fff; border-color: var(--red); }
.article-detail .hero-image { border-radius: var(--radius); overflow: hidden; margin-bottom: 8px; box-shadow: var(--shadow); }
.article-detail .hero-image img { width: 100%; }
.article-detail .caption { font-size: 12.5px; color: var(--muted); margin: 6px 0 20px; }
.article-body p { font-size: 17px; line-height: 1.75; color: var(--ink); margin: 0 0 18px; font-family: var(--font-serif); }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0; }
.tag-pill {
  font-size: 12px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  padding: 4px 12px;
  border-radius: 20px;
  color: var(--ink-soft);
}

/* ===== Forms / auth / admin ===== */
.auth-wrap {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  width: 100%;
  max-width: 380px;
}
.auth-card h1 { font-family: var(--font-serif); font-size: 24px; margin: 0 0 4px; }
.auth-card p.sub { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  background: var(--paper-soft);
  color: var(--ink);
  font-family: inherit;
}
.form-group textarea { resize: vertical; min-height: 90px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.checkbox-row input { width: auto; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  width: 100%;
}
.btn:hover { background: var(--red-dark); }
.btn.secondary { background: var(--paper-soft); color: var(--ink); border: 1px solid var(--line); }
.btn.small { width: auto; padding: 6px 12px; font-size: 12.5px; }

.flash-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 10px 14px; border-radius: 6px; font-size: 13.5px; }
.flash.success { background: #dcfce7; color: #14532d; }
.flash.danger { background: #fee2e2; color: #7f1d1d; }
.flash.info { background: #dbeafe; color: #1e3a8a; }
.flash.warning { background: #fef3c7; color: #78350f; }

.admin-shell { padding: 24px 0 60px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.admin-header h1 { font-family: var(--font-serif); font-size: 26px; margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } }
.stat-card { background: var(--paper); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat-card .num { font-size: 28px; font-weight: 800; font-family: var(--font-serif); }
.stat-card .label { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.admin-table-wrap { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table.admin-table { width: 100%; border-collapse: collapse; min-width: 640px; }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
table.admin-table th { font-size: 11.5px; text-transform: uppercase; color: var(--muted); }
.status-pill { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 20px; text-transform: uppercase; }
.status-pill.published { background: #dcfce7; color: #14532d; }
.status-pill.draft { background: #f3f4f6; color: #374151; }
.row-actions { display: flex; gap: 8px; }
.row-actions form { display: inline; }

/* ===== Footer ===== */
.site-footer {
  background: var(--ink);
  color: #d1d5db;
  margin-top: 40px;
  padding: 32px 0;
  font-size: 13px;
}
.site-footer .footer-top { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-cats { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-bottom { border-top: 1px solid #2b2f37; padding-top: 16px; color: #8b9099; }

/* ===== Universities directory ===== */
.university-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 640px) { .university-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .university-grid { grid-template-columns: repeat(4, 1fr); } }
.university-card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.university-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,.14); }
.university-card .logo-wrap {
  width: 56px; height: 56px; border-radius: 50%; background: var(--paper-soft);
  display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
}
.university-card .logo-wrap img { width: 32px; height: 32px; object-fit: contain; }
.university-card h4 { font-size: 13.5px; line-height: 1.3; margin: 0; min-height: 34px; }
.university-card .country { font-size: 11.5px; color: var(--muted); }
.university-card .enriched-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--red); }

.university-filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.university-filter-bar input, .university-filter-bar select {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 13.5px;
  background: var(--paper-soft); color: var(--ink);
}

.uni-detail-header { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.uni-detail-header .logo-wrap {
  width: 80px; height: 80px; border-radius: 50%; background: var(--paper); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.uni-detail-header .logo-wrap img { width: 48px; height: 48px; object-fit: contain; }
.uni-block { margin-bottom: 22px; }
.uni-block h3 { font-family: var(--font-serif); font-size: 17px; margin: 0 0 8px; }
.uni-block p { font-size: 15px; line-height: 1.7; color: var(--ink-soft); margin: 0 0 10px; }
.uni-pending {
  background: var(--paper-soft); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 20px; text-align: center; color: var(--muted); font-size: 13.5px;
}

/* ===== Courses / LMS ===== */
.course-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 700px) { .course-grid { grid-template-columns: repeat(2, 1fr); } }
.course-card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
}
.course-card .icon { font-size: 40px; }
.course-card h3 { font-family: var(--font-serif); font-size: 20px; margin: 0; }
.course-card p { color: var(--ink-soft); font-size: 14px; margin: 0; flex: 1; }
.course-card .meta { font-size: 12.5px; color: var(--muted); }

.topic-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.topic-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
}
.topic-row.locked { opacity: .55; }
.topic-row .badge-icon { font-size: 22px; width: 30px; text-align: center; flex-shrink: 0; }
.topic-row .info { flex: 1; }
.topic-row h4 { margin: 0 0 2px; font-size: 15px; }
.topic-row .status { font-size: 12px; color: var(--muted); }
.topic-row .status.passed { color: #16a34a; font-weight: 700; }
.topic-row .status.failed { color: #dc2626; }

.study-timer {
  background: var(--paper-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; text-align: center; margin: 20px 0;
}
.study-timer .big { font-size: 32px; font-weight: 800; font-family: var(--font-serif); color: var(--red); }

.exam-question { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.exam-question h4 { margin: 0 0 10px; font-size: 15px; }
.exam-question textarea { width: 100%; min-height: 110px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper-soft); color: var(--ink); font-family: inherit; font-size: 14px; }
.exam-question .choice-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.exam-question .feedback { font-size: 13px; margin-top: 8px; padding: 8px 10px; border-radius: 6px; }
.exam-question .feedback.good { background: #dcfce7; color: #14532d; }
.exam-question .feedback.bad { background: #fee2e2; color: #7f1d1d; }
.no-paste-note { font-size: 12px; color: var(--muted); margin-bottom: 14px; }

.cert-preview img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.score-circle {
  width: 140px; height: 140px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; font-family: var(--font-serif); margin: 0 auto 20px;
  border: 6px solid var(--red);
}
.score-circle.pass { border-color: #16a34a; color: #16a34a; }
.score-circle.fail { border-color: #dc2626; color: #dc2626; }

/* ===== Analytics ===== */
.analytics-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 20px; }
@media (min-width: 860px) { .analytics-grid { grid-template-columns: 1fr 1fr; } }
.analytics-panel h3 { font-family: var(--font-serif); font-size: 16px; margin: 0 0 14px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bar-row .bar-label { width: 110px; flex-shrink: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bar-track { flex: 1; height: 10px; background: var(--paper-soft); border-radius: 6px; overflow: hidden; }
.bar-row .bar-fill { height: 100%; background: var(--red); border-radius: 6px; }
.bar-row .bar-value { width: 46px; flex-shrink: 0; text-align: right; font-size: 12.5px; color: var(--muted); }
.daily-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.daily-chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.daily-chart .col .fill { width: 100%; background: var(--red); border-radius: 4px 4px 0 0; min-height: 2px; }
.daily-chart .col .lbl { font-size: 10px; color: var(--muted); white-space: nowrap; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state h2 { font-family: var(--font-serif); color: var(--ink); }

.pagination { display: flex; gap: 8px; justify-content: center; margin: 24px 0; }
.pagination a, .pagination span {
  padding: 6px 12px; border-radius: 6px; font-size: 13px; border: 1px solid var(--line);
  background: var(--paper);
}
.pagination .active { background: var(--red); color: #fff; border-color: var(--red); }

/* ===== Responsive breakpoints ===== */
@media (min-width: 640px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 2fr 1fr; }
}

@media (min-width: 960px) {
  .content-layout { grid-template-columns: 2.2fr 1fr; align-items: start; }
  .article-grid { grid-template-columns: repeat(3, 1fr); }
  .nav-toggle { display: none !important; }
}

@media (max-width: 780px) {
  .search-form { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .category-nav { display: none; }
  .category-nav.open { display: block; }
  .category-nav ul { flex-direction: column; overflow: visible; }
  .category-nav a { border-bottom: 1px solid rgba(255,255,255,.08); }
}

@media (min-width: 1200px) {
  .article-grid.wide { grid-template-columns: repeat(4, 1fr); }
}
