/* ================================================================
   MAB — IMMERSIVE 3D THEME
   Bloomberg Terminal × Apple × BlackRock AI
   Full 3D depth · GSAP · Three.js
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS VARIABLES ── */
:root {
  --bg:          #030608;
  --bg-2:        #05090F;
  --bg-card:     #080E1A;
  --bg-glass:    rgba(8,14,26,0.75);
  --border:      #1A2B1A;
  --border-glow: rgba(201,168,76,0.25);
  --text-1:      #EEF3FF;
  --text-2:      #7A9AB8;
  --text-3:      #3A5A78;
  --cyan:        #C9A84C;
  --gold:        #FFD700;
  --green:       #00FF88;
  --purple:      #9B7B3F;
  --red:         #FF4466;
  --font-ui:     'Inter', system-ui, sans-serif;
  --font-display:'Space Grotesk', 'Inter', sans-serif;
  --font-mono:   'JetBrains Mono', monospace;
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-xl: 32px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text-1);
  overflow-x: hidden;
  min-height: 100vh;
  cursor: none;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 2px; }

/* ── MAGNETIC CURSOR ── */
.mag-cursor {
  position: fixed; pointer-events: none; z-index: 99999;
  width: 12px; height: 12px;
  background: var(--cyan);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), background 0.25s;
  mix-blend-mode: screen;
  box-shadow: 0 0 20px var(--cyan), 0 0 60px rgba(201,168,76,0.3);
}
.mag-cursor.expand {
  width: 40px; height: 40px;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.4);
  box-shadow: 0 0 40px rgba(201,168,76,0.2);
}

/* ── READING PROGRESS ── */
.reading-progress {
  position: fixed; top: 0; left: 0; z-index: 10000;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  box-shadow: 0 0 12px var(--cyan);
  transition: width 0.08s linear;
}

/* ── LAYOUT ── */
.wrap    { max-width: 1360px; margin: 0 auto; padding: 0 32px; }
.wrap-sm { max-width: 900px;  margin: 0 auto; padding: 0 32px; }

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-1);
  font-weight: 700;
}
h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.7rem); }
p  { color: var(--text-2); line-height: 1.75; }

/* ── NOISE TEXTURE OVERLAY ── */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ════════════════════════════════════════════
   HEADER — Glassmorphism floating nav
═══════════════════════════════════════════════ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 9000;
  height: 68px;
  display: flex; align-items: center;
  background: rgba(3,6,9,0);
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 0; width: 100%;
}

/* Logo */
.site-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
  margin-right: auto;
}
.logo-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 0.85rem;
  color: #fff; letter-spacing: -0.02em;
  box-shadow: 0 0 20px rgba(201,168,76,0.3);
  overflow: hidden; position: relative;
}
.logo-mark img.logo-photo {
  width: 40px; height: 40px;
  object-fit: cover; border-radius: 10px;
}
.logo-wordmark { display: flex; flex-direction: column; gap: 1px; }
.logo-name { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; color: var(--text-1); letter-spacing: -0.02em; }
.logo-sub  { font-size: 0.62rem; color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--font-mono); }

/* Nav menu */
.nav-menu {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0 24px 0 0;
}
.nav-menu a {
  display: block; padding: 6px 12px;
  font-size: 0.8rem; font-weight: 500; color: var(--text-2);
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.01em;
}
.nav-menu a:hover { color: var(--cyan); background: rgba(201,168,76,0.07); }
.nav-menu .nav-cta a {
  background: rgba(201,168,76,0.1); border: 1px solid rgba(201,168,76,0.25);
  color: var(--cyan); padding: 5px 14px; border-radius: 8px;
}
.nav-menu .nav-cta a:hover { background: rgba(201,168,76,0.18); }

/* Clock */
.nav-clock {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-3);
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px;
  white-space: nowrap;
}
.nav-clock-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--green);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* Mobile toggle */
.nav-toggle {
  display: none; width: 38px; height: 38px;
  border: 1px solid var(--border); border-radius: 8px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  margin-left: 12px;
}
.nav-toggle span {
  display: block; width: 18px; height: 1.5px;
  background: var(--text-2); border-radius: 2px;
  transition: 0.3s;
}

