/*
Theme Name: Archaeognosia
Theme URI: https://example.com/archaeognosia
Author: Archaeognosia Team
Author URI: https://example.com
Description: A custom theme for Archaeognosia.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: archaeognosia
*/

/*
  Archaeognosia — modern, accessible blog styles
  - Fluid type and spacing scale
  - CSS variables with light/dark themes
  - Responsive grid and cards
  - Reduced motion friendly
  - Scroll-driven reveal animations
  - Enhanced UX: breadcrumbs, progress bar, scroll-to-top
*/

:root {
  --brand: #c8a258; /* warm antique gold */
  --brand-600: #a6833e;
  --brand-100: #fdf6e8;
  --accent: #2563eb; /* cobalt complement */
  --accent-muted: rgba(37, 99, 235, 0.08);
  --bg: #fefcf9;
  --bg-muted: #f7f4ef;
  --text: #1a1612;
  --text-muted: #6b5e4f;
  --card: #ffffff;
  --border: #e8e0d4;
  --shadow: 0 10px 30px rgba(26,22,18,0.05);
  --shadow-lg: 0 25px 50px -12px rgba(26,22,18,0.10);
  --shadow-glow: 0 0 40px rgba(200,162,88,0.12);
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --success: #22c55e;
  --error: #ef4444;
  --grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)' opacity='.03'/%3E%3C/svg%3E");
}

/* Theme handling */
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --bg: #0e0c09;
    --bg-muted: #171310;
    --text: #ede8df;
    --text-muted: #a89f8f;
    --brand-100: #2a2215;
    --accent-muted: rgba(37, 99, 235, 0.12);
    --card: #171310;
    --border: #2a2520;
    --shadow: 0 10px 30px rgba(0,0,0,0.5);
    --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.7);
    --shadow-glow: 0 0 40px rgba(200,162,88,0.08);
    color-scheme: dark;
  }
}

html[data-theme="light"] {
  --bg: #fefcf9;
  --bg-muted: #f7f4ef;
  --text: #1a1612;
  --text-muted: #6b5e4f;
  --brand-100: #fdf6e8;
  --accent-muted: rgba(37, 99, 235, 0.08);
  --card: #ffffff;
  --border: #e8e0d4;
  --shadow: 0 10px 30px rgba(26,22,18,0.05);
  --shadow-lg: 0 25px 50px -12px rgba(26,22,18,0.10);
  --shadow-glow: 0 0 40px rgba(200,162,88,0.12);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0e0c09;
  --bg-muted: #171310;
  --text: #ede8df;
  --text-muted: #a89f8f;
  --brand-100: #2a2215;
  --accent-muted: rgba(37, 99, 235, 0.12);
  --card: #171310;
  --border: #2a2520;
  --shadow: 0 10px 30px rgba(0,0,0,0.5);
  --shadow-lg: 0 25px 50px -12px rgba(0,0,0,0.7);
  --shadow-glow: 0 0 40px rgba(200,162,88,0.08);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  background-image: var(--grain);
  background-size: 200px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

img { max-width: 100%; height: auto; }

h1, h2, h3 { font-family: 'Playfair Display', Georgia, 'Times New Roman', serif; line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3rem); margin: 0 0 .75rem; }
h2 { font-size: clamp(1.5rem, 2vw + .75rem, 2rem); margin: 0 0 .75rem; }
h3 { font-size: 1.25rem; margin: 0 0 .25rem; }
p { margin: 0 0 1rem; color: var(--text-muted); }

/* Decorative divider */
.section-head h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-600));
  border-radius: 2px;
  margin-top: .5rem;
}

/* ---- Reading progress bar ---- */
.reading-progress {
  position: fixed; top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--brand));
  background-size: 200% 100%;
  animation: shimmer 3s ease infinite;
  z-index: 100;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Scroll-to-top button ---- */
