@charset "UTF-8";

/* ============================================================
   Spatial UI / Fluid Architecture Matrix
   Mathematically optimal interpolation (Utopia.fyi equations)
   Linear/Vercel Aesthetic Principles -> Light Mode
   ============================================================ */

:root {
  /* ── 1. FLUID TYPOGRAPHY (Linear Interpolation) ── 
     From 320px (min) to 1240px (max) viewport width.
     Base formula: clamp(min-size, calc([y-intercept] + [slope] * 100vw), max-size) 
  */
  --font-sans: "Pretendard Variable", "Pretendard", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, Menlo, monospace;

  --text-base-min: 1rem;       /* 16px */
  --text-base-max: 1.125rem;   /* 18px */
  /* Formula: clamp(16px, 15.565px + 0.136vw, 18px) */
  --text-base: clamp(1.0000rem, 0.9728rem + 0.1359vw, 1.1250rem);

  /* Step -1 (sm / caption) */
  --text-sm: clamp(0.8750rem, 0.8478rem + 0.1359vw, 0.9375rem);

  /* Step 1 (md / h4) */
  --text-md: clamp(1.1250rem, 1.0707rem + 0.2717vw, 1.2500rem);

  /* Step 2 (lg / h3) */
  --text-lg: clamp(1.2500rem, 1.1413rem + 0.5435vw, 1.5000rem);

  /* Step 3 (xl / h2) */
  --text-xl: clamp(1.5000rem, 1.3370rem + 0.8152vw, 1.8750rem);

  /* Step 4 (2xl / h1) */
  --text-2xl: clamp(1.7500rem, 1.4783rem + 1.3587vw, 2.3750rem);

  /* Step 5 (hero statement) */
  --text-3xl: clamp(2.2500rem, 1.7065rem + 2.7174vw, 3.5000rem);

  /* ── 2. SYSTEM SPACING & FLUID MEASUREMENTS ── */
  --space-3xs: clamp(0.25rem, 0.2283rem + 0.1087vw, 0.3125rem);
  --space-2xs: clamp(0.5rem, 0.4565rem + 0.2174vw, 0.625rem);
  --space-xs: clamp(0.75rem, 0.6848rem + 0.3261vw, 0.9375rem);
  --space-sm: clamp(1rem, 0.913rem + 0.4348vw, 1.25rem);
  --space-md: clamp(1.5rem, 1.3696rem + 0.6522vw, 1.875rem);
  --space-lg: clamp(2rem, 1.8261rem + 0.8696vw, 2.5rem);
  --space-xl: clamp(3rem, 2.7391rem + 1.3043vw, 3.75rem);
  --space-2xl: clamp(4rem, 3.6522rem + 1.7391vw, 5rem);
  
  --layout-width: 1240px;
  --reading-width: 72ch; /* The optimal line length character count */

  /* ── 3. LAB PRECISION PALETTE & BORDERS (Light Mode) ── */
  --bg-primary: #ffffff;
  --bg-secondary: #fafafb;
  --bg-glass: rgba(255, 255, 255, 0.85);
  
  --text-strong: #000000;
  --text-primary: #171717; /* Slate 900 */
  --text-secondary: #525252; /* Slate 600 */
  --text-tertiary: #a3a3a3; /* Slate 400 */

  /* Micro borders definition */
  --border-light: rgba(0, 0, 0, 0.04);
  --border-struct: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(0, 0, 0, 0.15);

  /* Accent – Brand Lime */
  --accent-glow: #65a300;
  --accent-glow-subtle: rgba(101, 163, 0, 0.12);

  /* ── 4. SPATIAL UI ELEVATION SYSTEM (Z-AXIS) ── */
  /* Ambient layers mapped to distance simulations */
  --elevation-1: 
    0 1px 2px rgba(0, 0, 0, 0.02),
    0 2px 4px rgba(0, 0, 0, 0.02);
  
  --elevation-2: 
    0 2px 4px rgba(0, 0, 0, 0.02),
    0 4px 8px rgba(0, 0, 0, 0.03),
    0 8px 16px rgba(0, 0, 0, 0.03);
    
  --elevation-3: 
    0 4px 8px rgba(0, 0, 0, 0.02),
    0 8px 16px rgba(0, 0, 0, 0.03),
    0 16px 32px rgba(0, 0, 0, 0.04),
    0 32px 64px rgba(0, 0, 0, 0.04);

  /* ── 5. KINETIC PHYSICS (GPU TIMING) ── */
  --ease-fluid: cubic-bezier(0.16, 1, 0.3, 1);     /* Smooth snap */
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);      /* Gentle deceleration */
  --motion-fast: 0.15s;
  --motion-med: 0.4s;
  --motion-slow: 0.8s;
}

/* ── 6. DARK MODE OVERRIDES (Cyber-Lab Edge) ── */
html.dark {
  --bg-primary: #000000; /* Deep Vantablack */
  --bg-secondary: #0a0a0a;
  --bg-glass: rgba(0, 0, 0, 0.75);
  
  --text-strong: #ffffff;
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-tertiary: #52525b;

  --border-light: rgba(255, 255, 255, 0.05); /* slightly more visible for edge */
  --border-struct: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(255, 255, 255, 0.15);

  --accent-glow: #ccff00; /* Lime Glow */
  --accent-glow-subtle: rgba(204, 255, 0, 0.15);

  --elevation-1: 0 4px 12px rgba(0, 0, 0, 0.8);
  --elevation-2: 0 8px 24px rgba(0, 0, 0, 0.9);
  --elevation-3: 0 16px 48px rgba(0, 0, 0, 1), 0 0 40px var(--accent-glow-subtle); /* Neon Bloom */
}

/* ── Base Engine ─────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  background-color: var(--bg-primary);
  /* The extreme precision dot grid */
  background-image: radial-gradient(circle at 1px 1px, var(--border-struct) 1px, transparent 0);
  background-size: 32px 32px;
  background-attachment: fixed;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: transparent;
  overflow-x: hidden;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

::selection {
  background: rgba(0,0,0,0.1);
  color: var(--text-strong);
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--motion-fast) var(--ease-fluid);
}

:where(a, button, input, [role="option"]):focus-visible {
  outline: 2px solid var(--text-strong);
  outline-offset: 3px;
}

/* ── Hardware Accelerated Motion Classes ─────────── */
.animate-fade-up {
  opacity: 0;
  transform: translate3d(0, 20px, 0); /* 3d triggers GPU acceleration */
  will-change: opacity, transform;
  animation: fadeUp var(--motion-slow) var(--ease-fluid) forwards;
}

.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.10s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.20s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* ── Glassmorphism Spatial Nav ───────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: clamp(56px, 5vw, 72px);
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border-struct);
  transition: transform var(--motion-med) var(--ease-fluid);
  will-change: transform;
}

.nav__inner {
  max-width: var(--layout-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text-strong);
  flex: 0 0 auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 1 1 auto;
  justify-content: flex-end;
}

.nav__mobile-search-trigger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-struct);
  border-radius: 999px;
  color: var(--text-secondary);
  cursor: pointer;
}

.nav__mobile-search-trigger:hover {
  color: var(--text-strong);
  border-color: var(--text-tertiary);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  letter-spacing: 0;
}

.nav__link:hover, .nav__link--active {
  color: var(--text-strong);
}

.nav__link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--text-strong);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--motion-med) var(--ease-fluid);
}

.nav__link:hover::after, .nav__link--active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-struct);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border var(--motion-fast), color var(--motion-fast);
}

.nav__search-trigger:hover {
  border: 1px solid var(--text-tertiary);
  color: var(--text-strong);
}

