@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: 'Fira Code';
  src: url('/fonts/fira-code-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
}

:root {
  --shell-bg: rgba(6, 6, 15, 0.9);
  --shell-text: #f0f4ff;
  --shell-muted: #9aa7bd;
  --shell-border: rgba(255, 255, 255, 0.1);
  --shell-teal: #5eead4;
  --shell-purple: #c4b5fd;
  --shell-gold: #fbbf24;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f4fffc;
  --bg-soft: #e8faf6;
  --bg-card: #ffffff;
  --bg-card-hover: #f2fbf8;
  --text: #10202a;
  --text-muted: #526978;
  --muted: #526978;
  --card-bg: rgba(255, 255, 255, 0.86);
  --border: rgba(13, 147, 115, 0.16);
  --border-accent: rgba(13, 147, 115, 0.28);
  --shell-bg: rgba(244, 255, 252, 0.92);
  --shell-text: #10202a;
  --shell-muted: #526978;
  --shell-border: rgba(13, 147, 115, 0.16);
  color-scheme: light;
}

html[data-theme="light"] body {
  background-color: var(--bg) !important;
  color: var(--text) !important;
}

html[data-theme="light"] .press-card,
html[data-theme="light"] .media-kit,
html[data-theme="light"] .speaking-card,
html[data-theme="light"] .card,
html[data-theme="light"] .lecture-card,
html[data-theme="light"] .resource-card,
html[data-theme="light"] .checklist-section,
html[data-theme="light"] pre,
html[data-theme="light"] .code-block {
  background-color: rgba(255, 255, 255, 0.86) !important;
  border-color: var(--border) !important;
}

html[data-theme="light"] article,
html[data-theme="light"] article h1,
html[data-theme="light"] article h2,
html[data-theme="light"] article h3,
html[data-theme="light"] article strong,
html[data-theme="light"] .hero h1,
html[data-theme="light"] .section h2 {
  color: var(--text) !important;
}

html[data-theme="light"] article p,
html[data-theme="light"] article li,
html[data-theme="light"] article blockquote,
html[data-theme="light"] .subtitle,
html[data-theme="light"] .article-date {
  color: var(--muted) !important;
}

.legacy-secondary-nav {
  display: none !important;
}

.stat-number {
  direction: ltr;
  unicode-bidi: isolate;
}

.secondary-shell {
  position: sticky;
  inset-block-start: 0;
  z-index: 9990;
  min-height: 58px;
  border-bottom: 1px solid var(--shell-border);
  background: var(--shell-bg);
  color: var(--shell-text);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
}

.secondary-shell-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 58px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.secondary-shell a {
  text-decoration: none;
}

.secondary-shell-brand {
  color: var(--shell-text);
  font: 800 0.92rem/1.1 Inter, system-ui, sans-serif;
  white-space: nowrap;
}

.secondary-shell-brand span {
  color: var(--shell-teal);
}

.secondary-shell-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 28px);
}

.secondary-shell-links a,
.secondary-shell-mobile-links a {
  color: var(--shell-muted);
  font: 650 0.78rem/1 Inter, system-ui, sans-serif;
  transition: color 160ms ease;
}

.secondary-shell-links a:nth-child(1),
.secondary-shell-mobile-links a:nth-child(1) { --shell-link: var(--shell-teal); }
.secondary-shell-links a:nth-child(2),
.secondary-shell-mobile-links a:nth-child(2) { --shell-link: var(--shell-purple); }
.secondary-shell-links a:nth-child(3),
.secondary-shell-mobile-links a:nth-child(3) { --shell-link: var(--shell-gold); }
.secondary-shell-links a:nth-child(4),
.secondary-shell-mobile-links a:nth-child(4) { --shell-link: #f9a8d4; }
.secondary-shell-links a:nth-child(5),
.secondary-shell-mobile-links a:nth-child(5) { --shell-link: #34d399; }
.secondary-shell-links a:nth-child(6),
.secondary-shell-mobile-links a:nth-child(6) { --shell-link: #f0abfc; }
.secondary-shell-links a:nth-child(7),
.secondary-shell-mobile-links a:nth-child(7) { --shell-link: #fde047; }
.secondary-shell-links a:nth-child(8),
.secondary-shell-mobile-links a:nth-child(8) { --shell-link: #93c5fd; }

.secondary-shell-links a:hover,
.secondary-shell-links a:focus-visible,
.secondary-shell-mobile-links a:hover,
.secondary-shell-mobile-links a:focus-visible,
.secondary-shell-links a[aria-current="page"] {
  color: var(--shell-link);
}

.secondary-shell-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.secondary-shell-select,
.secondary-shell-theme,
.secondary-shell-menu summary {
  min-height: 36px;
  border: 1px solid var(--shell-border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--shell-text);
  font: 650 0.78rem/1 Inter, system-ui, sans-serif;
}

html[data-theme="light"] .secondary-shell-select,
html[data-theme="light"] .secondary-shell-theme,
html[data-theme="light"] .secondary-shell-menu summary {
  background: rgba(255, 255, 255, 0.78);
}

.secondary-shell-select {
  max-width: 116px;
  padding-inline: 9px;
}

.secondary-shell-theme {
  width: 38px;
  cursor: pointer;
}

.secondary-shell-cta {
  min-height: 38px;
  padding-inline: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(94, 234, 212, .2);
  border-radius: 7px;
  color: #061512;
  background: linear-gradient(135deg, #5eead4, #7dd3fc);
  font: 800 .75rem/1 Inter, system-ui, sans-serif;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(94, 234, 212, .12);
}

html[data-theme="light"] .secondary-shell-cta {
  color: #f5fffe;
  border-color: rgba(255, 255, 255, .24);
  background: linear-gradient(135deg, #0b6f67, #315f78);
  box-shadow: 0 8px 22px rgba(20, 82, 88, .16);
}

.secondary-shell-select:focus-visible,
.secondary-shell-theme:focus-visible,
.secondary-shell-menu summary:focus-visible {
  outline: 2px solid var(--shell-teal);
  outline-offset: 2px;
}

.secondary-shell-menu {
  display: none;
  position: relative;
}

.secondary-shell-menu summary {
  width: 38px;
  display: grid;
  place-items: center;
  cursor: pointer;
  list-style: none;
}

.secondary-shell-menu summary::-webkit-details-marker { display: none; }

.secondary-shell-mobile-links {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: calc(100% + 8px);
  width: min(260px, calc(100vw - 32px));
  padding: 10px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--shell-border);
  border-radius: 8px;
  background: var(--shell-bg);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.secondary-shell-mobile-links a {
  padding: 11px 10px;
  border-radius: 6px;
}

@media (max-width: 1100px) {
  .secondary-shell-inner {
    grid-template-columns: auto 1fr;
    gap: 12px;
  }
  .secondary-shell-links { display: none; }
  .secondary-shell-controls { justify-self: end; }
  .secondary-shell-menu { display: block; }
  .secondary-shell-select { max-width: 100px; }
  .secondary-shell-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .secondary-shell *,
  .secondary-shell *::before,
  .secondary-shell *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