/* ════════════════════════════════════════════
   TICKER BAR
═══════════════════════════════════════════════ */
.ticker-bar {
  margin-top: 68px; /* header height */
  height: 36px; overflow: hidden;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
}
.ticker-label {
  flex-shrink: 0;
  padding: 0 14px;
  font-size: 0.62rem; font-family: var(--font-mono); font-weight: 700;
  color: var(--cyan); letter-spacing: 0.12em;
  background: rgba(201,168,76,0.1);
  border-right: 1px solid rgba(201,168,76,0.2);
  height: 100%; display: flex; align-items: center;
}
.ticker-track { flex: 1; overflow: hidden; position: relative; }
.ticker-inner {
  display: flex; gap: 0;
  animation: ticker-scroll 40s linear infinite;
  width: max-content;
}
.ticker-item {
  display: flex; align-items: center; gap: 8px;
  padding: 0 20px; white-space: nowrap;
  font-size: 0.72rem; color: var(--text-2);
  border-right: 1px solid var(--border);
}
.ticker-item a { color: var(--text-2); transition: color 0.2s; }
.ticker-item a:hover { color: var(--cyan); }
.ticker-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); flex-shrink: 0; }
@keyframes ticker-scroll { from { transform: translateX(0) } to { transform: translateX(-50%) } }

/* ════════════════════════════════════════════
   HERO SECTION — Full immersive WebGL
═══════════════════════════════════════════════ */
.hero-section {
  position: relative; min-height: 95vh;
  display: flex; align-items: center;
  overflow: hidden;
}
#hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0;
}
.hero-glow-1 {
  position: absolute; width: 600px; height: 600px;
  border-radius: 50%; top: -150px; left: -100px;
  background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 70%);
  pointer-events: none; z-index: 1;
}
.hero-glow-2 {
  position: absolute; width: 500px; height: 500px;
  border-radius: 50%; bottom: -100px; right: -50px;
  background: radial-gradient(circle, rgba(139,105,20,0.1) 0%, transparent 70%);
  pointer-events: none; z-index: 1;
}
.hero-content {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 340px; gap: 60px;
  align-items: center;
  padding: 80px 0 60px;
}
.hero-text { }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border-radius: 100px;
  background: rgba(201,168,76,0.08); border: 1px solid rgba(201,168,76,0.2);
  font-size: 0.7rem; font-weight: 600; color: var(--cyan);
  letter-spacing: 0.1em; text-transform: uppercase;
  font-family: var(--font-mono);
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(2.6rem, 5.5vw, 4.5rem);
  font-weight: 800; line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
  perspective: 1000px;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .highlight {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.05rem; color: var(--text-2); line-height: 1.7;
  max-width: 540px; margin-bottom: 40px;
}
.hero-stats {
  display: flex; gap: 32px;
}
.stat-item { display: flex; flex-direction: column; gap: 3px; }
.stat-num {
  font-family: var(--font-display); font-size: 2rem; font-weight: 800;
  color: var(--text-1); line-height: 1; letter-spacing: -0.04em;
}
.stat-label { font-size: 0.68rem; color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; }

/* Profile Card */
.hero-profile-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px 28px;
  backdrop-filter: blur(24px);
  box-shadow: 0 32px 64px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
  text-align: center;
  position: relative; overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.3s var(--ease-out);
}
.hero-profile-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.05) 0%, rgba(139,105,20,0.04) 100%);
  pointer-events: none;
}
.profile-photo-wrap {
  width: 96px; height: 96px; margin: 0 auto 16px;
  border-radius: 50%;
  border: 2px solid rgba(201,168,76,0.3);
  box-shadow: 0 0 0 6px rgba(201,168,76,0.06), 0 0 40px rgba(201,168,76,0.2);
  overflow: hidden;
  position: relative;
}
.profile-photo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-initials {
  width: 96px; height: 96px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: #fff;
  margin: 0 auto 16px;
}
.profile-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.profile-role { font-size: 0.73rem; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; font-family: var(--font-mono); }
.profile-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 20px; }
.badge {
  padding: 3px 10px; border-radius: 6px;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-family: var(--font-mono);
}
.badge-cyan   { color: var(--cyan);   background: rgba(201,168,76,0.12);   border: 1px solid rgba(201,168,76,0.25); }
.badge-gold   { color: var(--gold);   background: rgba(255,215,0,0.1);    border: 1px solid rgba(255,215,0,0.2); }
.badge-green  { color: var(--green);  background: rgba(0,255,136,0.1);    border: 1px solid rgba(0,255,136,0.2); }
.badge-purple { color: var(--purple); background: rgba(139,105,20,0.1);   border: 1px solid rgba(139,105,20,0.2); }
.profile-actions { display: flex; gap: 10px; }
.btn-profile {
  flex: 1; padding: 9px 12px; border-radius: 10px;
  font-size: 0.76rem; font-weight: 600;
  transition: all 0.2s var(--ease-out);
  letter-spacing: 0.02em;
}
.btn-profile-primary {
  background: rgba(201,168,76,0.12); border: 1px solid rgba(201,168,76,0.3); color: var(--cyan);
}
.btn-profile-primary:hover { background: rgba(201,168,76,0.22); transform: translateY(-1px); }
.btn-profile-ghost { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-2); }
.btn-profile-ghost:hover { color: var(--text-1); border-color: var(--text-2); transform: translateY(-1px); }