.nav__search-trigger span {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-struct);
  padding: 2px 6px;
  border-radius: 4px;
}

@media (max-width: 500px) {
  .nav {
    height: auto;
  }
  .nav__inner {
    height: auto;
    min-height: 56px;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 10px;
  }
  .nav__links {
    display: none;
  }
  .nav__mobile-search-trigger {
    display: inline-flex;
  }
  .nav__search-trigger {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .post-item:hover,
  .bento-card:hover {
    transform: none !important;
  }
}

/* ── Shell & Hero ────────────────────────────────── */
.shell {
  flex: 1;
  max-width: var(--layout-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
  width: 100%;
}

.hero {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-2xl);
  width: 100%;
  max-width: 800px;
  position: relative;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: 0.15em;
  padding: 6px 14px;
  border: 1px solid var(--border-struct);
  border-radius: 999px;
  background: var(--bg-primary);
  margin-bottom: var(--space-md);
  box-shadow: var(--elevation-1);
}

.hero__badge::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-strong);
  animation: blink 2s infinite ease-out;
}

@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.2; transform: scale(0.8); }
}

.hero__statement {
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--text-strong);
}

.hero__accent {
  color: var(--text-tertiary);
}

.hero__subtitle {
  margin-top: var(--space-md);
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0;
  max-width: 60ch;
}

/* ── Reading Progress Bar ────────────────────── */
#reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--text-strong);
  z-index: 10000;
  transition: width 0.1s linear;
  pointer-events: none;
}
html.dark #reading-progress {
  background: var(--accent-glow);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ── Lab Stats Counter ────────────────────────── */
.lab-stats {
  display: flex;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-struct);
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1;
  letter-spacing: 0;
}
html.dark .stat-value {
  color: var(--accent-glow);
  text-shadow: 0 0 20px rgba(204,255,0,0.3);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Taxonomy Filter (Anthropic-pattern) ────────── */
.research-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-struct);
}
.taxonomy-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tax-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-struct);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--motion-fast), color var(--motion-fast), border var(--motion-fast);
}
.tax-btn:hover {
  border-color: var(--text-tertiary);
  color: var(--text-strong);
}
.tax-btn--active {
  background: var(--accent-glow);
  color: #fff;
  border-color: var(--accent-glow);
  box-shadow: 0 2px 8px var(--accent-glow-subtle);
}
html.dark .tax-btn--active {
  background: var(--accent-glow);
  color: #000;
  border-color: var(--accent-glow);
}
.no-results {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--space-xl);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}
.no-results__icon {
  font-size: 1.5rem;
}

/* ── Structural Web Components ───────────────────── */
.system-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--space-lg);
}
.hud-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-struct);
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}
.hud-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-glow, #27c93f);
}
.hud-dot.pulsing {
  animation: pulse-glow 2s infinite;
}
@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 var(--accent-glow-subtle, rgba(39, 201, 63, 0.4)); }
  70% { box-shadow: 0 0 0 6px rgba(0,0,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-struct);
  padding-bottom: 8px;
}

.ecosystem-section {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-2xl);
}
.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}
.eco-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  text-decoration: none;
  transition: border var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast);
}
.eco-card:hover {
  border-color: var(--border-focus);
  box-shadow: var(--elevation-2);
  transform: translateY(-2px);
}
html.dark .eco-card:hover {
  border-color: rgba(204, 255, 0, 0.3);
}
.eco-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-struct);
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--text-strong);
}
.eco-card__info h3 {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 4px;
}
.eco-card__info p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 10px;
}

.eco-card__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.eco-card__status span {
  width: 5px; height: 5px;
  border-radius: 50%;
  display: inline-block;
}
.eco-card__status--live { color: #27c93f; }
.eco-card__status--live span { background: #27c93f; animation: pulse-glow 2s infinite; }
.eco-card__status--archived { color: var(--text-tertiary); }
.eco-card__status--archived span { background: var(--text-tertiary); }
.eco-card__status--scanning { color: #f5a623; }
.eco-card__status--scanning span {
  background: #f5a623;
  animation: blink 1s infinite;
}

.eco-card__tags {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.eco-card__tags span {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-struct);
  color: var(--text-tertiary);
}

.eco-card--locked {
  cursor: default;
  opacity: 0.5;
  border-style: dashed;
  pointer-events: none;
}
html.dark .eco-card--locked {
  opacity: 0.4;
}

/* Hero bg dot grid */
.shell::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
}
html.dark .shell::before {
  opacity: 1;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
}
.shell > * { position: relative; z-index: 1; }


.architect-module {
  margin-top: var(--space-3xl);
  padding: var(--space-2xl);
  background: var(--bg-secondary);
  border: 1px solid var(--border-struct);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.architect-module::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: var(--text-strong);
}
html.dark .architect-module::before {
  background: var(--accent-glow);
  box-shadow: 0 0 12px var(--accent-glow);
}
.arch-inner {
  display: flex;
  gap: var(--space-2xl);
  align-items: flex-start;
}
.arch-left {
  flex-shrink: 0;
}
.arch-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--border-struct);
  display: block;
}
.arch-photo--pixel {
  border-radius: 8px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  width: 100px;
  height: 100px;
}
html.dark .arch-photo {
  border-color: rgba(204, 255, 0, 0.25);
  box-shadow: 0 0 24px rgba(204, 255, 0, 0.1);
}
.arch-right {
  flex: 1;
}
.arch-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.arch-name {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: 0;
  margin-bottom: 12px;
}
.arch-bio {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  white-space: pre-line;
}
.arch-proof {
  display: flex;
  gap: var(--space-xl);
  margin-bottom: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--border-struct);
  border-bottom: 1px solid var(--border-struct);
}
.proof-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.proof-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1;
  letter-spacing: 0;
}
html.dark .proof-value {
  color: var(--accent-glow);
  text-shadow: 0 0 16px rgba(204,255,0,0.3);
}
.proof-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.arch-links {
  display: flex;
  gap: 10px;
}
.arch-btn {
  padding: 8px 18px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-strong);
  background: var(--bg-primary);
  border: 1px solid var(--border-struct);
  border-radius: 6px;
  text-decoration: none;
  transition: background var(--motion-fast), border-color var(--motion-fast);
}
.arch-btn:hover {
  border-color: var(--text-tertiary);
}
.arch-btn--primary {
  background: var(--text-strong);
  color: var(--bg-primary);
  border-color: var(--text-strong);
}
.arch-btn--primary:hover {
  background: var(--text-secondary);
  border-color: var(--text-secondary);
}
html.dark .arch-btn--primary {
  background: var(--accent-glow);
  color: #000;
  border-color: var(--accent-glow);
}
@media (max-width: 640px) {
  .arch-inner { flex-direction: column; gap: var(--space-lg); }
  .arch-photo { width: 80px; height: 80px; }
}

/* ── Asymmetric Bento Media Matrix (list.html) ────── */
.post-list {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: var(--space-lg);
  list-style: none;
}

/* Spatial Post Card (Bento Item) */
.post-item {
  grid-column: span 12; /* Mobile default */
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  position: relative;
  border-radius: 8px;
  padding: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-struct);
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  transition: border-color var(--motion-med) var(--ease-fluid), box-shadow var(--motion-med) var(--ease-fluid), transform var(--motion-med) var(--ease-fluid);
  will-change: transform, box-shadow;
  overflow: hidden;
}

html.dark .post-item {
  background: var(--bg-primary);
  border-color: rgba(255,255,255,0.06);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}



/* Radial gradient glow layer (mouse-tracked) */
.post-item::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(101, 163, 0, 0.06), transparent 40%);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.post-item:hover::before {
  opacity: 1;
}
.post-item > * {
  position: relative;
  z-index: 1;
}

