/* ════════════════════════════════════════
   TOKENS
════════════════════════════════════════ */
:root {
  --primary: #2563EB;
  --primary-rgb: 37,99,235;
  --accent: #0ea5e9;
  --accent-rgb: 14,165,233;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.08);
}
[data-theme="dark"] {
  --bg: #080c18;
  --bg-alt: #0f1629;
  --surface: rgba(30,41,59,0.6);
  --surface-solid: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --border: rgba(148,163,184,0.1);
  --border-hover: rgba(96,165,250,0.4);
  --primary: #60a5fa;
  --primary-rgb: 96,165,250;
  --primary-soft: rgba(96,165,250,0.1);
  --primary-glow: rgba(96,165,250,0.2);
  --accent: #38bdf8;
  --accent-soft: rgba(56,189,248,0.08);
  --glass-bg: rgba(15,23,42,0.6);
  --glass-border: rgba(148,163,184,0.08);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.3);
  --toggle-bg: #1e293b;
  --toggle-bd: #334155;
  --toggle-ic: #94a3b8;
  --scroll-hint: rgba(96,165,250,0.45);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.2);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.3);
  --grad-1: linear-gradient(135deg,#3b82f6,#2563EB);
  --grad-2: linear-gradient(135deg,#60a5fa,#0ea5e9);
  --grad-3: linear-gradient(135deg,#38bdf8,#0ea5e9);
}
[data-theme="light"] {
  --bg: #FAFBFF;
  --bg-alt: #F0F4FF;
  --surface: rgba(255,255,255,0.72);
  --surface-solid: #ffffff;
  --text-primary: #0a0f1e;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --border: rgba(148,163,184,0.2);
  --border-hover: rgba(59,130,246,0.5);
  --primary: #2563EB;
  --primary-rgb: 37,99,235;
  --primary-soft: rgba(37,99,235,0.08);
  --primary-glow: rgba(37,99,235,0.25);
  --accent: #0ea5e9;
  --accent-soft: rgba(14,165,233,0.1);
  --glass-bg: rgba(255,255,255,0.6);
  --glass-border: rgba(255,255,255,0.3);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.06);
  --toggle-bg: #F0F4FF;
  --toggle-bd: #DBEAFE;
  --toggle-ic: #2563EB;
  --scroll-hint: rgba(37,99,235,0.45);
  --grad-1: linear-gradient(135deg,#2563EB,#1d4ed8);
  --grad-2: linear-gradient(135deg,#2563EB,#0ea5e9);
  --grad-3: linear-gradient(135deg,#0ea5e9,#0284c7);
}

/* ════════════════════════════════════════
   RESET & BASE
════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  transition: all 0.5s;
  overflow-x: hidden;
}

/* ════════════════════════════════════════
   ARABIC / RTL
════════════════════════════════════════ */
[lang="ar"] body { font-family: 'Cairo', sans-serif; }
[lang="ar"] .nav-logo,
[lang="ar"] .hero-ya { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; direction: ltr; display: inline-block; }
[lang="ar"] .section-eyebrow,
[lang="ar"] .nav-links,
[lang="ar"] .role-chip-org,
[lang="ar"] .about-family { letter-spacing: 0; }
[lang="ar"] .nav-links { font-size: 15px; }
[lang="ar"] .section-eyebrow { font-size: 15px; }
[lang="ar"] .role-chip-org { font-size: 15px; }
[lang="ar"] .about-family { font-size: 16px; }
[dir="rtl"] .modal-close { right: auto; left: 16px; }
[dir="rtl"] .lb-close { right: auto; left: 20px; }
[dir="rtl"] .lb-prev { left: auto; right: 12px; }
[dir="rtl"] .lb-next { right: auto; left: 12px; }
[dir="rtl"] .section-eyebrow::before { transform: scaleX(-1); }

/* Language Switch */
.lang-switch {
  background: none; border: none; cursor: pointer; padding: 0;
  display: flex; align-items: center; font-family: inherit;
}
.lang-switch-track {
  position: relative; width: 52px; height: 28px;
  background: var(--border); border-radius: 100px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px; transition: background 0.3s;
}
.lang-switch-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.02em;
  position: relative; z-index: 1; line-height: 1;
  color: var(--text-tertiary); transition: color 0.3s;
}
.lang-switch-label.left { color: var(--accent); }
.lang-switch-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-solid, #fff);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}
[lang="ar"] .lang-switch-thumb { transform: translateX(24px); }
[lang="ar"] .lang-switch-label.left { color: var(--text-tertiary); }
[lang="ar"] .lang-switch-label.right { color: var(--accent); }

/* ════════════════════════════════════════
   MESH BACKGROUND
════════════════════════════════════════ */
.mesh-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.mesh-blob { position: absolute; border-radius: 50%; filter: blur(150px); opacity: .2; animation: float 25s ease-in-out infinite; }
[data-theme="dark"] .mesh-blob { opacity: .08; }
.mesh-blob:nth-child(1) { width: 500px; height: 500px; background: var(--primary); top: -10%; right: 10%; animation-delay: 0s; }
.mesh-blob:nth-child(2) { width: 400px; height: 400px; background: var(--accent); bottom: 10%; left: -5%; animation-delay: -8s; }
@keyframes float {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(30px,-40px) scale(1.03); }
  66% { transform: translate(-20px,25px) scale(.97); }
}

.page { position: relative; z-index: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 48px; }

/* ════════════════════════════════════════
   FLOATING GLASS NAV
════════════════════════════════════════ */
.nav {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 100;
  background: var(--glass-bg); backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid var(--glass-border); border-radius: 100px; padding: 12px 32px;
  display: flex; align-items: center; gap: 32px; box-shadow: var(--glass-shadow); transition: all 0.3s;
}
.nav.hidden { transform: translateX(-50%) translateY(-120%); opacity: 0; pointer-events: none; }
.nav-logo { font-size: 15px; font-weight: 700; color: var(--primary); letter-spacing: .02em; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--text-secondary); text-decoration: none; transition: color 0.2s; letter-spacing: .02em; cursor: pointer; }
.nav-links a:hover { color: var(--primary); }
.nav-right { display: flex; align-items: center; gap: 12px; }
/* Theme Switch */
.theme-switch {
  background: none; border: none; cursor: pointer; padding: 0;
  display: flex; align-items: center;
}
.theme-switch-track {
  position: relative; width: 52px; height: 28px;
  background: var(--border); border-radius: 100px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 7px; transition: background 0.3s;
}
.theme-switch-icon { font-size: 13px; position: relative; z-index: 1; line-height: 1; }
.theme-switch-icon.sun { color: var(--accent); }
.theme-switch-icon.moon { color: var(--text-tertiary); }
.theme-switch-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-solid, #fff);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}
[data-theme="dark"] .theme-switch-thumb { transform: translateX(24px); }
[data-theme="dark"] .theme-switch-track { background: var(--border); }
[data-theme="dark"] .theme-switch-icon.moon { color: var(--accent); }
[data-theme="dark"] .theme-switch-icon.sun { color: var(--text-tertiary); }

/* Hamburger button — hidden on desktop */
.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 4px;
}
.hamburger span {
  display: block; width: 20px; height: 2px; background: var(--text-secondary);
  border-radius: 2px; transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu dropdown */
.mobile-menu {
  display: none; position: fixed; top: 76px; left: 50%; transform: translateX(-50%);
  z-index: 99; background: var(--glass-bg); backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid var(--glass-border); border-radius: 20px;
  padding: 16px 24px; flex-direction: column; gap: 4px;
  box-shadow: var(--shadow-lg); min-width: 180px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 15px; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; padding: 10px 8px; border-radius: 12px;
  transition: all 0.2s; cursor: pointer; text-align: center;
}
.mobile-menu a:hover { color: var(--primary); background: var(--primary-soft); }

/* ════════════════════════════════════════
   HERO
════════════════════════════════════════ */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 140px 48px 100px; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; max-width: 1200px; width: 100%; }
.hero-eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .15em; color: var(--accent); margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.hero-eyebrow::before { content: ''; width: 24px; height: 2px; background: var(--accent); border-radius: 2px; }
.hero-title { font-size: clamp(48px, 5.5vw, 80px); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; margin-bottom: 24px; }
.hero-desc { font-size: 18px; line-height: 1.7; color: var(--text-secondary); max-width: 480px; margin-bottom: 40px; }
.hero-ctas { display: flex; gap: 16px; }
.btn { padding: 14px 28px; border-radius: 14px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.3s; font-family: inherit; border: none; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 16px rgba(37,99,235,0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,99,235,0.4); }
.btn-ghost { background: var(--glass-bg); color: var(--text-primary); border: 1px solid var(--border); backdrop-filter: blur(10px); }
.btn-ghost:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.hero-right { display: flex; justify-content: center; align-items: center; }
.hero-ya { font-size: clamp(180px, 22vw, 280px); font-weight: 200; color: var(--primary); line-height: .85; letter-spacing: -.04em; position: relative; text-shadow: 0 0 120px var(--primary-glow); }

