/* Sovereign Security AI — visual preview. Sealed Core palette, visible frosted glass. */

:root {
  --bg: #06070c;
  --text: #dde0e6;
  --text-head: #f5f7fb;
  --text-muted: #b4b8c1;
  --accent: #1a73ef;
  --accent-bright: #7ec2ff;
  --header-h: 4.15rem;
  --measure: 44rem;
  --page: 72rem;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 20px;
  --glass-bg-solid: rgba(16, 20, 30, 0.92);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-highlight: rgba(255, 255, 255, 0.25);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

main { flex: 1 0 auto; position: relative; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-bright); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

/* Backdrop: orbs, aurora, blurred logo — so glass has something to blur
   ========================================================================== */

.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 90, 210, 0.38), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(170, 185, 210, 0.16), transparent 55%),
    #06070c;
}

.page-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
}

.page-bg .orb-a {
  width: 58vw;
  height: 58vw;
  min-width: 28rem;
  min-height: 28rem;
  left: -12vw;
  top: -8vw;
  background: radial-gradient(circle, rgba(20, 110, 255, 0.62) 0%, rgba(0, 70, 200, 0.18) 45%, transparent 70%);
  animation: drift-a 28s ease-in-out infinite;
}

.page-bg .orb-b {
  width: 45vw;
  height: 45vw;
  min-width: 22rem;
  min-height: 22rem;
  right: -10vw;
  top: 18vh;
  background: radial-gradient(circle, rgba(200, 210, 225, 0.32) 0%, rgba(140, 160, 190, 0.1) 40%, transparent 70%);
  animation: drift-b 34s ease-in-out infinite;
}

.page-bg .orb-c {
  width: 60vw;
  height: 60vw;
  min-width: 26rem;
  min-height: 26rem;
  left: 18vw;
  top: 32vh;
  background: radial-gradient(circle, rgba(0, 130, 255, 0.48) 0%, rgba(0, 60, 160, 0.14) 50%, transparent 70%);
  animation: drift-c 32s ease-in-out infinite;
}

.page-bg .orb-d {
  width: 48vw;
  height: 48vw;
  min-width: 20rem;
  min-height: 20rem;
  right: 4vw;
  top: 48vh;
  background: radial-gradient(circle, rgba(200, 214, 235, 0.32) 0%, transparent 70%);
  animation: drift-a 40s ease-in-out infinite reverse;
}

.page-bg .bg-core {
  position: absolute;
  width: min(90vw, 52rem);
  height: min(90vw, 52rem);
  left: 50%;
  top: 8%;
  transform: translateX(-50%);
  background: url("assets/sealed-core.jpg") center 42% / cover no-repeat;
  filter: blur(42px) saturate(180%) brightness(1.35);
  opacity: 0.42;
  mix-blend-mode: screen;
  animation: drift-core 36s ease-in-out infinite;
}

.page-bg .bg-core-alt {
  position: absolute;
  width: min(70vw, 40rem);
  height: min(70vw, 40rem);
  right: -8vw;
  bottom: 5%;
  background: url("assets/logo.jpg") center 40% / cover no-repeat;
  filter: blur(48px) saturate(170%) brightness(1.3);
  opacity: 0.32;
  mix-blend-mode: screen;
  animation: drift-b 38s ease-in-out infinite;
}

@keyframes drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, 4%) scale(1.08); }
}
@keyframes drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-6%, 3%) scale(1.07); }
}
@keyframes drift-c {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4%, -5%) scale(1.05); }
}
@keyframes drift-core {
  0%, 100% { transform: translateX(-50%) translate(0, 0) scale(1); }
  50% { transform: translateX(-50%) translate(2%, -3%) scale(1.04); }
}

/* Glass
   ========================================================================== */

.glass {
  background: var(--glass-bg-solid);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}

@supports ((-webkit-backdrop-filter: blur(20px)) or (backdrop-filter: blur(20px))) {
  .glass {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    backdrop-filter: blur(22px) saturate(160%);
  }
}

/* Header
   ========================================================================== */

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.85rem;
  text-decoration: none;
  border-radius: 8px;
}
.skip-link:focus { top: 0.75rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 10, 16, 0.88);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 30px rgba(0, 0, 0, 0.25);
}