@media (min-width: 640px) {
  .post-item { grid-column: span 6; }
  .post-item--medium { grid-column: span 6; }
}

@media (min-width: 1024px) {
  .post-item { grid-column: span 4; }

  /* Bento Custom Spans */
  .post-item--medium {
    grid-column: span 6;
  }
  .post-item--large {
    grid-column: span 8;
    flex-direction: row;
    align-items: stretch;
  }
  .post-item--large .post-item__image-link {
    width: 42%;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    border-radius: 8px 0 0 8px;
    border-bottom: none;
    border-right: 1px solid var(--border-struct);
  }
  .post-item--large .post-item__content {
    padding: var(--space-md) var(--space-lg);
    justify-content: center;
  }
  .post-item--hero {
    grid-column: span 12;
    flex-direction: row;
    align-items: center;
    gap: var(--space-xl);
  }
  .post-item--hero .post-item__image-link {
    width: 42%;
    aspect-ratio: 1 / 1;
    border-radius: 8px 0 0 8px;
    border-bottom: none;
    border-right: 1px solid var(--border-struct);
  }
  .post-item--hero .post-item__content {
    width: 58%;
    padding-right: var(--space-xl);
  }
}

.post-item:hover {
  border-color: var(--border-focus);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  transform: translateY(-4px);
  z-index: 10;
}

html.dark .post-item:hover {
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 30px rgba(204,255,0,0.03);
}

.post-item__image-link {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background: #090909;
  border-bottom: 1px solid var(--border-struct);
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-item__image-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.fallback-mesh {
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle at 50% 50%, rgba(101, 163, 0, 0.08), transparent 60%),
              radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.04), transparent 50%);
  filter: blur(40px);
  z-index: 0;
}

html.dark .fallback-mesh {
  background: radial-gradient(circle at 50% 50%, rgba(204, 255, 0, 0.05), transparent 60%),
              radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.02), transparent 50%);
}

.fallback-icon {
  width: 32px;
  height: 32px;
  color: var(--text-tertiary);
  opacity: 0.4;
  z-index: 1;
}

.post-item__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  transform: none;
  background: #090909;
  display: block;
  transition: transform var(--motion-slow) var(--ease-out);
  will-change: transform;
}

.ambient-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(1.02);
  display: block;
  transition: transform var(--motion-slow) var(--ease-out);
  will-change: transform;
}

.post-item:hover .post-item__image {
  transform: none;
}

.post-item:hover .ambient-video {
  transform: scale(1.04);
}

/* Inner glare effect */
.post-item__image-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit; /* Fix: inherit perfectly matches the parent's dynamic radius */
  border: 1px solid rgba(255, 255, 255, 0.2);
  pointer-events: none;
  mix-blend-mode: overlay;
}

.post-item__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md);
}

.post-item__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Dedicated hitbox to make entire card clickable without layout side-effects */
.post-item__hitbox {
  position: absolute;
  inset: 0;
  z-index: 50; /* Ensure it overlays everything inside the card */
  cursor: pointer;
}

.post-title {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--text-primary);
  transition: color var(--motion-fast);
}

.post-item:hover .post-title {
  color: var(--text-strong);
}

.post-excerpt {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 4px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-xs);
}

.post-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-struct);
  border-radius: 4px;
}

/* ── Deep Reading Ergonomics (single.html) ───────── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  max-width: var(--layout-width);
}

@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: minmax(auto, var(--reading-width)) 1fr;
    gap: var(--space-2xl);
  }
}

.article-header {
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-struct);
  padding-bottom: var(--space-md);
}

.article-header__meta {
  display: flex;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-bottom: var(--space-sm);
}

.article-header h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  color: var(--text-strong);
  margin-bottom: var(--space-xs);
}

.post-header__desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.5;
  font-weight: 400;
}

.article-featured {
  margin-bottom: var(--space-2xl);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--elevation-2);
  border: 1px solid var(--border-struct);
  position: relative;
  isolation: isolate;
  background: #090909;
}

.article-featured__image, .article-featured__video {
  width: 100%;
  max-height: 70vh;
  display: block;
}

.article-featured__image {
  object-fit: contain;
  background: #090909;
}

.article-featured__video {
  object-fit: cover;
}

.article-featured figcaption {
  padding: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  background: var(--bg-primary);
  border-top: 1px solid var(--border-struct);
  text-align: right;
}

/* ── Article Layout & TOC (Scrollspy) ────────── */
/* Removed duplicate article-layout and toc-sidebar flex code */

.toc-sidebar__title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.toc-sidebar nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toc-sidebar nav ul ul {
  padding-left: 12px;
  margin-top: 6px;
}

.toc-sidebar nav a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--motion-fast), text-shadow var(--motion-fast);
  display: block;
  line-height: 1.4;
}

.toc-sidebar nav a:hover {
  color: var(--text-strong);
}

.toc-sidebar nav a.active {
  color: var(--text-strong);
  font-weight: 500;
  position: relative;
  padding-left: 12px;
}
.toc-sidebar nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--text-strong);
  transition: background 0.3s ease;
}
html.dark .toc-sidebar nav a.active::before {
  background: var(--accent-glow);
  box-shadow: 0 0 8px var(--accent-glow-subtle);
}

html.dark .toc-sidebar nav a.active {
  color: var(--accent-glow);
  text-shadow: 0 0 8px rgba(204, 255, 0, 0.4);
}

/* Precision Typography within Content */
.post-body {
  font-size: var(--text-md);
  color: var(--text-primary);
  font-weight: 400;
}

.post-body p { margin-bottom: 2rem; }

.post-body h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: 0;
  margin: 3.5rem 0 1.5rem;
  color: var(--text-strong);
}

.post-body h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: 0;
  margin: 2.5rem 0 1rem;
}

.post-body ul, .post-body ol {
  padding-left: 1.5rem;
  margin-bottom: 2rem;
}

.post-body li {
  margin-bottom: 0.5rem;
}

.post-body blockquote {
  border-left: 3px solid var(--text-strong);
  padding-left: 1.5rem;
  margin: 2.5rem 0;
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--text-secondary);
}

.post-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-secondary);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border-struct);
  color: var(--text-strong);
}

.post-body pre {
  background: #fcfcfc;
  border: 1px solid var(--border-struct);
  border-radius: 8px;
  padding: calc(var(--space-md) + 24px) var(--space-md) var(--space-md);
  margin: 2.5rem 0;
  overflow-x: auto;
  box-shadow: var(--elevation-1);
  position: relative;
}
html.dark .post-body pre {
  background: #0d0d0d;
}

/* macOS Window Dots */
.code-copy-wrapper::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 16px 0 0 #febc2e, 32px 0 0 #28c840;
  z-index: 2;
}

.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

/* Copy Button */
.code-copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-struct);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--motion-fast), background var(--motion-fast), color var(--motion-fast), border var(--motion-fast);
}

.code-copy-wrapper:hover .code-copy-btn,
.code-copy-btn:hover,
.code-copy-btn:focus {
  opacity: 1;
}

.code-copy-btn:hover {
  background: var(--bg-primary);
  color: var(--text-strong);
  border-color: var(--text-tertiary);
}

.code-copy-btn.copied {
  color: #27c93f;
  border-color: #27c93f;
}

.post-body img, .post-body video {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-struct);
  margin: 3rem 0;
  box-shadow: var(--elevation-1);
  display: block;
}

.markdown-figure {
  margin: 3rem 0;
}

.markdown-figure img {
  margin: 0;
}