/* ════════════════════════════════════════
   BENTO GRID
════════════════════════════════════════ */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(180px, auto); gap: 16px; margin-top: 48px; }
.bento-card { background: var(--glass-bg); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); border: 1px solid var(--glass-border); border-radius: 24px; padding: 32px; transition: all 0.35s; position: relative; overflow: hidden; }
.bento-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-hover); }
.bento-card.span-2 { grid-column: span 2; }
.bento-card.highlight { background: linear-gradient(135deg, var(--primary-soft), rgba(14,165,233,0.04)); }
.bento-card.stat-card { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.bento-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .15em; color: var(--text-tertiary); margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.bento-label-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.bento-body { font-size: 16px; line-height: 1.65; color: var(--text-secondary); }
.bento-quote { font-size: 20px; line-height: 1.6; color: var(--text-secondary); font-style: italic; padding-left: 24px; border-left: 3px solid var(--accent); }
.stat-number { font-size: 48px; font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--primary); }
.stat-label { font-size: 14px; color: var(--text-tertiary); margin-top: 8px; font-weight: 500; }

/* Role Chips */
.role-chips { display: flex; flex-direction: column; gap: 12px; }
.role-chip { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; transition: all 0.25s; }
.role-chip:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); transform: translateX(4px); }
.role-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; animation: blink 2.5s ease-in-out infinite; }
.role-chip-dot.inactive { animation: none; background: var(--text-tertiary); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.role-chip-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.role-chip-org { font-size: 13px; color: var(--text-tertiary); margin-top: 2px; }

/* About family */
.about-family {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; background: var(--glass-bg); backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); border-radius: 16px;
  font-size: 14px; color: var(--text-secondary); letter-spacing: 0.08em;
}
.about-family .icon { font-size: 18px; }