.scroll-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  color: white;
  border: none;
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 4px 20px rgba(200, 162, 88, 0.25);
  opacity: 0; visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition), background var(--transition), box-shadow var(--transition);
  z-index: 90;
}
.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: linear-gradient(135deg, var(--brand-600), var(--brand)); transform: translateY(-4px); box-shadow: 0 8px 24px rgba(200, 162, 88, 0.35); }
.scroll-top:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* ---- Scroll-reveal animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Breadcrumb ---- */
.breadcrumb { display: flex; align-items: center; gap: .4rem; font-size: .875rem; color: var(--text-muted); margin-bottom: 1rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--brand); text-decoration: none; transition: color var(--transition); }
.breadcrumb a:hover { color: var(--brand-600); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Prose content */
.prose { font-size: 1.05rem; }
.prose p { color: var(--text); max-width: 70ch; line-height: 1.8; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.25rem; color: var(--text); }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; transition: color var(--transition); }
.prose a:hover { color: var(--brand-600); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin: .4rem 0; line-height: 1.7; }
.prose blockquote { border-left: 3px solid var(--brand); padding: .75rem 1rem; color: var(--text-muted); margin: 1.5rem 0; background: var(--bg-muted); border-radius: 0 var(--radius) var(--radius) 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.prose code { background: var(--bg-muted); padding: .15rem .4rem; border-radius: .3rem; border: 1px solid var(--border); font-size: .9em; }

.container { width: min(1100px, 92%); margin-inline: auto; }
.narrow { width: min(800px, 92%); }

.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { left: 1rem; top: 1rem; width: auto; height: auto; background: var(--text); color: var(--bg); padding: .5rem .75rem; border-radius: .5rem; z-index: 200; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg), transparent 10%);
  border-bottom: 1px solid color-mix(in srgb, var(--border), transparent 40%);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.site-header.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.06); border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .75rem 0; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; transition: opacity var(--transition); }
.brand:hover { opacity: .85; }
.logo { width: 44px; height: 44px; border-radius: .75rem; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.logo.small { width: 32px; height: 32px; }
.brand-text { font-weight: 700; letter-spacing: .3px; font-size: 1.1rem; font-family: 'Playfair Display', Georgia, serif; }

.nav-list { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-list a { color: inherit; text-decoration: none; padding: .5rem .75rem; border-radius: .5rem; font-weight: 500; font-size: .95rem; position: relative; transition: color var(--transition), background var(--transition); }
.nav-list a::after { content: ''; position: absolute; bottom: 4px; left: 50%; width: 0; height: 2px; background: var(--brand); border-radius: 1px; transition: width var(--transition), left var(--transition); }
.nav-list a:hover { color: var(--brand); }
.nav-list a:hover::after { width: 60%; left: 20%; }
.nav-list a[aria-current="page"] { color: var(--brand); background: var(--brand-100); }
.nav-list a[aria-current="page"]::after { width: 60%; left: 20%; }

.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: .5rem; padding: .5rem; min-width: 44px; min-height: 44px; color: var(--text); cursor: pointer; transition: background var(--transition); align-items: center; justify-content: center; }
.nav-toggle:hover { background: var(--bg-muted); }

/* Mobile nav overlay */
.nav-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 45;
  opacity: 0;
  transition: opacity var(--transition);
}
.nav-overlay.active { display: block; opacity: 1; }

/* Nav close button — hidden on desktop, visible in mobile drawer */
.nav-close { display: none; }

.btn { --btn-bg: var(--brand); --btn-fg: white; display: inline-flex; align-items: center; gap: .5rem; border: none; background: linear-gradient(135deg, var(--brand), var(--brand-600)); color: var(--btn-fg); padding: .65rem 1.25rem; border-radius: .65rem; cursor: pointer; box-shadow: 0 4px 14px rgba(200, 162, 88, 0.25); font-weight: 600; font-size: .95rem; transition: all var(--transition); text-decoration: none; letter-spacing: 0.01em; }
.btn:hover { background: linear-gradient(135deg, var(--brand-600), var(--brand)); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200, 162, 88, 0.35); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border); box-shadow: none; }
.btn.ghost:hover { background: var(--bg-muted); transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand); color: var(--brand); }

/* Theme toggle */
#theme-toggle { gap: .4rem; padding: .5rem .9rem; border-radius: 999px; font-size: .85rem; }
#theme-toggle .theme-icon { transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
#theme-toggle:hover .theme-icon { transform: rotate(25deg) scale(1.15); }
html[data-theme="dark"] #theme-toggle { border-color: rgba(200, 162, 88, 0.3); color: var(--brand); }
html[data-theme="dark"] #theme-toggle:hover { background: rgba(200, 162, 88, 0.08); border-color: var(--brand); }
.theme-label { font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; font-size: .72rem; }

