/* ============================================================================
 * Almandine OS — Official Static Web One-Pager Stylesheet
 * Theme: Almandine Garnet (Fe3Al2(SiO4)3) & Garnet Hill, Ely, Nevada (7,050 ft)
 * Synchronized with ../almandine-os/docs/Colors.md (24-bit ANSI + GOP RGB)
 * ============================================================================ */

:root {
  /* Official Almandine OS TrueColor / GOP Palette (from docs/Colors.md) */
  --almandine-obsidian: #0D090C;       /* DEFAULT_BG_RGB: 13, 9, 12 */
  --almandine-garnet-bg: #300812;      /* ANSI_GARNET_BG: 48, 8, 18 */
  --almandine-crimson: #CC2244;        /* ANSI_CRIMSON: 204, 34, 68 */
  --almandine-crimson-bright: #FF3860; /* SGR 9 Bright Red/Crimson */
  --almandine-gold: #F0B429;           /* ANSI_GOLD: 240, 180, 41 */
  --almandine-gold-bright: #FFD050;    /* SGR 11 Bright Gold */
  --almandine-cyan: #50C8F0;           /* ANSI_CYAN: 80, 200, 240 */
  --almandine-green: #50DC78;          /* ANSI_GREEN: 80, 220, 120 */
  --almandine-ice-white: #F0F2F8;      /* DEFAULT_FG_RGB: 240, 242, 248 */
  --almandine-quartz-white: #F5F5FA;   /* ANSI_WHITE: 245, 245, 250 */
  --almandine-slate: #8C91A0;          /* ANSI_GRAY: 140, 145, 160 */

  /* Garnet Hill, Ely, NV Geological Extension (Rhyolite Matrix & Great Basin) */
  --ely-rhyolite-deep: #140E13;        /* Deep Tertiary volcanic matrix */
  --ely-rhyolite-surface: #1C1319;     /* Weathered rhyolite card surface */
  --ely-rhyolite-elevated: #261A22;    /* Lithophysae cavity highlight */
  --ely-rhyolite-ash: #B8A6AE;         /* Pale pinkish-gray rhyolite ash */
  --ely-spessartine: #9E1932;          /* Deep garnet crystal facet shadow */
  --ely-desert-ochre: #D98A3C;         /* Steptoe Valley high-desert sunset */
  --ely-basin-sage: #5E9E82;           /* Great Basin sagebrush & juniper */

  /* UI Structural Tokens */
  --border-subtle: rgba(204, 34, 68, 0.22);
  --border-strong: rgba(204, 34, 68, 0.55);
  --border-gold: rgba(240, 180, 41, 0.35);
  --glow-crimson: 0 0 32px rgba(204, 34, 68, 0.25);
  --glow-gold: 0 0 24px rgba(240, 180, 41, 0.18);
  --shadow-card: 0 14px 40px rgba(5, 2, 4, 0.72);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --font-display: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--almandine-obsidian);
  color: var(--almandine-ice-white);
  font-family: var(--font-sans);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: #090608;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -12%, rgba(204, 34, 68, 0.22) 0%, transparent 68%),
    radial-gradient(ellipse 55% 45% at 88% 18%, rgba(240, 180, 41, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 65% 50% at 12% 48%, rgba(158, 25, 50, 0.11) 0%, transparent 55%),
    radial-gradient(ellipse 85% 55% at 50% 88%, rgba(48, 8, 18, 0.32) 0%, transparent 65%),
    linear-gradient(180deg, #090608 0%, #0D080C 20%, #120A0F 50%, #0D080C 80%, #070406 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
}

/* Smooth deep vignette overlay (zero grid lines) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 45%, rgba(4, 2, 4, 0.55) 100%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--almandine-gold);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--almandine-crimson-bright);
}

code, pre, .mono {
  font-family: var(--font-mono);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ============================================================================
 * Sticky Navbar
 * ============================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 9, 12, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--almandine-ice-white);
}

.brand-crystal {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(204, 34, 68, 0.45));
}

.brand-title {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-almandine {
  color: var(--almandine-crimson-bright);
  font-weight: 800;
}

.brand-os {
  color: var(--almandine-gold);
  font-weight: 800;
}

.brand-badge {
  font-size: 0.7rem;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  background: rgba(204, 34, 68, 0.16);
  border: 1px solid var(--border-strong);
  color: var(--almandine-ice-white);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
  font-size: 0.88rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--ely-rhyolite-ash);
  padding: 0.3rem 0;
  position: relative;
}

.nav-links a:hover {
  color: var(--almandine-ice-white);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--almandine-crimson), var(--almandine-gold));
  transition: width 0.2s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links .nav-cta {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 0.52rem 1.2rem;
  margin-left: 0.45rem;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--almandine-crimson) 0%, var(--ely-spessartine) 100%);
  color: var(--almandine-quartz-white) !important;
  border: 1px solid rgba(255, 56, 96, 0.5);
  box-shadow: 0 4px 14px rgba(204, 34, 68, 0.35);
  font-weight: 600;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(204, 34, 68, 0.55);
}

.nav-cta::after {
  display: none;
}

/* ============================================================================
 * Hero Section (Garnet Hill Horizon + Bare-Metal Core)
 * ============================================================================ */
.hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-backdrop-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 340px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 3.85rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero h1 .hero-almandine {
  color: var(--almandine-crimson);
  background: none;
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--ely-rhyolite-ash);
  max-width: 640px;
  margin-bottom: 1.75rem;
  line-height: 1.68;
}

