/* ==========================================================================
   EDITORIAL ART-TECH / WARM MINIMALISM DESIGN SYSTEM
   Zsian Morales // Architectural Folio v4.0
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

/* --- 1. Design Tokens & CSS Variables --- */
:root {
  --canvas: #FAF8F5;          /* Never pure white for the page */
  --surface: #F2EFE9;         /* Feature cards / bento / banners */
  --surface-hover: #EBE7E0;
  --float: #FFFFFF;           /* Floating windows, code editors, command pill */
  --ink: #1C1B18;             /* Deep mineral carbon */
  --ink-muted: #6E6A63;       /* Weathered graphite */
  --ink-subtle: #969188;      /* Lighter secondary notes */
  --olive: #5A6B53;           /* Halftone / dither accent (used sparingly) */
  --olive-light: rgba(90, 107, 83, 0.12);
  --terracotta: #C96645;      /* Warm secondary accent */
  --dither-base: #EAE6DF;     /* Warm stone backing */
  --hairline: rgba(28, 27, 24, 0.08);
  --hairline-strong: rgba(28, 27, 24, 0.18);

  /* Fonts */
  --font-serif: 'Instrument Serif', 'Newsreader', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Typography Scale */
  --text-display: clamp(3.2rem, 7.5vw, 6.8rem);
  --text-h1: clamp(2.2rem, 4.5vw, 4rem);
  --text-h2: clamp(1.7rem, 3vw, 2.8rem);
  --text-h3: clamp(1.25rem, 2vw, 1.85rem);
  --text-body: 1.0625rem;
  --text-sm: 0.875rem;
  --text-mono: 0.75rem;

  /* Spacing */
  --section-py-desktop: 56px;
  --section-py-mobile: 40px;
  --measure-body: 60ch;
  --max-width: 1360px;

  /* Shadows */
  --shadow-window: 0 24px 60px rgba(28, 27, 24, 0.09), 0 4px 12px rgba(28, 27, 24, 0.04);
  --shadow-command: 0 12px 32px rgba(28, 27, 24, 0.06);
  --shadow-card: 0 10px 28px rgba(28, 27, 24, 0.05);

  /* Transitions */
  --ease-calm: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-calm: 800ms;
}

/* Optional Dark Drafting Desk Mode */
[data-theme="dark"] {
  --canvas: #161513;
  --surface: #1E1D19;
  --surface-hover: #262420;
  --float: #22211C;
  --ink: #F7F5F0;
  --ink-muted: #A8A49C;
  --ink-subtle: #726E66;
  --olive: #8CA383;
  --olive-light: rgba(140, 163, 131, 0.16);
  --terracotta: #E27E5E;
  --dither-base: #1C1B17;
  --hairline: rgba(247, 245, 240, 0.09);
  --hairline-strong: rgba(247, 245, 240, 0.22);
  --shadow-window: 0 24px 60px rgba(0, 0, 0, 0.45);
  --shadow-command: 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* --- Global Reset & Foundation --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--canvas);
}

/* Lenis drives the scroll position itself — native smooth would fight it */
html.lenis-active,
html.lenis-active body {
  scroll-behavior: auto;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--canvas);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  transition: background-color 300ms ease, color 300ms ease;
}

/* Custom Selection */
::selection {
  background-color: var(--olive-light);
  color: var(--ink);
}

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

/* Global Paper Grain Texture Overlay */
.paper-grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  background-repeat: repeat;
}

/* Scroll Progress Bar */
.scroll-progress-line {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  background-color: var(--olive);
  z-index: 10001;
  width: 0%;
  transition: width 80ms linear;
}

/* --- Container Frame --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 48px);
  padding-right: clamp(20px, 4vw, 48px);
}

/* --- Section Spacing --- */
.section-py {
  padding-top: var(--section-py-desktop);
  padding-bottom: var(--section-py-desktop);
}

@media (max-width: 768px) {
  .section-py {
    padding-top: var(--section-py-mobile);
    padding-bottom: var(--section-py-mobile);
  }
}

/* --- Typography Utilities --- */
.font-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.font-serif em {
  font-style: italic;
  font-weight: 400;
}

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

.eyebrow-label {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.eyebrow-label.olive {
  color: var(--olive);
}

.eyebrow-label.terracotta {
  color: var(--terracotta);
}

/* --- Section Dividers --- */
.brush-divider {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 clamp(20px, 4vw, 48px);
}

.brush-divider svg {
  width: 100%;
  height: 24px;
  stroke: var(--hairline-strong);
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
}

/* --- Intro Load Mask --- */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998; /* above the page, below the paper-grain texture (9999) */
  display: none;
  align-items: center;
  justify-content: center;
  background-color: var(--canvas);
  opacity: 1;
  transition: opacity 280ms var(--ease-calm);
}

html.js-intro .intro-overlay {
  display: flex;
  /* CSS-only failsafe: even if main.js never runs, the mask lifts on its own */
  animation: intro-failsafe 1ms 2600ms forwards;
}

@keyframes intro-failsafe {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

html.js-intro,
html.js-intro body {
  overflow: hidden;
}

.intro-overlay.is-leaving {
  opacity: 0;
}

/* Soft dotted halo — the site's dither motif, faded out at the edges */
.intro-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--olive) 1.2px, transparent 1.2px);
  background-size: 14px 14px;
  opacity: 0.18;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(circle at center, #000 0%, transparent 60%);
  mask-image: radial-gradient(circle at center, #000 0%, transparent 60%);
}

.intro-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 2.4vw, 26px);
  transition: transform 280ms var(--ease-calm), opacity 250ms ease;
}

.intro-overlay.is-leaving .intro-stage {
  transform: translateY(-14px);
  opacity: 0;
}

/* The ghost reserves the final width so the line never shifts while typing */
.intro-wordmark {
  position: relative;
  display: inline-block;
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6.5vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
}

.intro-ghost {
  visibility: hidden;
}

.intro-typed {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
}

.intro-caret {
  display: inline-block;
  width: 2px;
  height: 0.8em;
  margin-left: 0.06em;
  background-color: var(--olive);
  vertical-align: -0.02em;
  animation: intro-caret-blink 1s steps(1) infinite;
}

@keyframes intro-caret-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.intro-progress {
  display: block;
  width: clamp(120px, 18vw, 190px);
  height: 2px;
  background-color: var(--hairline-strong);
  overflow: hidden;
}

.intro-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--olive);
  transform: scaleX(0);
  transform-origin: left center;
  animation: intro-progress-fill 1700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes intro-progress-fill {
  to { transform: scaleX(1); }
}