/* Large button variant */
.btn.btn-lg { padding: 0.85rem 1.75rem; font-size: 1.05rem; border-radius: 99px; }

/* Hero */
.hero { 
  position: relative; 
  padding: 6rem 0 5rem; 
  background: 
    radial-gradient(at 20% 10%, rgba(200, 162, 88, 0.15) 0px, transparent 50%),
    radial-gradient(at 80% 90%, rgba(166, 131, 62, 0.10) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(37, 99, 235, 0.04) 0px, transparent 60%),
    linear-gradient(175deg, var(--bg) 0%, var(--bg-muted) 100%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200, 162, 88, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: 0.3;
}
.hero-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 4rem; align-items: center; position: relative; z-index: 1; }
.hero-copy h1 { 
  font-size: clamp(2.5rem, 5vw, 3.75rem); 
  letter-spacing: -0.03em; 
  line-height: 1.08; 
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--text) 30%, var(--brand) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
.hero-copy p { max-width: 48ch; font-size: 1.15rem; line-height: 1.75; color: var(--text-muted); margin-bottom: 2rem; font-weight: 400; }
.hero-art { display: grid; place-items: center; position: relative; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }

.search { margin-top: 0; position: relative; display: flex; align-items: center; width: 100%; max-width: 420px; }
.search input { 
  width: 100%; 
  padding: .85rem 1rem .85rem 2.75rem; 
  border-radius: 99px; 
  border: 1px solid var(--border); 
  background: var(--card); 
  color: var(--text); 
  font-size: .95rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
  transition: all var(--transition);
}
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(200, 162, 88, 0.15); }
.search input::placeholder { color: var(--text-muted); opacity: .7; }
.search-icon { position: absolute; left: 1rem; color: var(--text-muted); width: 18px; height: 18px; }

.section { padding: 4rem 0; }
.section.muted { background: var(--bg-muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); position: relative; }
.section.muted::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--brand), transparent); opacity: 0.15; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.75rem; }
.section-head h2 { margin-bottom: 0; }

/* Cards */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem; }
.post-card { 
  position: relative; 
  display: grid; 
  grid-template-rows: 200px 1fr; 
  border: 1px solid var(--border); 
  border-radius: var(--radius-lg); 
  overflow: hidden; 
  background: var(--card); 
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0,0,0,0.04); 
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.post-card:hover { 
  transform: translateY(-8px) scale(1.01); 
  box-shadow: 0 20px 40px -8px rgba(200, 162, 88, 0.15), 0 8px 16px rgba(0,0,0,0.06);
  border-color: var(--brand);
}
.card-link { position: absolute; inset: 0; z-index: 10; cursor: pointer; }
.card-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: var(--radius-lg); }

.card-media { background: linear-gradient(135deg, #e8e0d4, #a89f8f); position: relative; overflow: hidden; }
/* Add a subtle shine effect on hover */
.card-media::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-25deg);
  transition: 0.5s;
}
.post-card:hover .card-media::after { left: 150%; transition: 0.7s ease-in-out; }