.markdown-figure figcaption {
  margin-top: 0.625rem;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  line-height: 1.6;
  text-align: center;
}

/* ── Custom Shortcode Bento Grids ───────────────── */
.inline-bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-sm);
  margin: 3rem 0;
}
.inline-bento > * {
  margin: 0 !important; /* Reset child margins to keep grid tight */
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0;
  font-size: var(--text-sm);
}

.post-body th {
  border-bottom: 2px solid var(--text-strong);
  padding: 16px 8px;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-body td {
  padding: 16px 8px;
  border-bottom: 1px solid var(--border-struct);
}

/* ── Page Documents ───────────────────────────────── */
.about {
  max-width: 1040px;
  margin: var(--space-xl) 0 var(--space-2xl);
}

.about__label {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.about__title {
  font-size: clamp(2.25rem, 1.9239rem + 1.6304vw, 3rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: 0;
  color: var(--text-strong);
  margin: 0 0 var(--space-lg);
  max-width: 14ch;
}

.about__body {
  font-size: var(--text-md);
  color: var(--text-primary);
  line-height: 1.65;
}

.about__body > p,
.about__body > ul,
.about__body > ol,
.about__body > blockquote {
  max-width: 76ch;
}

.about__body p {
  margin-bottom: 1.25rem;
}

.about__body h2 {
  margin: 2.75rem 0 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border-struct);
  font-size: var(--text-xl);
  font-weight: 800;
  line-height: 1.16;
  color: var(--text-strong);
}

.about__body h3 {
  margin: 2rem 0 0.75rem;
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--text-strong);
}

.about__body ul,
.about__body ol {
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
}

.about__body li {
  margin-bottom: 0.5rem;
}

.about__body strong {
  color: var(--text-strong);
}

.about__body a {
  color: var(--text-strong);
  text-decoration: underline;
  text-decoration-color: rgba(101, 163, 0, 0.45);
  text-underline-offset: 3px;
}

html.dark .about__body a {
  text-decoration-color: rgba(204, 255, 0, 0.55);
}

.about__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem;
  font-size: 0.875rem;
  line-height: 1.5;
  display: block;
  overflow-x: auto;
  scrollbar-width: thin;
}

.about__body thead,
.about__body tbody,
.about__body tr {
  width: 100%;
}

.about__body th {
  padding: 0.75rem 0.75rem;
  border-bottom: 1px solid var(--text-strong);
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}

.about__body td {
  padding: 0.875rem 0.75rem;
  border-bottom: 1px solid var(--border-struct);
  vertical-align: top;
  color: var(--text-primary);
  min-width: 12rem;
}

.about__body td:first-child {
  min-width: 13rem;
  font-weight: 650;
  color: var(--text-strong);
}

.about__body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-secondary);
  border: 1px solid var(--border-struct);
  border-radius: 4px;
  padding: 0.15em 0.35em;
}

@media (max-width: 620px) {
  .about {
    max-width: min(100%, 340px);
  }
  .about__title {
    max-width: 100%;
  }
  .about__body {
    font-size: 1rem;
  }
}

/* ── Sticky Lab TOC ──────────────────────────────── */
/* Removed Sticky Lab TOC duplicate */

/* ── Footer ──────────────────────────────────────── */
.post-footer {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-struct);
}

.post-footer__back {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-footer__back-arrow {
  transition: transform var(--motion-med) var(--ease-fluid);
}

.post-footer__back:hover { color: var(--text-strong); }
.post-footer__back:hover .post-footer__back-arrow { transform: translateX(-4px); }

.comments {
  margin-top: var(--space-xl);
}
.comments__title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.footer {
  border-top: none;
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
  margin-top: auto;
  position: relative;
}
.footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-glow-subtle), var(--accent-glow), var(--accent-glow-subtle), transparent);
}

.footer__inner {
  max-width: var(--layout-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
  }
}

.footer__link {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}
.footer__link:hover { color: var(--text-strong); }

.footer__copy {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Command Palette (Cmd+K) ─────────────────────── */
.cmd-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.cmd-visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}
#cmd-palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  transition: opacity var(--motion-fast) var(--ease-out), visibility var(--motion-fast);
}
#cmd-palette {
  width: 100%;
  max-width: 600px;
  background: var(--bg-primary);
  border: 1px solid var(--border-struct);
  border-radius: 8px;
  box-shadow: var(--elevation-3);
  overflow: hidden;
  transform: scale(0.98);
  transition: transform var(--motion-med) var(--ease-out);
}
.cmd-visible #cmd-palette { transform: scale(1); }
.cmd-palette-header {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-struct);
  gap: 12px;
}
.cmd-icon { color: var(--text-secondary); }
#cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  color: var(--text-strong);
}
#cmd-input::placeholder { color: var(--text-tertiary); }
.cmd-esc {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--bg-secondary);
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-struct);
  color: var(--text-secondary);
}
.cmd-close {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-struct);
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background var(--motion-fast), color var(--motion-fast), border-color var(--motion-fast);
}
.cmd-close:hover,
.cmd-close:focus-visible {
  background: var(--bg-primary);
  color: var(--text-strong);
  border-color: var(--border-focus);
}
.cmd-palette-body {
  max-height: 400px;
  overflow-y: auto;
  padding: 12px;
}
.cmd-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 12px;
  margin-top: 8px;
}
.cmd-list { list-style: none; }
.cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--motion-fast), color var(--motion-fast);
}
.cmd-item-text { font-size: var(--text-sm); }
.cmd-item:hover, .cmd-item.active {
  background: var(--bg-secondary);
  color: var(--text-strong);
}
.cmd-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

/* ── Interactive Terminal UX Shortcode ───────────── */
.terminal-window {
  background: #111316;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  margin: 3rem 0;
  border: 1px solid rgba(0,0,0,0.18);
}
.terminal-header {
  background: #1a1d21;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.terminal-dots {
  display: flex;
  gap: 6px;
}
.terminal-dots span {
  width: 10px; height: 10px; border-radius: 50%;
}
.terminal-dots span:nth-child(1) { background: #ff5f56; }
.terminal-dots span:nth-child(2) { background: #ffbd2e; }
.terminal-dots span:nth-child(3) { background: #27c93f; }
.terminal-title {
  margin: 0 auto;
  transform: translateX(-24px);
  font-family: var(--font-mono);
  font-size: 11px;
  color: #c7c7c7;
  letter-spacing: 0.05em;
}
.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: #f4f4f5;
  line-height: 1.75;
  overflow-x: auto;
  white-space: pre-wrap;
}
.terminal-body.typing::after {
  content: "█";
  color: #b7e000;
  animation: blink 1s step-start infinite;
}
/* ── ENTERPRISE CODE ENGINE ──────────────────────── */
.code-engine-wrapper {
  position: relative;
  margin: var(--space-xl) 0;
  border-radius: 8px;
  background-color: #ffffff;
  border: 1px solid var(--border-struct);
  overflow: hidden;
  box-shadow: var(--elevation-1);
}
html.dark .code-engine-wrapper {
  background-color: #0d1117;
  border-color: rgba(255,255,255,0.1);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f7f7f8;
  border-bottom: 1px solid var(--border-struct);
}
html.dark .code-header {
  background: rgba(255,255,255,0.03);
}

.code-window-dots {
  display: flex;
  gap: 6px;
}
.code-window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.8;
}

.code-lang-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
html.dark .code-lang-label {
  color: #888;
}

.code-copy-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background var(--motion-fast), color var(--motion-fast);
}
.code-copy-btn svg {
  width: 16px;
  height: 16px;
}
.code-copy-btn:hover {
  background: var(--border-struct);
  color: var(--text-strong);
}
html.dark .code-copy-btn:hover {
  color: var(--accent-glow);
}
.code-copy-btn.copied {
  color: #27c93f;
}