/* PixPals wordmark — stamps in letter by letter below the progress line */
.intro-pix {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.intro-pix-row {
  position: relative;
  display: flex;
  align-items: flex-start;
  width: clamp(132px, 20vw, 196px);
}

.intro-pix-letter {
  display: block;
  height: auto;
  image-rendering: pixelated;
  opacity: 0;
  animation: intro-pix-letter-in 160ms steps(3, end) forwards;
}

/* The letters follow the faster zsian.me typing animation. */
.intro-pix-letter:nth-child(1) { animation-delay: 600ms; }
.intro-pix-letter:nth-child(2) { animation-delay: 680ms; }
.intro-pix-letter:nth-child(3) { animation-delay: 760ms; }
.intro-pix-letter:nth-child(4) { animation-delay: 840ms; }
.intro-pix-letter:nth-child(5) { animation-delay: 920ms; }
.intro-pix-letter:nth-child(6) { animation-delay: 1000ms; }
.intro-pix-letter:nth-child(7) { animation-delay: 1080ms; }

@keyframes intro-pix-letter-in {
  0% { opacity: 0; transform: translateY(-12%); }
  55% { opacity: 1; transform: translateY(4%); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Pixel caret hops to each letter's right edge as it lands (JS sets --pix-caret-x) */
.intro-pix-caret {
  position: absolute;
  top: 26%;
  left: 0;
  width: 4.5%;
  height: 48%;
  background-color: var(--olive);
  opacity: 0;
  transform: translateX(var(--pix-caret-x, 0px));
  transition: transform 80ms steps(2, end);
  animation: intro-caret-blink 1s steps(1) 600ms infinite;
}

.intro-pix-caption {
  font-family: PixPalsPixel, monospace;
  font-size: 8px;
  line-height: 1.6;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive);
  opacity: 0;
  animation: intro-pix-caption-in 180ms ease-out 1250ms forwards;
}

@keyframes intro-pix-caption-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .intro-pix-letter,
  .intro-pix-caption { animation: none; opacity: 1; transform: none; }
  .intro-pix-caret { animation: none; opacity: 0; }
}

/* --- Navigation --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--canvas);
  transition: border-bottom-color 200ms ease, box-shadow 200ms ease, background-color 300ms ease;
  border-bottom: 1px solid transparent;
}

.site-nav.nav-scrolled {
  border-bottom: 1px solid var(--hairline);
  background-color: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .site-nav.nav-scrolled {
  background-color: rgba(22, 21, 19, 0.92);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
}

.nav-brand-text {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.nav-logo-badge {
  width: 36px;
  height: 36px;
  background-color: #FFFFFF;
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(28, 27, 24, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 200ms var(--ease-calm), box-shadow 200ms var(--ease-calm);
}

.nav-brand:hover .nav-logo-badge {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 14px rgba(28, 27, 24, 0.1);
}

.nav-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.nav-brand-title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.nav-brand-title em {
  font-style: italic;
  color: var(--olive);
}

.nav-brand-subtitle {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--ink-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 28px);
  list-style: none;
}

.nav-link-item a {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 180ms ease;
}

.nav-link-item a:hover {
  color: var(--ink);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 180ms ease;
}

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

.nav-pill-cta {
  background-color: var(--ink);
  color: var(--canvas) !important;
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  padding: 10px 20px;
  border-radius: 9999px;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background-color 180ms ease, transform 180ms ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-pill-cta:hover {
  background-color: var(--olive);
  transform: translateY(-1px);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-menu-drawer {
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  background-color: var(--canvas);
  border-bottom: 1px solid var(--hairline-strong);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 999;
  transform: translateY(-120%);
  opacity: 0;
  visibility: hidden;
  transition: transform 300ms var(--ease-calm), opacity 300ms var(--ease-calm), visibility 300ms;
  box-shadow: 0 16px 32px rgba(28, 27, 24, 0.08);
}

.mobile-menu-drawer.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-menu-drawer a {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px dashed var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- Hero Section & ArtCanvas --- */
.hero-section {
  position: relative;
  /* Content-driven height: no vh-based minimum, so no centering slack above/below */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(24px, 3.4vw, 52px) 0 clamp(32px, 4.4vw, 68px);
  overflow: hidden;
}

.art-canvas-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 1400px;
  height: 100%;
  max-height: 800px;
  pointer-events: none;
  z-index: 1;
  -webkit-mask-image: radial-gradient(circle at center, #000 35%, transparent 75%);
  mask-image: radial-gradient(circle at center, #000 35%, transparent 75%);
  opacity: 0.72;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  /* Warm paper bas-relief */
  background-image: url("../public/art/hero-relief.webp");
  background-image: image-set(
    url("../public/art/hero-relief.webp") type("image/webp"),
    url("../public/art/hero-relief.jpg") type("image/jpeg")
  );
}

/* Drafting Desk Mode needs its own relief: the light plaster would glow
   against the dark canvas and destroy the contrast of the hero type. */
[data-theme="dark"] .art-canvas-wrapper {
  background-image: url("../public/art/hero-relief-dark.webp");
  background-image: image-set(
    url("../public/art/hero-relief-dark.webp") type("image/webp"),
    url("../public/art/hero-relief-dark.jpg") type("image/jpeg")
  );
}

.hero-art-reveal {
  display: none;
}

@media (any-hover: hover) and (prefers-reduced-motion: no-preference) {
  .hero-art-reveal {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.95;
  }

  [data-theme="dark"] .hero-art-reveal {
    filter: sepia(0.22) saturate(0.7) brightness(0.28);
    opacity: 0.82;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Scale the content visually while its layout box still sizes the hero. */
  transform: scale(0.85);
}

.hero-display-title {
  font-family: var(--font-serif);
  font-size: var(--text-display);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-display-title em {
  font-style: italic;
  color: var(--olive);
}

.hero-description {
  max-width: var(--measure-body);
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.7;
  color: var(--ink-muted);
  margin-bottom: 40px;
}

.hero-description strong {
  color: var(--ink);
  font-weight: 500;
}

.hero-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 52px;
  padding: 14px 24px;
  margin-bottom: 22px;
  border-radius: 9999px;
  background: var(--ink);
  color: var(--canvas);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms ease;
}

.hero-primary-action:hover {
  background: var(--olive);
  transform: translateY(-2px);
}

.hero-primary-action:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 4px;
}

/* Command shortcut and secondary navigation */
.hero-command-pill {
  background-color: var(--float);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-command);
  border-radius: 9999px;
  padding: 8px 12px 8px 20px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  transition: transform 200ms ease, box-shadow 200ms ease;
  max-width: 94vw;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-command-pill:hover {
  box-shadow: 0 16px 40px rgba(28, 27, 24, 0.09);
}

.command-snippet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink);
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  transition: background-color 150ms ease;
}

.command-snippet:hover {
  background-color: var(--surface);
}

.command-snippet .prompt-symbol {
  color: var(--olive);
}