/* ════════════════════════════════════════
   SECTIONS
════════════════════════════════════════ */
.section { padding: 120px 0; }
.section-header { margin-bottom: 48px; }
.section-eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .15em; color: var(--accent); margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.section-eyebrow::before { content: ''; width: 24px; height: 2px; background: var(--accent); border-radius: 2px; }
.section-title { font-size: clamp(36px, 4vw, 56px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.section-body { font-size: 18px; line-height: 1.75; color: var(--text-secondary); max-width: 620px; }

/* ════════════════════════════════════════
   THOUGHTS CARDS
════════════════════════════════════════ */
.thoughts-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.thoughts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 40px; }
.t-card { background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--glass-border); border-radius: 24px; overflow: hidden; cursor: pointer; transition: all 0.35s; display: flex; flex-direction: column; }
.t-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--border-hover); }
.t-card-media { aspect-ratio: 16/10; position: relative; overflow: hidden; }
.t-card-media img, .t-card-media video, .t-card-media iframe { width: 100%; height: 100%; object-fit: cover; border: none; display: block; }
.t-card-gradient { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 24px; }
.t-card-gradient.g1 { background: var(--grad-1); }
.t-card-gradient.g2 { background: var(--grad-2); }
.t-card-gradient.g3 { background: var(--grad-3); }
.t-card-cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.2); backdrop-filter: blur(10px); padding: 6px 12px; border-radius: 8px; }
.t-card-body { padding: 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.t-card-title { font-size: 20px; font-weight: 600; line-height: 1.3; color: var(--text-primary); }
.t-card-excerpt { font-size: 15px; line-height: 1.65; color: var(--text-secondary); }
.t-card-meta { font-size: 13px; font-weight: 500; color: var(--text-tertiary); margin-top: auto; display: flex; align-items: center; gap: 8px; }
.t-card-meta::before { content: ''; width: 16px; height: 1px; background: var(--text-tertiary); }
.t-card.hidden { display: none; }
.thoughts-empty { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--text-tertiary); font-size: 15px; }

/* Tags */
.tag { padding: 8px 18px; border-radius: 100px; font-size: 13px; font-weight: 500; background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); color: var(--text-secondary); cursor: pointer; transition: all 0.25s; }
.tag:hover, .tag.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 4px 12px rgba(37,99,235,0.25); }

/* ════════════════════════════════════════
   PROJECTS / LAB
════════════════════════════════════════ */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.project-card { background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--glass-border); border-radius: 24px; padding: 32px; transition: all 0.35s; cursor: pointer; display: flex; flex-direction: column; gap: 16px; }
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--border-hover); }
.project-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.project-icon.blue { background: var(--primary-soft); color: var(--primary); }
.project-icon.accent { background: var(--accent-soft); color: var(--accent); }
.project-name { font-size: 18px; font-weight: 600; color: var(--text-primary); }
.project-desc { font-size: 15px; line-height: 1.6; color: var(--text-secondary); }
.project-tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--primary); background: var(--primary-soft); padding: 4px 10px; border-radius: 6px; align-self: flex-start; margin-top: auto; }

/* ════════════════════════════════════════
   PHOTO GALLERY
════════════════════════════════════════ */
.photo-strip { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 260px 260px; gap: 8px; margin-top: 48px; border-radius: 24px; overflow: hidden; }
.mosaic-cell { background: var(--glass-bg); border: 1px solid var(--glass-border); overflow: hidden; display: flex; align-items: center; justify-content: center; transition: all 0.3s; position: relative; cursor: pointer; }
.photo-strip .mosaic-cell { border: none; border-radius: 0; }
.photo-strip .mosaic-cell:first-child { grid-row: span 2; }
.mosaic-cell:hover { opacity: 0.85; }
.mosaic-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mosaic-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; opacity: 0.25; }
.mosaic-empty span { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-primary); }
.mosaic-dot { width: 20px; height: 1px; background: var(--text-primary); }

/* ════════════════════════════════════════
   CONNECT
════════════════════════════════════════ */
.connect-card { background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--glass-border); border-radius: 28px; padding: 48px 40px; text-align: center; position: relative; overflow: hidden; }
.connect-card > * { position: relative; z-index: 1; }
.connect-title { font-size: clamp(28px, 4vw, 44px); font-weight: 700; color: var(--text-primary); letter-spacing: -.02em; margin-bottom: 20px; }
.social-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.social-btn { display: flex; align-items: center; gap: 9px; padding: 14px 24px; background: var(--primary-soft); border: 1px solid transparent; border-radius: 14px; font-size: 14px; font-weight: 500; color: var(--primary); text-decoration: none; transition: all 0.25s; }
.social-btn:hover { background: var(--primary); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.social-btn svg { flex-shrink: 0; }

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 40px 48px; display: flex; align-items: center; justify-content: space-between; max-width: 100%; font-size: 14px; }
.footer-left { font-size: 14px; letter-spacing: 0.08em; color: var(--text-tertiary); }
.footer-left span { color: var(--primary); }
.footer-right { font-size: 14px; letter-spacing: 0.06em; color: var(--text-tertiary); }