.hero-lead strong {
  color: var(--almandine-ice-white);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.78rem 1.35rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--almandine-crimson) 0%, #961430 100%);
  color: var(--almandine-quartz-white);
  border-color: var(--almandine-crimson-bright);
  box-shadow: var(--glow-crimson);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--almandine-crimson-bright) 0%, var(--almandine-crimson) 100%);
  color: #fff;
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(28, 19, 25, 0.85);
  color: var(--almandine-gold);
  border-color: var(--border-gold);
}

.btn-secondary:hover {
  background: rgba(48, 8, 18, 0.9);
  border-color: var(--almandine-gold);
  color: var(--almandine-gold-bright);
  transform: translateY(-2px);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.metric-card {
  background: rgba(28, 19, 25, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.85rem 0.9rem;
  backdrop-filter: blur(8px);
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--almandine-gold);
  display: block;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--ely-rhyolite-ash);
  margin-top: 0.15rem;
  display: block;
}

/* Hero Right: Crystalline Almandine Specimen + Ring-0 Telemetry Card */
.hero-specimen-card {
  background: linear-gradient(160deg, rgba(48, 8, 18, 0.6) 0%, rgba(20, 14, 19, 0.92) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: var(--shadow-card), var(--glow-crimson);
  position: relative;
  overflow: hidden;
}

.hero-specimen-card::before {
  content: "ALMANDINE OS • LOCAL AI APPLIANCE";
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--almandine-slate);
  letter-spacing: 0.06em;
}

.crystal-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem 0 0.75rem;
}

.crystal-svg-hero {
  width: 220px;
  height: 220px;
  filter: drop-shadow(0 12px 28px rgba(204, 34, 68, 0.45));
}

.specimen-specs {
  margin-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.9rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.spec-row {
  display: flex;
  flex-direction: column;
  background: rgba(13, 9, 12, 0.65);
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  border-left: 2px solid var(--almandine-crimson);
}

.spec-row.gold {
  border-left-color: var(--almandine-gold);
}

.spec-row.cyan {
  border-left-color: var(--almandine-cyan);
}

.spec-row.green {
  border-left-color: var(--almandine-green);
}

.spec-key {
  color: var(--almandine-slate);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.spec-value {
  color: var(--almandine-ice-white);
  font-weight: 600;
  margin-top: 0.1rem;
}

/* ============================================================================
 * Section Headers & Common Layout
 * ============================================================================ */
section {
  padding: 4.5rem 0;
  scroll-margin-top: 4.5rem;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--almandine-crimson-bright);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.section-kicker::before {
  content: "◆";
  color: var(--almandine-gold);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--almandine-ice-white);
  letter-spacing: -0.015em;
}

.section-desc {
  color: var(--ely-rhyolite-ash);
  max-width: 760px;
  margin-top: 0.55rem;
  font-size: 1rem;
}

/* ============================================================================
 * Interactive UEFI GOP / ANSI Console Simulator
 * ============================================================================ */
.terminal-wrapper {
  background: var(--almandine-obsidian);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-card), 0 0 45px rgba(204, 34, 68, 0.18);
  overflow: hidden;
}