.copy-feedback-icon {
  width: 14px;
  height: 14px;
  stroke: var(--ink-muted);
  stroke-width: 1.5;
  stroke-linecap: round;
  fill: none;
  transition: stroke 150ms ease;
}

.command-snippet.copied .copy-feedback-icon {
  stroke: var(--olive);
}

.pill-divider {
  width: 1px;
  height: 20px;
  background-color: var(--hairline-strong);
}

.hero-nav-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.sub-pill {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--ink-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 9999px;
  background-color: var(--surface);
  transition: background-color 160ms ease, color 160ms ease;
}

.sub-pill:hover {
  background-color: var(--ink);
  color: var(--canvas);
}

/* Quick Metrics Strip */
.quick-metrics-strip {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 3vw, 36px);
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--ink-muted);
  flex-wrap: wrap;
}

.quick-metric-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quick-metric-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--olive);
}

/* --- Dither Banner & Ordered Bayer Matrix --- */
.dither-banner-section {
  padding: 24px 0 48px;
}

.bg-dither-matrix {
  position: relative;
  background-color: var(--dither-base);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 48px clamp(20px, 4vw, 64px);
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.dither-dot-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: radial-gradient(var(--olive) 1.2px, transparent 1.2px);
  background-size: 14px 14px;
  opacity: 0.35;
}

.bayer-matrix-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.45;
  mix-blend-mode: multiply;
}

/* --- Quote Band: rotating engineering principles over the Bayer dither --- */
.quote-band {
  display: flex;
  align-items: center;
  /* Fixed band height so rotating quotes never shift the page below */
  min-height: 224px;
}

.quote-band-inner {
  position: relative;
  z-index: 2;
  flex: 1 1 100%;
  transition: opacity 340ms var(--ease-calm);
}

.quote-band-inner.is-fading {
  opacity: 0;
}

.quote-band-text {
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.4vw, 2.3rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  max-width: 1000px;
  margin: 0;
}

.quote-band-text em {
  font-style: italic;
  color: var(--olive);
}

.quote-band-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.quote-band-author::before {
  content: '— ';
  color: var(--olive);
}

.quote-band-controls {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.quote-band-counter {
  color: var(--ink-muted);
  letter-spacing: 0.12em;
  flex-shrink: 0;
}

.quote-band-toggle {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: none;
  border: 1px solid var(--hairline-strong);
  border-radius: 9999px;
  padding: 3px 10px;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.quote-band-toggle:hover {
  color: var(--ink);
  border-color: var(--ink-muted);
  background-color: rgba(28, 27, 24, 0.04);
}

[data-theme="dark"] .quote-band-toggle:hover {
  background-color: rgba(247, 245, 240, 0.06);
}

/* --- Section Heading Block --- */
.section-heading-block {
  margin-bottom: 40px;
}

.section-heading-title {
  font-family: var(--font-serif);
  font-size: var(--text-h1);
  line-height: 1.05;
}

.section-heading-title em {
  font-style: italic;
  color: var(--olive);
}

.section-heading-desc {
  font-size: 1.1rem;
  color: var(--ink-muted);
  max-width: var(--measure-body);
  margin-top: 12px;
}

/* --- Projects: Compact Specimen Grid --- */
#projects {
  max-width: 86rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 1.5vw, 24px);
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 10px;
  transition: border-color 220ms ease;
}

.project-card:hover,
.project-card:focus-within {
  border-color: var(--hairline-strong);
}

.project-card:focus-within {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
}

/* Matted frame that holds the browser mockup */
.project-card-frame {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background-color: var(--float);
}

.project-card-frame .mac-window-mockup {
  border-radius: 6px;
  border: 1px solid rgba(28, 27, 24, 0.06);
  box-shadow: none;
}

.project-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 12px 6px 4px;
}

.project-card-title {
  font-family: var(--font-serif);
  font-size: clamp(1.32rem, 1.62vw, 1.65rem);
  line-height: 1.18;
  letter-spacing: 0.012em;
  margin-bottom: 9px;
}

.project-card-title em {
  font-style: italic;
  color: var(--olive);
}

/* Case study button (disabled)
.project-card-open {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.project-card-open::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  z-index: 1;
}

.project-card-open:focus-visible {
  outline: none;
}
*/

.project-card-desc {
  font-size: 0.885rem;
  line-height: 1.55;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.project-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
}

/* Case study call to action (disabled)
.project-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color 180ms ease, gap 220ms var(--ease-calm);
}

.project-card:hover .project-card-cta {
  color: var(--ink);
  gap: 9px;
}

*/

.project-card-launch svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.project-card-launch {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 4px 9px;
  border-radius: 9999px;
  border: 1px solid transparent;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.project-card-launch:hover {
  background-color: var(--float);
  border-color: var(--hairline-strong);
}

.outline-pill-btn {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--ink);
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 9999px;
  border: 1px solid var(--hairline-strong);
  background-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 180ms ease;
  cursor: pointer;
}

.outline-pill-btn:hover {
  background-color: var(--ink);
  color: var(--canvas);
  border-color: var(--ink);
}

.outline-pill-btn.primary {
  background-color: var(--ink);
  color: var(--canvas);
  border-color: var(--ink);
}

.outline-pill-btn.primary:hover {
  background-color: var(--olive);
  border-color: var(--olive);
}

.outline-pill-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  fill: none;
}

/* MacWindowMockup */
.mac-window-mockup {
  position: relative;
  z-index: 2;
  width: 100%;
  background-color: var(--float);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-window);
  overflow: hidden;
  transition: transform 400ms var(--ease-calm);
}