/* ════════════════════════════════════════
   ANIMATIONS
════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-group > * { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal-group.visible > *:nth-child(1) { opacity:1; transform:none; transition-delay:0s; }
.reveal-group.visible > *:nth-child(2) { opacity:1; transform:none; transition-delay:0.1s; }
.reveal-group.visible > *:nth-child(3) { opacity:1; transform:none; transition-delay:0.2s; }
.reveal-group.visible > *:nth-child(4) { opacity:1; transform:none; transition-delay:0.3s; }
.reveal-group.visible > *:nth-child(5) { opacity:1; transform:none; transition-delay:0.4s; }
.reveal-group.visible > *:nth-child(6) { opacity:1; transform:none; transition-delay:0.5s; }

/* ════════════════════════════════════════
   LIGHTBOX
════════════════════════════════════════ */
.mosaic-cell { cursor: pointer; }
#lightbox { position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,0.93); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
#lightbox.open { opacity: 1; pointer-events: all; }
#lightbox img { max-width: min(90vw, 1200px); max-height: 85vh; object-fit: contain; border-radius: 4px; display: block; user-select: none; }
.lb-close { position: absolute; top: 20px; right: 24px; font-size: 34px; line-height: 1; color: #fff; background: none; border: none; cursor: pointer; opacity: 0.55; transition: opacity 0.2s; }
.lb-close:hover { opacity: 1; }
.lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); font-size: 42px; color: #fff; background: none; border: none; cursor: pointer; opacity: 0.45; transition: opacity 0.2s; padding: 16px; user-select: none; }
.lb-arrow:hover { opacity: 1; }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.45); font-size: 13px; letter-spacing: 0.15em; text-transform: uppercase; }

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero-desc { margin: 0 auto 40px; }
  .hero-ctas { justify-content: center; }
  .hero-eyebrow { justify-content: center; }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento-card.span-2 { grid-column: span 2; }
  .thoughts-grid, .projects-grid { grid-template-columns: 1fr; }
  .photo-strip { grid-template-columns: 1fr 1fr; grid-template-rows: 180px 180px 180px; }
  .photo-strip .mosaic-cell:first-child { grid-row: span 1; grid-column: span 2; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .container { padding: 0 24px; }
}
@media (max-width: 600px) {
  .nav { padding: 10px 20px; gap: 16px; }
  .bento { grid-template-columns: 1fr; }
  .bento-card.span-2 { grid-column: span 1; }
  .hero { padding: 120px 24px 80px; }
  footer { flex-direction: column; gap: 10px; text-align: center; padding: 32px 20px; }
  .photo-strip { grid-template-rows: 140px 140px 140px; border-radius: 16px; }
  .modal-overlay { padding: 0; }
  .modal-inner { padding: 28px 20px 32px; border-radius: 0; min-height: 100dvh; overflow-y: visible; }
  .modal-body h1 { font-size: 24px; }
}

/* ════════════════════════════════════════
   POST MODAL
════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 40px 20px;
  align-items: flex-start; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-inner {
  background: var(--bg);
  border: 1px solid var(--border-hover);
  border-radius: 16px;
  width: 100%; max-width: 720px;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.3s ease;
}
.modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  background: var(--text-primary);
  border: none;
  color: var(--bg); border-radius: 50%;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 17px; line-height: 1;
  transition: opacity 0.2s;
}
.modal-close:hover { opacity: 0.75; }
.modal-cover {
  width: 100%; aspect-ratio: 16/9;
  background: var(--surface); overflow: hidden;
}
.modal-cover img { width:100%; height:100%; object-fit:cover; display:block; }
.modal-cover iframe { width:100%; height:100%; border:none; display:block; }
.modal-cover.portrait { aspect-ratio: unset; max-height: 420px; }
.modal-cover.portrait img { object-fit: contain; background: #111; height: 420px; }
.modal-body {
  padding: 32px 36px 40px;
  display: flex; flex-direction: column; gap: 16px;
}
.modal-cat {
  font-size: 11px; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--primary); font-weight: 600;
}
.modal-body h1 {
  font-size: 30px; font-weight: 600; color: var(--text-primary);
  letter-spacing: -0.03em; line-height: 1.25; margin: 0;
}
.modal-meta {
  font-size: 13px; color: var(--text-tertiary); letter-spacing: 0.05em;
}
.modal-rating { font-size: 16px; color: var(--primary); }
.modal-divider {
  border: none; border-top: 1px solid var(--border); margin: 4px 0;
}
.modal-content {
  font-size: 17px; line-height: 1.85; color: var(--text-secondary);
  display: flex; flex-direction: column; gap: 14px;
}
.modal-content p { margin: 0; }
.modal-content strong { color: var(--text-primary); font-weight: 500; }
.modal-content em { font-style: italic; }
.modal-content a { color: var(--primary); }
.modal-content blockquote {
  border-left: 2px solid var(--primary);
  margin: 0; padding: 8px 0 8px 20px;
  color: var(--text-primary); font-style: italic;
}

/* Share bar */
.modal-share {
  display: flex; align-items: center; gap: 8px;
  padding-top: 20px; margin-top: 4px;
  border-top: 1px solid var(--border);
}
.share-label {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-tertiary); margin-right: 4px;
}
.share-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent; color: var(--text-primary);
  font-size: 13px; letter-spacing: 0.05em;
  cursor: pointer; text-decoration: none;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}
