/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* ---- Canvas system: the site is a design file ---- */
  --canvas: #F2F1EC;        /* the infinite canvas */
  --dots: #D9D6CC;          /* canvas dot grid */
  --artboard: #FFFFFF;      /* frames/artboards content sits on */
  --ink: #161513;           /* near-black text ink */
  --panel: #101012;         /* dark artboard (manifesto) + footer chrome */
  --panel-ink: #F2F1EC;
  --select: #EAB308;        /* selection yellow — boxes, handles, components */
  --select-ink: #111111;
  --accent: #FB450C;        /* Pewbeam orange — cursor, pins, tags */
  --accent-ink: #FFFFFF;
  --line: #E0DDD3;
  --muted: #797569;

  /* ---- Semantic tokens (mapped onto the system above) ---- */
  --text-color: var(--ink);
  --link-color: var(--text-color);
  --link-hover: var(--muted);
  --muted-color: var(--muted);
  --border-color: var(--line);
  --bg-color: var(--canvas);
  --card-bg: var(--artboard);
  --code-bg: #ECEAE2;

  /* ---- Type ---- */
  --max-width: 640px;
  --font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
  --font-display: "Archivo", "Geist", sans-serif;

  /* ---- Spacing scale ---- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* ---- Radius scale (crisp, tool-like) ---- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-pill: 999px;

  /* ---- Warm-tinted shadows (ink, not pure black) ---- */
  --shadow-sm: 0 1px 2px rgba(32, 25, 17, 0.08);
  --shadow-md: 0 10px 22px rgba(32, 25, 17, 0.12);
  --shadow-lg: 0 22px 48px rgba(32, 25, 17, 0.18);

  /* ---- Motion ---- */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --dur-fast: 150ms;
  --dur-normal: 280ms;
  --dur-slow: 480ms;
  --stagger: 60ms;
}

[data-theme="dark"] {
  --canvas: #141416;
  --dots: #28282C;
  --artboard: #1C1C20;
  --ink: #EDEBE4;
  --panel: #0B0B0D;
  --panel-ink: #EDEBE4;
  --select: #FACC15;
  --select-ink: #111111;
  --accent: #FF6A3D;
  --line: #2D2D33;
  --muted: #8F8D85;
  --code-bg: #232329;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 22px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #141416;
    --dots: #28282C;
    --artboard: #1C1C20;
    --ink: #EDEBE4;
    --panel: #0B0B0D;
    --panel-ink: #EDEBE4;
    --select: #FACC15;
    --select-ink: #111111;
    --accent: #FF6A3D;
    --line: #2D2D33;
    --muted: #8F8D85;
    --code-bg: #232329;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 22px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.6);
  }
}

/* Smooth scrolling for back to top functionality */
@media screen and (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Base typography */
body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-color);
  background-color: var(--bg-color);
  /* Technical blueprint grid background with refined subtle opacity */
  background-image: 
    linear-gradient(to right, color-mix(in srgb, var(--line) 16%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 16%, transparent) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 0 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Smooth transitions for theme changes and mobile status bar */
  transition: background-color 0.3s ease, color 0.2s ease;
}

::selection {
  background: var(--select);
  color: var(--select-ink, #111111);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.011em;
  text-wrap: balance;
}

h1 { font-size: 1.25rem; }
h2 { font-size: 1rem; margin-top: 3rem; }
h3 { font-size: 0.95rem; margin-top: 2.5rem; }

p {
  margin-bottom: 1.25rem;
  text-wrap: pretty;
}

/* Links */
a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
}

/* Prose links: discoverable monochrome underline with a soft hover fade */
.intro-lede a:not(.external-link),
.post-content a {
  color: var(--text-color);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  transition: opacity var(--dur-fast) ease, background-size var(--dur-normal) var(--ease-out-expo);
}

.intro-lede a:not(.external-link):hover,
.post-content a:hover {
  color: var(--text-color);
  text-decoration: none;
  opacity: 0.55;
}

/* External link icon */
.external-link {
  display: inline-flex;
  align-items: center;
}

.external-link::after {
  content: '';
  width: 0;
  height: 16px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.25" d="M8 5H5a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2V8.5M7.5 9.5 14 3m0 0v4m0-4h-4"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  margin-left: 0;
  transition: all 0.2s ease;
  overflow: hidden;
}

[data-theme="dark"] .external-link::after {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.25" d="M8 5H5a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2V8.5M7.5 9.5 14 3m0 0v4m0-4h-4"/></svg>');
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .external-link::after {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none"><path stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.25" d="M8 5H5a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2V8.5M7.5 9.5 14 3m0 0v4m0-4h-4"/></svg>');
  }
}

.external-link:hover::after {
  width: 16px;
  margin-left: 4px;
}