.terminal-titlebar {
  background: linear-gradient(90deg, #240710 0%, #300812 50%, #1C0A11 100%);
  border-bottom: 1px solid var(--border-strong);
  padding: 0.65rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.terminal-dots {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.tdot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.tdot.crimson { background: var(--almandine-crimson); }
.tdot.gold { background: var(--almandine-gold); }
.tdot.green { background: var(--almandine-green); }

.terminal-caption {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--almandine-ice-white);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.terminal-caption span.fb-pill {
  background: rgba(80, 200, 240, 0.14);
  color: var(--almandine-cyan);
  border: 1px solid rgba(80, 200, 240, 0.35);
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.7rem;
}

.terminal-toolbar {
  background: #140D12;
  border-bottom: 1px solid rgba(204, 34, 68, 0.2);
  padding: 0.55rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.toolbar-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--almandine-slate);
  margin-right: 0.35rem;
}

.cmd-chip {
  background: rgba(48, 8, 18, 0.65);
  border: 1px solid rgba(240, 180, 41, 0.32);
  color: var(--almandine-gold);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.24rem 0.6rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cmd-chip:hover {
  background: var(--almandine-crimson);
  color: var(--almandine-quartz-white);
  border-color: var(--almandine-crimson-bright);
}

.cmd-chip.chat-chip {
  border-color: rgba(80, 200, 240, 0.4);
  color: var(--almandine-cyan);
}

.cmd-chip.chat-chip:hover {
  background: rgba(80, 200, 240, 0.22);
  color: #fff;
}

.terminal-screen {
  background-color: #0D090C; /* Exact DEFAULT_BG_RGB (13, 9, 12) */
  color: #F0F2F8;            /* Exact DEFAULT_FG_RGB (240, 242, 248) */
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.48;
  padding: 1.15rem 1.25rem;
  height: 460px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Exact ANSI Color Classes from src/uefi_shim/uefi.h */
.ansi-crimson { color: #CC2244; }
.ansi-crimson-bold { color: #CC2244; font-weight: 700; }
.ansi-gold { color: #F0B429; }
.ansi-gold-bold { color: #F0B429; font-weight: 700; }
.ansi-cyan { color: #50C8F0; }
.ansi-green { color: #50DC78; font-weight: 600; }
.ansi-white { color: #F5F5FA; }
.ansi-gray { color: #8C91A0; }
.ansi-bold { font-weight: 700; color: #F0F2F8; }

.terminal-input-row {
  background: #110B0F;
  border-top: 1px solid rgba(204, 34, 68, 0.28);
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.prompt-label {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--almandine-crimson);
  flex-shrink: 0;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--almandine-quartz-white);
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.terminal-input::placeholder {
  color: rgba(140, 145, 160, 0.55);
}

.terminal-send-btn {
  background: var(--almandine-garnet-bg);
  border: 1px solid var(--border-strong);
  color: var(--almandine-gold);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 0.3rem 0.75rem;
  border-radius: 5px;
  cursor: pointer;
}

.terminal-send-btn:hover {
  background: var(--almandine-crimson);
  color: #fff;
}

/* ============================================================================
 * Origin, Geology & Garnet Hill, Ely, NV Theme Section
 * ============================================================================ */
.geology-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.lore-card {
  background: var(--ely-rhyolite-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}


.lore-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--almandine-ice-white);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lore-card p {
  color: var(--ely-rhyolite-ash);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.lore-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.lore-pill {
  background: rgba(13, 9, 12, 0.65);
  border: 1px solid rgba(204, 34, 68, 0.2);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
}

.lore-pill .lp-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--almandine-gold);
  text-transform: uppercase;
  display: block;
}

.lore-pill .lp-val {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--almandine-ice-white);
  font-weight: 600;
}

/* Color Theme Swatch Matrix */
.palette-box {
  background: var(--ely-rhyolite-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
}

.palette-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.palette-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.copy-toast {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--almandine-green);
  background: rgba(80, 220, 120, 0.12);
  border: 1px solid rgba(80, 220, 120, 0.35);
  padding: 0.25rem 0.65rem;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.copy-toast.visible {
  opacity: 1;
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
}

.swatch-card {
  background: rgba(13, 9, 12, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.swatch-card:hover {
  transform: translateY(-2px);
  border-color: var(--almandine-gold);
}

.swatch-preview {
  height: 54px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0.35rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
}

.swatch-body {
  padding: 0.65rem 0.75rem;
}

.swatch-name {
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--almandine-ice-white);
  display: block;
}

.swatch-token {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--almandine-gold);
  display: block;
  margin-top: 0.1rem;
}

.swatch-ansi {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--almandine-slate);
  display: block;
  margin-top: 0.2rem;
}

.swatch-role {
  font-size: 0.74rem;
  color: var(--ely-rhyolite-ash);
  margin-top: 0.35rem;
  line-height: 1.35;
}

/* ============================================================================
 * 4-Layer Software Architecture & Zero-Copy Arena Layout
 * ============================================================================ */
.arch-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: start;
}

.layer-stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.layer-card {
  background: var(--ely-rhyolite-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--almandine-crimson);
  border-radius: 10px;
  padding: 1.15rem 1.35rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.layer-card:hover {
  transform: translateX(4px);
  border-color: var(--almandine-gold);
}

.layer-card.l4 { border-left-color: var(--almandine-crimson-bright); }
.layer-card.l3 { border-left-color: var(--almandine-gold); }
.layer-card.l2 { border-left-color: var(--almandine-cyan); }
.layer-card.l1 { border-left-color: var(--almandine-green); }

.layer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.layer-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(204, 34, 68, 0.18);
  color: var(--almandine-crimson-bright);
}

.layer-card.l3 .layer-badge { background: rgba(240, 180, 41, 0.16); color: var(--almandine-gold); }
.layer-card.l2 .layer-badge { background: rgba(80, 200, 240, 0.16); color: var(--almandine-cyan); }
.layer-card.l1 .layer-badge { background: rgba(80, 220, 120, 0.16); color: var(--almandine-green); }

.layer-files {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--almandine-slate);
}

.layer-card h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--almandine-ice-white);
  margin-bottom: 0.35rem;
}

.layer-card p {
  font-size: 0.86rem;
  color: var(--ely-rhyolite-ash);
}

.layer-symbols {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.sym-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: rgba(13, 9, 12, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--almandine-ice-white);
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
}

/* Right Column: Zero-Copy 2 MiB Write-Back Physical Memory Arena Map */
.arena-panel {
  background: var(--ely-rhyolite-surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.arena-panel h3 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  margin-bottom: 0.35rem;
  color: var(--almandine-ice-white);
}

.arena-sub {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--almandine-cyan);
  margin-bottom: 1.15rem;
  display: block;
}

.arena-blocks {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.arena-block {
  background: rgba(13, 9, 12, 0.85);
  border: 1px solid rgba(204, 34, 68, 0.3);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
}

.arena-block-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--almandine-gold);
  margin-bottom: 0.35rem;
}

.arena-block-header .align-tag {
  color: var(--almandine-green);
  font-size: 0.7rem;
}

.arena-subitems {
  list-style: none;
  font-size: 0.74rem;
  color: var(--ely-rhyolite-ash);
  line-height: 1.55;
}

.arena-subitems li::before {
  content: "├─ ";
  color: var(--almandine-crimson-bright);
}

.arena-subitems li:last-child::before {
  content: "└─ ";
  color: var(--almandine-crimson-bright);
}

/* ============================================================================
 * Intel Core i9 Microarchitecture & Silicon Unleashed
 * ============================================================================ */
.silicon-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.silicon-card {
  background: var(--ely-rhyolite-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.silicon-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.silicon-card h3 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--almandine-ice-white);
}

.msr-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: rgba(240, 180, 41, 0.14);
  border: 1px solid var(--border-gold);
  color: var(--almandine-gold);
  white-space: nowrap;
}

.silicon-card p {
  font-size: 0.9rem;
  color: var(--ely-rhyolite-ash);
  margin-bottom: 1rem;
}

.code-snippet {
  background: #0A0709;
  border: 1px solid rgba(204, 34, 68, 0.25);
  border-radius: 8px;
  padding: 0.75rem 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--almandine-ice-white);
  overflow-x: auto;
  line-height: 1.5;
}

/* Data Tables (Performance Bottlenecks & Hardware Tiers) */
.table-card {
  background: var(--ely-rhyolite-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.table-card-header {
  background: rgba(48, 8, 18, 0.55);
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.table-card-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.table-scroll {
  overflow-x: auto;
}

table.almandine-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  text-align: left;
}

table.almandine-table th {
  background: rgba(13, 9, 12, 0.85);
  color: var(--almandine-gold);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border-strong);
}

table.almandine-table td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(204, 34, 68, 0.14);
  color: var(--almandine-ice-white);
  vertical-align: top;
}

table.almandine-table tr:last-child td {
  border-bottom: none;
}

table.almandine-table tr:hover td {
  background: rgba(48, 8, 18, 0.32);
}

.impact-badge {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(204, 34, 68, 0.2);
  color: var(--almandine-crimson-bright);
  display: inline-block;
}

/* ============================================================================
 * Interactive RAM Sizing Calculator
 * ============================================================================ */
.calc-panel {
  margin-top: 2rem;
  background: linear-gradient(135deg, rgba(48, 8, 18, 0.55) 0%, rgba(28, 19, 25, 0.92) 100%);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.75rem;
  align-items: center;
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.calc-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.preset-btn {
  background: rgba(13, 9, 12, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--ely-rhyolite-ash);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn.active,
.preset-btn:hover {
  background: var(--almandine-crimson);
  color: #fff;
  border-color: var(--almandine-crimson-bright);
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

input[type="range"] {
  accent-color: var(--almandine-crimson);
  width: 100%;
  cursor: pointer;
}

.calc-result-box {
  background: rgba(13, 9, 12, 0.85);
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  padding: 1.25rem;
  font-family: var(--font-mono);
}

.calc-formula {
  font-size: 0.73rem;
  color: var(--almandine-slate);
  margin-bottom: 0.65rem;
}

.calc-total {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--almandine-gold);
  margin-bottom: 0.25rem;
}

.calc-rec {
  font-size: 0.82rem;
  color: var(--almandine-green);
}

/* ============================================================================
 * Quick Start & Dual-Partition GPT USB Workflow
 * ============================================================================ */
.quickstart-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.75rem;
}

.cmd-block-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cmd-card {
  background: var(--ely-rhyolite-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.95rem 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.cmd-info {
  flex: 1;
}

.cmd-step {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--almandine-gold);
  text-transform: uppercase;
  display: block;
}

.cmd-desc {
  font-size: 0.84rem;
  color: var(--ely-rhyolite-ash);
  margin-bottom: 0.4rem;
}

.cmd-line {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--almandine-cyan);
  background: #0A0709;
  padding: 0.4rem 0.65rem;
  border-radius: 5px;
  border: 1px solid rgba(80, 200, 240, 0.2);
  display: inline-block;
}

.copy-cmd-btn {
  background: rgba(48, 8, 18, 0.8);
  border: 1px solid var(--border-strong);
  color: var(--almandine-ice-white);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.copy-cmd-btn:hover {
  background: var(--almandine-crimson);
}

.usb-partition-card {
  background: var(--ely-rhyolite-surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.usb-diagram {
  margin: 1rem 0;
  border: 2px solid var(--almandine-crimson);
  border-radius: 10px;
  overflow: hidden;
  background: #0A0709;
}

.usb-part {
  padding: 1rem;
  border-bottom: 1px dashed var(--border-strong);
}

.usb-part:last-child {
  border-bottom: none;
}

.usb-part-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--almandine-gold);
  display: flex;
  justify-content: space-between;
}

.usb-part-detail {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ely-rhyolite-ash);
  margin-top: 0.35rem;
}

/* ============================================================================
 * Footer
 * ============================================================================ */
.site-footer {
  padding: 3rem 0;
  background: #090608;
  border-top: 1px solid var(--border-strong);
  font-size: 0.85rem;
  color: var(--almandine-slate);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.footer-coords {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ely-rhyolite-ash);
}


/* ============================================================================
 * Interactive Almandine Light-Reflection Stage & Specimen Gallery
 * ============================================================================ */
.crystal-interactive-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0 0.5rem;
}

.crystal-canvas-wrap {
  position: relative;
  width: 280px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: crosshair;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 50%, rgba(204, 34, 68, 0.2) 0%, rgba(13, 9, 12, 0.3) 70%);
}

#almandine-crystal-canvas {
  width: 280px;
  height: 260px;
  display: block;
}

.crystal-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  width: 100%;
}

.crystal-ctrl-btn {
  background: rgba(13, 9, 12, 0.82);
  border: 1px solid rgba(204, 34, 68, 0.35);
  color: var(--ely-rhyolite-ash);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.crystal-ctrl-btn.active,
.crystal-ctrl-btn:hover {
  background: var(--almandine-crimson);
  color: var(--almandine-quartz-white);
  border-color: var(--almandine-gold);
}

.light-readout {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--almandine-gold);
  margin-top: 0.35rem;
  text-align: center;
  letter-spacing: 0.03em;
}

/* Real Almandine & Garnet Hill Specimen Gallery with JS Light Reflection */
.specimen-gallery-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.specimen-gallery-header h2,
.specimen-gallery-header h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--almandine-ice-white);
}