@supports ((-webkit-backdrop-filter: blur(20px)) or (backdrop-filter: blur(20px))) {
  .site-header {
    background: rgba(255, 255, 255, 0.07);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-head);
  min-width: 0;
}
.brand-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
}
.brand-name {
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  margin-right: -0.15rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  background: rgba(70, 80, 100, 0.85);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
@supports ((-webkit-backdrop-filter: blur(16px)) or (backdrop-filter: blur(16px))) {
  .menu-toggle {
    background: rgba(255, 255, 255, 0.24);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    backdrop-filter: blur(18px) saturate(180%);
  }
}
.menu-toggle:active { transform: scale(0.96); }
.menu-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  display: block;
  width: 20px;
  height: 2.5px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: rgba(8, 10, 16, 0.94);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.5rem 1.25rem 1.35rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
@supports ((-webkit-backdrop-filter: blur(20px)) or (backdrop-filter: blur(20px))) {
  .site-nav {
    background: rgba(12, 16, 26, 0.55);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
  }
}
.site-nav.is-open { display: flex; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.site-nav a {
  color: var(--text);
  text-decoration: none;
}
.site-nav ul a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-nav ul a:hover,
.site-nav ul a[aria-current="page"] { color: var(--text-head); }
.site-nav ul a[aria-current="page"] { color: var(--accent-bright); }

body.nav-open { overflow: hidden; }

/* Buttons
   ========================================================================== */

.btn,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 44px;
  padding: 0.8rem 1.4rem;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn {
  color: #f7f9ff;
  background: linear-gradient(180deg, rgba(70, 150, 255, 0.95) 0%, rgba(10, 90, 220, 0.92) 100%);
  border: 1px solid rgba(190, 220, 255, 0.45);
  box-shadow:
    0 8px 22px rgba(0, 90, 230, 0.38),
    0 2px 0 rgba(0, 40, 120, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    inset 0 -1px 0 rgba(0, 30, 80, 0.25);
}
.btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow:
    0 14px 30px rgba(0, 102, 230, 0.48),
    0 2px 0 rgba(0, 40, 120, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn-ghost {
  color: var(--text-head);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
@supports ((-webkit-backdrop-filter: blur(12px)) or (backdrop-filter: blur(12px))) {
  .btn-ghost {
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
  }
}
.btn-ghost:hover {
  color: var(--text-head);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
}

.btn-lg { margin-top: 1.5rem; padding: 0.9rem 1.55rem; }
.btn-nav {
  margin-top: 0.85rem;
  align-self: stretch;
  text-align: center;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin-top: 1.5rem; }
.actions .btn,
.actions .btn-ghost { margin-top: 0; }

/* Type and layout
   ========================================================================== */

.eyebrow {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

h1, h2, h3 {
  color: var(--text-head);
  font-weight: 650;
  line-height: 1.25;
}

h1 {
  margin: 0 0 0.8rem;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 0.85rem;
  font-size: 1.4rem;
}

h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.tagline {
  margin: 0 0 1.1rem;
  font-size: 1.0625rem;
  line-height: 1.45;
  color: var(--text);
}

.lead { margin: 0 0 0.9rem; }

.section {
  padding: 2.75rem 1.25rem;
  position: relative;
}

.page-top { padding-top: 2.25rem; }

.section-inner {
  max-width: var(--page);
  margin: 0 auto;
}

.prose,
.narrow {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

.story-wrap {
  max-width: 58rem;
  margin: 0 auto;
}

.prose p,
.narrow p { margin: 0 0 1rem; }

.prose a,
.narrow a,
.article-body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(126, 194, 255, 0.75);
  text-underline-offset: 0.18em;
}

.prose a:hover,
.narrow a:hover,
.article-body a:hover { color: var(--accent-bright); }

#overview, #top, #main {
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

/* Mission
   ========================================================================== */

.mission {
  padding: 0.85rem 1.25rem 0.35rem;
}

.mission-banner {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.45rem 1.4rem 1.55rem;
  text-align: center;
}

.mission-text {
  margin: 0;
  color: var(--text-head);
  font-size: 1.125rem;
  line-height: 1.5;
}

/* Hero / overview
   ========================================================================== */

.overview-hero {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

.hero-visual {
  max-width: 18rem;
  margin: 0 auto;
  mix-blend-mode: screen;
}

.hero-visual img {
  width: 100%;
  height: auto;
  margin: 0 auto;
  mix-blend-mode: screen;
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 8%, #000 92%, transparent),
    linear-gradient(to bottom, transparent, #000 6%, #000 90%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 8%, #000 92%, transparent),
    linear-gradient(to bottom, transparent, #000 6%, #000 90%, transparent);
  mask-composite: intersect;
}

/* Icon tiles
   ========================================================================== */

.tile-grid {
  display: grid;
  gap: 1rem;
  margin: 1.75rem 0 0;
}

.tile {
  padding: 1.2rem 1.2rem 1.25rem;
}

.tile-icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.8rem;
  display: block;
}

.tile h2,
.tile h3 { margin-bottom: 0.4rem; }

.tile p { margin: 0; color: var(--text); }

.note {
  margin: 1.25rem 0 0;
  color: var(--text-muted);
}

/* Comparison
   ========================================================================== */

.compare {
  display: grid;
  gap: 1rem;
  margin: 1.75rem 0 0;
}

.compare-panel {
  padding: 1.25rem 1.2rem 1.35rem;
  text-align: center;
}

.compare-panel svg {
  width: 100%;
  max-width: 18rem;
  height: auto;
  margin: 0 auto 0.85rem;
}

.compare-panel h3 { margin-bottom: 0.35rem; }
.compare-panel p { margin: 0; color: var(--text-muted); }

/* Timeline
   ========================================================================== */

.timeline {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem 1rem;
  padding: 1.1rem 1.15rem;
  align-items: start;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-head);
  background: rgba(0, 102, 230, 0.28);
  border: 1px solid rgba(126, 194, 255, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.step h2 { font-size: 1.05rem; margin: 0.15rem 0 0.35rem; }
.step p { margin: 0; }

/* Problem stories
   ========================================================================== */

.story-grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
}

.story {
  padding: 1.15rem 1.2rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.story-meta {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-bright);
  font-weight: 650;
}

.story h2,
.story h3 {
  font-size: 1.05rem;
  margin: 0;
}

.story p { margin: 0; }

.story-flag {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.story-link {
  margin-top: 0.45rem;
  font-size: 0.9375rem;
}

.address-block {
  margin-top: 2rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1.35rem 1.3rem 1.45rem;
}
.address-block h2 { margin-bottom: 0.7rem; }
.address-block p:last-child { margin-bottom: 0; }

/* Blog listing and posts
   ========================================================================== */

.blog-grid {
  display: grid;
  gap: 1.15rem;
  margin-top: 1.5rem;
}

.blog-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.blog-card img {
  width: 100%;
  height: 11rem;
  object-fit: cover;
}

.blog-card-body { padding: 1.15rem 1.2rem 1.3rem; }
.blog-card h2 { font-size: 1.125rem; margin-bottom: 0.4rem; color: var(--text-head); }
.blog-card p { margin: 0; color: var(--text); }

.article {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 1.75rem;
}

.article h1 { margin-bottom: 0.9rem; }

.article-body p { margin: 0 0 1.1rem; }

.article-body h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.35rem;
}

.article figure {
  margin: 1.5rem 0;
}

.article figure img {
  width: 100%;
  border-radius: 12px;
}

.credit {
  margin: 0.55rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.credit a { color: var(--text-muted); }

.sources {
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--glass-border);
}

.sources h2 { font-size: 1.05rem; }
.sources ul {
  margin: 0;
  padding: 0 0 0 1.15rem;
}
.sources li { margin: 0 0 0.45rem; }

/* Contact
   ========================================================================== */

.contact-card {
  max-width: 36rem;
  margin: 0 auto;
  padding: 1.75rem 1.4rem 1.85rem;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.5rem 0 0;
}

.contact-link {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-decoration: none;
  color: var(--text-head);
  padding: 0.95rem 1.1rem;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
}
.contact-link:hover { color: var(--text-head); border-color: var(--accent-bright); }

.contact-kind {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Footer
   ========================================================================== */

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 2rem 1.25rem 2.25rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(8, 10, 16, 0.72);
}
@supports ((-webkit-backdrop-filter: blur(16px)) or (backdrop-filter: blur(16px))) {
  .site-footer {
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    backdrop-filter: blur(20px) saturate(150%);
  }
}

.footer-inner {
  max-width: var(--page);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
}
.footer-nav a {
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-nav a:hover { color: var(--text-head); }

.footer-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
}
.footer-meta p { margin: 0 0 0.35rem; }
.preview-note { color: #9aa0ab; }

/* Desktop
   ========================================================================== */

@media (min-width: 800px) {
  .header-inner,
  .section,
  .mission,
  .site-footer { padding-left: 2rem; padding-right: 2rem; }

  h1 { font-size: 2.125rem; }
  .tagline { font-size: 1.125rem; }
  .mission-text { font-size: 1.2rem; }
  .mission-banner { padding: 1.7rem 2.1rem 1.8rem; }

  .page-top { padding-top: 3rem; }
  .section { padding-top: 3.5rem; padding-bottom: 3.5rem; }

  .tile-grid { grid-template-columns: repeat(2, 1fr); gap: 1.15rem; }
  .compare { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .story-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-actions { flex-direction: row; }
  .contact-link { flex: 1; }

  .footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.25rem 2rem;
    align-items: start;
  }
  .footer-nav { justify-content: flex-end; align-self: center; }
  .footer-meta { grid-column: 1 / -1; }

  .article { padding: 2rem 2rem 2.15rem; }
}

@media (min-width: 1100px) {
  .overview-hero {
    grid-template-columns: minmax(20rem, 34rem) minmax(16rem, 24rem);
    gap: 2.5rem 3rem;
    align-items: center;
  }
  .hero-visual { max-width: 20.5rem; margin: 0; }
  .overview-hero { gap: 2rem 2.25rem; }
  .mission { padding-top: 0.75rem; }
  .tile-grid { grid-template-columns: repeat(4, 1fr); }
  .story-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1240px) {
  .menu-toggle { display: none; }

  .site-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: static;
    background: transparent;
    border: 0;
    padding: 0;
    gap: 0.85rem;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .site-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 0;
  }

  .site-nav ul a {
    min-height: 44px;
    padding: 0.35rem 0.5rem;
    border-bottom: 0;
    font-size: 0.9rem;
  }

  .site-nav ul a[aria-current="page"] {
    color: var(--text-head);
    box-shadow: inset 0 -2px 0 var(--accent-bright);
  }

  .btn-nav {
    margin-top: 0;
    align-self: auto;
    padding: 0.55rem 1rem;
    min-height: 40px;
    flex-shrink: 0;
  }
}

/* Footer contact */
.footer-contact a { color: inherit; text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }

/* Site credit */
.site-credit { font-size: 0.75rem; opacity: 0.55; letter-spacing: 0.02em; }

/* Blog intro frosted panel */
.blog-intro { padding: 2rem 2.25rem; margin-bottom: 2rem; }
.blog-intro h1 { margin-top: 0; }
.blog-intro p:last-child { margin-bottom: 0; }
@media (max-width: 640px) { .blog-intro { padding: 1.4rem 1.25rem; } }

/* Mobile menu frost fix (Nov 21, 2026)
   The header itself had backdrop-filter, which makes it the "backdrop root"
   in Chrome/Samsung Internet: children (menu button, dropdown) could only
   blur the header, never the page, so their frost was invisible.
   The header's frost now lives on a ::before layer instead.
   ========================================================================== */
.site-header { isolation: isolate; }
@supports ((-webkit-backdrop-filter: blur(20px)) or (backdrop-filter: blur(20px))) {
  .site-header {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(255, 255, 255, 0.07);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
    pointer-events: none;
  }
}

@media (max-width: 1239px) {
  .menu-toggle {
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    background: rgba(200, 215, 240, 0.38);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(20px) saturate(190%) brightness(1.15);
    backdrop-filter: blur(20px) saturate(190%) brightness(1.15);
  }
  .menu-toggle-bars,
  .menu-toggle-bars::before,
  .menu-toggle-bars::after { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars { box-shadow: none; }
  .menu-toggle[aria-expanded="true"] {
    background: rgba(220, 232, 255, 0.5);
    border-color: #fff;
  }

  .site-nav {
    left: 0.75rem;
    right: 0.75rem;
    top: calc(100% + 0.5rem);
    padding: 0.6rem 1.25rem 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(190, 205, 235, 0.3) 0%, rgba(120, 140, 180, 0.22) 100%), rgba(10, 14, 24, 0.35);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    backdrop-filter: blur(28px) saturate(180%);
  }
  .site-nav ul a {
    color: #fff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 2px 12px rgba(0, 0, 0, 0.6);
    border-bottom-color: rgba(255, 255, 255, 0.18);
  }
  .site-nav ul a[aria-current="page"] { color: #9fd0ff; }
  .btn-nav { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
}
/* Browsers without backdrop-filter: solid, readable fallback */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  @media (max-width: 1239px) {
    .site-nav { background: rgba(28, 36, 54, 0.97); }
    .menu-toggle { background: rgba(80, 95, 125, 0.95); }
  }
}