/* ════════════════════════════════════════════
   POSTS SECTION
═══════════════════════════════════════════════ */
.posts-section { padding: 80px 0; position: relative; }
.section-header { margin-bottom: 48px; }
.section-eyebrow {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--cyan);
  font-family: var(--font-mono); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.section-eyebrow::before {
  content: ''; display: block; width: 20px; height: 1px;
  background: var(--cyan);
}
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0; }

/* Filter bar */
.filter-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-label { font-size: 0.65rem; color: var(--text-3); letter-spacing: 0.1em; text-transform: uppercase; font-family: var(--font-mono); margin-right: 4px; }
.filter-btn {
  padding: 5px 14px; border-radius: 8px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  border: 1px solid var(--border); color: var(--text-2); background: var(--bg-card);
  transition: all 0.2s var(--ease-out);
  cursor: pointer;
}
.filter-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.filter-btn.active { border-color: var(--cyan); color: var(--cyan); background: rgba(201,168,76,0.1); }

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

/* Post card */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-out);
  transform-style: preserve-3d;
  will-change: transform;
}
.post-card::after {
  content: ''; position: absolute; inset: 0; border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(201,168,76,0.04), transparent);
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
.post-card:hover { border-color: rgba(201,168,76,0.2); box-shadow: 0 20px 50px rgba(0,0,0,0.35), 0 0 0 1px rgba(201,168,76,0.08); }
.post-card:hover::after { opacity: 1; }
.card-shine {
  position: absolute; inset: 0; border-radius: var(--r-lg);
  pointer-events: none; z-index: 1; transition: background 0.15s;
}

.card-thumb {
  width: 100%; aspect-ratio: 16/9; overflow: hidden;
  position: relative; background: var(--bg-2);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
.post-card:hover .card-thumb img { transform: scale(1.04); }
.card-thumb-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 2.5rem; font-weight: 800;
  color: var(--border);
  background: linear-gradient(135deg, var(--bg-2), var(--bg-card));
}