.share-btn:hover { border-color: var(--border-hover); background: var(--primary-soft); }
.share-btn.copied { border-color: var(--primary); color: var(--primary); }
.share-btn svg { width: 13px; height: 13px; fill: currentColor; flex-shrink: 0; }

/* ════════════════════════════════════════
   THREE FILTERS TRIANGLE HEADER
════════════════════════════════════════ */
.modal-triangle-header {
  position: relative;
  width: 100%;
  min-height: 300px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 36px 24px 28px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  overflow: visible;
}
.mth-tag {
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 24px;
}
.mth-svg {
  width: 100%; max-width: 260px;
  overflow: visible; margin-bottom: 24px;
}
@media (max-width: 600px) { .mth-svg { max-width: 180px; } }
.mth-line {
  stroke: rgba(var(--primary-rgb),0.4); stroke-width: 1.5; transition: none;
}
.mth-line-1 { stroke-dasharray: 245 245; stroke-dashoffset: 245; }
.mth-line-2 { stroke-dasharray: 280 280; stroke-dashoffset: 280; }
.mth-line-3 { stroke-dasharray: 245 245; stroke-dashoffset: 245; }
@keyframes mthDrawLine { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
@keyframes mthFadeIn   { from { opacity: 0; } to { opacity: 1; } }
.modal-triangle-header.is-ready .mth-line-1 { animation: mthDrawLine 0.55s ease 0.1s forwards; }
.modal-triangle-header.is-ready .mth-line-2 { animation: mthDrawLine 0.55s ease 0.55s forwards; }
.modal-triangle-header.is-ready .mth-line-3 { animation: mthDrawLine 0.55s ease 1.0s forwards; }
.modal-triangle-header.is-dashed .mth-line { stroke-dasharray: 4 4; stroke-dashoffset: 0; }
.mth-node {
  fill: rgba(var(--primary-rgb),0.5); stroke: rgba(var(--primary-rgb),0.7); stroke-width: 1.5;
  opacity: 0;
  transition: fill 0.2s, filter 0.2s, transform 0.2s;
  transform-box: fill-box; transform-origin: center;
}
.mth-node.is-hovered {
  fill: var(--primary); filter: drop-shadow(0 0 8px rgba(var(--primary-rgb),0.7)); transform: scale(1.29);
}
.modal-triangle-header.is-ready .mth-node-msg { animation: mthFadeIn 0.3s ease 0.4s forwards; }
.modal-triangle-header.is-ready .mth-node-aud { animation: mthFadeIn 0.3s ease 0.85s forwards; }
.modal-triangle-header.is-ready .mth-node-tim { animation: mthFadeIn 0.3s ease 1.3s forwards; }
.mth-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  fill: rgba(255,255,255,0.78); opacity: 0; transition: fill 0.2s;
}
.mth-label.is-hovered { fill: #ffffff; }
[data-theme="light"] .mth-label { fill: rgba(var(--primary-rgb),0.55); }
[data-theme="light"] .mth-label.is-hovered { fill: var(--primary); }
.modal-triangle-header.is-ready .mth-label-msg { animation: mthFadeIn 0.3s ease 0.4s forwards; }
.modal-triangle-header.is-ready .mth-label-aud { animation: mthFadeIn 0.3s ease 0.85s forwards; }
.modal-triangle-header.is-ready .mth-label-tim { animation: mthFadeIn 0.3s ease 1.3s forwards; }
.mth-tooltip {
  position: absolute;
  background: rgba(var(--primary-rgb),0.12); border: 1px solid rgba(var(--primary-rgb),0.4);
  border-radius: 8px; padding: 8px 12px; max-width: 160px;
  font-size: 14px; color: var(--text-primary); line-height: 1.5;
  pointer-events: none; opacity: 0; transition: opacity 0.2s;
  white-space: normal; z-index: 10;
}
.mth-tooltip.is-visible { opacity: 1; }
.modal-inner.has-triangle { overflow: visible; }
@media (prefers-reduced-motion: reduce) {
  .modal-triangle-header .mth-line,
  .modal-triangle-header .mth-node,
  .modal-triangle-header .mth-label {
    animation: none !important; opacity: 1 !important; stroke-dashoffset: 0 !important;
  }
}

/* ── Crisis Pulse Network (mph) ── */
@keyframes mphDrawLine  { from { stroke-dashoffset: var(--mph-len); } to { stroke-dashoffset: 0; } }
@keyframes mphFadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes mphPulseRing {
  0%   { r: 8;  opacity: 0.85; stroke-width: 1.5; }
  100% { r: 50; opacity: 0;    stroke-width: 0.3; }
}
@keyframes mphFlicker   { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.75; } }

