/* QuantaInstitute Pure Dark Technical Design System (v5)
   Emblem Navy: #0f2744 | Emblem Royal Blue: #3667a6 | Electric Accent: #5b9bf8
*/

:root {
  --bg: #060a10;
  --bg-alt: #0a101a;
  --surface: #0e1624;
  --surface-hover: #131e30;
  --brand-navy: #0f2744;
  --brand-blue: #3667a6;
  --brand-blue-bright: #5b9bf8;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border: #1c283b;
  --border-accent: #2c4a75;
  --code-bg: #080d16;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --container-width: 1160px;
  --article-width: 780px;
  --radius: 10px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

.bg-grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(54, 103, 166, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(54, 103, 166, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--brand-blue-bright);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #93c5fd;
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.38rem;
  color: var(--text-muted);
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.article-container, .page-container {
  max-width: var(--article-width);
  padding-top: 3.5rem;
  padding-bottom: 5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 10, 16, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.site-brand:hover {
  color: #ffffff;
}

.brand-logo {
  display: block;
  object-fit: contain;
}

.brand-text {
  color: #93c5fd;
  font-weight: 500;
}

.brand-text strong {
  color: #ffffff;
  font-weight: 700;
}

.site-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.site-nav a:hover, .site-nav a.active {
  color: #ffffff;
}

.site-nav a.active {
  position: relative;
}

.site-nav a.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-blue-bright);
}

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  padding: 0.36rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.search-trigger:hover {
  border-color: var(--brand-blue-bright);
  color: #ffffff;
}

.nav-github {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.8rem;
  background: var(--brand-navy);
  border: 1px solid var(--border-accent);
  border-radius: 6px;
  color: #e2e8f0 !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
}

.nav-github:hover {
  background: #15355c;
  border-color: var(--brand-blue-bright);
  color: #ffffff !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
}

/* Bento Hero */
.hero {
  padding: 4rem 0 4.5rem;
  background: radial-gradient(circle at 80% 20%, rgba(54, 103, 166, 0.16) 0%, transparent 65%);
  border-bottom: 1px solid var(--border);
}

.hero-bento {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 1.35rem;
}

.bento-main {
  background: linear-gradient(155deg, #0e1624 0%, #090e18 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.75rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  color: #93c5fd;
  background: rgba(15, 39, 68, 0.8);
  border: 1px solid var(--border-accent);
  padding: 0.32rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
}

.eyebrow-diamond {
  width: 7px;
  height: 7px;
  background: var(--brand-blue-bright);
  transform: rotate(45deg);
}

.hero-title {
  font-size: clamp(2.45rem, 4.8vw, 3.6rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
  color: #ffffff;
}

.title-accent {
  color: var(--brand-blue-bright);
}

.hero-lead {
  font-size: 1.26rem;
  font-weight: 500;
  color: #e2e8f0;
  margin: 0 0 0.8rem;
  line-height: 1.45;
}

.hero-description {
  font-size: 1.02rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 580px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* Native Transparent Emblem Bento Tile */
.bento-emblem {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #0f1c30 0%, #080d16 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.emblem-radial {
  position: absolute;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(91, 155, 248, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.hero-emblem-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 172px;
  height: 172px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(54, 103, 166, 0.35));
}

.emblem-footer {
  position: relative;
  z-index: 1;
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(91, 155, 248, 0.22);
  width: 100%;
  text-align: center;
}

.mono-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #ffffff;
}

.mono-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--brand-blue-bright);
  margin-top: 0.2rem;
}

/* Interactive Terminal Bento Tile */
.bento-terminal {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: #0c1320;
  border-bottom: 1px solid var(--border);
}

.terminal-dots {
  display: flex;
  gap: 0.4rem;
}

.terminal-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #27354d;
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.terminal-tabs {
  display: flex;
  gap: 0.35rem;
}

.term-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
}

.term-tab.active {
  background: var(--brand-navy);
  border-color: var(--border-accent);
  color: #93c5fd;
}

.terminal-body {
  padding: 1.15rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: #cbd5e1;
}

.terminal-body.hidden {
  display: none;
}

.term-line .prompt {
  color: var(--brand-blue-bright);
  margin-right: 0.45rem;
}

.term-output {
  margin-top: 0.35rem;
  color: #38bdf8;
}

/* Quick Access Bento Tile */
.bento-index {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-index h3 {
  margin: 0.15rem 0 0.45rem;
  font-size: 1.08rem;
  color: #ffffff;
}

.bento-index p {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.92rem;
  transition: all 0.15s ease;
  cursor: pointer;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.84rem;
  align-self: flex-start;
}

.btn-primary {
  background: var(--brand-blue);
  color: #ffffff;
  border: 1px solid var(--brand-blue-bright);
}

.btn-primary:hover {
  background: #2b558a;
  color: #ffffff;
}

.btn-secondary {
  background: var(--brand-navy);
  color: #e2e8f0;
  border: 1px solid var(--border-accent);
}

.btn-secondary:hover {
  background: #16365e;
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--brand-blue-bright);
  color: #ffffff;
  background: rgba(54, 103, 166, 0.14);
}

/* Sections & Grids */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--brand-blue-bright);
  margin-bottom: 0.4rem;
}

.section-header-flex {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.section-header-flex h2 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin: 0;
}

.view-all {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--brand-blue-bright);
  white-space: nowrap;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.card:hover {
  border-color: var(--brand-blue-bright);
  background: var(--surface-hover);
}

.pillar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.pillar-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-blue-bright);
  background: rgba(15, 39, 68, 0.85);
  border: 1px solid var(--border-accent);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.pillar-diamond {
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--brand-blue-bright);
  transform: rotate(45deg);
}

.pillar-card h3, .tool-card h3, .post-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  line-height: 1.35;
  color: #ffffff;
}