.card-body { padding: 20px 22px 22px; position: relative; z-index: 2; }
.card-cats {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
}
.cat-pill {
  padding: 2px 9px; border-radius: 5px;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  font-family: var(--font-mono);
}
.card-title {
  font-family: var(--font-display); font-size: 0.97rem; font-weight: 700;
  line-height: 1.4; color: var(--text-1); margin-bottom: 8px;
}
.card-title a { color: inherit; transition: color 0.2s; }
.card-title a:hover { color: var(--cyan); }
.card-excerpt {
  font-size: 0.8rem; color: var(--text-2); line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 0.68rem; color: var(--text-3); font-family: var(--font-mono);
}
.era-pill {
  padding: 1px 7px; border-radius: 4px; font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* Featured card (first post) */
.post-card-featured {
  grid-column: span 3;
  display: grid; grid-template-columns: 1.3fr 1fr;
  gap: 0;
  background: linear-gradient(135deg, rgba(201,168,76,0.04), rgba(139,105,20,0.03));
  border-color: rgba(201,168,76,0.15);
}
.post-card-featured .card-thumb { aspect-ratio: auto; height: 100%; min-height: 280px; }
.post-card-featured .card-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.post-card-featured .card-title { font-size: 1.5rem; margin-bottom: 14px; }
.post-card-featured .card-excerpt { font-size: 0.88rem; -webkit-line-clamp: 3; }

/* ════════════════════════════════════════════
   SINGLE POST
═══════════════════════════════════════════════ */
.single-wrapper { padding-top: 104px; } /* nav + ticker */

.single-hero {
  padding: 60px 0 40px;
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.single-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(201,168,76,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.single-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.72rem; color: var(--text-3); font-family: var(--font-mono);
  margin-bottom: 20px;
}
.single-breadcrumb a { color: var(--text-3); transition: color 0.2s; }
.single-breadcrumb a:hover { color: var(--cyan); }
.single-breadcrumb-sep { color: var(--border); }

.single-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.single-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.2; letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.single-meta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 0.73rem; color: var(--text-3); font-family: var(--font-mono);
}
.single-meta-author { display: flex; align-items: center; gap: 8px; }
.author-avatar-sm {
  width: 30px; height: 30px; border-radius: 50%; overflow: hidden;
  border: 1px solid rgba(201,168,76,0.2); flex-shrink: 0;
}
.author-avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
.author-avatar-sm-initials {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
.copy-link-btn {
  padding: 4px 12px; border-radius: 6px;
  font-size: 0.68rem; font-family: var(--font-mono); font-weight: 600;
  border: 1px solid var(--border); color: var(--text-3);
  background: var(--bg-card);
  transition: all 0.2s; cursor: pointer;
}
.copy-link-btn:hover { border-color: var(--cyan); color: var(--cyan); }

.single-feat-img {
  border-radius: var(--r-lg); overflow: hidden;
  margin: 40px 0; aspect-ratio: 2/1;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}
.single-feat-img img { width: 100%; height: 100%; object-fit: cover; }

.single-layout {
  display: grid; grid-template-columns: 1fr 300px; gap: 60px;
  padding: 60px 0 100px; align-items: start;
}

/* Post content */
.post-content {
  font-size: 1.05rem; line-height: 1.85; color: var(--text-2);
}
.post-content h2,.post-content h3,.post-content h4 {
  color: var(--text-1); margin: 2.5rem 0 1rem; letter-spacing: -0.02em;
}
.post-content p { margin-bottom: 1.5rem; }
.post-content a { color: var(--cyan); border-bottom: 1px solid rgba(201,168,76,0.3); transition: border-color 0.2s; }
.post-content a:hover { border-bottom-color: var(--cyan); }
.post-content ul,.post-content ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.post-content li { margin-bottom: 0.6rem; }
.post-content blockquote {
  margin: 2rem 0; padding: 20px 24px;
  border-left: 3px solid var(--cyan);
  background: rgba(201,168,76,0.04);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-style: italic; color: var(--text-1);
}
.post-content img { border-radius: var(--r-md); margin: 2rem 0; width: 100%; }
.post-content code {
  font-family: var(--font-mono); font-size: 0.85em;
  background: rgba(201,168,76,0.08); border: 1px solid rgba(201,168,76,0.15);
  padding: 2px 6px; border-radius: 4px; color: var(--cyan);
}
.post-content pre {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 24px; overflow-x: auto;
  margin: 2rem 0;
}
.post-content pre code { background: none; border: none; padding: 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: 0.9rem; }
.post-content th { background: var(--bg-2); color: var(--text-1); padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.post-content td { padding: 10px 16px; border-bottom: 1px solid var(--border); }

/* Sidebar */
.single-sidebar { position: sticky; top: 100px; }
.sidebar-widget {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 22px;
  margin-bottom: 20px;
}
.widget-title {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3); font-family: var(--font-mono);
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* Author box */
.author-box { text-align: center; }
.author-box-photo {
  width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(201,168,76,0.25);
  box-shadow: 0 0 20px rgba(201,168,76,0.15);
  margin: 0 auto 12px;
}
.author-box-photo img { width: 100%; height: 100%; object-fit: cover; }
.author-box-name { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.author-box-role { font-size: 0.65rem; color: var(--text-3); font-family: var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; }
.author-box-actions { display: flex; gap: 8px; flex-direction: column; }
.author-box-link {
  display: block; padding: 7px 12px; border-radius: 8px; text-align: center;
  font-size: 0.73rem; font-weight: 600; transition: all 0.2s;
}
.author-box-link-primary { background: rgba(201,168,76,0.1); border: 1px solid rgba(201,168,76,0.25); color: var(--cyan); }
.author-box-link-primary:hover { background: rgba(201,168,76,0.2); }
.author-box-link-ghost { background: var(--bg-2); border: 1px solid var(--border); color: var(--text-2); }
.author-box-link-ghost:hover { color: var(--text-1); border-color: var(--text-2); }

/* Search form */
.search-form { display: flex; gap: 8px; }
.search-input {
  flex: 1; padding: 8px 12px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-1); font-size: 0.8rem; font-family: var(--font-ui);
  outline: none; transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--cyan); }
.search-btn {
  padding: 8px 14px; background: rgba(201,168,76,0.1); border: 1px solid rgba(201,168,76,0.25);
  border-radius: 8px; color: var(--cyan); font-size: 0.9rem; transition: all 0.2s;
}
.search-btn:hover { background: rgba(201,168,76,0.2); }

/* Post nav */
.post-nav { display: flex; gap: 16px; margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--border); }
.post-nav-item {
  flex: 1; padding: 18px 20px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--r-md);
  transition: all 0.25s; display: block;
}
.post-nav-item:hover { border-color: rgba(201,168,76,0.2); transform: translateY(-2px); }
.post-nav-dir { font-size: 0.62rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--font-mono); margin-bottom: 6px; }
.post-nav-title { font-size: 0.85rem; font-weight: 600; color: var(--text-1); line-height: 1.4; }
.post-nav-item.next { text-align: right; }