.code-engine-wrapper .highlight {
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
}
.code-engine-wrapper pre {
  margin: 0;
  padding: var(--space-md);
  overflow-x: auto;
  background: #ffffff !important;
  color: #171717 !important;
}
.code-engine-wrapper code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #171717;
}

html.dark .code-engine-wrapper pre {
  background: #0d1117 !important;
  color: #e5e7eb !important;
}

html.dark .code-engine-wrapper code {
  color: #e5e7eb;
}


/* ── CONTEXTUAL TELEMETRY SIDEBAR (TOC) ─ Stripe-style ── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  max-width: var(--layout-width);
  margin: 0 auto;
  padding-top: clamp(56px, 5vw, 72px);
}

/* ── Article Grid Layout & TOC (Unified) ── */
.article-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  position: relative;
}

.article-main {
  min-width: 0;
  width: 100%;
}

.toc-sidebar {
  display: none;
}

@media (min-width: 1080px) {
  .article-layout {
    display: grid;
    grid-template-columns: minmax(0, 72ch) 260px;
    gap: var(--space-xl);
    align-items: start;
    justify-content: center;
  }
  .article-main {
    padding: var(--space-xl) 0;
  }
  .toc-sidebar {
    display: block;
    position: sticky;
    top: calc(72px + var(--space-xl));
    align-self: start;
    padding: var(--space-md);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: none;
    border: 1px solid var(--border-struct);
    border-radius: 8px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--elevation-1);
  }
  .toc-sidebar::-webkit-scrollbar { display: none; }
}

.toc-sidebar__title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-struct);
}

.toc-sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--border-struct);
  margin-left: 4px;
}

.toc-sidebar nav ul ul {
  padding-left: 12px;
  margin-top: 4px;
  border-left: none;
}

.toc-sidebar nav a {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-tertiary);
  text-decoration: none;
  padding: 6px 0 6px 16px;
  margin-left: -1px; /* overlap border */
  border-left: 1px solid transparent;
  transition: all var(--motion-fast);
  margin-bottom: 2px;
  word-break: keep-all;
}

.toc-sidebar nav a:hover {
  color: var(--text-strong);
}

.toc-sidebar nav a.active {
  color: var(--text-strong);
  font-weight: 500;
  border-left-color: var(--text-strong);
}

html.dark .toc-sidebar nav a.active {
  color: #fff;
  border-left-color: #fff;
}

/* ── MERMAID DIAGRAMS ──  */
.mermaid-diagram {
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-struct);
  border-radius: 8px;
  overflow-x: auto;
  text-align: center;
}
html.dark .mermaid-diagram {
  background: #0a0a0b;
  border-color: rgba(255,255,255,0.1);
}
.mermaid-diagram svg {
  max-width: 100%;
  height: auto;
}

/* ── Operator-Log Hero ────────────────────────────── */
/* Refs: panr/hugo-theme-terminal (Fira Code mono-dominant, 2.3k⭐)
   Vercel Geist (precise mono), Rauno Freiberg (density, cursor craft) */
.hero--operator {
  padding-top: 0;
  margin-bottom: var(--space-xl);
}
.hero--operator .hero__prompt {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75ch;
}
.hero--operator .hero__prompt-sigil {
  color: #65a300;
  font-weight: 700;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #65a300;
  text-indent: -9999px;
  overflow: hidden;
}
html.dark .hero--operator .hero__prompt-sigil {
  color: #ccff00;
}
.hero--operator .hero__statement {
  font-family: var(--font-sans);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.02;
  color: var(--text-strong);
}
.hero--operator .hero__statement .hero__accent {
  color: inherit;
  font-weight: inherit;
}
.hero__cursor {
  display: inline-block;
  width: 0.55ch;
  height: 0.85em;
  background: #65a300;
  vertical-align: -0.05em;
  margin-left: 0.12em;
  animation: op-blink 1.1s steps(2, end) infinite;
}
html.dark .hero__cursor {
  background: #ccff00;
  box-shadow: 0 0 12px rgba(204, 255, 0, 0.5);
}
@keyframes op-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.hero--operator .hero__subtitle {
  color: var(--text-secondary);
  margin-top: var(--space-md);
  max-width: 52ch;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: var(--space-md);
}
.hero__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--border-struct);
  border-radius: 8px;
  background: rgba(255,255,255,0.68);
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color var(--motion-fast), color var(--motion-fast), background var(--motion-fast), transform var(--motion-fast);
}
.hero__action:hover {
  border-color: rgba(101, 163, 0, 0.5);
  color: var(--text-strong);
  transform: translateY(-1px);
}
.hero__action--primary {
  background: #111;
  color: #fff;
  border-color: #111;
}
html.dark .hero__action {
  background: rgba(10, 10, 11, 0.72);
}
html.dark .hero__action--primary {
  background: #ccff00;
  color: #111;
  border-color: #ccff00;
}
.hero--operator .hero__meta {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-top: var(--space-lg);
  padding-top: var(--space-sm);
  border-top: 1px dashed var(--border-struct);
  letter-spacing: 0.02em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.hero--operator .hero__meta-sep {
  margin: 0 0.9ch;
  opacity: 0.4;
}
.hero--operator .hero__meta-live {
  color: #65a300;
  font-weight: 700;
  position: relative;
  padding-left: 14px;
}
html.dark .hero--operator .hero__meta-live {
  color: #ccff00;
}
.hero--operator .hero__meta-live::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: op-pulse 2s ease-in-out infinite;
}
@keyframes op-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(204, 255, 0, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(204, 255, 0, 0); }
}

/* Push hero type bigger — Rauno/Linear scale */
.hero--operator .hero__statement {
  font-size: 3.875rem;
}
@media (max-width: 900px) {
  .hero--operator .hero__statement { font-size: 3rem; }
}
@media (max-width: 620px) {
  .shell {
    overflow-x: hidden;
  }
  .hero,
  .hero__content,
  .operator-map,
  .operator-map__subtitle,
  .ecosystem-section,
  .bento-module,
  .research-header,
  .post-list,
  .profile {
    max-width: min(100%, 340px);
    min-width: 0;
  }
  .hero--operator .hero__statement {
    font-size: 1.55rem;
    line-height: 1.12;
    max-width: 100%;
    word-break: keep-all;
    overflow-wrap: normal;
  }
  .hero--operator .hero__subtitle {
    font-size: 1rem;
    max-width: 100%;
    line-height: 1.65;
    word-break: keep-all;
  }
  .hero__action {
    min-height: 40px;
    padding: 0 14px;
  }
  .hero--operator .hero__meta {
    display: block;
    line-height: 1.7;
  }
  .hero--operator .hero__meta-item {
    display: block;
    max-width: 100%;
    word-break: keep-all;
  }
  .hero--operator .hero__meta-sep {
    display: none;
  }
  .operator-map__subtitle {
    word-break: keep-all;
  }
}

/* ── Post Feed (Command Center v2) ────────────────── */
/* Refs: Linear changelog, Paul Graham essay index,
   sindresorhus.com dense listing, HN front */