.pillar-card h3 a, .tool-card h3 a, .post-card h3 a {
  color: #ffffff;
}

.pillar-card h3 a:hover, .tool-card h3 a:hover, .post-card h3 a:hover {
  color: var(--brand-blue-bright);
}

.pillar-card p, .tool-card p, .post-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin: 0 0 1.25rem;
  flex-grow: 1;
}

.topic-list {
  list-style: none;
  padding: 0.9rem 0 0;
  margin: 0;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #cbd5e1;
}

.topic-list li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.35rem;
}

.topic-list li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--brand-blue-bright);
}

.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.tool-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #93c5fd;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
}

.tool-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 500;
}

.mini-code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  color: #93c5fd;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

/* Repo Telemetry Bar */
.repo-telemetry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.telemetry-sep {
  color: var(--text-dim);
}

/* Badges */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.badge-navy {
  background: var(--brand-navy);
  border-color: var(--border-accent);
  color: #ffffff;
}

.badge-blue {
  background: rgba(54, 103, 166, 0.22);
  border-color: rgba(91, 155, 248, 0.35);
  color: #93c5fd;
}

/* Empty State */
.empty-state {
  padding: 2rem;
  border: 1px dashed var(--border-accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.empty-state-header {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--brand-blue-bright);
  margin-bottom: 0.5rem;
}

.empty-state code {
  font-family: var(--font-mono);
  background: var(--code-bg);
  color: #93c5fd;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* Publications & Blog Lists */
.pub-list, .post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pub-item {
  padding: 1.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.15s ease;
}

.pub-item:hover {
  border-color: var(--brand-blue-bright);
}

.pub-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.pub-title {
  font-size: 1.22rem;
  font-weight: 600;
  margin: 0 0 0.45rem;
  line-height: 1.35;
}

.pub-title a {
  color: #ffffff;
}

.pub-title a:hover {
  color: var(--brand-blue-bright);
}

.pub-authors {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 0.65rem;
}

.pub-excerpt {
  font-size: 0.94rem;
  color: var(--text-muted);
  margin: 0 0 0.9rem;
}

.pub-item-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.pub-item-links span {
  color: var(--border);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  border-color: var(--brand-blue-bright);
  color: #ffffff;
}

.filter-btn.active {
  background: var(--brand-blue);
  border-color: var(--brand-blue-bright);
  color: #ffffff;
}

/* Article & Page Headers */
.page-header, .article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.page-title, .article-title {
  font-size: clamp(1.9rem, 3.6vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #ffffff;
  margin: 0.35rem 0 0.75rem;
}

.page-subtitle {
  font-size: 1.12rem;
  color: var(--text-muted);
  margin: 0;
}

.article-author {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin: 0;
}

.meta-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 0.65rem;
}

.pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.abstract-box {
  background: var(--surface);
  border-left: 3px solid var(--brand-blue-bright);
  padding: 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 2rem;
}

.abstract-box h2 {
  font-size: 0.82rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #93c5fd;
  margin: 0 0 0.5rem;
}

.abstract-box p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.7;
  color: #e2e8f0;
}

.install-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--code-bg);
  border: 1px solid var(--border-accent);
  color: #93c5fd;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  overflow-x: auto;
}

.install-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.install-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  white-space: nowrap;
}

.copy-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--brand-blue-bright);
  color: #ffffff;
}

/* Research Page Stack */
.research-stack {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.research-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.research-block-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.research-block-header h2 {
  margin: 0 !important;
}

/* Prose */
.prose {
  font-size: 1.04rem;
  line-height: 1.75;
  color: #cbd5e1;
}

.prose h2 {
  font-size: 1.45rem;
  color: #ffffff;
  margin: 2.25rem 0 0.85rem;
  letter-spacing: -0.015em;
}

.prose h3 {
  font-size: 1.18rem;
  color: #e2e8f0;
  margin: 1.75rem 0 0.65rem;
}

.prose p {
  margin: 0 0 1.25rem;
}

.prose ul, .prose ol {
  margin: 0 0 1.35rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose strong {
  color: #ffffff;
}

.prose pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  color: #e2e8f0;
  padding: 1.15rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.55;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  color: #93c5fd;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

.bibtex-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.bibtex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.bibtex-header h3 {
  font-size: 1rem;
  color: #ffffff;
  margin: 0;
}

.bibtex-section pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  color: #cbd5e1;
  padding: 1rem;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  overflow-x: auto;
}

.article-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Search Modal */
.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}

.search-modal.open {
  display: flex;
}

.search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 12, 0.78);
  backdrop-filter: blur(6px);
}

.search-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 600px;
  margin: 0 1rem;
  background: var(--surface);
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--border);
  color: var(--brand-blue-bright);
}

.search-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 1rem;
}

.search-esc {
  background: var(--code-bg);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
}

.search-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 0.5rem;
}

.search-result-item {
  display: block;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  transition: background 0.12s ease;
}

.search-result-item:hover {
  background: var(--surface-hover);
}

.search-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}

.search-result-title {
  font-weight: 600;
  color: #ffffff;
  font-size: 0.95rem;
}

.search-result-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.search-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  background: #04070c;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4rem 0 2.5rem;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.18rem;
  color: #ffffff;
  margin-bottom: 0.85rem;
}

.footer-about p {
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 0 1rem;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.mono-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: #93c5fd;
  background: rgba(15, 39, 68, 0.7);
  border: 1px solid var(--border-accent);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.footer-links h4 {
  color: #ffffff;
  font-size: 0.9rem;
  margin: 0 0 0.85rem;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

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

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-bento {
    grid-template-columns: 1fr;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .section-header-flex {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-toggle {
    display: block;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 4.5rem;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
  }
  .site-nav.open {
    display: block;
  }
  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}