.mac-titlebar {
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  background-color: #F8F7F4;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .mac-titlebar {
  background-color: #272520;
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.mac-traffic-dots {
  display: flex;
  gap: 7px;
}

.traffic-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background-color: #FF5F56; }
.dot-yellow { background-color: #FFBD2E; }
.dot-green { background-color: #27C93F; }

.mac-window-filename {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Browser Variant */
.browser-variant .mac-titlebar {
  grid-template-columns: 70px 1fr 40px;
}

.browser-url-bar {
  background-color: #ECE9E2;
  border-radius: 5px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-muted);
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-theme="dark"] .browser-url-bar {
  background-color: #34322C;
  color: #B5B0A6;
}

.mac-browser-viewport {
  position: relative;
  width: 100%;
  /* Source screenshots are ~2:1, so match them instead of cropping into 16:10 */
  aspect-ratio: 2 / 1;
  background-color: #141413;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mac-browser-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 500ms var(--ease-calm);
}

/* Terminal Variant */
.terminal-variant {
  background-color: #181816;
  color: #ECE8E0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.terminal-variant .mac-titlebar {
  background-color: #20201D;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.terminal-variant .mac-window-filename {
  color: #8C8880;
}

.mac-terminal-content {
  padding: 20px 24px;
  min-height: 220px;
}

.term-row {
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
}

.term-prompt {
  color: #8CA383;
  user-select: none;
}

.term-output {
  color: #A39E93;
}

.term-highlight {
  color: #FAF8F5;
  font-weight: 500;
}

/* Code Editor Variant */
.editor-variant {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.mac-editor-content {
  padding: 20px 24px;
  min-height: 200px;
}

.editor-line {
  display: flex;
  gap: 16px;
}

.editor-gutter {
  color: #B8B4AC;
  user-select: none;
  text-align: right;
  width: 24px;
}

.syn-keyword { color: var(--olive); font-weight: 500; }
.syn-string { color: #8F5B34; }
.syn-comment { color: var(--ink-muted); font-style: italic; }

/* --- About & Skills (Editorial Two-Column) --- */
.about-section-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(48px, 6vw, 96px);
  align-items: start;
}

.about-pullquote-col {
  display: flex;
  flex-direction: column;
}

.about-statement {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.2vw, 2.75rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

/* Dotted Bayer surface, reused from the philosophy banner */
.quote-panel {
  position: relative;
  overflow: hidden;
  background-color: var(--dither-base);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: clamp(22px, 2.6vw, 34px);
  margin-bottom: 28px;
}

.quote-panel .about-statement {
  position: relative;
  z-index: 2;
  margin-bottom: 0;
}

.quote-panel .dither-dot-layer {
  opacity: 0.3;
}

.quote-panel .bayer-matrix-canvas {
  opacity: 0.35;
}

.about-statement em {
  font-style: italic;
  color: var(--olive);
}

.about-profile-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background-color: var(--surface);
  border: 1px solid var(--hairline);
  padding: 18px 22px;
  border-radius: 8px;
  margin-bottom: 28px;
}

.about-avatar-frame {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--olive);
  flex-shrink: 0;
}

.about-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-profile-info {
  display: flex;
  flex-direction: column;
}

.about-profile-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  line-height: 1.2;
}

.about-profile-title {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--ink-muted);
}

.about-profile-location {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--olive);
  margin-top: 4px;
}

.about-body-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-muted);
  max-width: var(--measure-body);
}

.about-body-text p + p {
  margin-top: 16px;
}

.about-cv-link {
  color: var(--ink);
  font: 500 .85rem var(--font-mono);
  text-underline-offset: .3em;
  text-decoration-color: var(--hairline-strong);
}

.about-cv-link:hover { color: var(--olive); text-decoration-color: currentColor; }
.about-cv-link:focus-visible { outline: 2px solid var(--olive); outline-offset: 4px; }


/* Mono Stack Index */
.stack-index-col {
  background-color: var(--surface);
  border: 1px solid var(--hairline);
  padding: clamp(24px, 4vw, 40px);
  border-radius: 8px;
}

.stack-index-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline-strong);
  margin-bottom: 20px;
}

.stack-index-title {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: 0.08em;
  color: var(--ink);
  text-transform: uppercase;
}

.stack-index-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.stack-index-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px dashed var(--hairline);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  gap: 16px;
}

.stack-index-item:last-child {
  border-bottom: none;
}

.stack-item-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.stack-item-name {
  color: var(--ink);
}

.stack-item-category {
  color: var(--olive);
  font-size: var(--text-mono);
  font-weight: 500;
}

.stack-item-tags {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.version-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 7px;
  background-color: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  color: var(--olive);
  flex-shrink: 0;
}

/* --- Credentials & Immersion Section --- */
.credentials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.credential-card {
  background-color: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
  transition: all 220ms ease;
  display: flex;
  flex-direction: column;
}

.credential-card:hover {
  border-color: var(--hairline-strong);
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}

.credential-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: #ECE9E2;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.credential-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}

.credential-card:hover .credential-img-wrap img {
  transform: scale(1.04);
}

.credential-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 27, 24, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FAF8F5;
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  opacity: 0;
  transition: opacity 200ms ease;
}

.credential-img-wrap:hover .credential-img-overlay {
  opacity: 1;
}

.credential-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.credential-org {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--olive);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.credential-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.25;
  margin-bottom: 8px;
}

.credential-desc {
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* Lightbox Modal */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: rgba(20, 19, 17, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease, visibility 250ms;
}

.image-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 88vh;
  position: relative;
  background-color: var(--float);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-caption {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--ink-muted);
  margin-top: 10px;
  text-align: center;
}

.lightbox-close-btn {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--ink);
  color: var(--canvas);
  border: 1px solid var(--hairline-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* --- Footer & Transmission --- */
.site-footer {
  border-top: 1px solid var(--hairline);
  background-color: var(--canvas);
  padding: clamp(64px, 8vw, 112px) 0 40px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  margin-bottom: 60px;
}

.footer-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Dotted Philippines plate — the dot field is an SVG used as a mask so it
   inherits the theme colour; the pin is a real element on top of it. */
.footer-map-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.footer-map {
  position: relative;
  width: clamp(170px, 19vw, 268px);
  aspect-ratio: 520 / 733;
}

/* Pre-coloured PNG per theme rather than a CSS mask: Chrome refuses to fetch
   mask-image from a file:// document (opaque origin), so a mask silently
   disappears when index.html is opened straight from disk. background-image
   has no such restriction. */
.footer-map-dots {
  position: absolute;
  inset: 0;
  background-image: url("../public/art/ph-dots-light.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: 0.5;
}

[data-theme="dark"] .footer-map-dots {
  background-image: url("../public/art/ph-dots-dark.png");
  opacity: 0.45;
}

.footer-map-caption {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  color: var(--ink-subtle);
  white-space: nowrap;
}

.footer-signoff {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 36px;
  max-width: 920px;
}

.footer-signoff em {
  font-style: italic;
  color: var(--olive);
}

.footer-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.footer-link-pill {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink);
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 9999px;
  border: 1px solid var(--hairline-strong);
  background-color: var(--surface);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 180ms ease;
}

.footer-link-pill:hover {
  background-color: var(--ink);
  color: var(--canvas);
}

.footer-link-pill svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  fill: none;
}

.footer-link-pill .footer-brand-icon {
  fill: currentColor;
  stroke: none;
}

.footer-bottom-bar {
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  color: var(--ink-muted);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-ornament {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--olive);
}

/* --- Motion Animations --- */
@keyframes calm-fade-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.calm-reveal {
  opacity: 0;
  animation: calm-fade-up var(--duration-calm) var(--ease-calm) forwards;
}

.reveal-delay-1 { animation-delay: 80ms; }
.reveal-delay-2 { animation-delay: 160ms; }
.reveal-delay-3 { animation-delay: 240ms; }