.modal-pulse-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 24px;
  box-sizing: border-box;
}
.mph-tag {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.mph-svg-wrap {
  position: relative;
  width: 100%;
  max-width: 260px;
  overflow: visible;
}
@media (max-width: 600px) { .mph-svg-wrap { max-width: 180px; } }
.mph-svg {
  width: 100%;
  aspect-ratio: 1;
  overflow: visible;
  display: block;
}

/* Lines */
.mph-line {
  stroke: rgba(var(--primary-rgb),0.5);
  stroke-width: 1.2;
  fill: none;
  stroke-dasharray: 40 40;
  stroke-dashoffset: 40;
  transition: none;
}

/* Pulse rings */
.mph-ring {
  fill: none;
  stroke: rgba(var(--primary-rgb),0.55);
}

/* Outer nodes */
.mph-node {
  fill: rgba(var(--primary-rgb),0.45);
  stroke: rgba(var(--primary-rgb),0.75);
  stroke-width: 1.4;
  opacity: 0;
  transition: fill 0.2s, filter 0.2s, transform 0.2s;
  transform-box: fill-box;
  transform-origin: center;
}
.mph-node.is-hovered {
  fill: rgba(var(--primary-rgb),0.9);
  filter: drop-shadow(0 0 8px rgba(var(--primary-rgb),0.7));
  transform: scale(1.35);
}

/* Labels */
.mph-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  fill: rgba(255,255,255,0.78);
  opacity: 0;
  transition: fill 0.2s;
}
.mph-label.is-hovered { fill: rgba(255,255,255,0.9); }
[data-theme="light"] .mph-label { fill: rgba(var(--primary-rgb),0.55); }
[data-theme="light"] .mph-label.is-hovered { fill: var(--primary); }

/* Center label */
.mph-center-label {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  fill: rgba(255,255,255,0.92);
  pointer-events: none;
}
[data-theme="light"] .mph-center-label { fill: rgba(255,255,255,0.9); }

