/* ═══════════════════════════════════════════════════════
   Modern Cards — theeofe.com theme
   Clean card-based UI with soft shadows and sans-serif type
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Lora:ital,wght@0,600;0,700;1,400&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

:root {
  --bg:          #f1f3f7;
  --surface:     #ffffff;
  --surface-2:   #f8f9fb;
  --border:      #e4e7ed;
  --text:        #111827;
  --text-2:      #4b5563;
  --text-3:      #9ca3af;
  --accent:      #6366f1;
  --accent-dim:  #ede9fe;
  --accent-dark: #4f46e5;
  --red:         #ef4444;
  --red-dim:     #fee2e2;
  --yellow:      #f59e0b;
  --yellow-dim:  #fef3c7;
  --green:       #10b981;
  --green-dim:   #d1fae5;
  --blue:        #3b82f6;
  --blue-dim:    #dbeafe;
  --radius:      12px;
  --radius-sm:   6px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow:      0 4px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.05);
  --shadow-lg:   0 10px 32px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --content-w:   min(92vw, 1140px);
  --body-font:   'Inter', system-ui, sans-serif;
  --serif:       'Lora', Georgia, serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── SITE WRAPPER ─────────────────────────────────── */
.site-wrap {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 0 80px;
}

/* ── SITE MASTHEAD ────────────────────────────────── */
.site-masthead {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 32px 16px;
  margin-bottom: 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}
.site-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.4px;
  text-decoration: none;
  display: inline-block;
}
.site-name:hover { text-decoration: none; color: var(--accent); }
.site-tagline {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 2px;
}
.issue-line {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* ── CATEGORY NAV ─────────────────────────────────── */
.cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 32px;
  margin-bottom: 28px;
}
.cat-nav a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-2);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: background .15s, color .15s, border-color .15s;
}
.cat-nav a:hover { background: var(--accent-dim); color: var(--accent-dark); border-color: var(--accent-dim); text-decoration: none; }
.cat-nav a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── FEATURED ZONE ────────────────────────────────── */
.featured-zone {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
  padding: 0 32px;
  margin-bottom: 32px;
}
@media (max-width: 720px) { .featured-zone { grid-template-columns: 1fr; } }

.featured-main {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px 36px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.featured-main::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}

.featured-main .article-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.featured-main .article-title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 14px;
}
.featured-main .article-title a { color: inherit; text-decoration: none; }
.featured-main .article-title a:hover { color: var(--accent); text-decoration: none; }
.featured-main .article-deck {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 18px;
}
.featured-main .article-meta {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

.featured-secondary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.featured-secondary .sec-item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow .15s, transform .15s;
  cursor: pointer;
}
.featured-secondary .sec-item:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.featured-secondary .article-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.featured-secondary .sec-item h3 {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 6px;
  color: var(--text);
}
.featured-secondary .sec-item h3 a { color: inherit; text-decoration: none; }
.featured-secondary .sec-item h3 a:hover { color: var(--accent); }
.featured-secondary .article-meta { font-size: 11px; color: var(--text-3); }

/* ── ARTICLE GRID ─────────────────────────────────── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 0 32px;
  margin-bottom: 36px;
}
@media (max-width: 500px) { .article-grid { grid-template-columns: 1fr; padding: 0 16px; } }

.article-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 24px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow .18s, transform .18s;
  display: flex;
  flex-direction: column;
}
.article-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.article-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.article-card h3 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text);
  flex: 1;
}
.article-card h3 a { color: inherit; text-decoration: none; }
.article-card h3 a:hover { color: var(--accent); }
.article-card p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 14px;
  flex: 1;
}
.article-meta {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ── PAGINATION ───────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 0 32px;
  font-size: 13px;
  font-weight: 500;
}
.pagination a, .pagination span {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  text-decoration: none;
  transition: background .12s, color .12s;
}
.pagination a:hover { background: var(--accent-dim); color: var(--accent-dark); border-color: var(--accent-dim); text-decoration: none; }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── SITE FOOTER ──────────────────────────────────── */
.site-footer {
  margin-top: 48px;
  padding: 20px 32px;
  font-size: 12px;
  color: var(--text-3);
  border-top: 1px solid var(--border);
  text-align: center;
}
.site-footer a { color: var(--text-3); }

/* ══════════════════════════════════════════════════════
   ARTICLE PAGE — single article view
   ══════════════════════════════════════════════════════ */

.article-page {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 32px 80px;
}

/* ── MASTHEAD (article page) ──────────────────────── */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin: 0 -32px 20px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.masthead .pub-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.2px;
}
.masthead .pub-name a { color: var(--text); text-decoration: none; }
.masthead .pub-name a:hover { color: var(--accent); }
.masthead .pub-date { font-size: 12px; color: var(--text-3); }

/* ── BACK NAV ─────────────────────────────────────── */
.back-nav {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  padding: 0 0 16px;
}
.back-nav a { color: var(--text-2); text-decoration: none; }
.back-nav a:hover { color: var(--accent); }

/* ── HEADLINE BLOCK ───────────────────────────────── */
.headline-block {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px 40px 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
}
.headline-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}
.kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
h1 {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 16px;
}
.deck {
  font-size: 18px;
  color: var(--text-2);
  line-height: 1.6;
  font-style: italic;
}

/* ── BYLINE ───────────────────────────────────────── */
.byline {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  padding: 14px 40px;
  background: var(--surface-2);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: 20px;
}