.post-list--feed {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  grid-template-columns: none !important;
  border-top: 1px solid var(--border-struct);
  margin-top: var(--space-sm);
}
.post-list--feed .post-item {
  display: grid !important;
  grid-template-columns: 108px minmax(0, 1fr) auto;
  column-gap: 1.5rem;
  padding: 1.15rem 0.5rem 1.15rem 0;
  border-bottom: 1px solid var(--border-light);
  align-items: baseline;
  grid-column: auto !important;
  grid-row: auto !important;
  transition: background-color 0.18s var(--ease-out), padding-left 0.18s var(--ease-out);
  position: relative;
}
.post-list--feed .post-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #65a300;
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.2s var(--ease-out);
}
html.dark .post-list--feed .post-item::before {
  background: #ccff00;
}
.post-list--feed .post-item:hover {
  padding-left: 0.75rem;
  background: rgba(0, 0, 0, 0.02);
}
html.dark .post-list--feed .post-item:hover {
  background: rgba(204, 255, 0, 0.03);
}
.post-list--feed .post-item:hover::before {
  transform: scaleY(1);
}
.post-list--feed .post-item__image-link {
  display: none;
}
.post-list--feed .post-item__content {
  display: contents;
}
.post-list--feed .post-item__meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}
.post-list--feed .post-item__meta .post-date {
  color: var(--text-secondary);
  font-weight: 500;
}
.post-list--feed .post-item__meta .post-reading-time {
  opacity: 0.7;
  font-size: 0.6875rem;
}
.post-list--feed .post-title {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  letter-spacing: 0;
  margin: 0;
}
.post-list--feed .post-title a {
  color: inherit;
  text-decoration: none;
}
.post-list--feed .post-item:hover .post-title a {
  color: var(--text-strong);
}
.post-list--feed .post-excerpt {
  display: none;
}
.post-list--feed .post-tags {
  justify-self: end;
  align-self: baseline;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0;
}
.post-list--feed .post-tags .post-tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border: 1px solid var(--border-struct);
  border-radius: 2px;
  color: var(--text-tertiary);
  background: transparent;
  line-height: 1;
}
.post-list--feed .post-item:hover .post-tags .post-tag:first-child {
  border-color: #65a300;
  color: #65a300;
}
html.dark .post-list--feed .post-item:hover .post-tags .post-tag:first-child {
  border-color: #ccff00;
  color: #ccff00;
}
@media (max-width: 680px) {
  .post-list--feed .post-item {
    grid-template-columns: 88px minmax(0, 1fr);
    row-gap: 8px;
  }
  .post-list--feed .post-tags {
    grid-column: 2;
    justify-self: start;
  }
}

/* ── Profile Block ────────────────────────────────── */
/* Refs: Ben Kuhn benkuhn.net (concrete bullet bio),
   Maggie Appleton maggieappleton.com/about (timeline),
   Gwern gwern.net/about (factual dense) */