/* Tooltips */
.mph-tooltip {
  position: absolute;
  background: rgba(4, 10, 48, 0.94);
  border: 1px solid rgba(var(--primary-rgb),0.5);
  border-radius: 8px;
  padding: 10px 14px;
  max-width: 220px;
  font-size: 14px;
  color: rgba(210,220,255,0.95);
  line-height: 1.6;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: normal;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.mph-tooltip.is-visible { opacity: 1; }

/* Allow tooltips to overflow modal */
.modal-inner.has-pulse { overflow: visible; }

/* ── Clarity header (noise-to-signal) ─────────────────── */
.modal-clarity-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 260px;
  background: #060614;
  padding: 24px 20px 20px;
  box-sizing: border-box;
}
.mcl-tag {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.mcl-canvas-wrap {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 160px;
}
.mcl-canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.modal-inner.has-clarity { overflow: visible; }

@media (prefers-reduced-motion: reduce) {
  .mcl-canvas { /* static frame drawn by JS */ }
}

/* ── Internal First header (inside-out) ─────────────────── */
@keyframes mifDrawLine { to { stroke-dashoffset: 0; } }
@keyframes mifFadeIn   { to { opacity: 1; } }
@keyframes mifFlash    { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }
@keyframes mifPulseRing {
  0%   { r: 55; opacity: 0.18; stroke-width: 1; }
  60%  { r: 68; opacity: 0.06; stroke-width: 0.5; }
  100% { r: 75; opacity: 0;    stroke-width: 0.3; }
}
.modal-if-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 24px;
  box-sizing: border-box;
}
.mif-tag {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
/* AI article header — orbital system */
@keyframes maiFadeIn { to { opacity: 1; } }
.modal-mai-header { width:100%; display:flex; flex-direction:column; align-items:center; padding:32px 24px 24px; box-sizing:border-box; }
.mai-tag { font-size:13px; font-weight:700; letter-spacing:0.1em; text-transform:uppercase; color:var(--accent); margin-bottom:24px; }
.mai-svg-wrap { position:relative; width:100%; max-width:300px; overflow:visible; }
.mai-svg { width:100%; overflow:visible; display:block; }
.mai-orb-ring { fill:none; stroke:rgba(var(--primary-rgb),0.22); stroke-width:0.7; opacity:0; }
.mai-core     { fill:rgba(var(--primary-rgb),0.75); stroke:rgba(var(--accent-rgb),0.9); stroke-width:1.8; opacity:0; }
.mai-core-text{ fill:rgba(255,255,255,0.92); font-size:7px; font-weight:700; letter-spacing:0.05em; opacity:0; }
.mai-node     { fill:rgba(var(--primary-rgb),0.62); stroke:rgba(var(--accent-rgb),0.82); stroke-width:1.2; opacity:0; }
.mai-label    { font-size:6px; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; fill:var(--accent); opacity:0; }
[data-theme="light"] .mai-label { fill:rgba(var(--primary-rgb),0.55); }
#modal-mai.is-ready .mai-core      { animation: maiFadeIn 0.4s ease 0.1s forwards; }
#modal-mai.is-ready .mai-core-text { animation: maiFadeIn 0.4s ease 0.2s forwards; }
#modal-mai.is-ready .mai-orb-ring  { animation: maiFadeIn 0.5s ease 0.4s forwards; }
#modal-mai.is-ready .mai-node-1    { animation: maiFadeIn 0.3s ease 0.7s forwards; }
#modal-mai.is-ready .mai-node-2    { animation: maiFadeIn 0.3s ease 0.85s forwards; }
#modal-mai.is-ready .mai-node-3    { animation: maiFadeIn 0.3s ease 1.0s forwards; }
#modal-mai.is-ready .mai-node-4    { animation: maiFadeIn 0.3s ease 1.15s forwards; }
#modal-mai.is-ready .mai-label-1   { animation: maiFadeIn 0.3s ease 0.8s forwards; }
#modal-mai.is-ready .mai-label-2   { animation: maiFadeIn 0.3s ease 0.95s forwards; }
#modal-mai.is-ready .mai-label-3   { animation: maiFadeIn 0.3s ease 1.1s forwards; }
#modal-mai.is-ready .mai-label-4   { animation: maiFadeIn 0.3s ease 1.25s forwards; }
@media (prefers-reduced-motion: reduce) {
  #modal-mai .mai-core, #modal-mai .mai-core-text, #modal-mai .mai-orb-ring,
  #modal-mai .mai-node, #modal-mai .mai-label { animation:none !important; opacity:1 !important; }
}
/* Slow Comms header — Option A: Two Paths */
@keyframes mscDrawPath { to { stroke-dashoffset: 0; } }
@keyframes mscGlowRing {
  0%   { r: 10; opacity: 0.28; stroke-width: 1.2; }
  70%  { r: 22; opacity: 0.07; stroke-width: 0.6; }
  100% { r: 28; opacity: 0;   stroke-width: 0.3; }
}
.modal-msc-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 24px;
  box-sizing: border-box;
}
.msc-tag {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.msc-svg-wrap { position: relative; width: 100%; max-width: 340px; overflow: visible; }
.msc-svg { width: 100%; overflow: visible; display: block; }
.msc-path-left {
  fill: none; stroke: rgba(var(--primary-rgb),0.52); stroke-width: 1.5; stroke-linejoin: round;
  stroke-dasharray: 78; stroke-dashoffset: 78;
}
.msc-path-right {
  fill: none; stroke: rgba(var(--accent-rgb),0.78); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 48; stroke-dashoffset: 48;
}
.msc-center-node { fill: rgba(var(--primary-rgb),0.65); stroke: rgba(var(--accent-rgb),0.9); stroke-width: 1.8; opacity: 0; }
.msc-glow-ring   { fill: none; stroke: rgba(var(--accent-rgb),0.22); stroke-width: 1; opacity: 0; }
.msc-end-dot     { fill: rgba(var(--primary-rgb),0.55); stroke: rgba(var(--accent-rgb),0.88); stroke-width: 1.8; opacity: 0; }
.msc-label { font-size: 8px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--accent); opacity: 0; }
[data-theme="light"] .msc-label { fill: rgba(var(--primary-rgb),0.6); }
/* Animation triggers */
#modal-msc.is-ready .msc-path-left   { animation: mscDrawPath 0.65s linear  0.1s forwards; }
#modal-msc.is-ready .msc-center-node { animation: mifFadeIn  0.4s ease      0.8s forwards; }
#modal-msc.is-ready .msc-glow-ring-1 { animation: mifFadeIn  0.1s ease      0.8s forwards, mscGlowRing 2.2s ease-out 1.1s infinite; }
#modal-msc.is-ready .msc-glow-ring-2 { animation: mifFadeIn  0.1s ease      0.8s forwards, mscGlowRing 2.2s ease-out 2.2s infinite; }
#modal-msc.is-ready .msc-path-right  { animation: mscDrawPath 0.9s ease-out  1.0s forwards; }
#modal-msc.is-ready .msc-end-dot     { animation: mifFadeIn  0.4s ease      1.9s forwards; }
#modal-msc.is-ready .msc-label-react   { animation: mifFadeIn 0.3s ease 0.5s  forwards; }
#modal-msc.is-ready .msc-label-pause   { animation: mifFadeIn 0.3s ease 1.0s  forwards; }
#modal-msc.is-ready .msc-label-respond { animation: mifFadeIn 0.3s ease 1.8s  forwards; }
@media (prefers-reduced-motion: reduce) {
  #modal-msc .msc-path-left, #modal-msc .msc-path-right, #modal-msc .msc-end-dot,
  #modal-msc .msc-center-node, #modal-msc .msc-glow-ring, #modal-msc .msc-label {
    animation: none !important; opacity: 1 !important; stroke-dashoffset: 0 !important;
  }
}
.mif-svg-wrap {
  position: relative;
  width: 100%;
  max-width: 260px;
  overflow: visible;
}
@media (max-width: 600px) { .mif-svg-wrap { max-width: 180px; } }
.mif-svg { width: 100%; aspect-ratio: 1; overflow: visible; display: block; }
.mif-spoke {
  stroke: rgba(var(--primary-rgb),0.5);
  stroke-width: 1.2;
  fill: none;
  stroke-dasharray: 16 16;
  stroke-dashoffset: 16;
}
.mif-inner-ring { fill: none; stroke: rgba(var(--primary-rgb),0.35); stroke-width: 1.5; opacity: 0; }
.mif-outer-ring { fill: none; stroke: rgba(var(--primary-rgb),0.55); }
.mif-node {
  fill: rgba(var(--primary-rgb),0.45);
  stroke: rgba(var(--primary-rgb),0.75);
  stroke-width: 1.4;
  opacity: 0;
}
.mif-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  fill: rgba(255,255,255,0.45);
  opacity: 0;
}
[data-theme="light"] .mif-label { fill: rgba(var(--primary-rgb),0.55); }
.mif-center-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  fill: rgba(255,255,255,0.97);
  pointer-events: none;
  opacity: 0;
}
.mif-center-sub {
  font-size: 6px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  fill: rgba(255,255,255,0.88);
  pointer-events: none;
  opacity: 0;
}
[data-theme="light"] .mif-center-label { fill: rgba(255,255,255,0.9); }
/* Animation triggers — fire when .is-ready is added to #modal-if */
#modal-if.is-ready .mif-center-node  { animation: mifFadeIn 0.4s ease 0.1s  forwards; }
#modal-if.is-ready .mif-inner-ring   { animation: mifFadeIn 0.4s ease 0.1s  forwards; }
#modal-if.is-ready .mif-center-label { animation: mifFadeIn 0.4s ease 0.25s forwards, mifFlash 1.8s ease-in-out 1.6s infinite; }
#modal-if.is-ready .mif-center-sub   { animation: mifFadeIn 0.4s ease 0.35s forwards; }
#modal-if.is-ready .mif-spoke-content { animation: mifDrawLine 0.45s ease 0.5s forwards; }
#modal-if.is-ready .mif-spoke-events  { animation: mifDrawLine 0.45s ease 0.5s forwards; }
#modal-if.is-ready .mif-spoke-brand   { animation: mifDrawLine 0.45s ease 0.5s forwards; }
#modal-if.is-ready .mif-spoke-design  { animation: mifDrawLine 0.45s ease 0.5s forwards; }
#modal-if.is-ready .mif-node-content  { animation: mifFadeIn 0.35s ease 0.85s forwards; }
#modal-if.is-ready .mif-node-events   { animation: mifFadeIn 0.35s ease 0.85s forwards; }
#modal-if.is-ready .mif-node-brand    { animation: mifFadeIn 0.35s ease 0.85s forwards; }
#modal-if.is-ready .mif-node-design   { animation: mifFadeIn 0.35s ease 0.85s forwards; }
#modal-if.is-ready .mif-label-content { animation: mifFadeIn 0.3s ease 1.0s  forwards; }
#modal-if.is-ready .mif-label-events  { animation: mifFadeIn 0.3s ease 1.0s  forwards; }
#modal-if.is-ready .mif-label-brand   { animation: mifFadeIn 0.3s ease 1.0s  forwards; }
#modal-if.is-ready .mif-label-design  { animation: mifFadeIn 0.3s ease 1.0s  forwards; }
#modal-if.is-ready .mif-outer-ring    { animation: mifPulseRing 2.4s ease-out 1.2s infinite; }
#modal-if.is-ready .mif-outer-ring-2  { animation: mifPulseRing 2.4s ease-out 2.4s infinite; }
@media (prefers-reduced-motion: reduce) {
  #modal-if .mif-spoke, #modal-if .mif-node, #modal-if .mif-label,
  #modal-if .mif-center-label, #modal-if .mif-center-sub,
  #modal-if .mif-inner-ring, #modal-if .mif-center-node {
    animation: none !important; opacity: 1 !important; stroke-dashoffset: 0 !important;
  }
}