/* ── BODY TEXT ────────────────────────────────────── */
.article-body {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  font-size: 16px;
  line-height: 1.75;
}
@media (max-width: 600px) {
  .headline-block, .article-body { padding: 24px 20px; }
  .byline { padding: 12px 20px; }
}

.article-body p { margin-bottom: 1.2em; color: var(--text); }

.article-body h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  line-height: 1.3;
}
.article-body h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 28px 0 10px;
}
.article-body h4 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 22px 0 8px;
}

.article-body ul, .article-body ol {
  margin: 1em 0 1em 1.4em;
}
.article-body li { margin-bottom: .45em; }

.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.article-body code {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-dark);
}

.article-body blockquote {
  border-left: 4px solid var(--accent);
  background: var(--accent-dim);
  padding: 14px 18px;
  margin: 24px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-2);
}

/* ── FIGURES ──────────────────────────────────────── */
.article-body figure {
  margin: 28px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.article-body figure img {
  max-width: 100%;
  height: auto;
  display: block;
}
.article-body figure figcaption {
  font-size: 12px;
  color: var(--text-3);
  font-style: italic;
  padding: 8px 14px;
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ── PULL QUOTE ───────────────────────────────────── */
.pullquote {
  background: var(--accent-dim);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 32px 0;
  text-align: center;
  border: 1px solid rgba(99,102,241,.15);
}
.pullquote p {
  font-family: var(--serif);
  font-size: 21px;
  font-style: italic;
  color: var(--accent-dark);
  line-height: 1.45;
  margin-bottom: 12px;
}
.pullquote cite {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ── CALLOUT BOXES ────────────────────────────────── */
.alert-box, .danger-box, .info-box, .success-box {
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: var(--radius-sm);
  border: 1px solid;
}
.alert-box   { background: var(--yellow-dim); border-color: #fcd34d; }
.danger-box  { background: var(--red-dim);    border-color: #fca5a5; }
.info-box    { background: var(--blue-dim);   border-color: #93c5fd; }
.success-box { background: var(--green-dim);  border-color: #6ee7b7; }

.alert-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.alert-box .alert-label   { color: #92400e; }
.danger-box .alert-label  { color: #991b1b; }
.info-box .alert-label    { color: #1e40af; }
.success-box .alert-label { color: #065f46; }
.alert-box p   { margin-bottom: 0; font-size: 14px; color: #78350f; }
.danger-box p  { margin-bottom: 0; font-size: 14px; color: #7f1d1d; }
.info-box p    { margin-bottom: 0; font-size: 14px; color: #1e3a8a; }
.success-box p { margin-bottom: 0; font-size: 14px; color: #064e3b; }

/* ── SOURCES ──────────────────────────────────────── */
.sources {
  background: var(--surface-2);
  border-top: 2px solid var(--border);
  margin-top: 40px;
  padding-top: 20px;
  border-radius: 0 0 var(--radius) var(--radius);
}
.sources h3 { margin-top: 0; color: var(--text-2); }
.sources ol {
  font-size: 12px;
  color: var(--text-3);
  padding-left: 18px;
  line-height: 1.7;
}
.sources a { color: var(--blue); }
.sources a:hover { text-decoration: underline; }

/* ── FOOTER RULE (article page) ───────────────────── */
.footer-rule {
  margin-top: 24px;
  padding: 14px 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: center;
}

/* ── CAT BADGE ────────────────────────────────────── */
.cat-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  padding: 3px 10px;
  border-radius: 99px;
  text-decoration: none;
  margin-bottom: 8px;
}
.cat-badge:hover { opacity: .88; text-decoration: none; }

/* ── EMPTY STATE ──────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 72px 32px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 0 32px;
}
.empty-state h2 {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--text-2);
  margin-bottom: 10px;
}
.empty-state p { color: var(--text-3); }

/* ─── Article-card thumbnail (modern-cards-thumb variant) ─────────────── */
.article-card { padding: 0; overflow: hidden; }
.article-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(0,0,0,.04);
  border-bottom: 1px solid var(--border);
}
.article-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.article-card:hover .article-thumb img { transform: scale(1.05); }
.article-card > .article-kicker { padding: 20px 24px 0; margin-bottom: 8px; }
.article-card > h3 { padding: 0 24px; margin: 0 0 10px; }
.article-card > p { padding: 0 24px; margin: 0 0 16px; }
.article-card > .article-meta { padding: 0 24px 20px; margin: auto 0 0; }

/* ─── Featured-zone thumbnails ─────────────────────────────────────── */
.featured-main { padding: 0; overflow: hidden; }
.featured-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(0,0,0,.04);
  border-bottom: 1px solid var(--border);
}
.featured-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.featured-main:hover .featured-thumb img { transform: scale(1.03); }
.featured-main__body { padding: 26px 30px 24px; }
.featured-main__body .article-kicker { margin-bottom: 8px; }
.featured-main__body .article-title { margin: 0 0 12px; }
.featured-main__body .article-deck { margin-bottom: 14px; }

/* Small square thumbs on secondary items */
.sec-item { padding: 0; overflow: hidden; }
.sec-item { display: flex !important; align-items: stretch; gap: 0; }
.sec-thumb {
  flex: 0 0 88px;
  display: block;
  overflow: hidden;
  background: rgba(0,0,0,.04);
  border-right: 1px solid var(--border);
}
.sec-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.sec-item:hover .sec-thumb img { transform: scale(1.06); }
.sec-item__body { flex: 1; padding: 12px 14px; min-width: 0; }
.sec-item__body .article-kicker { margin-bottom: 4px; }
.sec-item__body h3 { margin: 0 0 4px; }
