/* ==========================================================================
   Google Design - Code is a Design Material (UI/UX Learning Rebuild)
   Design System & Architecture Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Variables
   -------------------------------------------------------------------------- */
:root {
  /* Core Google Design Dark Blue Palette */
  --theme-background: #111318;
  --theme-surface: #1a1d23;
  --theme-surface-alt: #242932;
  --theme-surface-hover: #2f3540;
  --theme-surface-border: rgba(255, 255, 255, 0.08);
  --theme-surface-border-strong: rgba(255, 255, 255, 0.18);

  --theme-foreground: #ffffff;
  --theme-bright: #ffffff;
  --theme-text-secondary: #c2c7cf;
  --theme-text-muted: #8c9199;

  /* Accent & Highlight Colors */
  --theme-accent: #8ab4f8;           /* Google Material Blue */
  --theme-accent-hover: #c2d7ff;
  --theme-accent-dark: #669df6;
  
  --theme-analogous-mint: #a8d9d0;   /* Cool Mint */
  --theme-analogous-coral: #ffb4ab;  /* Material Coral */
  --theme-analogous-lime: #a9d18e;   /* Soft Lime */
  --theme-analogous-cyan: #7bcfff;   /* Material Cyan */

  /* Typography */
  --font-heading: 'Space Grotesk', 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout & Spacing */
  --container-max-wide: 1360px;
  --container-max-reading: 780px;
  --container-max-narrow: 920px;
  
  --header-height: 72px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Motion & Transitions */
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snappy: cubic-bezier(0, 0.1, 0.1, 1);
  --ease-leaving: cubic-bezier(0, 1, 0.1, 1);
  --ease-morph: cubic-bezier(0, 0, 0.2, 1);
  --transition-fast: 0.2s var(--ease-smooth);
  --transition-normal: 0.35s var(--ease-smooth);
  --transition-slow: 0.6s var(--ease-smooth);

  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.6);
  --shadow-accent-glow: 0 0 30px rgba(138, 180, 248, 0.18);
}

/* --------------------------------------------------------------------------
   2. Reset & Base Setup
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--theme-background);
  color: var(--theme-foreground);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--theme-background);
  color: var(--theme-foreground);
  line-height: 1.68;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--theme-background);
}
::-webkit-scrollbar-thumb {
  background: #242932;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #363d48;
}

/* Selection */
::selection {
  background-color: var(--theme-accent);
  color: #002e69;
}

/* Base Link & Button */
a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
  color: inherit;
}

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

/* --------------------------------------------------------------------------
   3. Google Design Exact Single-Shape Exclusion Magnetic Cursor
   -------------------------------------------------------------------------- */
.CustomCursor_cursor__HzHPF {
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 420px;
  height: 24px;
  width: 24px;
  left: 0;
  top: -100px;
  mix-blend-mode: exclusion;
  pointer-events: none;
  position: fixed;
  transform: translate3d(-50%, -50%, 0);
  z-index: 99999;
  will-change: left, top, width, height, border-radius, opacity;
  transition: width 0.15s ease-in,
              height 0.15s ease-in,
              border-radius 0.15s ease-in,
              opacity 0.1s ease-in;
}

/* State 1: Active over regular text links / headings */
.CustomCursor_cursor__HzHPF.-active {
  border-color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: width 0.15s ease-in-out,
              height 0.2s ease-in-out;
}

/* State 2: Over images / canvas inspection loupe */
.CustomCursor_cursor__HzHPF.-media {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border-color: rgba(255, 255, 255, 0.85);
  transition: width 0.2s ease-in-out,
              height 0.2s ease-in-out;
}

/* State 3: Snapped firmly onto a chip / button / icon */
.CustomCursor_cursor__HzHPF.-snapped {
  border-color: rgba(255, 255, 255, 0.9);
  transition: width 0.15s var(--ease-snappy),
              height 0.15s var(--ease-snappy),
              border-radius 0.15s var(--ease-snappy);
}

/* State 4: Leaving / releasing from magnetic snap */
.CustomCursor_cursor__HzHPF.-leaving {
  transition: width 0.2s ease-out,
              height 0.2s ease-out,
              border-radius 0.2s ease-out;
}

/* --------------------------------------------------------------------------
   4. Scroll Reveal & Float Micro-Animations (.js-target)
   -------------------------------------------------------------------------- */