/* Animation triggers — applied when .is-ready is added to #modal-pulse */
.modal-pulse-header.is-ready .mph-line-narrative {
  animation: mphDrawLine 0.5s ease 0.1s forwards, mphFlicker 2.4s ease-in-out 0.75s infinite;
}
.modal-pulse-header.is-ready .mph-line-channels {
  animation: mphDrawLine 0.5s ease 0.35s forwards, mphFlicker 2.4s ease-in-out 1.0s infinite;
}
.modal-pulse-header.is-ready .mph-line-governance {
  animation: mphDrawLine 0.5s ease 0.6s forwards, mphFlicker 2.4s ease-in-out 1.25s infinite;
}
.modal-pulse-header.is-ready .mph-line-trust {
  animation: mphDrawLine 0.5s ease 0.85s forwards, mphFlicker 2.4s ease-in-out 1.5s infinite;
}
.modal-pulse-header.is-ready .mph-line-speed {
  animation: mphDrawLine 0.5s ease 1.1s forwards, mphFlicker 2.4s ease-in-out 1.75s infinite;
}
.modal-pulse-header.is-ready .mph-ring {
  animation: mphPulseRing 2.2s ease-out infinite;
}
.modal-pulse-header.is-ready .mph-ring-2 {
  animation: mphPulseRing 2.2s ease-out 1.1s infinite;
}
.modal-pulse-header.is-ready .mph-node-narrative  { animation: mphFadeIn 0.35s ease 0.5s  forwards; }
.modal-pulse-header.is-ready .mph-node-channels   { animation: mphFadeIn 0.35s ease 0.75s forwards; }
.modal-pulse-header.is-ready .mph-node-governance { animation: mphFadeIn 0.35s ease 1.0s  forwards; }
.modal-pulse-header.is-ready .mph-node-trust      { animation: mphFadeIn 0.35s ease 1.25s forwards; }
.modal-pulse-header.is-ready .mph-node-speed      { animation: mphFadeIn 0.35s ease 1.5s  forwards; }
.modal-pulse-header.is-ready .mph-label-narrative  { animation: mphFadeIn 0.3s ease 0.5s  forwards; }
.modal-pulse-header.is-ready .mph-label-channels   { animation: mphFadeIn 0.3s ease 0.75s forwards; }
.modal-pulse-header.is-ready .mph-label-governance { animation: mphFadeIn 0.3s ease 1.0s  forwards; }
.modal-pulse-header.is-ready .mph-label-trust      { animation: mphFadeIn 0.3s ease 1.25s forwards; }
.modal-pulse-header.is-ready .mph-label-speed      { animation: mphFadeIn 0.3s ease 1.5s  forwards; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .modal-pulse-header .mph-line,
  .modal-pulse-header .mph-node,
  .modal-pulse-header .mph-label,
  .modal-pulse-header .mph-ring {
    animation: none !important;
    opacity: 1 !important;
    stroke-dashoffset: 0 !important;
  }
}