/* Related posts */
.related-posts { padding: 60px 0; border-top: 1px solid var(--border); }
.related-posts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 32px; }

/* ════════════════════════════════════════════
   ARCHIVE PAGE
═══════════════════════════════════════════════ */
.archive-hero {
  padding: 100px 0 60px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(201,168,76,0.03) 0%, transparent 60%);
  position: relative; overflow: hidden;
}
.archive-hero::before {
  content: ''; position: absolute; right: -100px; top: 50%; transform: translateY(-50%);
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,105,20,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.era-timeline { padding: 60px 0 100px; }
.era-section { margin-bottom: 16px; border-radius: var(--r-lg); overflow: hidden; }

.era-header {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 24px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer; user-select: none;
  transition: border-color 0.25s, background 0.25s;
}
.era-header:hover { border-color: rgba(201,168,76,0.2); }

.era-year {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 800;
  letter-spacing: -0.04em; min-width: 70px;
}
.era-info { flex: 1; }
.era-info-name {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  font-family: var(--font-mono);
}
.era-info-desc { font-size: 0.78rem; color: var(--text-2); margin-top: 2px; }
.era-count {
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-3);
  padding: 4px 10px; background: var(--bg-2); border-radius: 6px; border: 1px solid var(--border);
  white-space: nowrap;
}
.era-toggle { font-size: 1.3rem; color: var(--text-3); font-weight: 300; width: 24px; text-align: center; }

.era-posts {
  background: var(--bg-2);
  border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  overflow: hidden;
  height: 0; opacity: 0;
}
.era-posts.open { height: auto; opacity: 1; }

.era-post-row {
  display: flex; align-items: center; gap: 16px;
  padding: 11px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.era-post-row:last-child { border-bottom: none; }
.era-post-row:hover { background: rgba(201,168,76,0.03); }
.era-post-date { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-3); min-width: 72px; }
.era-post-title {
  flex: 1; font-size: 0.875rem; color: var(--text-2);
  transition: color 0.2s;
}
.era-post-row:hover .era-post-title { color: var(--text-1); }
.era-post-title a { color: inherit; }
.era-post-cat { font-size: 0.6rem; font-weight: 700; font-family: var(--font-mono); white-space: nowrap; padding: 2px 8px; border-radius: 4px; }
.era-post-time { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-3); white-space: nowrap; }