.card-media.gradient.bronze { background: linear-gradient(135deg, #c8a258, #8b6914); }
.card-media.gradient.classical { background: linear-gradient(135deg, #7b9ec7, #2d5a8e); }
.card-media.gradient.hellenistic { background: linear-gradient(135deg, #6db89e, #2c7a5c); }
.card-body { padding: 1.5rem; display: flex; flex-direction: column; }
.post-card h3 { font-size: 1.35rem; margin-bottom: 0.75rem; letter-spacing: -0.015em; transition: color var(--transition); font-family: 'Playfair Display', serif; }
.post-card:hover h3 { color: var(--brand); }
.post-card p { line-height: 1.65; margin-bottom: auto; }
.meta { color: var(--text-muted); font-size: 0.85rem; font-weight: 500; display: flex; gap: .5rem; align-items: center; margin: .25rem 0 1rem; }
.tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.tag { 
  font-size: .75rem; 
  padding: .3rem .8rem; 
  border: 1px solid var(--border); 
  border-radius: 999px; 
  color: var(--text-muted); 
  background: var(--bg-muted);
  font-weight: 500;
  transition: all var(--transition);
}
.post-card:hover .tag { border-color: var(--brand); color: var(--brand); background: var(--brand-100); }

/* Category grid */
.category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.category-card { position: relative; display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: clip; background: var(--card); box-shadow: var(--shadow); color: inherit; text-decoration: none; transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.category-media.placeholder { background: linear-gradient(135deg, #e8e0d4, #a89f8f); }
.category-media.placeholder.history { background: linear-gradient(135deg, #7b9ec7, #2d5a8e); }
.category-media.placeholder.art { background: linear-gradient(135deg, #c8a258, #8b6914); }
.category-media.placeholder.society { background: linear-gradient(135deg, #6db89e, #2c7a5c); }
.category-body { padding: 1.25rem; }
.category-body h2 { margin: 0 0 .25rem; font-size: 1.25rem; transition: color var(--transition); }
.category-card:hover .category-body h2 { color: var(--brand); }
.anchor { scroll-margin-top: 80px; }

/* Make category images cover their area */
.category-media img { width: 100%; height: auto; object-fit: contain; display: block; }

/* Hover swap for society card: primary shown, hover image fades in on card hover */
.category-media { position: relative; }
.category-media img.media-primary { position: relative; z-index: 1; }
.category-media img.media-hover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; top: 0; left: 0; opacity: 0; transition: opacity .22s ease-in-out; z-index: 2; }
.category-card:hover .category-media img.media-hover { opacity: 1; }
.category-card:hover .category-media img.media-primary { opacity: 0; transition: opacity .22s ease-in-out; }

/* About/subscribe */
.subscribe { display: grid; grid-template-columns: 1fr auto; gap: .6rem; margin-top: .75rem; }
.subscribe input { padding: .75rem 1rem; border: 1px solid var(--border); border-radius: .6rem; background: var(--card); color: var(--text); font-family: inherit; transition: border-color var(--transition), box-shadow var(--transition); }
.subscribe input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(200, 162, 88, 0.15); }
.form-note { font-size: .85rem; color: var(--text-muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 4rem 0 2rem; background: var(--bg-muted); position: relative; }
.site-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--brand), transparent); opacity: 0.3; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-col h4 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; color: var(--text); }
.footer-col p { font-size: .95rem; max-width: 30ch; line-height: 1.6; }
.foot-brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 700; margin-bottom: 1rem; }
.foot-nav-list { display: flex; flex-direction: column; gap: .75rem; }
.foot-nav-list a { color: var(--text-muted); text-decoration: none; font-size: .95rem; transition: color var(--transition); position: relative; display: inline-block; }
.foot-nav-list a:hover { color: var(--brand); }
.foot-nav-list a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 1px; background: var(--brand); transition: width var(--transition); }
.foot-nav-list a:hover::after { width: 100%; }
.social-links { display: flex; gap: .75rem; }
.social-icon-link { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: 1px solid var(--border); color: var(--text-muted); transition: all var(--transition); }
.social-icon-link:hover { background: var(--brand); color: white; border-color: var(--brand); transform: translateY(-3px) scale(1.05); box-shadow: 0 6px 16px rgba(200, 162, 88, 0.3); }

.footer-bottom { border-top: 1px solid var(--border); padding-top: 2rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.foot-copy { color: var(--text-muted); font-size: .9rem; }
.foot-legal { display: flex; gap: 1.5rem; }
.foot-legal a { color: var(--text-muted); text-decoration: none; font-size: .9rem; transition: color var(--transition); }
.foot-legal a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* Quiz Section */
.quiz-banner {
  background: linear-gradient(135deg, #1a1612 0%, #0e0c09 100%);
  border-radius: var(--radius-lg);
  padding: 3rem;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px -12px rgba(0,0,0,0.25);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: center;
}
.quiz-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: 0.5;
}
html[data-theme="dark"] .quiz-banner {
  background: linear-gradient(135deg, var(--card) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
}

/* Quiz header & progress */
.quiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.quiz-badge {
  font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  background: rgba(200, 162, 88, 0.2); color: var(--brand); padding: .35rem .85rem;
  border-radius: 999px; border: 1px solid rgba(200, 162, 88, 0.3);
}
.quiz-score { font-size: .9rem; font-weight: 600; color: #94a3b8; }

.quiz-progress-bar {
  width: 100%; height: 5px; border-radius: 99px;
  background: rgba(255,255,255,0.1); margin-bottom: 1.5rem; overflow: hidden;
}
.quiz-progress-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.quiz-content h3 { font-size: 1.6rem; margin-bottom: .75rem; color: white; line-height: 1.3; }
.quiz-content p { color: #94a3b8; font-size: 1rem; margin-bottom: 1.5rem; }
.quiz-hint { font-size: .9rem; color: #64748b; font-style: italic; margin-bottom: 1rem; }
.quiz-options { display: grid; gap: 0.6rem; }
.quiz-option {
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.1);
  padding: .9rem 1.15rem;
  border-radius: 0.75rem;
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: .95rem;
  position: relative;
}
.quiz-option:hover:not(.disabled) {
  background: rgba(255,255,255,0.12);
  transform: translateX(5px);
  border-color: rgba(200, 162, 88, 0.5);
}
.quiz-option:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.quiz-option .opt-letter {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  display: grid; place-items: center;
  font-size: .8rem; font-weight: 700; flex-shrink: 0;
  transition: all var(--transition);
}
.quiz-option:hover:not(.disabled) .opt-letter {
  border-color: var(--brand); background: rgba(200, 162, 88, 0.2); color: var(--brand);
}
.quiz-option .opt-text { flex: 1; }
.quiz-option .opt-icon { font-size: 1.1rem; opacity: 0; transition: opacity 0.3s; flex-shrink: 0; }

/* Answer states */
.quiz-option.correct {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.6);
  transform: translateX(5px);
}
.quiz-option.correct .opt-letter { border-color: #22c55e; background: rgba(34,197,94,0.3); color: #22c55e; }
.quiz-option.correct .opt-icon { opacity: 1; }
.quiz-option.wrong {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.5);
}
.quiz-option.wrong .opt-letter { border-color: #ef4444; background: rgba(239,68,68,0.25); color: #ef4444; }
.quiz-option.wrong .opt-icon { opacity: 1; }
.quiz-option.disabled { pointer-events: none; opacity: 0.55; }
.quiz-option.correct.disabled, .quiz-option.wrong.disabled { opacity: 1; }

/* Feedback */
.quiz-feedback {
  margin-top: 1rem; padding: 1rem 1.25rem;
  border-radius: .75rem; font-size: .95rem; line-height: 1.6;
  animation: fadeSlideIn 0.35s cubic-bezier(0.16,1,0.3,1);
}
.quiz-feedback.correct-fb { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3); }
.quiz-feedback.correct-fb p { color: #86efac; margin: 0; }
.quiz-feedback.wrong-fb { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); }
.quiz-feedback.wrong-fb p { color: #fca5a5; margin: 0; }

/* Actions */
.quiz-actions { margin-top: 1.25rem; display: flex; justify-content: flex-end; animation: fadeSlideIn 0.35s cubic-bezier(0.16,1,0.3,1); }
.quiz-next-btn { padding: .7rem 1.5rem; font-size: .95rem; border-radius: 99px; }

/* Results */
.quiz-results {
  text-align: center; padding: 1.5rem 0;
  animation: fadeSlideIn 0.5s cubic-bezier(0.16,1,0.3,1);
}
.quiz-results-icon { font-size: 4rem; margin-bottom: 1rem; }
.quiz-results h3 { font-size: 1.75rem; margin-bottom: .5rem; color: white; }
.quiz-results p { color: #94a3b8; font-size: 1.05rem; margin-bottom: 2rem; }
.quiz-results-stats {
  display: flex; justify-content: center; gap: 2.5rem;
  margin-bottom: 2rem;
}
.quiz-stat { display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.quiz-stat-num { font-size: 2rem; font-weight: 700; color: white; font-family: 'Playfair Display', serif; }
.quiz-stat-label { font-size: .8rem; color: #64748b; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-visual {
  position: relative;
  height: 100%;
  min-height: 250px;
  background: radial-gradient(circle at center, var(--brand) 0%, transparent 70%);
  display: grid;
  place-items: center;
}
.quiz-icon {
  font-size: 8rem;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
  animation: float 6s ease-in-out infinite;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.quiz-icon.pop { transform: scale(1.25); }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

@media (max-width: 768px) {
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .quiz-banner { grid-template-columns: 1fr; padding: 1.75rem; text-align: left; }
  .quiz-visual { display: none; }
  .quiz-option { justify-content: flex-start; }
  .quiz-content h3 { font-size: 1.3rem; }
  .quiz-results-stats { gap: 1.5rem; }
  .quiz-stat-num { font-size: 1.5rem; }
  .quiz-results h3 { font-size: 1.4rem; }
}

/* ==================== */
/* STATS COUNTER        */
/* ==================== */
.stats-section { padding: 3rem 0; }
.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.stat-item { text-align: center; flex: 1; min-width: 140px; }
.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
  display: inline;
}
.stat-suffix {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--brand);
}
.stat-label {
  display: block;
  margin-top: .5rem;
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}
.stat-divider {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
}
@media (max-width: 640px) {
  .stats-grid { gap: 1.5rem; }
  .stat-divider { display: none; }
  .stat-item { min-width: 120px; }
}

/* ==================== */
/* MEANDER DIVIDER      */
/* ==================== */
.meander-divider {
  overflow: hidden;
  line-height: 0;
  padding: 1rem 0;
  color: var(--brand);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.meander-divider.visible {
  opacity: 0.35;
}
.meander-svg {
  width: 100%;
  height: 40px;
}
html[data-theme="dark"] .meander-divider.visible {
  opacity: 0.2;
}

/* ==================== */
/* INTERACTIVE TIMELINE */
/* ==================== */
.timeline {
  position: relative;
  padding: 2rem 0;
}
.timeline-track {
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 3px;
}
.timeline-line {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 99px;
}
.timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(to bottom, var(--brand), var(--accent));
  border-radius: 99px;
  transition: height 0.3s ease;
}
.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding-left: 64px;
}
.timeline-item {
  position: relative;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}
.timeline-dot {
  position: absolute;
  left: -52px;
  top: 1.5rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--border);
  z-index: 2;
  transition: all 0.4s ease;
}
.timeline-item.visible .timeline-dot {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(200, 162, 88, 0.2);
}
.timeline-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: 0 4px 20px -4px rgba(0,0,0,0.06);
  transition: all 0.35s ease;
  position: relative;
}
.timeline-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -8px rgba(200, 162, 88, 0.12);
  border-color: var(--brand);
}
.timeline-date {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--brand);
  margin-bottom: .25rem;
  display: block;
}
.timeline-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  margin: .25rem 0 .5rem;
  color: var(--text);
}
.timeline-card p {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: .95rem;
  margin: 0;
}
.timeline-icon {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.8rem;
  opacity: 0.6;
}

@media (max-width: 640px) {
  .timeline-track { left: 16px; }
  .timeline-items { padding-left: 48px; gap: 2rem; }
  .timeline-dot { left: -40px; width: 12px; height: 12px; }
  .timeline-card { padding: 1.25rem; }
  .timeline-card h3 { font-size: 1.2rem; }
  .timeline-icon { display: none; }
}

/* ==================== */
/* GREEK WORD (IN HERO) */
/* ==================== */
.hero-word-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  box-shadow: 0 8px 30px -8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  max-width: 380px;
  margin: 0 auto;
}
.hero-word-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--brand));
}
.hero-word-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--brand);
  background: var(--brand-100);
  padding: .25rem .75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.hero-word-card .greek-word-original {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--brand);
  line-height: 1.2;
}
.hero-word-card .greek-word-translit {
  font-size: .9rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: .25rem;
}
.hero-word-divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  margin: 1rem 0;
}
.hero-word-card .greek-word-pos {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brand);
  background: var(--brand-100);
  padding: .2rem .6rem;
  border-radius: 999px;
  margin-bottom: .5rem;
}
.hero-word-card .greek-word-meaning {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--text);
  margin: 0 0 .75rem;
}
.hero-word-card .greek-word-desc {
  color: var(--text-muted);
  line-height: 1.65;
  font-size: .85rem;
  margin: 0 0 .75rem;
}
.hero-word-card .greek-word-usage {
  font-size: .8rem;
  color: var(--text-muted);
  padding: .75rem 1rem;
  background: var(--bg-muted);
  border-radius: var(--radius);
  border-left: 2px solid var(--brand);
  margin: 0;
  line-height: 1.55;
  text-align: left;
}