.profile {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  margin: var(--space-xl) 0 var(--space-2xl);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border-struct);
  border-bottom: 1px solid var(--border-struct);
  align-items: start;
}
@media (max-width: 680px) {
  .profile {
    grid-template-columns: 96px 1fr;
    gap: 1rem;
  }
}
.profile__photo-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border-struct);
}
.profile__photo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(204, 255, 0, 0.08));
  pointer-events: none;
}
.profile__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  filter: contrast(1.05);
}
.profile__body {
  min-width: 0;
}
.profile__header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}
.profile__name {
  font-family: var(--font-sans);
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  color: var(--text-strong);
  margin: 0;
}
.profile__handle {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: #65a300;
  letter-spacing: 0.02em;
}
html.dark .profile__handle {
  color: #ccff00;
}
.profile__bio {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 52ch;
  margin: 0 0 var(--space-md);
}
.profile__bio a {
  color: var(--text-strong);
  text-decoration: none;
  border-bottom: 1px solid #65a300;
  font-weight: 600;
  transition: background 0.15s;
}
html.dark .profile__bio a {
  border-bottom-color: #ccff00;
}
.profile__bio a:hover {
  background: rgba(204, 255, 0, 0.12);
}
.profile__bio strong {
  color: var(--text-strong);
  font-weight: 700;
}
/* Thesis + Evidence block */
.profile__thesis {
  margin: 0 0 var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile__thesis .thesis__quote {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: 0;
  line-height: 1.4;
}
.profile__thesis .thesis__tag {
  font-size: 0.875rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.profile__thesis .thesis__tag strong {
  color: #65a300;
  font-weight: 700;
}
html.dark .profile__thesis .thesis__tag strong {
  color: #ccff00;
}
.profile__evidence {
  list-style: none;
  margin: 0 0 var(--space-md);
  padding: 12px 16px;
  border: 1px solid var(--border-struct);
  border-radius: 4px;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile__evidence li {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.profile__evidence strong {
  color: var(--text-strong);
  font-weight: 700;
}
.profile__evidence a {
  color: var(--text-strong);
  border-bottom: 1px solid #65a300;
  text-decoration: none;
}
html.dark .profile__evidence a {
  border-bottom-color: #ccff00;
}
.profile__evidence .ev-key {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 2px 6px;
  border-radius: 2px;
  background: var(--bg-primary);
  border: 1px solid var(--border-struct);
  min-width: 48px;
  text-align: center;
  flex-shrink: 0;
}

/* Lifeline — swim-lane ribbons */
/* Refs: Basecamp hill chart, Linear roadmap, Wikipedia timeline diagrams */
/* ============================================================
   Event Log (Vertical Timeline)
   ============================================================ */
.event-log { width: 100%; position: relative; }
.event-log__head { margin-bottom: 24px; }
.event-log__title { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-secondary); }
.event-log__list { list-style: none; padding: 0; margin: 0; position: relative; }
.event-log__list::before { content: ''; position: absolute; top: 0; bottom: 0; left: 6px; width: 1px; background: var(--border-struct); z-index: 0; }
.event-log__item { position: relative; padding-left: 32px; padding-bottom: 32px; }
.event-log__item:last-child { padding-bottom: 0; }
.event-log__item:last-child::before { content: ''; position: absolute; top: 24px; bottom: 0; left: 0; width: 16px; background: var(--bg-primary); z-index: 1; }
.event-log__node { position: absolute; left: 2px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--text-tertiary); z-index: 2; box-shadow: 0 0 0 4px var(--bg-primary); transition: all 0.3s ease; }
.event-log__node--live { background: var(--accent-glow); box-shadow: 0 0 0 4px var(--bg-primary), 0 0 8px var(--accent-glow-subtle); }
.event-log__node--ship { background: #fb923c; box-shadow: 0 0 0 4px var(--bg-primary), 0 0 6px rgba(251, 146, 60, 0.2); }
.event-log__node--stop { background: var(--text-tertiary); opacity: 0.5; box-shadow: 0 0 0 4px var(--bg-primary); }
.event-log__node--exit { background: linear-gradient(135deg, #c084fc, var(--accent-glow)); box-shadow: 0 0 0 4px var(--bg-primary); }
.event-log__node--base { background: var(--bg-primary); border: 2px solid var(--border-focus); box-shadow: 0 0 0 4px var(--bg-primary); }
.event-log__content { position: relative; top: -2px; }
.event-log__header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.event-log__time { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); }
.event-log__badge { font-family: var(--font-mono); font-size: 0.65rem; padding: 2px 6px; border-radius: 4px; letter-spacing: 0.05em; font-weight: 600; }
.event-log__badge--live { color: var(--bg-primary); background: var(--accent-glow); }
.event-log__badge--ship { color: #fff; background: #fb923c; }
.event-log__badge--stop { color: var(--text-tertiary); background: var(--border-light); }
.event-log__badge--exit { color: #fff; background: #c084fc; }
.event-log__badge--base { color: var(--text-tertiary); border: 1px solid var(--border-struct); }
.event-log__name { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin: 0 0 4px 0; }
.event-log__desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; margin: 0; }
/* ── Position Crystal — Tech stack + Target ───────── */
.ev-stack {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  padding: 2px 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-struct);
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}

/* 3-layer capability block — honest AI-native positioning */
.profile__capabilities {
  margin: 0 0 var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cap-layer {
  padding: 12px 16px;
  border-radius: 4px;
  border: 1px solid var(--border-struct);
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: center;
}
.cap-layer__head {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cap-layer__label {
  font-weight: 800;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cap-layer__note {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}
.cap-layer__items {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-primary);
}
.cap-layer--foundation {
  background: var(--bg-primary);
  border-color: var(--text-primary);
  border-width: 1.5px;
}
.cap-layer--foundation .cap-layer__label { color: var(--text-strong); }
.cap-layer--acceleration {
  background: rgba(101, 163, 0, 0.06);
  border-color: rgba(101, 163, 0, 0.4);
}
.cap-layer--acceleration .cap-layer__label { color: #4d7a00; }
html.dark .cap-layer--acceleration {
  background: rgba(204, 255, 0, 0.05);
  border-color: rgba(204, 255, 0, 0.35);
}
html.dark .cap-layer--acceleration .cap-layer__label { color: #ccff00; }
.cap-layer--stack {
  background: var(--bg-secondary);
  border-style: dashed;
  opacity: 0.85;
}
.cap-layer--stack .cap-layer__label { color: var(--text-secondary); }
@media (max-width: 680px) {
  .cap-layer { grid-template-columns: 1fr; gap: 6px; }
}
.profile__target {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(101, 163, 0, 0.08), rgba(101, 163, 0, 0));
  border: 1px solid rgba(101, 163, 0, 0.3);
  border-radius: 4px;
  font-size: 0.8125rem;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}
html.dark .profile__target {
  background: linear-gradient(90deg, rgba(204, 255, 0, 0.08), rgba(204, 255, 0, 0));
  border-color: rgba(204, 255, 0, 0.28);
}
.profile__target .target-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #65a300;
  flex-shrink: 0;
  animation: op-pulse 2.2s ease-in-out infinite;
}
html.dark .profile__target .target-pulse { background: #ccff00; }
.profile__target .target-label {
  font-weight: 700;
  color: #65a300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.6875rem;
}
html.dark .profile__target .target-label { color: #ccff00; }
.profile__target .target-text {
  color: var(--text-primary);
  font-weight: 500;
}

/* Single-card B section */
.operator-map {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.operator-map__subtitle {
  max-width: 68ch;
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.6;
  margin: 0 0 var(--space-md);
}
.operator-map__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.operator-map__grid--triad {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.operator-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--border-struct);
  border-radius: 8px;
  background: var(--bg-primary);
  color: inherit;
  text-decoration: none;
  transition: transform var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast);
}
.operator-card:hover {
  transform: translateY(-2px);
  border-color: rgba(101, 163, 0, 0.42);
  box-shadow: 0 10px 30px rgba(101, 163, 0, 0.08);
}
html.dark .operator-card:hover {
  border-color: rgba(204, 255, 0, 0.38);
  box-shadow: 0 10px 34px rgba(204, 255, 0, 0.08);
}
.operator-card__kicker {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.operator-card h3 {
  margin: 12px 0 8px;
  font-size: 1.375rem;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--text-strong);
}
.operator-card p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.operator-card__status {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.4;
  color: #4d7a00;
}
html.dark .operator-card__status { color: #ccff00; }
.operator-map__claim-strip {
  display: block;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed var(--border-focus);
  border-radius: 6px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  text-decoration: none;
}
.operator-map__claim-strip:hover {
  color: var(--text-strong);
  border-color: rgba(101, 163, 0, 0.5);
}
html.dark .operator-map__claim-strip:hover {
  border-color: rgba(204, 255, 0, 0.45);
}
.operator-map__next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.operator-map__next-actions a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--border-struct);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color var(--motion-fast), color var(--motion-fast), transform var(--motion-fast);
}
.operator-map__next-actions a:hover {
  border-color: rgba(101, 163, 0, 0.5);
  color: var(--text-strong);
  transform: translateY(-1px);
}
html.dark .operator-map__next-actions a:hover {
  border-color: rgba(204, 255, 0, 0.45);
}
@media (max-width: 1000px) {
  .operator-map__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .operator-map__grid {
    grid-template-columns: 1fr;
  }
  .operator-card {
    min-height: 0;
  }
}

.ecosystem-grid--single {
  display: block;
}
.eco-card--featured {
  display: block;
  padding: var(--space-lg);
  border: 1px solid var(--border-struct);
  border-radius: 8px;
  background: var(--bg-primary);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.eco-card--featured:hover {
  border-color: #65a300;
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(101, 163, 0, 0.08);
}
html.dark .eco-card--featured:hover { border-color: #ccff00; box-shadow: 0 4px 28px rgba(204, 255, 0, 0.08); }
.eco-card--featured .eco-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 1.375rem;
  font-weight: 900;
  color: #65a300;
  background: rgba(101, 163, 0, 0.1);
  border-radius: 6px;
  margin-bottom: var(--space-sm);
}
html.dark .eco-card--featured .eco-card__icon { color: #ccff00; background: rgba(204, 255, 0, 0.1); }
.eco-card--featured h3 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 4px 0 6px;
}
.eco-card--featured p {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 60ch;
  margin: 0 0 var(--space-sm);
}
.eco-card--featured .eco-card__metrics {
  margin: 0 0 12px;
}
.ecosystem-footnote {
  margin-top: var(--space-md);
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  letter-spacing: 0.01em;
}
.ecosystem-footnote a {
  color: var(--text-secondary);
  border-bottom: 1px dotted var(--border-focus);
  text-decoration: none;
}

/* ── Frame Sections (A–H portfolio structure) ─────── */
/* Refs: gwern.net, patrickcollison.com, antfu.me, levels.io, nownownow.com */
.frame-marker {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  position: absolute;
  top: -20px;
  left: 0;
  padding: 3px 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-struct);
  border-radius: 2px;
}
.profile {
  position: relative;
}

.frame-section {
  margin: var(--space-xl) 0 var(--space-xl);
  position: relative;
}
.frame-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: var(--space-md);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-struct);
  flex-wrap: wrap;
}
.frame-section__label {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-strong);
}
.frame-section__progress {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}
.frame-section__progress a {
  color: var(--text-tertiary);
  border-bottom: 1px dotted var(--border-focus);
  text-decoration: none;
}
.frame-section__progress a:hover {
  color: #65a300;
  border-bottom-color: #65a300;
}
html.dark .frame-section__progress a:hover {
  color: #ccff00;
  border-bottom-color: #ccff00;
}
.fs-status {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 2px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 4px;
}
.fs-status--planned {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}
.fs-status--building {
  background: rgba(101, 163, 0, 0.12);
  color: #4d7a00;
}
.fs-status--cfp {
  background: rgba(234, 88, 12, 0.1);
  color: #c2410c;
}
html.dark .fs-status--planned { background: rgba(96, 165, 250, 0.14); color: #93c5fd; }
html.dark .fs-status--building { background: rgba(204, 255, 0, 0.12); color: #ccff00; }
html.dark .fs-status--cfp { background: rgba(251, 146, 60, 0.14); color: #fdba74; }

.fs-planned {
  padding: 14px 18px;
  border: 1px dashed var(--border-focus);
  border-radius: 4px;
  background: var(--bg-secondary);
  margin-bottom: 10px;
}
.fs-planned__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.fs-planned__desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 8px;
}
.fs-planned__meta {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}
.fs-frame-note {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
  padding: 10px 14px;
  border-left: 2px solid var(--border-struct);
  background: var(--bg-secondary);
}
.fs-frame-note a {
  color: var(--text-secondary);
  border-bottom: 1px dotted var(--border-focus);
  text-decoration: none;
}

/* H · Now */
.frame-section--now .now-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.frame-section--now .now-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.frame-section--now .now-list em {
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}
.now-key {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #65a300;
  padding-top: 3px;
}
html.dark .now-key { color: #ccff00; }

/* G · Open Questions */
.fs-questions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  counter-reset: q;
}
.fs-questions li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: baseline;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-primary);
}
.fq-num {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}
.fq-text a {
  color: #65a300;
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  margin-left: 6px;
  border-bottom: 1px dotted #65a300;
}
html.dark .fq-text a { color: #ccff00; border-bottom-color: #ccff00; }

/* Eco-card metric line */
.eco-card__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 8px;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.eco-card__metrics span {
  padding: 2px 7px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-struct);
  border-radius: 2px;
  font-variant-numeric: tabular-nums;
}
.eco-card__status--donate span { background: #2563eb; }
.eco-card__status--donate { color: #2563eb; }
html.dark .eco-card__status--donate { color: #60a5fa; }
html.dark .eco-card__status--donate span { background: #60a5fa; }
.eco-card__status--ship span { background: #c2410c; }
.eco-card__status--ship { color: #c2410c; }
html.dark .eco-card__status--ship { color: #fb923c; }
html.dark .eco-card__status--ship span { background: #fb923c; }

@media (max-width: 680px) {
  .frame-section__head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .frame-section--now .now-list li { grid-template-columns: 44px 1fr; }
}

/* Legacy timeline — kept for non-home pages, unused on homepage */
.profile__timeline {
  list-style: none;
  margin: 0 0 var(--space-md);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 1px dashed var(--border-struct);
  padding-left: 18px;
  position: relative;
}
.profile__timeline li {
  display: grid;
  grid-template-columns: 48px 36px 1fr;
  gap: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
  align-items: baseline;
  position: relative;
}
.profile__timeline li::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-focus);
  border: 1px solid var(--bg-primary);
}
.profile__timeline li:last-child::before {
  background: #65a300;
  box-shadow: 0 0 0 3px rgba(101, 163, 0, 0.12);
}
html.dark .profile__timeline li:last-child::before {
  background: #ccff00;
  box-shadow: 0 0 0 3px rgba(204, 255, 0, 0.18);
}
.profile__timeline .t-year {
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.profile__timeline .t-age {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}
.profile__timeline .t-age::before { content: "·"; margin-right: 4px; }
.profile__timeline .t-event {
  color: var(--text-secondary);
}
.profile__now {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-struct);
  border-radius: 4px;
  font-size: 0.8125rem;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}
.profile__now .now-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #65a300;
  flex-shrink: 0;
  animation: op-pulse 2s ease-in-out infinite;
}
html.dark .profile__now .now-pulse { background: #ccff00; }
.profile__now .now-label {
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.6875rem;
}
.profile__now .now-text {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}
.profile__links {
  display: flex;
  gap: 20px;
  font-size: 0.875rem;
  flex-wrap: wrap;
}
.profile__links a {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.profile__links a:hover {
  border-bottom-color: #65a300;
}
html.dark .profile__links a:hover {
  border-bottom-color: #ccff00;
}

/* ── Category System ──────────────────────────────── */
.tax-count {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-tertiary);
  background: var(--bg-secondary);
  border-radius: 8px;
  min-width: 20px;
  text-align: center;
  line-height: 1.4;
}
.tax-btn--active .tax-count {
  color: var(--accent-glow);
  background: rgba(255,255,255,0.9);
}
.post-category {
  display: inline-block;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 4px;
  margin-right: 8px;
  line-height: 1.5;
  text-transform: uppercase;
}
.post-category--연구노트 {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}
.post-category--철학 {
  background: rgba(168, 85, 247, 0.12);
  color: #9333ea;
}
.post-category--인생사 {
  background: rgba(101, 163, 0, 0.14);
  color: #4d7a00;
}
.post-category--프로젝트 {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
}
html.dark .post-category--연구노트 {
  background: rgba(96, 165, 250, 0.16);
  color: #93c5fd;
}
html.dark .post-category--철학 {
  background: rgba(192, 132, 252, 0.16);
  color: #d8b4fe;
}
html.dark .post-category--인생사 {
  background: rgba(204, 255, 0, 0.15);
  color: #ccff00;
}
html.dark .post-category--프로젝트 {
  background: rgba(251, 146, 60, 0.16);
  color: #fdba74;
}

/* Section label upgrade — terminal divider */
.research-header .section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
}
.research-header .section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-struct);
}

/* ============================================================
   V3 High-End Assets Inject (Visual Cards)
   ============================================================ */

.hero--operator {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
}

/* Eco Card with Visual */
.eco-card.has-visual {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.eco-card.has-visual .eco-card__content {
  padding: 32px;
  display: flex;
  gap: 20px;
}

.eco-card__visual {
  width: 100%;
  height: 100%;
  border-left: 1px solid var(--border-light);
  overflow: hidden;
  position: relative;
  background: var(--bg-secondary);
}

.eco-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: transform 0.8s var(--ease-out), opacity 0.4s ease;
  filter: grayscale(80%) contrast(1.2);
}

.eco-card.has-visual:hover .eco-card__visual img {
  transform: scale(1.05);
  opacity: 1;
  filter: grayscale(20%) contrast(1.1);
}

@media (max-width: 768px) {
  .eco-card.has-visual {
    grid-template-columns: 1fr;
    grid-template-rows: auto 200px;
  }
  .eco-card__visual {
    border-left: none;
    border-top: 1px solid var(--border-light);
  }
}


/* ============================================================
   Bento Module (Now & Questions)
   ============================================================ */
.bento-module {
  margin-top: 4rem;
}
.bento-module__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 800px) {
  .bento-module__grid {
    grid-template-columns: 1fr;
  }
}

.bento-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-focus);
  border-radius: 8px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
  box-shadow: var(--elevation-2);
}
.bento-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow-subtle);
}
.bento-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(101, 163, 0, 0.06), transparent 40%);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.bento-card:hover::before {
  opacity: 1;
}