.js-target {
  opacity: 0;
  transform: translate3d(0, var(--y-start-px, 40px), 0);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.js-target.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* --------------------------------------------------------------------------
   5. Reading Progress Bar
   -------------------------------------------------------------------------- */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--theme-accent), var(--theme-analogous-cyan));
  z-index: 10001;
  transition: width 0.1s linear;
}

/* --------------------------------------------------------------------------
   6. Site Header & Navbar
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(17, 19, 24, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--theme-surface-border);
  z-index: 1000;
  transition: transform 0.3s var(--ease-smooth), background 0.3s ease;
}

.header-inner {
  max-width: var(--container-max-wide);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--theme-foreground);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.brand-logo:hover {
  opacity: 0.9;
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--theme-foreground);
}

.study-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(138, 180, 248, 0.15);
  color: var(--theme-accent);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(138, 180, 248, 0.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* View Segmented Control */
.view-segmented-control {
  display: flex;
  align-items: center;
  background: var(--theme-surface);
  border: 1px solid var(--theme-surface-border);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 2px;
}

.segmented-btn {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  color: var(--theme-text-secondary);
  transition: all var(--transition-fast);
}

.segmented-btn:hover {
  color: var(--theme-foreground);
}

.segmented-btn.active {
  background-color: var(--theme-accent);
  color: #002e69;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Nav Icon Buttons */
.nav-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--theme-surface);
  border: 1px solid var(--theme-surface-border);
  color: var(--theme-foreground);
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.nav-icon-btn:hover {
  background: var(--theme-surface-hover);
  border-color: var(--theme-surface-border-strong);
}

/* --------------------------------------------------------------------------
   7. Navigation Drawer
   -------------------------------------------------------------------------- */
.nav-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 10010;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.nav-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 90vw;
  background: #1a1d23;
  border-left: 1px solid var(--theme-surface-border);
  z-index: 10020;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-smooth);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.nav-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--theme-surface-border);
}

.drawer-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
}

.drawer-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--theme-surface);
  color: var(--theme-foreground);
  transition: var(--transition-fast);
}

.drawer-close-btn:hover {
  background: var(--theme-surface-hover);
  color: var(--theme-accent);
}

.drawer-content {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.drawer-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--theme-surface);
  border: 1px solid var(--theme-surface-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--theme-text-muted);
}

.drawer-search-box input {
  background: none;
  border: none;
  color: var(--theme-foreground);
  font-family: inherit;
  font-size: 14px;
  width: 100%;
  outline: none;
}

.drawer-section-heading {
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--theme-text-muted);
  margin-bottom: 14px;
}

.drawer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-link {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--theme-text-secondary);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.drawer-link .link-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--theme-text-muted);
  margin-right: 12px;
  transition: all var(--transition-fast);
}

.drawer-link .link-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--theme-text-muted);
}

.drawer-link:hover {
  background: var(--theme-surface);
  color: var(--theme-foreground);
  padding-left: 18px;
}

.drawer-link:hover .link-bullet {
  background: var(--theme-accent);
  transform: scale(1.5);
}

.chip-tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-tag {
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--theme-surface);
  border: 1px solid var(--theme-surface-border);
  color: var(--theme-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chip-tag:hover, .chip-tag.active {
  background: rgba(138, 180, 248, 0.15);
  border-color: var(--theme-accent);
  color: var(--theme-accent);
}

.study-notes-card {
  background: linear-gradient(145deg, rgba(138, 180, 248, 0.08), rgba(123, 207, 255, 0.05));
  border: 1px solid rgba(138, 180, 248, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
}

.study-notes-card h4 {
  font-size: 14px;
  color: var(--theme-accent);
  margin-bottom: 6px;
}

.study-notes-card p {
  font-size: 13px;
  color: var(--theme-text-secondary);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   8. Live Search Modal
   -------------------------------------------------------------------------- */
.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  z-index: 10030;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.search-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.search-modal-box {
  width: 640px;
  max-width: 92vw;
  background: #20252d;
  border: 1px solid var(--theme-surface-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(-20px) scale(0.98);
  transition: transform 0.35s var(--ease-smooth);
}

.search-modal-backdrop.open .search-modal-box {
  transform: translateY(0) scale(1);
}

.search-modal-input-wrap {
  display: flex;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--theme-surface-border);
  gap: 14px;
  color: var(--theme-text-muted);
}

.search-modal-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 18px;
  color: var(--theme-foreground);
  outline: none;
}

.kbd-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  background: var(--theme-surface);
  border: 1px solid var(--theme-surface-border);
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--theme-text-muted);
}