@media (max-width: 900px) {
  .hero-word-card { max-width: 100%; }
}

/* ==================== */
/* THIS DAY IN HISTORY  */
/* ==================== */
.history-today-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  box-shadow: 0 4px 20px -4px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}
.history-today-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--brand));
}
.history-today-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 72px;
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  border-radius: var(--radius);
  color: white;
  padding: .75rem;
}
.history-today-month {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: 0.9;
}
.history-today-day {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}
.history-today-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--text);
  margin: 0 0 .5rem;
}
.history-today-content p {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: .95rem;
  margin: 0 0 .5rem;
}
.history-today-era {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--brand);
}
.history-today-icon {
  font-size: 3rem;
  opacity: 0.5;
}

@media (max-width: 640px) {
  .history-today-card {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.5rem;
    text-align: center;
  }
  .history-today-date {
    margin: 0 auto;
  }
  .history-today-icon { display: none; }
}

/* Selection colour */
::selection { background: rgba(200, 162, 88, 0.25); color: var(--text); }

/* Focus ring global */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* Smooth scrollbar (webkit) */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-muted); }
::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-600); }

/* A11y helpers */
.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; }

/* Utilities */
.text-center { text-align: center; }

/* Team section */
.team { display: grid; gap: 1.25rem; margin: 1rem 0 1.5rem; }
.team-member { padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); transition: all var(--transition); }
.team-member:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.team-member h3 { margin: 0 0 .5rem; color: var(--brand); font-size: 1.2rem; }
.team-member p { margin: .35rem 0; line-height: 1.7; }