/* ════════════════════════════════════════════
   CAT ARCHIVE PAGE
═══════════════════════════════════════════════ */
.cat-hero {
  padding: 100px 0 50px;
  border-bottom: 1px solid var(--border);
}
.cat-hero-inner { display: flex; align-items: center; gap: 20px; }
.cat-icon-badge {
  width: 64px; height: 64px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; flex-shrink: 0;
}
.cat-hero-name { font-size: clamp(1.8rem, 3vw, 2.8rem); margin-bottom: 4px; }
.cat-hero-count { font-size: 0.73rem; color: var(--text-3); font-family: var(--font-mono); }

/* ════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 60px 0 0;
  position: relative; overflow: hidden;
}
.site-footer::before {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse, rgba(201,168,76,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.footer-brand p { font-size: 0.82rem; color: var(--text-3); line-height: 1.7; margin: 16px 0; }
.footer-dfsa {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 8px;
  font-size: 0.65rem; font-family: var(--font-mono); color: var(--green);
  background: rgba(0,255,136,0.07); border: 1px solid rgba(0,255,136,0.15);
}
.footer-dfsa-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.footer-col-title {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3); font-family: var(--font-mono); margin-bottom: 16px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 0.82rem; color: var(--text-2); transition: color 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.footer-links a:hover { color: var(--cyan); }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; flex-wrap: wrap; gap: 16px;
}
.footer-legal { font-size: 0.7rem; color: var(--text-3); line-height: 1.6; font-family: var(--font-mono); }
.footer-icons { display: flex; align-items: center; gap: 8px; }
.footer-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; color: var(--text-3);
  transition: all 0.2s; font-family: var(--font-mono);
}
.footer-icon:hover { border-color: var(--cyan); color: var(--cyan); }

/* ════════════════════════════════════════════
   SEARCH / 404
═══════════════════════════════════════════════ */
.page-hero { padding: 100px 0 50px; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
.empty-state {
  padding: 80px 20px; text-align: center;
  grid-column: 1/-1; color: var(--text-3);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state a { color: var(--cyan); }

/* ════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════ */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 60px; }
.pagination .page-numbers {
  padding: 8px 14px; border-radius: 8px;
  font-size: 0.8rem; font-family: var(--font-mono); font-weight: 600;
  border: 1px solid var(--border); color: var(--text-2);
  background: var(--bg-card); transition: all 0.2s;
}
.pagination .page-numbers:hover { border-color: var(--cyan); color: var(--cyan); }
.pagination .current { background: rgba(201,168,76,0.1); border-color: rgba(201,168,76,0.3); color: var(--cyan); }
.pagination .dots { border: none; background: none; }

/* ════════════════════════════════════════════
   UTILITY CLASSES
═══════════════════════════════════════════════ */
.section-gap { padding: 80px 0; }
.glow-border { border: 1px solid var(--border-glow); box-shadow: 0 0 20px rgba(201,168,76,0.06); }
.fade-in { opacity: 0; }

/* ════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card-featured { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .related-posts-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .hero-profile-card { max-width: 380px; }
  .single-layout { grid-template-columns: 1fr; }
  .single-sidebar { position: static; top: auto; }
}
@media (max-width: 768px) {
  .wrap { padding: 0 18px; }
  .wrap-sm { padding: 0 18px; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-card-featured { grid-column: span 1; grid-template-columns: 1fr; }
  .post-card-featured .card-thumb { aspect-ratio: 16/9; height: auto; }
  .hero-stats { gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .era-header { padding: 14px 16px; gap: 10px; }
  .era-year { font-size: 1.2rem; min-width: 50px; }
  .nav-menu { display: none; position: fixed; top: 68px; left: 0; right: 0; bottom: 0; background: rgba(3,6,9,0.97); flex-direction: column; align-items: flex-start; padding: 24px; gap: 4px; overflow-y: auto; z-index: 8999; }
  .nav-menu.open { display: flex; }
  .nav-menu a { font-size: 1rem; padding: 12px 16px; width: 100%; border-radius: 10px; }
  .nav-toggle { display: flex; }
  .ticker-bar { display: none; }
  body { cursor: auto; }
  .mag-cursor { display: none; }
  .related-posts-grid { grid-template-columns: 1fr; }
}

/* ── ARCUS ElevenLabs widget ── */
.arcus-widget-wrap {
  position: fixed; bottom: 28px; right: 28px;
  z-index: 8000;
}