.search-modal-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 12px;
}

.search-result-item {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

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

.search-res-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--theme-foreground);
}

.search-res-snippet {
  font-size: 13px;
  color: var(--theme-text-muted);
}

/* --------------------------------------------------------------------------
   9. Layout Containers & Grid Helpers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.layout-wide {
  max-width: var(--container-max-wide);
}

.layout-reading {
  max-width: var(--container-max-reading);
}

.layout-center-narrow {
  max-width: var(--container-max-narrow);
  text-align: center;
}

.section-spacer {
  margin-top: 64px;
  margin-bottom: 64px;
}

/* View Panels */
.main-content {
  padding-top: calc(var(--header-height) + 32px);
  padding-bottom: 80px;
  min-height: calc(100vh - 120px);
}

.view-panel {
  display: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease-smooth);
}

.view-panel.active {
  display: block;
  opacity: 1;
  animation: fadeInView 0.45s var(--ease-smooth);
}

@keyframes fadeInView {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   10. Article View: Code is a Design Material
   -------------------------------------------------------------------------- */
.article-hero-section {
  padding-top: 24px;
  padding-bottom: 40px;
}

.article-meta-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.tag-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--theme-surface);
  border: 1px solid var(--theme-surface-border);
  color: var(--theme-text-secondary);
  display: inline-block;
}

.tag-badge.accent {
  background: rgba(138, 180, 248, 0.18);
  border-color: rgba(138, 180, 248, 0.3);
  color: var(--theme-accent);
}

.dot-separator {
  color: var(--theme-text-muted);
}

.read-time {
  font-size: 13px;
  color: var(--theme-text-muted);
}

.article-main-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--theme-bright);
}

.article-lead-subtitle {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: var(--theme-text-secondary);
  line-height: 1.45;
  margin-bottom: 36px;
}

/* Author Card */
.author-card-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.author-avatar-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--theme-accent);
}

.author-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-details {
  text-align: left;
}

.author-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--theme-foreground);
}

.author-role {
  font-size: 13px;
  color: var(--theme-text-muted);
}

.btn-share {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--theme-surface);
  border: 1px solid var(--theme-surface-border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--theme-foreground);
  margin-left: 16px;
  transition: var(--transition-fast);
}

.btn-share:hover {
  background: var(--theme-surface-hover);
  border-color: var(--theme-accent);
}

/* Hero Feature Image */
.hero-image-container {
  margin-top: 16px;
  margin-bottom: 48px;
}

.hero-visual-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #1a1d23;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--theme-surface-border);
}

.hero-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-smooth);
}

.hero-visual-frame:hover .hero-media-img {
  transform: scale(1.02);
}

.hero-visual-overlay {
  position: absolute;
  bottom: 18px;
  right: 18px;
}

.interactive-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(17, 19, 24, 0.75);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--theme-text-secondary);
}

/* Editorial Body Typography */
.article-content-body {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--theme-text-secondary);
}

.article-content-body p {
  margin-bottom: 24px;
}

.editorial-callout {
  padding: 24px;
  background: rgba(138, 180, 248, 0.05);
  border-left: 3px solid var(--theme-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 32px;
}

.editorial-callout p {
  margin-bottom: 0;
  font-size: 1.05rem;
  color: var(--theme-foreground);
}

.dropcap-paragraph::first-letter {
  font-family: var(--font-heading);
  float: left;
  font-size: 4rem;
  line-height: 0.8;
  padding-top: 4px;
  padding-right: 12px;
  padding-bottom: 4px;
  color: var(--theme-accent);
  font-weight: 700;
}

.article-section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--theme-bright);
  margin-top: 48px;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.editorial-link {
  color: var(--theme-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
  transition: color var(--transition-fast);
}

.editorial-link:hover {
  color: var(--theme-accent-hover);
}

.pullquote-block {
  margin: 40px 0;
  padding: 32px;
  background: var(--theme-surface);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--theme-accent);
}

.pullquote-block p {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--theme-bright);
  margin-bottom: 0;
}

/* 2-Column Media Showcase Grid */
.media-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.media-card {
  background: var(--theme-surface);
  border: 1px solid var(--theme-surface-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.media-img-wrapper {
  aspect-ratio: 1;
  overflow: hidden;
  background: #171b21;
}

.media-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-smooth);
}