.specimen-gallery-hint {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--almandine-gold);
  background: rgba(48, 8, 18, 0.85);
  border: 1px solid var(--border-gold);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.specimen-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
  margin-bottom: 2.5rem;
}

.specimen-photo-card {
  background: var(--ely-rhyolite-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  transform-style: preserve-3d;
  will-change: transform;
  display: flex;
  flex-direction: column;
}

.specimen-photo-card:hover {
  border-color: var(--almandine-gold);
  box-shadow: 0 18px 44px rgba(204, 34, 68, 0.28);
}

.specimen-photo-card.featured-wide {
  grid-column: span 2;
}

.specimen-img-stage {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: #080507;
  cursor: crosshair;
  user-select: none;
}

.specimen-photo-card.featured-wide .specimen-img-stage {
  height: 270px;
}

.specimen-img-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.06) saturate(1.08);
  transition: transform 0.35s ease;
}

.specimen-reflect-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: screen;
}

.specimen-badge-overlay {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 3;
  background: rgba(13, 9, 12, 0.82);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(204, 34, 68, 0.55);
  color: var(--almandine-gold);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  pointer-events: none;
}

.specimen-ri-overlay {
  position: absolute;
  bottom: 0.65rem;
  right: 0.65rem;
  z-index: 3;
  background: rgba(13, 9, 12, 0.84);
  border: 1px solid rgba(80, 200, 240, 0.4);
  color: var(--almandine-cyan);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 0.16rem 0.5rem;
  border-radius: 4px;
  pointer-events: none;
}