/* --- Scroll Reveal (driven by IntersectionObserver in main.js) ---
   Classes are added at runtime and removed again once the transition
   finishes, so hover transitions on cards stay snappy. */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 780ms var(--ease-calm) var(--reveal-delay, 0ms),
    transform 780ms var(--ease-calm) var(--reveal-delay, 0ms);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* --- Case Study Inspector Modal (disabled) ---
.case-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 40px);
}

.case-modal[hidden] {
  display: none;
}

.case-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(28, 27, 24, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 260ms ease;
}

.case-modal.open .case-modal-backdrop {
  opacity: 1;
}

.case-modal-panel {
  position: relative;
  width: min(1140px, 100%);
  max-height: min(88vh, 820px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: var(--canvas);
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  box-shadow: 0 40px 90px rgba(28, 27, 24, 0.3);
  padding: clamp(20px, 2.4vw, 34px);
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  transition: opacity 280ms var(--ease-calm), transform 340ms var(--ease-calm);
}

.case-modal.open .case-modal-panel {
  opacity: 1;
  transform: none;
}

.case-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  background-color: var(--canvas);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.case-modal-close:hover {
  background-color: var(--ink);
  color: var(--canvas);
  border-color: var(--ink);
}

.case-modal-close svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  fill: none;
}

.case-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(20px, 2.6vw, 40px);
  align-items: center;
}

.case-modal-visual .mac-window-mockup {
  box-shadow: var(--shadow-window);
}

.case-modal-content {
  display: flex;
  flex-direction: column;
  padding-top: 4px;
}

.case-modal-title {
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.3vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 6px 0 10px;
}

.case-modal-title em {
  font-style: italic;
  color: var(--olive);
}

.case-modal-subtitle {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.55;
  margin-bottom: 18px;
}

.case-modal-breakdown {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--ink-muted);
  margin-bottom: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}

.case-modal-breakdown p + p {
  margin-top: 12px;
}

.case-modal-breakdown strong {
  color: var(--ink);
  font-weight: 600;
}

.case-modal-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.case-modal-open {
  overflow: hidden;
}
*/

/* --- Responsive Breakpoints --- */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .footer-map-col {
    align-items: flex-start;
  }
  .footer-map {
    width: 168px;
  }
  .about-section-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .credentials-grid {
    grid-template-columns: 1fr 1fr;
  }
  /* Case study layout (disabled)
  .case-modal-grid {
    grid-template-columns: 1fr;
  }
  */
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hero-content {
    transform: scale(0.94);
  }
  .mobile-nav-toggle {
    display: inline-flex;
  }
  .credentials-grid {
    grid-template-columns: 1fr;
  }
  .hero-command-pill {
    flex-direction: column;
    padding: 12px;
    border-radius: 16px;
    gap: 10px;
  }
  .pill-divider {
    display: none;
  }
  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  /* Case study layout (disabled)
  .case-modal {
    padding: 0;
  }
  .case-modal-panel {
    max-height: 100vh;
    height: 100%;
    border-radius: 0;
    border: 0;
  }
  */
}

@media (max-width: 900px) {
  #projects {
    max-width: 56rem;
  }
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #projects {
    max-width: 28rem;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
}

/* Reduced Motion Override */
@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;
  }
  [data-parallax-rate] {
    transform: none !important;
  }
}