.media-card:hover .media-card-img {
  transform: scale(1.03);
}

.media-caption {
  padding: 20px;
}

.caption-text {
  font-size: 0.95rem;
  color: var(--theme-text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.caption-source {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--theme-text-muted);
}

/* Diagram Feature Card (Double Diamond & Low-fi Blocks) */
.diagram-feature-card {
  background: var(--theme-surface);
  border: 1px solid var(--theme-surface-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.diagram-img-wrap {
  aspect-ratio: 16 / 9;
  background: #1a1d23;
  overflow: hidden;
}

.diagram-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-smooth);
}

.diagram-feature-card:hover .diagram-media-img {
  transform: scale(1.015);
}

.diagram-meta-info {
  padding: 24px 32px;
  border-top: 1px solid var(--theme-surface-border);
}

.diagram-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--theme-bright);
  margin-bottom: 8px;
}

.diagram-desc {
  font-size: 0.95rem;
  color: var(--theme-text-secondary);
  line-height: 1.6;
}

/* Highlight Insight Box */
.insight-highlight-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(138, 180, 248, 0.12), rgba(123, 207, 255, 0.08));
  border: 1px solid rgba(138, 180, 248, 0.3);
  border-radius: var(--radius-md);
  margin: 32px 0;
}

.insight-icon {
  font-size: 24px;
}

.insight-body {
  font-size: 1rem;
  color: var(--theme-foreground);
  line-height: 1.6;
}

/* Quote Callout Card */
.quote-callout-card {
  padding: 36px;
  background: radial-gradient(circle at top right, rgba(138, 180, 248, 0.1), transparent), var(--theme-surface);
  border: 1px solid var(--theme-surface-border-strong);
  border-radius: var(--radius-lg);
  margin: 40px 0;
  text-align: center;
}

.quote-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--theme-accent);
  margin-bottom: 16px;
}

.quote-author {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--theme-text-muted);
}

/* Conclusion Banner */
.conclusion-banner {
  padding: 28px;
  background: var(--theme-surface-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--theme-surface-border);
  text-align: center;
  margin-top: 40px;
}

.conclusion-banner p {
  font-size: 1.15rem;
  color: var(--theme-bright);
  margin-bottom: 0;
}

/* Interactive Prompt Card (CTA to Sandbox) */
.interactive-prompt-card {
  padding: 48px;
  background: linear-gradient(135deg, #1d2430 0%, #151a21 100%);
  border: 1px solid rgba(138, 180, 248, 0.3);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  box-shadow: var(--shadow-accent-glow);
  flex-wrap: wrap;
}

.prompt-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--theme-accent);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 8px;
}

.prompt-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--theme-bright);
  margin-bottom: 8px;
}

.prompt-desc {
  font-size: 1rem;
  color: var(--theme-text-secondary);
  max-width: 600px;
}

.btn-primary-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  background: var(--theme-accent);
  color: #002e69;
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 16px rgba(138, 180, 248, 0.28);
  transition: all var(--transition-fast);
}

.btn-primary-action:hover {
  background: var(--theme-accent-hover);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   11. Archive View Layout (Matching Video 2026-08-29 14-21-22.mp4)
   -------------------------------------------------------------------------- */
.archive-container {
  padding-top: 16px;
}

.archive-header-row {
  margin-bottom: 48px;
}

.archive-page-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--theme-bright);
  letter-spacing: -0.02em;
}

/* 2-Column Entity List Grid */
.entity-list-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 40px;
}

.entity-list-item {
  width: 100%;
}

.entity-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  text-decoration: none;
  cursor: pointer;
}

.entity-card-info {
  flex: 1;
  padding-right: 12px;
}

.entity-card-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--theme-foreground);
  margin-bottom: 10px;
  transition: color var(--transition-fast);
}

/* Hover on card highlights title */
.entity-card:hover .entity-card-title {
  color: var(--theme-accent);
}