.specimen-caption {
  padding: 1rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.specimen-caption h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--almandine-ice-white);
  margin-bottom: 0.3rem;
}

.specimen-caption p {
  font-size: 0.82rem;
  color: var(--ely-rhyolite-ash);
  line-height: 1.48;
}

.specimen-caption-meta {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(204, 34, 68, 0.16);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--almandine-slate);
}
/* ============================================================================
 * Download .iso Images Section
 * ============================================================================ */
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.iso-card {
  background: var(--ely-rhyolite-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
}

.iso-card.featured {
  border-color: var(--border-gold);
}

.iso-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.iso-tier {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--almandine-gold);
}

.iso-status-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(204, 34, 68, 0.16);
  border: 1px solid var(--border-strong);
  color: var(--almandine-ice-white);
}

.iso-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--almandine-ice-white);
  margin-bottom: 0.45rem;
}

.iso-filename {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--almandine-cyan);
  background: #0A0709;
  border: 1px solid rgba(80, 200, 240, 0.24);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  margin-bottom: 0.75rem;
  word-break: break-all;
}

.iso-desc {
  font-size: 0.88rem;
  color: var(--ely-rhyolite-ash);
  line-height: 1.55;
}

.iso-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(204, 34, 68, 0.16);
}

.iso-specs {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--almandine-slate);
}

.iso-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(13, 9, 12, 0.78);
  border: 1px dashed var(--border-gold);
  color: var(--almandine-gold);
  cursor: not-allowed;
  user-select: none;
}

/* Responsive Breakpoints */
@media (max-width: 980px) {
  .hero-grid,
  .geology-grid,
  .arch-layout,
  .silicon-grid,
  .calc-panel,
  .quickstart-grid,
  .specimen-gallery-grid,
  .download-grid {
    grid-template-columns: 1fr;
  }

  .specimen-photo-card.featured-wide {
    grid-column: span 1;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-inner {
    height: auto;
    min-height: 64px;
    padding: 0.65rem 1.5rem;
    flex-wrap: wrap;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 0.85rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 560px) {
  .hero-metrics,
  .specimen-specs,
  .lore-meta-grid {
    grid-template-columns: 1fr;
  }
}