/* Contact Page */
.contact-layout { display: grid; gap: 2.5rem; }
.contact-form { display: grid; gap: 1.25rem; }
.form-group { display: grid; gap: .5rem; }
.form-group label { font-weight: 600; font-size: .9rem; color: var(--text); }
.form-group input, .form-group textarea { padding: .8rem 1rem; border: 1px solid var(--border); border-radius: .6rem; background: var(--card); color: var(--text); font-family: inherit; font-size: .95rem; transition: border-color var(--transition), box-shadow var(--transition); }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(200, 162, 88, 0.15); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); opacity: .6; }

.contact-form .btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-600));
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  letter-spacing: 0.025em;
  transition: all var(--transition);
  justify-content: center;
  margin-top: 0.5rem;
  border-radius: 0.75rem;
}

.contact-form .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(200, 162, 88, 0.4);
  filter: brightness(1.1);
}

.contact-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }
.social-card { display: flex; align-items: center; gap: 1.25rem; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: all var(--transition); }
.social-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.social-text { display: flex; flex-direction: column; }
.social-text strong { font-size: 1.1rem; }
.social-text span { color: var(--text-muted); font-size: .9rem; }

/* CTA / "Join the Odyssey" section */
.cta-section { position: relative; overflow: hidden; }
.cta-glow { position: absolute; right: -5%; top: -10%; width: 300px; height: 300px; background: var(--brand); opacity: 0.05; border-radius: 50%; filter: blur(60px); }
.cta-heading { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.cta-subtext { font-size: 1.15rem; }
.cta-subscribe { margin-top: 2rem; max-width: 420px; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cta-subscribe input { flex: 1; padding: 0.8rem 1rem; border-radius: 0.5rem; }
.cta-note { margin-top: 0.75rem; }
.cta-visual { width: 100%; aspect-ratio: 4/3; background: linear-gradient(135deg, var(--card), var(--bg-muted)); border-radius: 1.5rem; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 30px -8px rgba(200, 162, 88, 0.1); position: relative; overflow: hidden; }
.cta-dots { position: absolute; inset: 0; opacity: 0.1; background-image: radial-gradient(var(--text) 1px, transparent 1px); background-size: 20px 20px; }
.cta-visual-content { text-align: center; padding: 2rem; position: relative; z-index: 1; }
.cta-visual-content h3 { font-size: 1.5rem; margin-top: 1rem; }
.cta-visual-content p { font-size: 0.9rem; margin: 0; }
.cta-emoji { font-size: 4rem; margin-bottom: 0.5rem; background: var(--bg); width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; margin-inline: auto; box-shadow: 0 4px 20px rgba(0,0,0,0.05); }

/* Post article header media */
.post-header-media { height: 180px; border-radius: 1rem; margin: .75rem 0 1rem; }

/* Instagram Section */
.insta-preview { display: grid; place-items: center; margin-top: 1rem; }
.insta-card { display: grid; grid-template-columns: 1fr; max-width: 400px; width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: all var(--transition); }
.insta-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.insta-media { aspect-ratio: 1/1; background: var(--bg-muted); position: relative; overflow: hidden; }
.insta-media img, .insta-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.insta-content { padding: 1.5rem; display: flex; flex-direction: column; justify-content: center; }
.insta-header { display: flex; align-items: center; gap: .5rem; font-weight: 600; margin-bottom: .75rem; }
.insta-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--bg); padding: 2px; }
.insta-caption { font-size: .95rem; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
.insta-cta { color: var(--brand); font-weight: 600; font-size: .9rem; }

@media (min-width: 600px) {
  .insta-card { grid-template-columns: 200px 1fr; max-width: 600px; }
  .insta-media { aspect-ratio: auto; }
}

/* category cards use image height to set the media area so images display fully */

@media (min-width: 800px) {
  .team { grid-template-columns: 1fr 1fr; }
  .contact-layout { grid-template-columns: 2fr 1fr; }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-word-card { max-width: 100%; }
  .hero { padding: 3.5rem 0 3rem; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; }
  .nav-list {
    position: fixed; right: 0; top: 0;
    width: 280px; height: 100vh;
    background: var(--card);
    border-left: 1px solid var(--border);
    padding: 4rem 1.5rem 2rem;
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
    display: flex; flex-direction: column;
    align-items: stretch;
    gap: .25rem;
    z-index: 55;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  }
  .nav-list.open {
    transform: translateX(0);
    visibility: visible;
  }
  .nav-close {
    position: absolute; top: 1rem; right: 1rem;
    background: none; border: 1px solid var(--border); border-radius: .5rem;
    padding: .5rem; min-width: 44px; min-height: 44px;
    color: var(--text); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background var(--transition);
  }
  .nav-close:hover { background: var(--bg-muted); }
  .nav-list a { padding: .75rem 1rem; font-size: 1.05rem; border-radius: .5rem; }
  .nav-list a:hover { background: var(--bg-muted); }
  .post-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .foot-copy { text-align: left; }
  .scroll-top { bottom: 1.25rem; right: 1.25rem; width: 44px; height: 44px; }
  .cta-subscribe { flex-direction: column; }
  .cta-subscribe input { width: 100%; }
  .cta-subscribe .btn { width: 100%; justify-content: center; }
  .cta-visual { display: none; }
  .subscribe { grid-template-columns: 1fr; }
}

/* Page intro header (for inner pages) */
.page-intro { padding: 3rem 0 1rem; background: linear-gradient(175deg, var(--bg), var(--bg-muted)); position: relative; }
.page-intro::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--brand), transparent); opacity: 0.2; }
.page-intro h1 { margin-bottom: .5rem; }
.page-intro p { max-width: 55ch; font-size: 1.1rem; }

/* Toast notification */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--text); color: var(--bg); padding: .75rem 1.5rem; border-radius: var(--radius);
  font-weight: 500; font-size: .95rem;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast.success { background: var(--success); color: white; }
.toast.error { background: var(--error); color: white; }

/* ---- 404 Error page ---- */
.error-hero { min-height: 60vh; display: flex; align-items: center; }
.error-emoji { font-size: 6rem; margin-bottom: 1rem; }
.error-message { font-size: 1.15rem; max-width: 50ch; margin-inline: auto; }
.error-cta { justify-content: center; margin-top: 2rem; }

/* ---- Print styles ---- */
@media print {
  .site-header, .site-footer, .scroll-top, .reading-progress,
  .nav-toggle, #theme-toggle, .toast, .skip-link,
  .quiz-banner, .subscribe, .cta-section { display: none !important; }
  body { background: white; color: black; font-size: 12pt; line-height: 1.6; }
  a { color: black; text-decoration: underline; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
  nav a[href]::after, .brand a[href]::after { content: none; }
  .container { max-width: 100%; padding: 0; }
  img { max-width: 100% !important; }
  h1, h2, h3 { page-break-after: avoid; }
  article, section { page-break-inside: avoid; }
}