.bento-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}
.bento-card__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
  font-weight: 600;
}
.bento-card__label::before {
  content: "●";
  color: var(--accent-glow);
  margin-right: 6px;
  font-size: 0.5rem;
  vertical-align: middle;
}
.bento-card__meta {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
}
.bento-card__meta a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: var(--border-struct);
  text-underline-offset: 3px;
}
.bento-card__meta a:hover {
  color: var(--text-primary);
}
.bento-card__body {
  position: relative;
  z-index: 1;
}

/* Now Bento */
.now-bento {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.now-bento li {
  display: flex;
  gap: 16px;
  font-size: 0.875rem;
}
.now-bento__key {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--accent-glow);
  flex: 0 0 48px;
  text-transform: uppercase;
}
.now-bento__val {
  color: var(--text-secondary);
  line-height: 1.5;
}
.now-bento__val em {
  font-style: normal;
  color: var(--accent-glow);
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

/* Questions Bento */
.q-bento {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.q-bento li {
  display: flex;
  gap: 12px;
  font-size: 0.875rem;
  align-items: baseline;
}
.q-bento__num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--accent-glow);
  font-weight: 700;
  flex: 0 0 24px;
}
.q-bento__text {
  color: var(--text-secondary);
  line-height: 1.6;
}
.q-bento__link {
  font-family: var(--font-mono);
  color: var(--accent-glow);
  text-decoration: none;
  font-size: 0.75rem;
  margin-left: 6px;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.q-bento__link:hover {
  opacity: 1;
}