/* Theme switcher */
.theme-switcher {
  display: flex;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 32px;
  padding: 2px;
  gap: 2px;
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 32px;
  color: var(--muted-color);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.theme-btn:hover {
  color: var(--text-color);
  background: var(--border-color);
}

.theme-btn.active {
  color: var(--text-color);
  background: var(--bg-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .theme-btn.active {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.project-card-link {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
}

.project-card-link:hover {
  text-decoration: none;
  color: inherit;
}

/* Skill card links: smooth lift and colored border glow on hover */
.project-card-link:hover .project-card,
.project-card-link:focus-visible .project-card {
  border-color: var(--card-accent, var(--select));
  box-shadow: 0 12px 28px var(--card-glow, rgba(234, 179, 8, 0.25));
  transform: translateY(-4px);
}

/* Unique Vibrant Hover Colors for Each Skill Card */
.builtgrid .project-card-link:nth-child(1) { --card-accent: #6366F1; --card-glow: rgba(99, 102, 241, 0.35); } /* Electric Indigo */
.builtgrid .project-card-link:nth-child(2) { --card-accent: #EF4444; --card-glow: rgba(239, 68, 68, 0.35); } /* Flame Coral / Crimson */
.builtgrid .project-card-link:nth-child(3) { --card-accent: #10B981; --card-glow: rgba(16, 185, 129, 0.35); } /* Emerald Green */
.builtgrid .project-card-link:nth-child(4) { --card-accent: #06B6D4; --card-glow: rgba(6, 182, 212, 0.35); } /* Cyan Azure */
.builtgrid .project-card-link:nth-child(5) { --card-accent: #D946EF; --card-glow: rgba(217, 70, 239, 0.35); } /* Fuchsia Magenta */
.builtgrid .project-card-link:nth-child(6) { --card-accent: #F59E0B; --card-glow: rgba(245, 158, 11, 0.35); } /* Amber Gold */
.builtgrid .project-card-link:nth-child(7) { --card-accent: #8B5CF6; --card-glow: rgba(139, 92, 246, 0.35); } /* Royal Purple */
.builtgrid .project-card-link:nth-child(8) { --card-accent: #EC4899; --card-glow: rgba(236, 72, 153, 0.35); } /* Hot Pink */

.builtgrid .project-card-link:hover .project-card-visual {
  transform: scale(1.025);
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 5px 5px 0 5px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  transition: border-color var(--dur-normal) var(--ease-out-quart),
              box-shadow var(--dur-normal) var(--ease-out-quart),
              transform 220ms var(--ease-out-quart);
}

.project-card:hover {
  border-color: var(--muted-color);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .project-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-lg);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .project-card:hover {
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow-lg);
  }
}

.project-card-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: 100%;
  height: calc(100% - 30%);
  aspect-ratio: 1 / 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 6px 12px rgba(255, 255, 255, 0.18);
}

.project-card-visual svg,
.project-card-visual > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card-logo {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.project-card-logo svg,
.project-card-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.project-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
  margin-top: 4px;
  margin-bottom: 0;
}

.project-card-stat {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-color);
  margin-bottom: 8px;
}

.project-card-visual--pewbeam { background: transparent; }
.project-card-visual--colorizer { background: transparent; }
.project-card-visual--alignmate { background: linear-gradient(135deg, #7075ff 0%, #585bed 100%); }
.project-card-visual--filla { background: transparent; }
.project-card-visual--twibble { background: transparent; }
.project-card-visual--markly-blue { background: linear-gradient(140deg, #3d8bff 0%, #154fce 100%); }
.project-card-visual--markly-pink { background: transparent; }
.project-card-visual--select-lock { background: transparent; }

.project-card-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .project-card-visual::after {
  border-color: rgba(255, 255, 255, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .project-card-visual::after {
    border-color: rgba(255, 255, 255, 0.08);
  }
}

/* Post page layout — Aligned with Responsive Grid */
.container:has(.post-layout),
.post-layout-container {
  max-width: min(1140px, 92vw);
  padding: 5rem 0 2rem;
}

.post-layout {
  width: 100%;
  max-width: min(1140px, 92vw);
  margin: 0 auto;
  display: flex;
  justify-content: flex-end; /* Aligns article canvas flush with right responsive grid */
  position: relative;
  min-height: calc(100vh - 200px);
}

.post-sidebar {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  left: max(1.25rem, calc(50% - min(570px, 46vw)));
  width: 28px;
  height: auto;
  z-index: 150;
  padding: 0;
}

.post-sidebar .post-nav {
  display: none;
}

.post-main {
  flex: none;
  width: calc(100% - 320px);
  max-width: 820px;
  margin: 0;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding-left: clamp(20px, 3.5vw, 48px);
  padding-right: clamp(20px, 3.5vw, 48px);
  padding-top: clamp(24px, 3.5vw, 40px);
  padding-bottom: clamp(32px, 4.5vw, 64px);
}

@media (max-width: 1024px) {
  .post-main {
    width: 100%;
    max-width: 100%;
  }
  .post-sidebar {
    left: max(0.85rem, calc(50% - 46vw));
  }
}

@media (max-width: 720px) {
  .post-sidebar {
    display: none;
  }
}

/* ============================================================
   ==============  SUBSTACK PROGRESS TICK CAPSULE & POPUP =====
   ============================================================ */
.table-of-contents {
  border-top: none;
  padding-top: 0;
}

.table-of-contents::before {
  content: none;
  display: none;
}

.substack-toc-widget {
  display: inline-flex;
  align-items: center;
  position: relative;
}

/* 1. Floating Capsule Pill containing indicator tick dashes */
.toc-tick-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 26px;
  padding: 10px 4px;
  background: #e9e9e9;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

[data-theme="dark"] .toc-tick-rail,
.theme-dark .toc-tick-rail {
  background: #252527;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.toc-tick-rail:hover {
  background: #e0e0e0;
}

[data-theme="dark"] .toc-tick-rail:hover,
.theme-dark .toc-tick-rail:hover {
  background: #2d2d30;
}

.toc-tick {
  display: block;
  height: 1.5px;
  background: #888888;
  border: none;
  padding: 0;
  margin: 0;
  border-radius: 1px;
  cursor: pointer;
  transition: width 0.15s ease, background-color 0.15s ease;
}

.toc-tick.toc-tick-primary {
  width: 12px;
  height: 2px;
  background: #555555;
}

[data-theme="dark"] .toc-tick.toc-tick-primary,
.theme-dark .toc-tick.toc-tick-primary {
  background: #aaaaaa;
}

.toc-tick.toc-tick-sub {
  width: 7px;
  height: 1.5px;
  background: #999999;
}

[data-theme="dark"] .toc-tick.toc-tick-sub,
.theme-dark .toc-tick.toc-tick-sub {
  background: #666666;
}

.toc-tick:hover {
  width: 14px;
  background: #111111;
}

[data-theme="dark"] .toc-tick:hover,
.theme-dark .toc-tick:hover {
  background: #ffffff;
}

.toc-tick.is-active,
.toc-tick.active {
  width: 14px;
  height: 2px;
  background: #111111;
}

[data-theme="dark"] .toc-tick.is-active,
[data-theme="dark"] .toc-tick.active,
.theme-dark .toc-tick.is-active,
.theme-dark .toc-tick.active {
  background: #ffffff;
}

/* 2. Floating Popout Card (Appears on Hover beside capsule pill) */
.toc-card {
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  width: 260px;
  max-height: calc(100vh - 8rem);
  display: flex;
  flex-direction: column;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 200;
}

/* Invisible bridge to prevent hover gap flicker */
.toc-card::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 0;
  bottom: 0;
  width: 18px;
}

[data-theme="dark"] .toc-card,
.theme-dark .toc-card {
  background: #1e1e20;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.substack-toc-widget:hover .toc-card,
.substack-toc-widget:focus-within .toc-card,
.substack-toc-widget.is-open .toc-card {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0) scale(1);
}

.toc-card-header {
  margin-bottom: 12px;
}

.toc-card-title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #444444;
}

[data-theme="dark"] .toc-card-title,
.theme-dark .toc-card-title {
  color: #bbbbbb;
}

/* 3. Hierarchical List */
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc-list::-webkit-scrollbar {
  display: none;
}

.toc-item {
  margin: 0;
}

.toc-item.toc-level-3 {
  padding-left: 14px;
}

.toc-link {
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.35;
  color: #777777;
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s ease;
}

[data-theme="dark"] .toc-link,
.theme-dark .toc-link {
  color: #888888;
}

.toc-level-3 .toc-link {
  font-size: 13px;
  color: #888888;
}

[data-theme="dark"] .toc-level-3 .toc-link,
.theme-dark .toc-level-3 .toc-link {
  color: #777777;
}

.toc-link:hover,
.toc-link.is-hovered {
  color: #111111;
  text-decoration: none;
}

[data-theme="dark"] .toc-link:hover,
[data-theme="dark"] .toc-link.is-hovered,
.theme-dark .toc-link:hover,
.theme-dark .toc-link.is-hovered {
  color: #ffffff;
}

.toc-link.active,
.toc-link.is-active {
  color: #111111;
  font-weight: 600;
}

[data-theme="dark"] .toc-link.active,
[data-theme="dark"] .toc-link.is-active,
.theme-dark .toc-link.active,
.theme-dark .toc-link.is-active {
  color: #ffffff;
}

/* Post styles */
.post {
  max-width: none;
  margin: 0;
}

.post-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--text-color);
  text-align: left;
}

.post-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-color);
  margin: 0 0 1.25rem;
}

.post-title {
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}

.post-meta {
  color: var(--muted-color);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.post-meta-sep { color: var(--line); }
.post-meta-tags { color: var(--muted-color); }

.post-tags {
  margin: 0.75rem 0;
}

.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  margin: 0 0.25rem;
  background: var(--code-bg);
  border-radius: 20px;
  font-size: 0.8125rem;
  color: var(--muted-color);
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Post content */
.post-content {
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: break-word;
}

.post-content h1 {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: clamp(2.75rem, 5vw, 3.75rem) 0 1.35rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  scroll-margin-top: 2rem;
}

.post-content h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.95rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: clamp(2.75rem, 5vw, 3.75rem) 0 1.35rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  scroll-margin-top: 2rem;
}

.post-content h3 {
  font-size: clamp(1.1rem, 1.9vw, 1.3rem);
  letter-spacing: -0.015em;
  margin: 2rem 0 0.75rem;
  scroll-margin-top: 2rem;
}

.post-content p {
  margin-bottom: 1.75rem;
}

.post-content mark,
.post-content span[style*="background"] {
  background-color: #FEF08A !important;
  color: #111111 !important;
  padding: 2px 6px;
  border-radius: 4px;
}

[data-theme="dark"] .post-content mark,
[data-theme="dark"] .post-content span[style*="background"] {
  background-color: #854D0E !important;
  color: #FFFFFF !important;
}

.post-content s,
.post-content del,
.post-content strike {
  text-decoration: line-through;
  opacity: 0.75;
}

.post-content .btn-cta,
.post-content .studio-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--select, #111111);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 14px;
  border-radius: 999px;
  text-decoration: none !important;
  margin: 1.25rem 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .post-content .btn-cta,
[data-theme="dark"] .post-content .studio-cta-btn {
  background: #ffffff;
  color: #111111 !important;
}

.post-content .btn-cta:hover,
.post-content .studio-cta-btn:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.post-content .callout-card,
.post-content .studio-callout {
  background: var(--code-bg, rgba(0, 0, 0, 0.03));
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
  border-left: 4px solid var(--accent, #3B82F6);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 2rem 0;
}

.post-content .callout-card h4,
.post-content .studio-callout h4,
.post-content .callout-card strong,
.post-content .studio-callout strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-color, inherit);
  display: block;
  margin-bottom: 6px;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.75rem 2rem;
}

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

.post-content blockquote {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0;
  padding: 0 0 0 1.5rem;
  border-left: 2px solid var(--text-color);
  color: var(--text-color);
  font-style: normal;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.post-content blockquote p { margin-bottom: 0.75rem; }
.post-content blockquote p:last-child { margin-bottom: 0; }

.post-content blockquote em {
  display: inline-block;
  margin-top: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-style: normal;
  color: var(--muted-color);
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
}

.post-content pre {
  margin: 2rem 0;
  padding: 1.25rem;
  background: var(--code-bg);
  border-radius: 0;
  border: 1px solid var(--border-color);
  overflow-x: auto;
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.post-content a {
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.post-content code {
  word-break: break-word;
  overflow-wrap: break-word;
}

.post-content ul li a,
.post-content ol li a {
  word-break: break-all;
  overflow-wrap: anywhere;
}

@media (max-width: 600px) {
  .post-content a[href*="://"] {
    word-break: break-all;
    overflow-wrap: anywhere;
    line-break: anywhere;
  }
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: clamp(2rem, 4vw, 3rem) 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.post-content video {
  width: 100%;
  height: auto;
  margin: clamp(2rem, 4vw, 3rem) 0;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.post-content hr {
  margin: 3rem 0;
  border: none;
  border-top: 1px solid var(--border-color);
}

/* Tables */
.post-content table {
  width: 100%;
  margin: clamp(2rem, 4vw, 3rem) 0;
  border-collapse: collapse;
  border: 1px solid var(--border-color);
  border-radius: 0;
  background: var(--card-bg);
  font-size: 0.875rem;
  overflow: hidden;
}

.post-content th,
.post-content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.post-content th {
  background: var(--code-bg);
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--text-color);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.post-content tr:last-child td {
  border-bottom: none;
}

.post-content tr:nth-child(even) {
  background: var(--code-bg);
}

.post-content td code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.125rem 0.25rem;
}

[data-theme="dark"] .post-content td code {
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 600px) {
  .post-content table {
    font-size: 0.8125rem;
  }
  
  .post-content th,
  .post-content td {
    padding: 0.5rem 0.75rem;
  }
}

/* Responsive */
@media (max-width: 1100px) {
  .post-sidebar {
    left: calc(50% - 380px - 240px - 3rem);
  }
}

@media (max-width: 900px) {
  .post-layout {
    flex-direction: column;
    gap: 0;
    padding: 0;
    min-height: auto;
  }
  
  .post-sidebar {
    position: static;
    width: 100%;
    height: auto;
    margin-bottom: 2rem;
    padding: 0;
    background: none;
    border-radius: 0;
  }
  
  .post-main {
    margin-left: 0;
    width: 100%;
    max-width: none;
    padding: 0;
  }
  
  .table-of-contents {
    display: none;
  }
  
  .post-nav {
    margin-bottom: 1rem;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 56px 20px;
  }

  .post-title {
    font-size: 18px;
  }

  .post-layout {
    padding: 0;
  }
  
  .post-sidebar {
    padding: 0;
  }
  
  .post-nav {
    margin-bottom: 1rem;
  }
  
  .post-main {
    padding: 0;
  }
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-color);
  text-decoration: none;
  z-index: 100;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .back-to-top {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .back-to-top {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

.back-to-top:hover {
  background: var(--link-color);
  color: white;
  border-color: var(--link-color);
  transform: translateY(-2px);
  text-decoration: none;
}

.back-to-top:active {
  background: var(--link-color);
  color: white;
  border-color: var(--link-color);
  transform: translateY(-1px);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 768px) {
  .post-layout .back-to-top {
    display: flex;
  }
}

/* Now Playing */
.now-playing {
  margin-top: 1.5rem;
  animation: slide-up 0.5s ease-out;
}

.now-playing-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-color);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem;
  transition: all 0.2s ease;
}

.now-playing-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.now-playing-album-art {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

.now-playing-info {
  display: flex;
  flex-direction: column;
}

.now-playing-title {
  font-weight: 600;
}

.now-playing-artist {
  color: var(--muted-color);
  font-size: 0.875rem;
}

@keyframes slide-up {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section reveal on scroll */
html.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out-expo),
              transform var(--dur-slow) var(--ease-out-expo);
}

html.js-reveal [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* View transitions */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) {
    animation: vt-out 180ms var(--ease-out-quart) both;
  }
  ::view-transition-new(root) {
    animation: vt-in var(--dur-normal) var(--ease-out-expo) both;
  }
}

@keyframes vt-out {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes vt-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

:focus-visible {
  outline: 2px solid var(--select);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   ===============  EDITORIAL HOMEPAGE  =======================
   ============================================================ */

/* Full-bleed wrapper */
.home-wide {
  width: min(1140px, 92vw);
  margin-left: 50%;
  transform: translateX(-50%);
}

/* ---- Masthead ---- */
.masthead { padding-top: 0.5rem; }

.eyebrow-name { color: var(--text-color); }

.eyebrow-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-color);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #19c37d;
  animation: pulse-dot 2.4s ease-out infinite;
}

@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(25, 195, 125, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(25, 195, 125, 0); }
  100% { box-shadow: 0 0 0 0 rgba(25, 195, 125, 0); }
}

/* ============================================================
   ===================  SITE NAVBAR (BLUEPRINT)  ==============
   ============================================================ */
.sitenav {
  position: sticky;
  top: 0;
  z-index: 70;
  width: 100%;
  background: transparent;
  padding: 0.5rem 0;
}

.sitenav.is-scrolled {
  background: color-mix(in srgb, var(--bg-color) 85%, transparent);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}

.sitenav-frame {
  position: relative;
  width: min(1140px, 92vw);
  margin: 0.8rem auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.8rem;
  border: 1px dotted var(--line);
  background: color-mix(in srgb, var(--bg-color) 60%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Blueprint architectural guide crosshairs */
.sitenav-frame::before {
  content: '';
  position: absolute;
  top: -14px;
  bottom: -14px;
  left: 0;
  right: 0;
  border-left: 1px dotted var(--line);
  border-right: 1px dotted var(--line);
  pointer-events: none;
}

.sitenav-frame::after {
  content: '';
  position: absolute;
  left: -14px;
  right: -14px;
  top: 0;
  bottom: 0;
  border-top: 1px dotted var(--line);
  border-bottom: 1px dotted var(--line);
  pointer-events: none;
}

.sitenav-left {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  min-width: 0;
}

.sitenav-brand {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-color);
  text-decoration: none;
  white-space: nowrap;
}

.sitenav-brand:hover {
  color: var(--text-color);
}

.sitenav-links-left {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.sitenav-links-left a,
.sitenav-right a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--dur-fast) ease;
  white-space: nowrap;
}

.sitenav-links-left a:hover,
.sitenav-right a:hover {
  color: var(--text-color);
  text-decoration: none;
}

.footer-links-card {
  display: none !important;
}

.sitenav-links-left {
  display: none !important;
}

.sitenav-right {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-theme-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  transition: color var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.nav-theme-btn:hover {
  color: var(--text-color);
  transform: scale(1.1);
}

.nav-theme-btn .moon-icon {
  display: none;
}

[data-theme="dark"] .nav-theme-btn .sun-icon {
  display: block;
}

[data-theme="light"] .nav-theme-btn .sun-icon {
  display: none;
}

[data-theme="light"] .nav-theme-btn .moon-icon {
  display: block;
}

@media (max-width: 768px) {
  .sitenav-links-left {
    display: none;
  }
}

@media (max-width: 480px) {
  .sitenav-frame {
    padding: 0.75rem 1rem;
  }
  .sitenav-right {
    gap: 0.9rem;
  }
}

.hero-top {
  width: 100%;
  display: block;
}

/* Display name typography: Bold Italic 2-line masthead */
.display {
  position: relative;
  width: 100%;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-style: italic;
  font-weight: 900;
  margin: 0 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  line-height: 0.86;
  letter-spacing: -0.035em;
}

.display .word {
  display: block;
  width: 100%;
  font-style: italic;
  font-size: clamp(3.2rem, 13.8vw, 11rem);
  font-variation-settings: "wght" 900, "wdth" 120;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.display .ltr {
  display: inline-block;
  font-style: italic;
  font-variation-settings: "wght" 900, "wdth" 120;
  transition: transform 0.4s var(--ease-spring),
              font-variation-settings 0.3s ease,
              color 0.2s ease;
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .display .ltr:hover {
    font-variation-settings: "wght" 900, "wdth" 125;
    transform: translateY(-6%) scale(1.05);
    color: var(--select);
  }
}

/* Comment pin */
.pin-wrap {
  position: relative;
  justify-self: end;
  margin-top: 0.6rem;
}

.pin {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: 2px solid var(--card-bg);
  border-radius: 999px 999px 999px 6px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform var(--dur-normal) var(--ease-spring);
}

.pin-wrap:hover .pin,
.pin-wrap:focus-within .pin { transform: scale(1.08) rotate(-6deg); }

.pin-note {
  position: absolute;
  top: calc(100% + 0.7rem);
  right: 0;
  width: min(250px, 68vw);
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 12px 4px 12px 12px;
  box-shadow: var(--shadow-lg);
  padding: 0.9rem 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-color);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity var(--dur-normal) var(--ease-out-expo),
              transform var(--dur-normal) var(--ease-out-expo);
  pointer-events: none;
  z-index: 20;
}

.pin-note b {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-color);
}

.pin-wrap:hover .pin-note,
.pin-wrap:focus-within .pin-note {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

@media (max-width: 640px) {
  .hero-top { grid-template-columns: 1fr; }
  .pin-wrap { justify-self: start; margin-top: 1.25rem; }
  .pin-note { right: auto; left: 0; border-radius: 4px 12px 12px 12px; }
}

.kicker {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: clamp(0.68rem, 1.4vw, 0.85rem);
  color: var(--muted-color);
  margin: clamp(1.25rem, 3vw, 2rem) 0 clamp(2rem, 4vw, 3rem);
}

.kicker-status { color: var(--text-color); }
.kicker-status .dot { display: inline-block; margin-right: 0.45rem; vertical-align: 1px; }

.intro {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2rem 3rem;
  align-items: start;
}

.intro-lede {
  font-size: clamp(1.05rem, 1.7vw, 1.4rem);
  line-height: 1.5;
  max-width: 42ch;
  letter-spacing: -0.01em;
}

.intro-lede p { margin: 0 0 1rem; }
.intro-lede p:last-child { margin-bottom: 0; }

.intro-lede a:not(.external-link) {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.intro-links {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  justify-self: end;
  width: 100%;
  max-width: 288px;
  border: 1px dotted var(--line);
  background: var(--card-bg);
  padding: 0;
  box-sizing: border-box;
}

/* Blueprint architectural guide crosshairs locked to grid lines */
.intro-links::before {
  content: '';
  position: absolute;
  top: -16px;
  bottom: -16px;
  left: 0;
  right: 0;
  border-left: 1px dotted var(--line);
  border-right: 1px dotted var(--line);
  pointer-events: none;
}

.intro-links::after {
  content: '';
  position: absolute;
  left: -16px;
  right: -16px;
  top: 0;
  bottom: 0;
  border-top: 1px dotted var(--line);
  border-bottom: 1px dotted var(--line);
  pointer-events: none;
}

.metalink {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  height: 64px; /* Exact 2 × 32px grid modules */
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-color);
  padding: 0 1.25rem;
  border-bottom: 1px dotted var(--line);
  text-decoration: none;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
  box-sizing: border-box;
}

.metalink:first-child { border-top: none; }
.metalink:last-child { border-bottom: none; }

.metalink:hover {
  background: color-mix(in srgb, var(--select) 8%, transparent);
  color: var(--text-color);
}

.metalink-go {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  opacity: 0.7;
  transition: transform var(--dur-normal) var(--ease-spring), opacity var(--dur-fast) ease;
}

.metalink:hover .metalink-go {
  transform: translate(3px, -3px);
  opacity: 1;
  color: var(--select);
}

/* Capability tags — positioned above the divider line */
.taglist {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  padding: 0 0 clamp(1rem, 2vw, 1.5rem);
  border-top: none;
  border-bottom: none;
}

.taglist li {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-color);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.85rem;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.taglist li:hover {
  color: var(--pill-accent, var(--select));
  border-color: var(--pill-accent, var(--select));
  box-shadow: 0 0 14px var(--pill-glow, rgba(234, 179, 8, 0.25));
  transform: translateY(-2px);
}

.taglist li:nth-child(1) { --pill-accent: #EAB308; --pill-glow: rgba(234, 179, 8, 0.3); }  /* Yellow */
.taglist li:nth-child(2) { --pill-accent: #EC4899; --pill-glow: rgba(236, 72, 153, 0.3); } /* Pink */
.taglist li:nth-child(3) { --pill-accent: #06B6D4; --pill-glow: rgba(6, 182, 212, 0.3); }  /* Cyan */
.taglist li:nth-child(4) { --pill-accent: #10B981; --pill-glow: rgba(16, 185, 129, 0.3); } /* Green */
.taglist li:nth-child(5) { --pill-accent: #8B5CF6; --pill-glow: rgba(139, 92, 246, 0.3); } /* Purple */
.taglist li:nth-child(6) { --pill-accent: #F97316; --pill-glow: rgba(249, 115, 22, 0.3); }  /* Orange */
.taglist li:nth-child(7) { --pill-accent: #3B82F6; --pill-glow: rgba(59, 130, 246, 0.3); }  /* Blue */
.taglist li:nth-child(8) { --pill-accent: #14B8A6; --pill-glow: rgba(20, 184, 166, 0.3); } /* Teal */

/* Index sections = Technical Blueprint Dotted Artboards */
.index {
  position: relative;
  margin: clamp(4.5rem, 9vw, 6.5rem) 0;
  scroll-margin-top: 6.5rem;
  background: color-mix(in srgb, var(--card-bg) 65%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px dotted var(--line);
  border-radius: 0;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  box-shadow: none;
}

/* Blueprint architectural guide crosshairs */
.index::before {
  content: '';
  position: absolute;
  top: -16px;
  bottom: -16px;
  left: 0;
  right: 0;
  border-left: 1px dotted var(--line);
  border-right: 1px dotted var(--line);
  pointer-events: none;
}

.index::after {
  content: '';
  position: absolute;
  left: -16px;
  right: -16px;
  top: 0;
  bottom: 0;
  border-top: 1px dotted var(--line);
  border-bottom: 1px dotted var(--line);
  pointer-events: none;
}

.index-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1.15rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px dotted var(--line);
}

.index-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted-color);
}

.index-title {
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.index-meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-color);
}

.index-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 2px solid var(--select, #EAB308);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.4);
  font-size: 0;
  line-height: 0;
  flex-shrink: 0;
}

.index-arrow::after {
  content: "";
  width: 6px;
  height: 6px;
  background-color: var(--select, #EAB308);
  border-radius: 50%;
}

/* Selected Work: asymmetric card grid */
.workgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.workcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  text-decoration: none;
  color: var(--text-color);
  transition: transform var(--dur-normal) var(--ease-out-expo);
}

.workcard:hover,
.workcard:focus-visible {
  transform: translateY(-4px);
}

.workcard:hover .workcard-media,
.workcard:focus-visible .workcard-media {
  border-color: var(--select);
}

.workcard--lg {
  grid-column: 1 / -1;
}

.workcard-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px dotted var(--line);
  background: var(--code-bg);
}

.workcard--lg .workcard-media { aspect-ratio: 21 / 9; }

.workcard-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out-quart);
}

.workcard:hover .workcard-media img { transform: scale(1.035); }

@media (prefers-reduced-motion: reduce) {
  .workcard-media img { transition: none; }
  .workcard:hover .workcard-media img { transform: none; }
}

.workcard-tag {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  left: auto;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: #111111;
  background: var(--select, #EAB308);
  border-radius: 10px;
  padding: 0.3rem 0.7rem;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.workcard-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.workcard-title {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.index-meta {
  display: none !important;
}

.workcard-sub {
  display: none !important;
}

@media (max-width: 640px) {
  .workgrid { grid-template-columns: 1fr; }
  .workcard--lg .workcard-media { aspect-ratio: 16 / 10; }
}

/* Row list */
.rowlist { list-style: none; margin: 0; padding: 0; }

.rowitem {
  border-bottom: 1px dotted var(--border-color);
  transition: background-color var(--dur-fast) ease;
}

.rowitem:hover { background: var(--code-bg); }

.row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(0.9rem, 2.2vw, 1.7rem) 0.5rem;
  color: var(--text-color);
  text-decoration: none;
  transition: padding-left var(--dur-normal) var(--ease-out-expo),
              color var(--dur-fast) ease;
}

.row:hover { color: var(--text-color); padding-left: 1rem; }

.row-idx {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted-color);
}

.row-title {
  font-size: clamp(1.2rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.row-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-color);
  white-space: nowrap;
}

.row-year {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted-color);
  font-variant-numeric: tabular-nums;
}

.row-go {
  font-size: 1.05rem;
  color: var(--muted-color);
  transition: transform var(--dur-normal) var(--ease-out-expo),
              color var(--dur-fast) ease;
}

.row:hover .row-go { transform: translate(4px, -4px); color: var(--text-color); }

@media (max-width: 768px) {
  .row {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
    padding: 1.25rem 0.5rem !important;
  }

  .row-idx {
    font-size: 0.75rem !important;
    font-weight: 700;
    color: var(--select, #EAB308) !important;
  }

  .row-title {
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
  }

  .row-tag,
  .row-year {
    font-size: 0.75rem !important;
    color: var(--muted-color) !important;
    white-space: normal !important;
  }
}

/* Skills Matrix Card — Technical Blueprint 2x3 Grid System */
.skills-matrix-card,
.builtgrid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  box-sizing: border-box;
  margin-top: 1.75rem;
  width: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .skills-matrix-card,
[data-theme="dark"] .builtgrid {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.skills-matrix-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 80px;
  background: var(--card-bg);
  padding: 1.25rem 1.4rem;
  text-decoration: none;
  color: var(--text-color);
  transition: background-color var(--dur-fast) ease,
              color var(--dur-fast) ease,
              padding-left var(--dur-normal) var(--ease-out-expo);
  box-sizing: border-box;
}

[data-theme="dark"] .skills-matrix-row {
  background: #141416;
}

.skills-matrix-row:hover {
  background: rgba(234, 179, 8, 0.08);
  color: var(--select, #EAB308);
  padding-left: 1.75rem;
  text-decoration: none;
}

[data-theme="dark"] .skills-matrix-row:hover {
  background: #1A1A1E;
  color: var(--select, #EAB308);
}

.skills-matrix-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow: hidden;
}

.skills-matrix-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skills-matrix-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0.8;
}

.skills-matrix-arrow {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--muted-color);
  transition: transform var(--dur-normal) var(--ease-out-expo), color var(--dur-fast) ease;
  flex-shrink: 0;
}

.skills-matrix-row:hover .skills-matrix-arrow {
  transform: translate(3px, -3px);
  color: var(--select, #EAB308);
}

@media (max-width: 860px) {
  .skills-matrix-card,
  .builtgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .skills-matrix-card,
  .builtgrid {
    grid-template-columns: 1fr;
  }
}

/* Manifesto — Technical Blueprint Dotted Panel */
.statement-band {
  position: relative;
  width: min(1140px, 92vw);
  margin: clamp(4.5rem, 10vw, 7.5rem) calc(50% - min(570px, 46vw));
  background: var(--panel);
  color: var(--panel-ink);
  padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 5vw, 4.5rem);
  border: 1px dotted var(--line);
  border-radius: 0;
  box-shadow: none;
}

.statement-band::before {
  content: '';
  position: absolute;
  top: -16px;
  bottom: -16px;
  left: 0;
  right: 0;
  border-left: 1px dotted var(--line);
  border-right: 1px dotted var(--line);
  pointer-events: none;
}

.statement-band::after {
  content: '';
  position: absolute;
  left: -16px;
  right: -16px;
  top: 0;
  bottom: 0;
  border-top: 1px dotted var(--line);
  border-bottom: 1px dotted var(--line);
  pointer-events: none;
}

.statement-inner {
  width: 100%;
  margin: 0 auto;
}

.statement-text {
  font-family: var(--font-display);
  font-variation-settings: "wght" 800, "wdth" 105;
  text-transform: uppercase;
  font-size: clamp(1.35rem, 2.8vw, 2.35rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}

.statement-text em {
  font-style: normal;
  color: var(--select);
}

.statement-sub {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: color-mix(in srgb, var(--panel-ink) 65%, transparent);
  max-width: 42ch;
}

/* Track-record stat table */
.stattable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.75rem;
}

.stattable tr { border-bottom: 1px dotted var(--line); }
.stattable tr:last-child { border-bottom: none; }

.stattable td {
  padding: clamp(0.85rem, 2vw, 1.25rem) 0.5rem;
  vertical-align: baseline;
}

.stattable-value {
  font-family: var(--font-display);
  font-variation-settings: "wght" 800, "wdth" 115;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.01em;
  white-space: nowrap;
  width: 1%;
}

.stattable-label {
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  padding-left: clamp(1rem, 3vw, 2rem) !important;
}

.stattable-source {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-color);
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .stattable-source { display: none; }
}

/* Cursor-following image preview */
.cursor-preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: clamp(220px, 24vw, 320px);
  aspect-ratio: 4 / 3;
  margin: 0;
  padding: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  pointer-events: none;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  scale: 0.88;
  transform: translate(-50%, -50%);
  transition: opacity var(--dur-normal) var(--ease-out-expo),
              scale var(--dur-slow) var(--ease-spring);
  will-change: transform, opacity;
}

.cursor-preview.is-on { opacity: 1; scale: 1; }

.cursor-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 720px) {
  .intro { grid-template-columns: 1fr; gap: 1.75rem; }
  .intro-links { justify-self: stretch; max-width: none; }
  .row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; }
  .row-tag, .row-go { display: none; }
}

/* ============================================================
   ===============  EDITORIAL FOOTER  =========================
   ============================================================ */
.footer {
  position: relative;
  z-index: 40;
  max-width: none;
  margin: clamp(4rem, 9vw, 7rem) 0 0;
  padding: 0;
  background: var(--panel);
  border-top: none;
  --text-color: var(--panel-ink);
  --muted-color: color-mix(in srgb, var(--panel-ink) 58%, transparent);
  --border-color: color-mix(in srgb, var(--panel-ink) 20%, transparent);
  --line: color-mix(in srgb, var(--panel-ink) 20%, transparent);
  --card-bg: color-mix(in srgb, var(--panel-ink) 8%, var(--panel));
  --code-bg: color-mix(in srgb, var(--panel-ink) 10%, var(--panel));
  color: var(--panel-ink);
}

.footer::before { content: none; display: none; }

.footer-inner {
  width: min(1140px, 92vw);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
}

.footer-cta { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }

.footer-bigmail {
  display: inline-flex;
  align-items: center;
  gap: 0.12em;
  font-family: var(--font-display);
  font-variation-settings: "wght" 820, "wdth" 118;
  text-transform: uppercase;
  font-size: clamp(2rem, 7vw, 5rem);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-color);
  text-decoration: none;
  transition: color var(--dur-fast) ease;
}

.footer-bigmail span {
  display: none !important;
}

.footer-bigmail:hover {
  color: var(--select);
  text-decoration: none;
}

.footer-bigmail:hover span { transform: translate(0.15em, -0.15em); }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem 3rem;
  align-items: start;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.footer-col { display: flex; flex-direction: column; gap: 0.45rem; }

.footer-col--right {
  align-items: flex-end;
  text-align: right;
  min-width: 200px;
}

nav.footer-col {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem 1.75rem;
}

nav.footer-col .footer-label {
  flex-basis: 100%;
  margin-bottom: 0.15rem;
}

.footer-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-color);
  margin-bottom: 0.6rem;
}

/* Footer Links Dynamic 3-Column Matrix Grid (3x1, 3x2, 3x3, etc.) */
.footer-links-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  max-width: 1140px;
  width: 100%;
  margin-top: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: relative;
}

[data-theme="dark"] .footer-links-card {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.footer-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.15rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-color);
  text-decoration: none;
  background: var(--card-bg);
  transition: background-color var(--dur-fast) ease,
              padding-left var(--dur-normal) var(--ease-out-expo),
              color var(--dur-fast) ease;
}

[data-theme="dark"] .footer-link-row {
  background: #141416;
}

.footer-link-row span.footer-link-label {
  color: inherit;
  letter-spacing: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-link-row span.footer-link-arrow {
  font-size: 0.95rem;
  color: var(--muted-color);
  transition: transform var(--dur-normal) var(--ease-out-expo),
              color var(--dur-fast) ease;
  flex-shrink: 0;
}

.footer-link-row:hover {
  background: rgba(234, 179, 8, 0.08);
  color: var(--select, #EAB308);
  padding-left: 1.65rem;
  text-decoration: none;
}

[data-theme="dark"] .footer-link-row:hover {
  background: #1A1A1E;
  color: var(--select, #EAB308);
}

.footer-link-row:hover span.footer-link-arrow {
  transform: translate(3px, -3px);
  color: var(--select, #EAB308);
}

.footer-links-card,
.intro-links,
.metalink {
  display: none !important;
}

@media (max-width: 860px) {
  .footer-links-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .footer-links-card {
    grid-template-columns: 1fr;
  }
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-color);
  width: fit-content;
}

.footer-link span {
  color: var(--muted-color);
  transition: transform var(--dur-normal) var(--ease-out-expo), color var(--dur-fast) ease;
}

.footer-link:hover { color: var(--text-color); text-decoration: none; }
.footer-link:hover span { transform: translate(3px, -3px); color: var(--text-color); }

.footer-col--right .theme-switcher { margin-top: 0.1rem; }
.footer-col--right .now-playing { margin-top: 1rem; max-width: 240px; }

.footer-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-color);
}

.footer-base a { color: var(--muted-color); }
.footer-base a:hover { color: var(--text-color); text-decoration: none; }
.footer-totop span { transition: transform var(--dur-normal) var(--ease-out-expo); display: inline-block; }
.footer-totop:hover span { transform: translateY(-3px); }

.footer-wordmark {
  display: none !important;
}

/* ============================================================
   ==============  TOOLBAR DOCK + COLLAB CURSOR  ==============
   ============================================================ */
.dock {
  position: fixed;
  top: 50%;
  left: clamp(1.8rem, 3.5vw, 3rem);
  transform: translateY(-50%);
  bottom: auto;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background: color-mix(in srgb, var(--card-bg) 92%, var(--bg-color));
  border: 1px solid var(--line);
  border-radius: 0px;
  padding: 0;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.dock-tool {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 0px;
  color: var(--muted-color);
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
  transition: all 0.15s ease;
  cursor: pointer;
  user-select: none;
}

.dock-tool svg,
.dock .theme-btn svg {
  width: 17px;
  height: 17px;
}

.dock-tool:last-child {
  border-bottom: none;
}

.dock-tool:hover {
  color: var(--text-color);
  background: color-mix(in srgb, var(--line) 40%, transparent);
  border-color: color-mix(in srgb, var(--line) 70%, transparent);
}

.dock-tool.is-active {
  background: #FA9E1C !important;
  color: #000000 !important;
  border-color: #FA9E1C !important;
  border-radius: 0px !important;
  box-shadow: 0 0 18px rgba(250, 158, 28, 0.6) !important;
}

.dock-tool.is-active svg {
  fill: #000000 !important;
  color: #000000 !important;
}

.dock-link {
  text-decoration: none;
}

.dock-link:hover {
  color: var(--text-color);
  background: color-mix(in srgb, var(--line) 45%, transparent);
  text-decoration: none;
}

.dock-sep {
  width: 100%;
  height: 1px;
  background: var(--line);
  margin: 0;
  border-radius: 0;
}

.dock .theme-switcher {
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.dock .theme-btn {
  width: 46px;
  height: 46px;
  border-radius: 0px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
  color: var(--muted-color);
  cursor: pointer;
  transition: all 0.15s ease;
}

.dock .theme-btn:hover {
  color: var(--text-color);
  background: color-mix(in srgb, var(--line) 40%, transparent);
  border-color: color-mix(in srgb, var(--line) 70%, transparent);
}

.dock .theme-btn.active,
.dock .theme-btn.is-active {
  color: var(--text-color);
  background: color-mix(in srgb, var(--text-color) 14%, var(--card-bg));
  border-color: color-mix(in srgb, var(--line) 80%, var(--text-color) 20%);
  border-radius: 0px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

/* Theme Toggle Button in Dock (Sun in dark mode -> switch to light; Moon in light mode -> switch to dark) */
.theme-toggle-btn {
  position: relative;
  background: transparent;
  cursor: pointer;
}

.theme-toggle-btn .sun-icon {
  display: block;
}
.theme-toggle-btn .moon-icon {
  display: none;
}

[data-theme="light"] .theme-toggle-btn .sun-icon {
  display: none !important;
}
[data-theme="light"] .theme-toggle-btn .moon-icon {
  display: block !important;
}

@media (prefers-color-scheme: light) {
  html:not([data-theme]) .theme-toggle-btn .sun-icon {
    display: none;
  }
  html:not([data-theme]) .theme-toggle-btn .moon-icon {
    display: block;
  }
}

@media (max-width: 768px) {
  .dock {
    top: auto !important;
    bottom: 1.25rem !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    flex-direction: row !important;
    padding: 0;
    border-radius: 0px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
  .dock-tool,
  .dock .theme-btn {
    width: 44px;
    height: 44px;
    border-bottom: none !important;
    border-right: 1px solid color-mix(in srgb, var(--line) 50%, transparent) !important;
  }
  .dock-tool:last-child,
  .dock .theme-btn:last-child {
    border-right: none !important;
  }
  .dock-sep {
    width: 1px !important;
    height: 44px !important;
    margin: 0 !important;
  }
  .dock .theme-switcher {
    flex-direction: row !important;
    width: auto !important;
  }
}

/* Circle vector cursor */
.collab {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--select);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  will-change: transform;
}

.collab svg {
  width: 22px;
  height: 22px;
  transition: transform 0.22s var(--ease-spring);
  filter: drop-shadow(0 0 5px rgba(234, 179, 8, 0.45));
}

.collab.is-on { opacity: 1; }

.collab.is-hovering svg {
  transform: scale(1.4);
  filter: drop-shadow(0 0 10px rgba(234, 179, 8, 0.75));
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-col--right { align-items: flex-start; text-align: left; }
  .footer-base-mid { display: none; }
}

/* Homepage Articles Feed Grid */
.articles-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.article-home-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface, #FFFFFF);
  border: 1px solid var(--line);
  border-radius: 0;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.22s var(--ease-spring), border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

[data-theme="dark"] .article-home-card {
  background: var(--card-bg, #18181B);
}

.article-home-card:hover {
  transform: translateY(-3px);
  border-color: var(--select);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.article-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-subtle, #f0ede6);
  overflow: hidden;
}

.article-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-home-card:hover .article-card-thumb img {
  transform: scale(1.04);
}

.article-card-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  left: auto;
  background: var(--select, #EAB308);
  color: #111111;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 2;
}

[data-theme="dark"] .article-card-tag {
  background: var(--select, #EAB308);
  color: #111111;
}

.article-card-info {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
}

.article-card-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.article-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
  margin: 0;
}

.article-card-read {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--select);
  margin-top: auto;
  padding-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