/* PixPals — a little world within the folio */
@font-face{font-family:PixPalsPixel;src:url('../public/pixpals/press-start-2p-latin.woff2') format('woff2');font-display:swap}
@font-face{font-family:PixPalsDisplay;src:url('../public/pixpals/pixelify-sans-latin.woff2') format('woff2');font-weight:400 700;font-display:swap}
.pixpals-card{display:grid;grid-template-columns:.86fr 1.14fr;overflow:hidden;background:#f6f2e7;color:#2c3c30;border:1px solid #d4d9c8;box-shadow:0 15px 45px #28372b0c}
.pixpals-copy{padding:clamp(28px,4vw,62px);display:flex;flex-direction:column;align-items:flex-start}
.pixpals-topline,.pixpals-preview-label,.pixpals-preview-footer{font-family:PixPalsPixel,monospace;font-size:8px;line-height:1.7;letter-spacing:.02em}
.pixpals-topline{display:flex;gap:20px;flex-wrap:wrap;color:#6e8065}
.pixpals-topline i{display:inline-block;width:8px;height:8px;background:#90a67c;margin-right:7px;box-shadow:0 0 0 3px #dce6d2}
.pixpals-logo{width:min(290px,85%);height:auto;margin:38px 0 8px;image-rendering:pixelated}
.pixpals-kicker{font-family:PixPalsPixel,monospace;font-size:7px;line-height:1.8;color:#a66c54;letter-spacing:.04em}
.pixpals-copy h3{font-family:PixPalsDisplay,sans-serif;font-size:clamp(36px,4vw,58px);font-weight:700;line-height:1.02;letter-spacing:-.03em;margin:30px 0 16px}
.pixpals-copy h3 span{color:#829675}
.pixpals-description{max-width:420px;font-size:15px;line-height:1.8;color:#667064}
.pixpals-tags{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0 28px}
.pixpals-tags span{font-family:PixPalsPixel,monospace;font-size:7px;line-height:1.5;color:#66775e;border:1px solid #cdd6c4;padding:9px;background:#eef2e7}
.pixpals-button{display:inline-flex;gap:35px;align-items:center;background:#344d3b;color:#fff9e9;padding:15px 20px;text-decoration:none;font-family:PixPalsDisplay,sans-serif;font-size:19px;font-weight:700;box-shadow:4px 4px 0 #aab99d;transition:transform .2s,box-shadow .2s}
.pixpals-button:hover{transform:translate(2px,2px);box-shadow:2px 2px 0 #aab99d}.pixpals-button:focus-visible{outline:3px solid #c76d4c;outline-offset:5px}
.pixpals-pals{display:flex;align-items:center;gap:13px;margin-top:35px;color:#788777;font-size:12px}.pixpals-avatars{display:flex;padding-left:7px}.pixpals-avatars img{width:37px;height:37px;object-fit:cover;image-rendering:pixelated;background:#e6dac1;border:2px solid #f6f2e7;border-radius:50%;margin-left:-7px}.pixpals-avatars img:nth-child(2){background:#dbe6d3}.pixpals-avatars img:nth-child(3){background:#efcdb8}
.pixpals-preview{position:relative;display:flex;flex-direction:column;justify-content:center;padding:clamp(25px,4vw,60px);background-color:#dfe9d7;background-image:linear-gradient(#a9bda32b 1px,transparent 1px),linear-gradient(90deg,#a9bda32b 1px,transparent 1px);background-size:24px 24px}
.pixpals-preview-label,.pixpals-preview-footer{display:flex;justify-content:space-between;gap:12px;color:#697f64}.pixpals-preview-label{margin-bottom:18px}.pixpals-preview-footer{margin-top:18px;font-size:7px}
.pixpals-window{border:2px solid #3e5141;background:#f9f4e8;box-shadow:9px 9px 0 #9bad9670;transform:rotate(-1deg)}.pixpals-window-bar{height:35px;display:flex;align-items:center;justify-content:space-between;padding:0 12px;font-family:PixPalsPixel,monospace;font-size:7px;color:#5d705a}.pixpals-window-bar i{display:inline-block;width:7px;height:7px;margin-right:4px;background:#d89178}.pixpals-window-bar i:nth-child(2){background:#e4c47c}.pixpals-window-bar i:nth-child(3){background:#96ac88}.pixpals-window>.pixpals-shot{display:block;width:100%;height:auto;image-rendering:auto;border-top:2px solid #3e5141}
.pixpals-stamp{position:absolute;right:25px;top:22px;display:grid;place-content:center;text-align:center;width:86px;height:86px;border-radius:50%;background:#f1d9a0;border:1px dashed #718467;outline:5px solid #f1d9a0;color:#536b51;font-family:PixPalsPixel,monospace;font-size:7px;line-height:1.8;transform:rotate(12deg)}
@media(max-width:850px){.pixpals-card{grid-template-columns:1fr}.pixpals-preview{min-height:360px}.pixpals-stamp{top:20px;right:24px}.pixpals-preview-label{padding-right:95px}}
@media(max-width:480px){.pixpals-copy{padding:28px 24px 35px}.pixpals-logo{margin-top:30px}.pixpals-preview{padding:30px 20px;min-height:0}.pixpals-stamp{width:65px;height:65px;font-size:6px;right:20px;top:18px}.pixpals-preview-label{font-size:7px}.pixpals-window-bar{font-size:6px}.pixpals-preview-footer{font-size:6px}}

/* Use the PixPals card's height for both full-width game features. */
.game-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: 1fr;
  gap: clamp(12px, 2vw, 24px);
  width: 100vw;
  width: 100dvw;
  margin-left: calc(50% - 50vw);
  margin-left: calc(50% - 50dvw);
}

.game-showcase .pixpals-card {
  border-left: 0;
  border-right: 0;
}

/* Hollowmoon */
.hollowmoon-card {
  --hollowmoon-gold: #dfbd87;
  --hollowmoon-inset: clamp(28px, 5.6vw, 110px);
  --hollowmoon-frame: clamp(12px, 1.6vw, 30px);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 4vw, 72px);
  padding: clamp(44px, 5.3vw, 90px) var(--hollowmoon-inset);
  overflow: hidden;
  scroll-margin-top: 90px;
  background: #111019;
  color: #fcf1e2;
}

.game-showcase-preview {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.game-showcase-preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.game-showcase-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #100e18 1%, #100e18ec 21%, #100e18ae 42%, #100e1824 68%, #100e1873 100%),
    linear-gradient(0deg, #0e0b14ed, transparent 44%, #0e0b1440 100%);
}

.hollowmoon-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: var(--hollowmoon-frame);
  border: 1px solid #dfbd8761;
  pointer-events: none;
}

.hollowmoon-content {
  max-width: 36rem;
}

.hollowmoon-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(18px, 2.3vw, 32px);
  color: var(--hollowmoon-gold);
  font: 500 0.8125rem / 1.4 var(--font-mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hollowmoon-meta span {
  border-left: 1px solid #dfbd877a;
  padding-left: 14px;
}

.hollowmoon-wordmark {
  display: block;
  width: min(100%, 35rem);
  height: auto;
  filter: drop-shadow(0 6px 14px #08070e9c);
}

.hollowmoon-genre {
  margin-top: clamp(18px, 2.2vw, 32px);
  font-family: var(--font-serif);
  font-size: clamp(2.35rem, 4.4vw, 4.9rem);
  line-height: 1.02;
}

.hollowmoon-description {
  max-width: 37ch;
  margin-top: 14px;
  color: #ded4df;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.65;
}

.hollowmoon-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 22px;
  padding: 8px 19px;
  border-radius: 999px;
  background: var(--hollowmoon-gold);
  color: #1c1422;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.hollowmoon-link:hover {
  background: #f0d4a7;
}

.hollowmoon-link:focus-visible {
  outline-color: var(--hollowmoon-gold);
}

.hollowmoon-crest {
  position: absolute;
  top: clamp(34px, 3.8vw, 62px);
  right: var(--hollowmoon-inset);
  width: clamp(54px, 6.5vw, 106px);
  height: auto;
  filter: drop-shadow(0 6px 14px #08070ed9);
}

.hollowmoon-cast {
  display: flex;
  align-self: end;
  gap: clamp(9px, 1.15vw, 18px);
  padding-bottom: 6px;
}

.hollowmoon-portrait {
  display: flex;
  flex-direction: column;
  width: clamp(115px, 10vw, 166px);
  padding: 5px;
  border: 1px solid #bd9865bb;
  background: #17121f;
  box-shadow: 0 10px 28px #0a0812aa;
  transform: rotate(-3deg);
}

.hollowmoon-portrait + .hollowmoon-portrait {
  transform: translateY(14px) rotate(3deg);
}

.hollowmoon-portrait img {
  display: block;
  width: 100%;
  height: auto;
}

.hollowmoon-portrait figcaption {
  display: grid;
  flex: 1;
  place-items: center;
  padding: 7px 2px 4px;
  color: #f1d9b0;
  font-family: var(--font-serif);
  font-size: clamp(0.94rem, 1.3vw, 1.25rem);
  line-height: 1.15;
  text-align: center;
}

@media (max-width: 850px) {
  .hollowmoon-card {
    grid-template-columns: minmax(0, 1fr);
    align-content: space-between;
    padding-top: 106px;
  }

  .game-showcase-preview video {
    object-fit: cover;
  }

  .game-showcase-preview::after {
    background: linear-gradient(180deg, #100e18f7 0%, #100e18e6 33%, #100e1894 64%, #100e18e8 100%);
  }

  .hollowmoon-cast {
    justify-self: end;
  }

  .hollowmoon-portrait {
    width: clamp(108px, 23vw, 155px);
  }
}

@media (max-width: 768px) {
  .section-heading-block { margin-bottom: 30px; }
}

/* A tiny room sticker floating over the game preview. */
.pixpals-room-sticker{position:absolute;z-index:2;width:clamp(150px,19vw,265px);right:2%;bottom:1%;padding:10px 10px 9px;background:#fff9ed;border:2px solid #f9f4e8;box-shadow:0 5px 0 #9bad9666,0 12px 20px #344d3b33;transform:rotate(7deg);text-align:center}
.pixpals-room-scene{position:relative;min-width:0}
.pixpals-room-art{display:block;width:100%;height:auto;image-rendering:pixelated;filter:drop-shadow(0 4px 2px #344d3b22)}
.pixpals-room-prop{position:absolute;height:auto;image-rendering:pixelated}
.pixpals-room-plant{width:15%;left:12%;top:50%}.pixpals-room-chair{width:15%;left:65%;top:53%}.pixpals-room-table{width:16%;left:46%;top:72%}
.pixpals-sticker-caption{display:block;margin-top:3px;font-family:PixPalsPixel,monospace;font-size:6px;line-height:1.5;color:#6d8065}
@media(max-width:850px){.pixpals-room-sticker{width:clamp(135px,27vw,210px);right:2%;bottom:0}}
@media(max-width:480px){.pixpals-room-sticker{width:135px;right:1%;bottom:0;padding:6px}.pixpals-sticker-caption{font-size:5px}}

/* PixPals preview v2 — a scrapbook diorama around the night-lounge window. */
#pixpals-preview{scroll-margin-top:90px}
.pixpals-window{position:relative}
/* pixel tape holding the window to the paper */
.pixpals-window::before,.pixpals-window::after{content:"";position:absolute;z-index:3;width:74px;height:22px;background:#e4c47c99;border:1px solid #d8917833;box-shadow:0 2px 0 #344d3b14}
.pixpals-window::before{top:-11px;left:-20px;transform:rotate(-8deg)}
.pixpals-window::after{top:-11px;right:22%;transform:rotate(7deg)}
.pixpals-bubble{position:absolute;z-index:4;top:26px;left:-14px;transform:rotate(-3deg);background:#fff9ed;border:2px solid #3e5141;box-shadow:3px 3px 0 #9bad9670;padding:9px 11px;font-family:PixPalsPixel,monospace;font-size:7px;line-height:1.7;color:#3f5240;text-align:left}
.pixpals-bubble>span{display:block;color:#6d8065;font-size:6px}
.pixpals-bubble i{display:inline-block;width:5px;height:8px;margin-left:4px;background:#829675;vertical-align:-1px;animation:intro-caret-blink 1s steps(1) infinite}
.pixpals-bubble::after{content:"";position:absolute;left:16px;bottom:-8px;width:8px;height:8px;background:#fff9ed;border-right:2px solid #3e5141;border-bottom:2px solid #3e5141}
/* pal + plant perched on the window roof */
.pixpals-roof-pal{position:absolute;z-index:2;bottom:100%;left:20%;width:auto;height:clamp(56px,6.5vw,86px);image-rendering:pixelated;animation:pixpals-bob 1.6s steps(2,end) infinite}
.pixpals-roof-plant{position:absolute;z-index:2;bottom:100%;right:14%;width:auto;height:clamp(30px,3.4vw,46px);image-rendering:pixelated}
@keyframes pixpals-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
/* cozy corner: lamp glow, vending hum, a pal waiting nearby */
.pixpals-scene-corner{position:absolute;z-index:2;left:3.5%;bottom:15%;display:flex;align-items:flex-end;gap:12px}
.pixpals-scene-corner::before,.pixpals-scene-corner::after{content:"";position:absolute;z-index:-1;border-radius:50%;animation:pixpals-glow 2.8s steps(3,end) infinite alternate}
.pixpals-scene-corner::before{left:-24px;bottom:-18px;width:110px;height:110px;background:radial-gradient(circle,#e4c47c66 0%,transparent 65%)}
.pixpals-scene-corner::after{left:26px;bottom:-22px;width:120px;height:120px;background:radial-gradient(circle,#d8917855 0%,transparent 65%);animation-delay:1.4s}
@keyframes pixpals-glow{from{opacity:.45}to{opacity:.95}}
.pixpals-scene-corner img{image-rendering:pixelated;height:auto}
.pixpals-scene-lamp{width:clamp(22px,2.6vw,34px)}
.pixpals-scene-vending{width:clamp(40px,4.6vw,62px)}
.pixpals-scene-pal{width:clamp(34px,4vw,54px);animation:pixpals-bob 1.6s steps(2,end) .8s infinite}
/* polaroid of two pals, pinned mid-right */
.pixpals-polaroid{position:absolute;z-index:2;right:2.5%;top:30%;width:clamp(118px,13vw,172px);padding:8px 8px 6px;background:#fff9ed;border:2px solid #f9f4e8;box-shadow:0 5px 0 #9bad9666,0 12px 20px #344d3b33;transform:rotate(5deg);text-align:center}
.pixpals-polaroid img{display:block;width:100%;height:auto}
.pixpals-polaroid span{display:block;margin-top:5px;font-family:PixPalsPixel,monospace;font-size:6px;line-height:1.5;color:#6d8065}
/* keycap legend, straight from the in-game controls card */
.pixpals-keys{position:absolute;z-index:2;left:31%;bottom:4.5%;display:flex;gap:10px;transform:rotate(-2deg);background:#fff9ed;border:2px solid #3e5141;box-shadow:3px 3px 0 #9bad9670;padding:8px 10px;font-family:PixPalsPixel,monospace;font-size:6px;color:#6d8065}
.pixpals-keys span{display:flex;align-items:center;gap:5px}
.pixpals-keys b{font-weight:400;color:#3f5240;background:#eef2e7;border:1px solid #cdd6c4;box-shadow:0 2px 0 #cdd6c4;padding:3px 4px}
/* scattered pixel sparkles on the grid paper */
.pixpals-spark{position:absolute;width:9px;height:9px;background-image:linear-gradient(#829675,#829675),linear-gradient(#829675,#829675);background-size:100% 3px,3px 100%;background-position:center;background-repeat:no-repeat;animation:pixpals-twinkle 2.4s steps(2,end) infinite}
.pixpals-spark-1{left:2%;top:38%}
.pixpals-spark-2{left:44%;top:3.5%;animation-delay:.6s}
.pixpals-spark-3{right:2%;top:56%;animation-delay:1.2s}
.pixpals-spark-4{left:26%;bottom:2.5%;animation-delay:1.8s}
@keyframes pixpals-twinkle{0%,100%{opacity:.2}50%{opacity:.85}}
@media(max-width:850px){.pixpals-polaroid{top:26%}.pixpals-keys{left:28%;bottom:3.5%}.pixpals-scene-corner{bottom:12%}}
@media(max-width:480px){.pixpals-keys{display:none}.pixpals-spark-3,.pixpals-spark-4{display:none}.pixpals-polaroid{width:112px;right:1%;top:24%;padding:6px 6px 4px}.pixpals-polaroid span{font-size:5px}.pixpals-bubble{left:-8px;top:40px;padding:7px 8px;font-size:6px}.pixpals-bubble>span{font-size:5px}.pixpals-scene-corner{left:2%;bottom:12%;gap:8px}.pixpals-roof-pal{left:55%}.pixpals-roof-plant{display:none}}

/* Header game wordmark and spacing after the PixPals introduction. */
.nav-brand-text{align-items:center}
.nav-pixpals-logo{display:block;width:94px;height:auto;object-fit:contain}
.pixpals-description + .pixpals-button{margin-top:28px}
@media(max-width:480px){.nav-brand{gap:8px}.nav-brand-text{gap:7px}.nav-brand-title{font-size:1.25rem;white-space:nowrap}.nav-pixpals-logo{width:65px}}
@media(max-width:600px){.nav-pill-cta{display:none}.nav-controls{gap:6px}}
@media(max-width:380px){.nav-brand-title{font-size:1.05rem}.nav-pixpals-logo{width:53px}.nav-logo-badge{width:32px;height:32px}}

.works-gallery {
  scroll-margin-top: 90px;
}

.works-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.works-heading .section-heading-title {
  margin-bottom: 0;
}

.works-motion-toggle {
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  padding: 8px 14px;
  font: 12px var(--font-mono);
  cursor: pointer;
}

.works-motion-toggle:hover {
  border-color: currentColor;
}

.works-motion-toggle[hidden] {
  display: none;
}

.works-viewport {
  overflow: auto hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--hairline-strong) transparent;
}

.works-track,
.works-group {
  display: flex;
  width: max-content;
}

.works-group {
  gap: 8px;
  padding-right: 8px;
}

.works-gallery:not(.has-loop) .works-group[aria-hidden="true"] {
  display: none;
}

.works-gallery.has-loop .works-viewport:not(:has(.works-card:focus-visible)) {
  overflow: clip;
}

.works-gallery.has-loop .works-viewport:not(:has(.works-card:focus-visible)) .works-track {
  animation: works-scroll 42s linear infinite paused;
}

.works-gallery.is-animating .works-viewport:not(:has(.works-card:focus-visible)) .works-track {
  animation-play-state: running;
}

.works-viewport:has(.works-card:focus-visible) .works-group[aria-hidden="true"] {
  display: none;
}

@keyframes works-scroll {
  from { transform: translate3d(-50%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

.works-card {
  position: relative;
  display: block;
  flex: none;
  width: max(270px, 30vw);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #201f1d;
}

.works-card:focus-visible {
  outline-offset: -3px;
}

.works-card img,
.works-preview,
.works-view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.works-card img,
.works-preview {
  object-fit: cover;
  transition: transform .26s ease;
}

.works-preview {
  opacity: 0;
}

.works-card.is-playing .works-preview {
  opacity: 1;
}

.works-view {
  display: grid;
  place-items: center;
  color: #fff;
  background: rgb(0 0 0 / 26%);
  opacity: 0;
  transition: opacity .2s ease;
}

.works-view span {
  padding: 8px 16px;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 999px;
  background: rgb(0 0 0 / 56%);
  font: 12px var(--font-mono);
}

.works-card:focus-visible :is(img, .works-preview) {
  transform: scale(1.055);
}

.works-card:focus-visible .works-view {
  opacity: 1;
}

@media (hover: hover) {
  .works-gallery.is-animating .works-viewport:hover:not(:has(.works-card:focus-visible)) .works-track {
    animation-play-state: paused;
  }

  .works-card:hover :is(img, .works-preview) {
    transform: scale(1.055);
  }

  .works-card:hover .works-view {
    opacity: 1;
  }
}

@media (hover: none) {
  .works-view {
    place-items: end;
    padding: 8px;
    background: transparent;
    opacity: 1;
  }
}

.works-dialog {
  width: min(94vw, 980px);
  max-height: 92dvh;
  margin: auto;
  padding: 0;
  border: 0;
  background: #0c0c0c;
}

.works-dialog::backdrop {
  background: rgb(0 0 0 / 78%);
}

.works-dialog-close {
  position: absolute;
  inset: 12px 12px auto auto;
  z-index: 1;
}

.works-dialog-close button {
  color: #fff;
  border-color: rgb(255 255 255 / 55%);
  background: rgb(0 0 0 / 75%);
}

.works-dialog-close button:focus-visible {
  outline-color: #fff;
}

.works-dialog video {
  display: block;
  width: 100%;
  max-height: 75dvh;
  background: #0c0c0c;
}

@media (prefers-reduced-motion: reduce) {
  .works-card :is(img, .works-preview, .works-view) {
    transition: none;
  }

  .works-card:hover :is(img, .works-preview),
  .works-card:focus-visible :is(img, .works-preview) {
    transform: none;
  }
}

/* GitHub contribution calendar */
.github-activity { background: var(--surface); padding-block: clamp(40px, 4.5vw, 64px); }
.github-activity-content { max-width: 68rem; }
.github-activity-header { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.github-activity-header h2 { margin: 12px 0 8px; font: 400 clamp(2rem, 3.2vw, 3rem)/1 var(--font-serif); letter-spacing: -.03em; }
.github-activity-header h2 em { color: var(--olive); }
.github-activity-header p { color: var(--ink-muted); }
.github-activity-link { color: var(--ink); font: 500 .8rem var(--font-mono); text-underline-offset: .3em; white-space: nowrap; }
.github-calendar { margin-top: 24px; overflow-x: auto; padding-bottom: 4px; }
.github-calendar[hidden] { display: none; }
.github-calendar-inner { min-width: 660px; }
.github-months, .github-days { display: grid; grid-template-columns: repeat(var(--weeks), minmax(8px, 1fr)); gap: 3px; }
.github-months { height: 23px; color: var(--ink-muted); font: 500 .65rem var(--font-mono); }
.github-months span { white-space: nowrap; }
.github-days { grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; }
.github-day, .github-legend i { aspect-ratio: 1; border-radius: 2px; background: var(--github-empty, #deddd3); }
.github-day[data-level="1"], .github-legend i[data-level="1"] { background: #bdcea9; }
.github-day[data-level="2"], .github-legend i[data-level="2"] { background: #8caa78; }
.github-day[data-level="3"], .github-legend i[data-level="3"] { background: #618a55; }
.github-day[data-level="4"], .github-legend i[data-level="4"] { background: #3e693e; }
.github-day.is-blank { visibility: hidden; }
[data-theme="dark"] .github-activity { --github-empty: #383b34; }
.github-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 12px; color: var(--ink-muted); font: .65rem var(--font-mono); }
.github-legend i { width: 10px; }
.github-legend span:first-child { margin-right: 4px; }
.github-legend span:last-child { margin-left: 4px; }