.entity-card-snippet {
  font-size: 0.95rem;
  color: var(--theme-text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
}

.entity-tags-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Square-to-Circle Morphing Thumbnail */
.entity-card-thumb-wrap {
  width: 130px;
  height: 130px;
  min-width: 130px;
  aspect-ratio: 1;
  border-radius: 0px;
  overflow: hidden;
  background-color: var(--theme-surface);
  position: relative;
  transition: border-radius 240ms var(--ease-morph);
  box-shadow: var(--shadow-sm);
}

/* Core Google Design Effect: Morph to 50% circle on card hover */
.entity-card:hover .entity-card-thumb-wrap {
  border-radius: 50%;
}

.entity-card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Tag Pill Buttons (Matching Video) */
.tag-pill-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--theme-surface);
  border: 1px solid var(--theme-surface-border);
  color: var(--theme-text-secondary);
  display: inline-block;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.tag-pill-btn:hover {
  border-color: var(--theme-surface-border-strong);
}

/* --------------------------------------------------------------------------
   12. Code as a Material Sandbox
   -------------------------------------------------------------------------- */
.sandbox-intro-box {
  text-align: center;
  margin-bottom: 40px;
}

.sandbox-heading {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--theme-bright);
  margin-top: 12px;
  margin-bottom: 12px;
}

.sandbox-subheading {
  font-size: 1.05rem;
  color: var(--theme-text-secondary);
  max-width: 720px;
  margin: 0 auto;
}

.sandbox-workspace {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

.canvas-viewport-card {
  position: relative;
  background: #0d1015;
  border: 1px solid var(--theme-surface-border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.material-canvas {
  width: 100%;
  height: 480px;
  display: block;
}

.canvas-hud {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 12px;
}

.hud-item {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  background: rgba(17, 19, 24, 0.85);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--theme-text-secondary);
}

/* Controls Panel */
.sandbox-control-panel {
  padding: 28px;
  background: var(--theme-surface);
  border: 1px solid var(--theme-surface-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--theme-bright);
  border-bottom: 1px solid var(--theme-surface-border);
  padding-bottom: 12px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--theme-text-secondary);
  display: flex;
  justify-content: space-between;
}

.val-badge {
  font-family: var(--font-mono);
  color: var(--theme-accent);
}

.styled-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--theme-surface-alt);
  outline: none;
}

.styled-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--theme-accent);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(138, 180, 248, 0.5);
  transition: transform 0.15s ease;
}

.styled-range::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.palette-swatches {
  display: flex;
  gap: 10px;
}

.swatch-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.swatch-btn:hover {
  transform: scale(1.15);
}

.swatch-btn.active {
  border-color: #ffffff;
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.control-group-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.btn-action-outline {
  padding: 10px;
  border: 1px solid var(--theme-surface-border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--theme-text-secondary);
  transition: all var(--transition-fast);
}

.btn-action-outline:hover {
  background: var(--theme-surface-hover);
  color: var(--theme-foreground);
}

.btn-action-filled {
  padding: 12px;
  background: var(--theme-accent);
  color: #002e69;
  font-weight: 700;
  font-size: 13px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-action-filled:hover {
  background: var(--theme-accent-hover);
}

/* --------------------------------------------------------------------------
   13. Site Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--theme-surface-border);
  background: #0c0f14;
  padding: 48px 0;
}

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

.footer-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-logo {
  color: var(--theme-foreground);
}

.footer-copy {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: var(--theme-text-muted);
}

.footer-subtext {
  font-size: 12px;
  color: #686f78;
}

.footer-links {
  display: flex;
  gap: 20px;
  font-size: 14px;
}

.footer-link {
  color: var(--theme-text-secondary);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--theme-accent);
}

/* --------------------------------------------------------------------------
   14. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .entity-list-grid {
    grid-template-columns: 1fr;
  }
  .sandbox-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Disable custom cursor on mobile touch screens */
  .CustomCursor_cursor__HzHPF {
    display: none !important;
  }

  .media-grid-2col {
    grid-template-columns: 1fr;
  }

  .view-segmented-control {
    display: none;
  }

  .article-main-title {
    font-size: 2.2rem;
  }

  .interactive-prompt-card {
    padding: 28px;
    flex-direction: column;
    align-items: flex-start;
  }
}
/* Hide the native cursor entirely — only the custom magnetic circle is shown */
body,
body * {
  cursor: none !important;
}

/* Homepage Hero Actions */
.home-hero {
  text-align: center;
  padding-top: 88px;
}

.home-hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
}

.home-hero-actions a {
  text-decoration: none;
}

.home-hero-actions .btn-action-outline {
  display: inline-flex;
  align-items: center;
  padding: 16px 28px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
}
