/* ==========================================================================
   Emin Buyuk — Ultra-Lite Minimal Portfolio UI
   Clean white canvas, feather-light borders, crisp Plus Jakarta Sans & Mono.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f6f7f9;
  --ink: #111318;
  --ink-2: #596070;
  --ink-3: #667084;
  --accent: #111318;
  --accent-ink: #ffffff;
  --link: #3b5bdb;
  --line: #eceef2;
  --line-strong: #d8dce4;
  --header-bg: rgba(255, 255, 255, 0.88);
  --shadow-sm: 0 1px 2px rgba(17, 19, 24, 0.04);
  --shadow-md: 0 8px 24px rgba(17, 19, 24, 0.06);
  --shadow-lg: 0 20px 50px rgba(17, 19, 24, 0.14);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --container: 1060px;
  --gutter: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Soft muted dot tints only (never loud fills) */
  --dot: #6366f1;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0c0d10;
  --surface: #121419;
  --surface-soft: #181b22;
  --ink: #f3f4f6;
  --ink-2: #9ca3af;
  --ink-3: #8993a5;
  --accent: #f3f4f6;
  --accent-ink: #0c0d10;
  --link: #748ffc;
  --line: #20232b;
  --line-strong: #303542;
  --header-bg: rgba(12, 13, 16, 0.86);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

[data-accent="violet"] { --dot: #6366f1; }
[data-accent="coral"] { --dot: #f43f5e; }
[data-accent="rose"] { --dot: #ec4899; }
[data-accent="sky"] { --dot: #0ea5e9; }
[data-accent="indigo"] { --dot: #4f46e5; }
[data-accent="emerald"] { --dot: #10b981; }
[data-accent="amber"] { --dot: #f59e0b; }
[data-accent="teal"] { --dot: #14b8a6; }

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

[hidden] {
  display: none !important;
}

body.is-scroll-locked {
  overflow: hidden;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

section[id],
div[id],
article[id] {
  scroll-margin-top: 78px;
}

.hero-grid > *,
.feature-grid > *,
.mini-grid > *,
.catalog-grid > *,
.studio-games-grid > *,
.split-showcase > *,
.detail-grid > *,
.music-banner > *,
.story-columns > *,
.career-row > *,
.cert-row > *,
.specs-strip > *,
.metrics-grid > *,
.track-card > *,
.related-grid > *,
.detail-nav > *,
.workflow-grid > *,
.screen-gallery > *,
.about-identity > *,
.channel-head > *,
.track-meta-row > * {
  min-width: 0;
}

h1,
h2,
h3,
p,
dd,
strong {
  overflow-wrap: break-word;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 180ms ease, color 180ms ease;
}

main {
  flex: 1 0 auto;
  overflow-x: clip;
}

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

a,
button {
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 6px;
}

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

.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.skip:focus {
  top: 14px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--link);
  transform-origin: left center;
  transform: scaleX(var(--scroll, 0));
  pointer-events: none;
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  border-radius: 8px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand-domain {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-3);
  margin-top: 2px;
}

.main-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 140ms ease, background-color 140ms ease;
}

.main-nav a:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.main-nav a.is-active {
  color: var(--ink);
  background: var(--surface-soft);
  font-weight: 600;
}

.header-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tool-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease;
}

.tool-btn:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.tool-btn svg {
  width: 16px;
  height: 16px;
}

.cmd-trigger {
  width: auto;
  padding: 0 10px;
  gap: 8px;
  white-space: nowrap;
}

.cmd-trigger svg {
  flex: none;
}

.cmd-trigger:focus-visible,
.back-top-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.cmd-kbd {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-3);
  padding: 2px 5px;
  line-height: 1.2;
  border-radius: 5px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

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

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

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

.lang-switch {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 650;
}

.menu-toggle {
  display: none;
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  justify-content: flex-end;
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 13, 16, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.mobile-drawer-panel {
  position: relative;
  z-index: 1;
  width: min(320px, 88vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  padding: 16px 18px calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}

.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.mobile-drawer-title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-link {
  min-height: 46px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--ink-2);
  transition: background-color 140ms ease, color 140ms ease;
}

.drawer-link:hover,
.drawer-link:focus-visible,
.drawer-link.is-active {
  background: var(--surface-soft);
  color: var(--ink);
}

.drawer-link.is-active {
  font-weight: 650;
}

.drawer-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
}

.drawer-link.is-active .drawer-link-icon {
  color: var(--ink);
}

.drawer-link-icon svg {
  width: 19px;
  height: 19px;
}

.drawer-lang {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

.mobile-drawer-footer {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-drawer-btn {
  width: 100%;
}

.app-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
}

.app-icon-sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.app-icon-xs {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.app-icon.is-round {
  border-radius: 50%;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Section Jump Pills (Studio & About) */
.jump-pills {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jump-pills a {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}

.jump-pills a:hover,
.jump-pills a.is-current {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--accent-ink);
}

.tech-chips {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-chip {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.tech-chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.tech-chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* ==========================================================================
   Typography, Pills & Buttons
   ========================================================================== */

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--ink);
}

h1 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

h2 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.18;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
}

h3 {
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.25;
}

.hero-muted {
  color: var(--ink-3);
  display: block;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  max-width: 100%;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: normal;
  align-self: flex-start;
  justify-self: start;
}

.pill-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--dot);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, background-color 150ms ease, border-color 150ms ease, color 150ms ease, opacity 150ms ease;
}

.btn:active,
.track-card:active,
.drawer-link:active,
.tabbar-item:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn-primary:hover {
  opacity: 0.88;
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: var(--surface-soft);
}

.btn-secondary.is-copied {
  border-color: #10b981;
  color: #059669;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  transition: gap 160ms var(--ease), color 140ms ease;
}

.link-arrow:hover {
  gap: 8px;
  color: var(--link);
}

.link-muted {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-3);
  transition: color 140ms ease;
}

.link-muted:hover {
  color: var(--ink);
}

/* ==========================================================================
   Hero Section (Clean, Airy & Lite)
   ========================================================================== */

.hero {
  padding-top: clamp(44px, 6.5vw, 80px);
  padding-bottom: clamp(44px, 6vw, 68px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
}

.hero-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.eyebrow {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink-2);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

.live-clock {
  color: var(--ink-3);
  padding-left: 8px;
  border-left: 1px solid var(--line-strong);
}

.live-clock[hidden] {
  display: none;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.3rem);
  margin-bottom: 18px;
}

.hero-intro {
  margin: 0 0 26px;
  max-width: 52ch;
  font-size: 1.02rem;
  color: var(--ink-2);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   Sections & Filters
   ========================================================================== */

.section {
  padding-top: clamp(44px, 6vw, 68px);
  padding-bottom: clamp(18px, 3vw, 32px);
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-kicker,
.page-kicker {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.section-sub {
  margin: 6px 0 0;
  max-width: 58ch;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.section-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.section-link:hover {
  color: var(--ink);
}

.section-hint {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-3);
}

.filter-bar {
  margin-bottom: 22px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-bar[hidden] {
  display: none;
}

.filter-bar button {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 140ms ease;
}

.filter-bar button span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  opacity: 0.7;
}

.filter-bar button:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.filter-bar button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

/* ==========================================================================
   Projects Showcase (Clean Minimal Cards)
   ========================================================================== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.feature-card[hidden],
.mini-card[hidden],
.catalog-card[hidden] {
  display: none;
}

.feature-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.feature-media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 340ms var(--ease);
}

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

.feature-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.feature-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.meta-status {
  color: var(--ink-3);
  white-space: nowrap;
}

.feature-body h3 {
  font-size: 1.18rem;
  margin-bottom: 6px;
}

.feature-body h3 a:hover {
  color: var(--link);
}

.feature-body p {
  margin: 0 0 16px;
  color: var(--ink-2);
  font-size: 0.9rem;
  flex: 1;
}

.card-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* Lite grid for remaining 5 projects on Home */
.mini-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.mini-card {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 160ms ease, background-color 160ms ease;
}

.mini-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.mini-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px;
}

.mini-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.mini-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
}

.mini-card h3 {
  font-size: 1.08rem;
  margin-bottom: 3px;
}

.mini-sub {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
}

.mini-desc {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--ink-2);
  flex: 1;
}

.mini-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mini-foot .tag-row {
  margin: 0;
}

.row-arrow {
  color: var(--ink-3);
  transition: transform 150ms var(--ease), color 140ms ease;
}

.mini-card:hover .row-arrow {
  transform: translateX(3px);
  color: var(--ink);
}

/* ==========================================================================
   Home Bottom Split (Quiet Lite Surfaces)
   ========================================================================== */

.split-showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.studio-card {
  padding: clamp(22px, 3vw, 30px);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.studio-card h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  margin-bottom: 8px;
}

.studio-copy {
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 0.94rem;
}

.track-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 22px;
}

.track-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--line);
  transition: border-color 140ms ease;
}

.track-chip:hover {
  border-color: var(--line-strong);
}

.track-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot);
}

.facts-row {
  margin: 0 0 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.facts-row div {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}

.facts-row dt {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
}

.facts-row dd {
  margin: 4px 0 0;
  font-size: 0.76rem;
  color: var(--ink-2);
  line-height: 1.35;
}

.teaser-links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
}

/* ==========================================================================
   Subpage Headers & Projects Directory Toolbar
   ========================================================================== */

.page-head {
  padding-top: clamp(38px, 5.5vw, 64px);
  padding-bottom: 24px;
}

.page-head h1 {
  font-size: clamp(2rem, 4vw, 2.85rem);
  margin-bottom: 10px;
}

.page-intro {
  margin: 0;
  max-width: 62ch;
  font-size: 1rem;
  color: var(--ink-2);
}

.directory-toolbar {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.directory-toolbar .filter-bar {
  margin-bottom: 0;
}

.toolbar-right {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.search-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 38px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  min-width: 280px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.search-field:focus-within {
  border-color: var(--link);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 16%, transparent);
}

.search-field[hidden],
.view-toggle[hidden] {
  display: none;
}

.search-field svg {
  width: 15px;
  height: 15px;
  color: var(--ink-3);
  flex-shrink: 0;
}

.search-field input {
  border: 0;
  background: transparent;
  width: 100%;
  font-size: 0.86rem;
  outline: none;
}

.view-toggle {
  display: inline-flex;
  padding: 2px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.view-toggle button {
  padding: 4px 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
}

.view-toggle button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.count-line {
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-3);
}

/* ==========================================================================
   Projects Catalog Grid & List Mode
   ========================================================================== */

.catalog-section {
  padding-bottom: 52px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.catalog-grid.is-list {
  grid-template-columns: 1fr;
}

.catalog-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.catalog-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.catalog-grid.is-list .catalog-card {
  flex-direction: row;
  align-items: stretch;
}

.catalog-grid.is-list .catalog-media {
  width: 240px;
  flex-shrink: 0;
  aspect-ratio: auto;
  border-bottom: 0;
  border-right: 1px solid var(--line);
}

.catalog-media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.catalog-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.catalog-body h2 {
  font-size: 1.3rem;
  margin-bottom: 3px;
}

.catalog-body h2 a:hover {
  color: var(--link);
}

.catalog-subj {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
}

.catalog-desc {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 0.92rem;
  flex: 1;
}

.tag-row {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row li {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-2);
}

.empty-state {
  padding: 32px 20px;
  text-align: center;
  border-radius: var(--radius);
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  color: var(--ink-2);
}

.empty-state p {
  margin: 0 0 14px;
}

/* ==========================================================================
   Project Detail Page
   ========================================================================== */

.detail-page {
  padding-top: clamp(30px, 5vw, 52px);
  padding-bottom: 60px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-2);
  margin-bottom: 20px;
}

.back-link:hover {
  color: var(--ink);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-3);
}

.breadcrumb a {
  color: var(--ink-2);
}

.breadcrumb a:hover {
  color: var(--ink);
}

.breadcrumb span[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.detail-intro {
  display: grid;
  gap: clamp(18px, 4vw, 40px);
  margin-bottom: clamp(22px, 4vw, 36px);
}

.detail-intro-split {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
}

.detail-head {
  max-width: 68ch;
}

.detail-flow {
  padding: clamp(16px, 3vw, 30px);
  background: linear-gradient(150deg, var(--surface), var(--surface-soft));
}

.detail-flow ol {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-flow li {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.detail-flow li + li::before {
  position: absolute;
  bottom: 100%;
  left: 24px;
  height: 21px;
  border-left: 1px solid var(--line-strong);
  content: "";
}

.detail-flow li:nth-child(2) {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.detail-flow span {
  font-size: 0.85rem;
}

.detail-interface {
  max-width: 760px;
}

.detail-interface-pair {
  max-width: none;
}

.interface-screens {
  display: grid;
  gap: clamp(12px, 2.5vw, 24px);
}

.detail-interface-pair .interface-screens {
  grid-template-columns: minmax(0, 4fr) minmax(0, 1fr);
  align-items: center;
  padding: clamp(12px, 2.5vw, 24px);
}

.interface-screens > div {
  display: block;
  min-width: 0;
}

.detail-interface-pair .interface-screens > div {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.media-screenshot img {
  object-fit: contain;
}

.detail-figure figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.85rem;
}

.detail-sections {
  margin: 0 0 clamp(24px, 4vw, 36px);
  border-block: 1px solid var(--line);
}

.detail-sections ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
}

.detail-sections a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 8px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 0.88rem;
  font-weight: 600;
}

.detail-sections a:hover,
.detail-sections a:focus-visible {
  color: var(--ink);
  background: var(--surface-soft);
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.detail-app-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.detail-head h1 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  margin-bottom: 0;
}

.detail-lead {
  margin: 0 0 22px;
  font-size: 1.06rem;
  color: var(--ink-2);
}

.detail-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.specs-strip {
  margin: 0 0 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  overflow: hidden;
}

.specs-strip div {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.specs-strip div:last-child {
  border-right: 0;
}

.specs-strip dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 4px;
}

.specs-strip dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}

.metrics-grid {
  margin: 0 0 36px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metrics-grid div {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.metrics-grid dt {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.15;
}

.metrics-grid dd {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--ink-2);
  line-height: 1.4;
}

.detail-subblock {
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.detail-subblock h2 {
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.workflow-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 14px;
}

.workflow-step {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.workflow-step h3 {
  font-size: 1.02rem;
  margin: 6px 0;
}

.workflow-step p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.screen-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.screen-card {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  transition: border-color 160ms ease, transform 180ms var(--ease);
}

.screen-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.screen-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center top;
  background: var(--surface);
}

.screen-card figcaption {
  padding: 12px;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.screen-card figcaption h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 0.92rem;
}

.screen-card figcaption p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.detail-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: clamp(26px, 5vw, 48px);
  align-items: start;
}

.detail-main h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.detail-copy {
  margin: 0 0 28px;
  font-size: 0.98rem;
  color: var(--ink-2);
  line-height: 1.75;
}

.detail-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.detail-points li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.94rem;
}

.point-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-3);
  padding-top: 2px;
}

.detail-aside-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-aside {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.detail-aside h3 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.detail-aside .tag-row {
  margin-bottom: 0;
}

.detail-ask p {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.detail-ask-btn {
  width: 100%;
}

.related-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.related-section h2 {
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.related-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 150ms ease, background-color 150ms ease;
}

.related-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.related-card strong {
  margin-top: 10px;
  font-size: 1.06rem;
  color: var(--ink);
}

.related-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
  margin: 2px 0 8px;
}

.related-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.detail-nav {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-nav-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 150ms ease, background-color 150ms ease;
}

.detail-nav-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.detail-nav-next {
  text-align: right;
}

.detail-nav-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
}

.detail-nav-card strong {
  font-size: 1.08rem;
}

/* ==========================================================================
   Music & Studio Page
   ========================================================================== */

.studio-stats-wrap {
  padding-bottom: 8px;
}

.studio-stats-wrap .metrics-grid {
  margin-bottom: 24px;
}

.studio-hero-section {
  padding-bottom: 16px;
}

.studio-games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.studio-game-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.studio-game-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.studio-game-media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}

.studio-game-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-game-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}

.studio-game-body .card-links {
  width: 100%;
}

.studio-game-body h3 {
  font-size: 1.2rem;
  margin: 10px 0 8px;
}

.studio-game-body p {
  margin: 0 0 16px;
  font-size: 0.92rem;
  color: var(--ink-2);
  flex: 1;
}

.music-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(20px, 4vw, 40px);
  align-items: center;
  padding: clamp(20px, 3.5vw, 32px);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.music-banner-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.music-banner-copy .hero-actions {
  width: 100%;
}

.channel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.channel-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.music-banner-copy .channel-head h2 {
  margin: 6px 0 0;
}

.music-banner-copy h2 {
  margin: 12px 0 8px;
}

.music-banner-copy p {
  margin: 0 0 20px;
  color: var(--ink-2);
}

.music-banner-art {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.music-banner-art img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 320ms var(--ease);
}

.music-banner-art:hover img {
  transform: scale(1.02);
}

.track-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.track-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 160ms ease, box-shadow 180ms ease, transform 180ms var(--ease);
}

.track-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.track-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0c0d10;
  border-bottom: 1px solid var(--line);
}

.track-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 320ms var(--ease);
}

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

.track-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 19, 24, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 0.7rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background-color 150ms ease, transform 150ms ease;
}

.track-card:hover .track-play {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  transform: scale(1.06);
}

.track-meta-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
}

.track-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-3);
}

.track-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.track-info strong {
  font-size: 0.94rem;
  color: var(--ink);
  line-height: 1.3;
}

.track-info span {
  font-size: 0.76rem;
  color: var(--ink-2);
}

.track-ext {
  font-size: 0.8rem;
  color: var(--ink-3);
  text-align: right;
  transition: color 140ms ease, transform 150ms var(--ease);
}

.track-card:hover .track-ext {
  color: var(--ink);
  transform: translate(1px, -1px);
}

.about-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.about-identity {
  display: flex;
  align-items: center;
  gap: 18px;
}

.about-portrait {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  object-fit: cover;
  object-position: center 20%;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.about-head-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.principles-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.principle-card {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.principle-card h3 {
  font-size: 1.08rem;
  margin: 8px 0 6px;
}

.principle-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

/* ==========================================================================
   About & Career Page
   ========================================================================== */

.story-section {
  padding-bottom: 40px;
}

.story-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.story-lead,
.story-body {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.96rem;
  line-height: 1.75;
}

.story-lead {
  color: var(--ink);
}

.career-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.career-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.career-period {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-3);
  padding-top: 3px;
  align-self: start;
}

.career-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
  flex-shrink: 0;
}

.career-row.is-current-role .career-dot {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.career-row.is-current-role .career-period {
  color: var(--ink);
  font-weight: 600;
}

.career-content h3 {
  font-size: 1.12rem;
  margin-bottom: 6px;
}

.career-content h3 span {
  font-weight: 500;
  font-size: 0.94rem;
  color: var(--ink-2);
}

.career-content p {
  margin: 0 0 12px;
  color: var(--ink-2);
  font-size: 0.94rem;
}

.career-content .tag-row {
  margin-bottom: 0;
}

.cert-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.cert-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.cert-badge {
  display: inline-flex;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
}

.cert-row strong {
  font-weight: 600;
  font-size: 0.95rem;
}

.cert-date {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-3);
}

.stack-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.stack-group {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.stack-group h3 {
  font-size: 1.06rem;
  margin-bottom: 12px;
}

.stack-group .tag-row {
  margin-bottom: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: clamp(44px, 6vw, 72px);
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.footer-cta {
  padding: clamp(32px, 5vw, 48px) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-kicker {
  margin: 0 0 5px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.footer-cta-copy h2 {
  margin-bottom: 6px;
}

.footer-cta-copy p:last-child {
  margin: 0;
  max-width: 50ch;
  color: var(--ink-2);
  font-size: 0.94rem;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bar {
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.footer-id {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-id img {
  border-radius: 5px;
}

.footer-id strong {
  color: var(--ink);
}

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

.footer-links a {
  color: var(--ink-2);
}

.footer-links a:hover {
  color: var(--ink);
}

/* ==========================================================================
   Quick Jump Command Palette (⌘K)
   ========================================================================== */

.cmd-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: start center;
  padding: min(14vh, 110px) 16px 24px;
}

.cmd-overlay[hidden] {
  display: none;
}

.cmd-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 13, 16, 0.45);
  backdrop-filter: blur(4px);
}

.cmd-box {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.cmd-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}

.cmd-head svg {
  width: 17px;
  height: 17px;
  color: var(--ink-3);
  flex-shrink: 0;
}

.cmd-input {
  flex: 1;
  min-width: 0;
  min-height: 32px;
  padding: 0;
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
}

.cmd-input::placeholder {
  color: var(--ink-3);
}

.cmd-input:focus-visible {
  box-shadow: 0 2px var(--link);
}

.cmd-esc {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.cmd-esc:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.cmd-list {
  list-style: none;
  margin: 0;
  padding: 5px 8px 8px;
  max-height: min(350px, 58dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cmd-list li[hidden] {
  display: none;
}

.cmd-item {
  min-height: 42px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  cursor: pointer;
}

.cmd-item:hover,
.cmd-item[aria-selected="true"] {
  background: var(--surface-soft);
}

.cmd-item-title {
  color: var(--ink);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.cmd-empty {
  margin: 0;
  padding: 22px 16px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-3);
}

/* ==========================================================================
   Mobile Tabbar, Back-to-Top, Toast & Gentle Reveal
   ========================================================================== */

.mobile-tabbar {
  display: none;
}

.back-top-btn {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 90;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-bottom-width: 4px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  transition: background-color 140ms ease, transform 140ms var(--ease);
}

.back-top-btn:hover {
  background: var(--surface-soft);
}

.back-top-btn:active {
  transform: translateY(2px);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 160;
  padding: 10px 15px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

/* Content is always immediately visible (no opacity:0 scroll trap on tall mobile sections) */
[data-reveal] {
  opacity: 1;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .main-nav {
    gap: 2px;
  }

  .main-nav a {
    padding-inline: 7px;
  }

  .hero-grid,
  .split-showcase,
  .detail-grid,
  .music-banner {
    grid-template-columns: 1fr;
  }

  .music-banner-art {
    order: -1;
  }

  .feature-grid,
  .mini-grid,
  .track-grid,
  .screen-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --gutter: 18px;
  }

  .site-header {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .cmd-trigger {
    width: 40px;
    min-height: 44px;
    padding: 0;
  }

  .cmd-kbd,
  .brand-domain {
    display: none;
  }

  .header-inner {
    min-height: 56px;
    gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .brand-logo {
    width: 30px;
    height: 30px;
  }

  .brand-name {
    font-size: 0.94rem;
  }

  .header-tools {
    gap: 6px;
  }

  .tool-btn {
    width: 38px;
    height: 38px;
    border-radius: 9px;
  }


  /* Balanced mobile vertical rhythm */
  .hero {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .hero-grid {
    gap: 22px;
  }

  .hero-author {
    gap: 10px;
    margin-bottom: 12px;
  }

  .author-avatar {
    width: 38px;
    height: 38px;
  }

  .eyebrow {
    flex-wrap: wrap;
    row-gap: 4px;
    margin-bottom: 0;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 7.5vw, 2.45rem);
    margin-bottom: 12px;
  }

  .hero-intro {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 20px;
  }

  .section {
    padding-top: 32px;
    padding-bottom: 20px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
  }

  .section-sub {
    font-size: 0.92rem;
  }

  .page-head {
    padding-top: 24px;
    padding-bottom: 16px;
  }

  .page-head h1 {
    font-size: clamp(1.75rem, 7vw, 2.35rem);
    margin-bottom: 8px;
  }

  .page-intro {
    font-size: 0.94rem;
  }

  /* Zero-overflow horizontal touch rails (flush with container, no negative margins) */
  .filter-bar,
  .jump-pills,
  .tech-chips {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 2px 0 6px;
    gap: 8px;
  }

  .filter-bar {
    margin-bottom: 16px;
  }

  .jump-pills {
    margin-top: 14px;
  }

  .tech-chips {
    margin-top: 10px;
  }

  .filter-bar::-webkit-scrollbar,
  .jump-pills::-webkit-scrollbar,
  .tech-chips::-webkit-scrollbar {
    display: none;
  }

  .filter-bar button,
  .jump-pills a,
  .tech-chip {
    flex: 0 0 auto;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    scroll-snap-align: start;
  }

  .filter-bar button {
    padding: 7px 14px;
  }

  .btn {
    min-height: 44px;
    padding: 11px 16px;
    border-radius: 10px;
  }

  .directory-toolbar {
    margin-top: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .toolbar-right {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .search-field {
    flex: 1;
    min-width: 0;
    height: 44px;
    border-radius: 10px;
  }

  .search-field input,
  .cmd-input {
    font-size: 16px;
  }

  .view-toggle button {
    min-height: 38px;
    padding: 6px 12px;
  }

  .count-line {
    margin-top: 10px;
  }

  .catalog-section {
    padding-bottom: 32px;
  }

  /* Unified mobile card spacing */
  .feature-grid,
  .mini-grid,
  .catalog-grid,
  .studio-games-grid,
  .track-grid,
  .story-columns,
  .stack-grid,
  .related-grid,
  .detail-nav {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .mini-grid {
    margin-top: 14px;
  }

  .feature-body,
  .mini-card-link,
  .catalog-body,
  .studio-game-body,
  .studio-card,
  .music-banner,
  .story-columns,
  .detail-aside,
  .principle-card,
  .stack-group,
  .workflow-step,
  .related-card {
    padding: 16px;
  }

  .feature-meta {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .card-links {
    padding-top: 12px;
  }

  .card-links a {
    min-height: 34px;
  }

  /* Detail page vertical flow */
  .detail-page {
    padding-top: 20px;
    padding-bottom: 40px;
  }

  .breadcrumb {
    margin-bottom: 14px;
    gap: 6px;
  }

  .detail-intro-split,
  .detail-interface-pair .interface-screens {
    grid-template-columns: minmax(0, 1fr);
  }

  .interface-mobile {
    width: min(72%, 260px);
    margin-inline: auto;
  }

  .detail-title-row h1,
  .detail-points li > span:last-child,
  .specs-strip dd,
  .metrics-grid dd {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .detail-sections ul {
    column-gap: 6px;
  }

  .detail-title-row {
    gap: 11px;
    margin-bottom: 10px;
  }

  .detail-app-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
  }

  .detail-head h1 {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

  .screen-gallery {
    gap: 10px;
  }

  .about-identity {
    align-items: flex-start;
    gap: 14px;
  }

  .about-portrait {
    width: 68px;
    height: 68px;
    border-radius: 14px;
  }

  .channel-avatar {
    width: 46px;
    height: 46px;
  }

  .detail-lead {
    font-size: 0.96rem;
    margin-bottom: 18px;
  }

  .specs-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
  }

  .specs-strip div {
    padding: 12px;
  }

  .specs-strip div:nth-child(2) {
    border-right: 0;
  }

  .specs-strip div:nth-child(1),
  .specs-strip div:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .detail-figure {
    border-radius: 12px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 24px;
  }

  .metrics-grid div {
    padding: 13px;
  }

  .metrics-grid dt {
    font-size: 1.15rem;
  }

  .detail-grid {
    gap: 20px;
  }

  .detail-copy {
    margin-bottom: 20px;
    font-size: 0.94rem;
  }

  .detail-subblock,
  .related-section {
    margin-top: 28px;
    padding-top: 22px;
  }

  .detail-nav {
    margin-top: 20px;
    padding-top: 18px;
  }

  .detail-nav-next {
    text-align: left;
  }

  /* Studio, About & Career spacing */
  .studio-stats-wrap .metrics-grid {
    margin-bottom: 16px;
  }

  .music-banner {
    gap: 16px;
  }

  .story-section {
    padding-bottom: 24px;
  }

  .catalog-grid.is-list .catalog-card {
    flex-direction: row;
    align-items: stretch;
  }

  .catalog-grid.is-list .catalog-media {
    width: 112px;
    flex: 0 0 112px;
    aspect-ratio: 1;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .catalog-grid.is-list .catalog-body {
    min-width: 0;
    padding: 12px 14px;
  }

  .catalog-grid.is-list .catalog-desc,
  .catalog-grid.is-list .tag-row {
    display: none;
  }

  .career-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 0;
  }

  .cert-row {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 6px 12px;
    padding: 12px 14px;
  }

  .cert-date {
    grid-column: 2 / 3;
  }

  /* Clean horizontal 1-col stat rows on mobile (zero squeezed words!) */
  .facts-row {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 18px;
  }

  .facts-row div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
  }

  .facts-row dt {
    font-size: 1.08rem;
    flex-shrink: 0;
  }

  .facts-row dd {
    margin: 0;
    font-size: 0.82rem;
    text-align: right;
  }

  .track-chips {
    gap: 7px;
    margin-bottom: 18px;
  }

  .track-chip {
    min-height: 36px;
    padding: 6px 11px;
  }

  /* Footer clearance above bottom tabbar */
  .site-footer {
    margin-top: 32px;
    padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  }

  .footer-cta {
    padding: 26px 0 22px;
    gap: 16px;
  }

  .footer-bar {
    padding: 16px 0 20px;
    gap: 12px;
  }

  .footer-links {
    gap: 8px 16px;
  }

  .footer-links a {
    padding: 4px 0;
  }

  /* Refined thumb-zone tabbar */
  .mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    background: var(--bg);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 18px rgba(17, 19, 24, 0.06);
    padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .tabbar-item {
    position: relative;
    min-height: 48px;
    padding: 6px 2px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--ink-3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 140ms ease, background-color 140ms ease, transform 120ms ease;
  }

  .tabbar-item svg {
    width: 20px;
    height: 20px;
  }

  .tabbar-item.is-active {
    color: var(--ink);
    background: var(--surface-soft);
  }

  .tabbar-item.is-active::after {
    content: "";
    position: absolute;
    top: 3px;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
  }

  .back-top-btn {
    right: max(16px, env(safe-area-inset-right));
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    width: 46px;
    height: 46px;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    text-align: center;
  }

  .cmd-overlay {
    padding: 12px;
  }

  .cmd-box {
    max-height: 82dvh;
    display: flex;
    flex-direction: column;
  }

  .cmd-list {
    max-height: 60dvh;
  }

  .cmd-item {
    min-height: 46px;
  }
}

@media (max-width: 480px) {
  :root {
    --gutter: 16px;
  }

  .about-identity {
    flex-direction: column;
    gap: 12px;
  }

  .about-head-actions {
    width: 100%;
  }

  .about-head-actions .btn {
    flex: 1;
  }

  .hero-actions {
    flex-direction: column;
    gap: 8px;
  }

  .hero-actions .btn,
  .footer-actions,
  .footer-actions .btn {
    width: 100%;
  }

}

@media (max-width: 360px) {
  .header-tools .cmd-trigger {
    display: none;
  }

  .header-tools {
    gap: 4px;
  }

  .facts-row div {
    flex-direction: column;
    gap: 2px;
  }

  .facts-row dd {
    text-align: left;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .mobile-drawer,
  .mobile-tabbar,
  .back-top-btn,
  .cmd-overlay,
  .toast,
  .about-head-actions,
  .back-link,
  .hero-actions,
  .detail-nav {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #111318 !important;
    font-size: 11pt;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .section,
  .page-head {
    padding-top: 16px;
    padding-bottom: 12px;
  }

  .story-columns,
  .cert-row,
  .stack-group {
    background: #ffffff !important;
    break-inside: avoid;
  }
}

.install-questions dt {
  margin-bottom: 6px;
  font-weight: 700;
}

.install-questions dd {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.88rem;
}

.editorial-feature,
.novel-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(18px, 4vw, 44px);
  align-items: center;
}

.editorial-feature img,
.novel-hero figure {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.editorial-feature img,
.novel-hero img {
  width: 100%;
  height: auto;
}

.novel-page {
  padding-top: clamp(28px, 6vw, 70px);
}

.novel-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

.novel-hero figure {
  margin: 0;
  background: var(--surface-soft);
}

.novel-hero figcaption {
  padding: 9px 14px;
  color: var(--ink-2);
  font-size: 0.84rem;
}

.novel-chapters,
.now-entries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.novel-chapters {
  margin-top: clamp(24px, 5vw, 52px);
}

.now-entries {
  list-style: none;
  margin: 0;
  padding: 0;
}

.novel-chapters section,
.now-entry {
  min-width: 0;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.novel-chapters h2,
.now-entry h2 {
  font-size: clamp(1.16rem, 3vw, 1.5rem);
}

.novel-chapters p,
.now-entry p,
.editorial-feature p:not(.section-kicker) {
  margin-bottom: 12px;
  color: var(--ink-2);
}

.project-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-social-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}

.project-social-links a:hover {
  border-color: var(--line-strong);
}

.project-social-links img {
  flex: none;
}

.project-social-links small {
  display: block;
  color: var(--ink-2);
  font-weight: 400;
}

@media (max-width: 760px) {
  .editorial-feature,
  .novel-hero,
  .novel-chapters,
  .now-entries {
    grid-template-columns: minmax(0, 1fr);
  }
}


.project-progress dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 16px;
  margin: 0 0 18px;
}

.project-progress dl > div {
  padding: 16px;
  min-width: 0;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.project-progress dt {
  color: var(--ink-2);
  font-size: 0.85rem;
}

.project-progress dd {
  margin: 4px 0 0;
}

.project-support:not([hidden]),
.support-count {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.support-count strong {
  font-variant-numeric: tabular-nums;
  font-size: 1.2rem;
}

.support-count span {
  color: var(--ink-2);
  font-size: 0.85rem;
}

.project-social-links span,
.project-social-links small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.now-entry h2 {
  margin-top: 10px;
}

@media (max-width: 760px) {
  .project-progress dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-progress dl {
    gap: 8px;
  }
}

.song-feature-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 16px;
}

.song-feature-head h2 {
  margin-bottom: 4px;
  font-size: clamp(1.65rem, 4vw, 2.65rem);
}

.song-feature-head p {
  margin: 0;
  color: var(--ink-2);
}

.song-feature-image {
  margin: 0 0 20px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #18283d;
}

.song-feature-image img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: cover;
  object-position: center 54%;
}

.song-feature-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(16px, 4vw, 38px);
  align-items: start;
}

.song-feature-copy h3 {
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.song-feature-copy p {
  color: var(--ink-2);
}

.song-verse {
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.song-verse p:last-child {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .song-feature-copy {
    grid-template-columns: minmax(0, 1fr);
  }
}

.artist-hero,
.game-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(22px, 5vw, 52px);
  overflow: hidden;
  padding: clamp(20px, 4vw, 52px);
  margin-bottom: clamp(22px, 4vw, 36px);
  border-radius: var(--radius-lg);
}

.artist-hero {
  background: radial-gradient(ellipse at 88% 30%, #452f55, transparent 60%), #181323;
  color: #fff6f4;
}

.artist-hero h1 {
  margin: 0 0 12px;
  color: inherit;
  font-size: clamp(3.25rem, 9vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
}

.artist-hero p {
  color: #e3d3e3;
}

.artist-intro {
  margin: 0 0 8px;
  font-size: clamp(1.04rem, 2.3vw, 1.5rem);
}

.artist-hero .artist-cta {
  border: 1px solid #fff0e9;
  background: #fff0e9;
  color: #25192c;
}

.artist-hero .artist-cta-secondary {
  border: 1px solid #957e9e;
  color: #fff6f4;
}

.artist-hero .btn:hover {
  background: #e6c8dc;
  color: #25192c;
}

.artist-portrait {
  align-self: stretch;
  max-height: 360px;
  border-color: #957e9e;
  background: #291e34;
}

.artist-portrait img {
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.artist-releases,
.artist-detail #tracks,
.artist-detail .song-feature,
.happy-lines-detail #screenshots,
.game-detail #how-it-works {
  margin-bottom: clamp(24px, 5vw, 52px);
}

.release-grid {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 83%;
  gap: 16px;
  margin: 0;
  padding: 3px 2px 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 2px;
  list-style: none;
}

.release-controls:not([hidden]) {
  display: flex;
  gap: 8px;
}

.release-controls .btn {
  min-width: 44px;
}

.release-card {
  scroll-snap-align: start;
}

.release-card:last-child {
  scroll-snap-align: end;
}

.release-card {
  display: grid;
  grid-template-columns: minmax(90px, 0.72fr) minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

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

.release-card div {
  min-width: 0;
  padding: clamp(12px, 3vw, 24px);
  overflow-wrap: anywhere;
}

.release-card h3 {
  margin-bottom: 6px;
  font-size: clamp(1.08rem, 2.5vw, 1.5rem);
}

.release-card p {
  margin-bottom: 8px;
  color: var(--ink-2);
}

.game-hero {
  background: linear-gradient(130deg, #384263, #21273e 70%);
  color: #fff;
}

.happy-lines-detail .game-hero {
  background: radial-gradient(ellipse at 75% 0%, #fac98e, transparent 75%), #fff0d9;
  color: #2d2137;
}

.game-hero h1 {
  color: inherit;
  font-size: clamp(2.3rem, 5vw, 4.3rem);
}

.game-hero .detail-lead {
  color: inherit;
}

.happy-lines-detail .game-hero h1 {
  font-size: clamp(1.75rem, 3.55vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.happy-lines-detail .game-hero .detail-app-icon {
  width: clamp(54px, 5.7vw, 72px);
  height: auto;
  aspect-ratio: 1;
  border: 2px solid #fff9ef;
  border-radius: 22%;
  box-shadow: 0 4px 10px #62392629;
}

.happy-lines-detail .game-hero .detail-lead {
  max-width: 43ch;
}

.happy-lines-detail .screen-card {
  display: flex;
  flex-direction: column;
}

.happy-lines-detail .screen-card figcaption {
  flex: 1;
}

.happy-lines-detail .screen-card:hover {
  transform: none;
}

.game-hero .game-install {
  border-color: #442867;
  background: #442867;
  color: #fff;
}

.game-hero .btn-secondary {
  border-color: #c8b8e1;
  background: #fff9ef;
  color: #352544;
}

.game-hero .btn:hover {
  border-color: #835cb2;
  background: #e3c9f6;
  color: #352544;
}

.happy-lines-detail .game-hero-media {
  border: 3px solid #fffcf0;
  box-shadow: 0 12px 28px #62392626;
}

.happy-lines-detail .screen-card {
  border-radius: 18px;
}

.happy-lines-detail .screen-card figcaption {
  padding: 14px;
}

@media (max-width: 760px) {
  .artist-hero,
  .game-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .artist-portrait {
    max-height: 260px;
  }
}

.kedy-stories > p {
  max-width: 65ch;
  color: var(--ink-2);
}

.kedy-episodes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.kedy-episode {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.kedy-episode img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.kedy-episode div {
  padding: clamp(14px, 3vw, 22px);
}

.kedy-episode h3 {
  margin-bottom: 8px;
  font-size: 1.04rem;
}

.kedy-episode p {
  color: var(--ink-2);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .kedy-episodes {
    grid-template-columns: minmax(0, 1fr);
  }

  .kedy-episode {
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
    align-items: center;
  }

  .kedy-episode img {
    height: 100%;
  }

  .release-grid {
    grid-auto-columns: 92%;
  }
}

.home-hero {
  padding-block: clamp(26px, 6vw, 76px);
  background: radial-gradient(ellipse at 85% 0%, var(--surface-soft), transparent 65%);
}

.home-spotlight {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.home-spotlight:hover {
  border-color: var(--line-strong);
}

.home-spotlight-media {
  display: grid;
  aspect-ratio: 17 / 10;
  padding: clamp(8px, 2vw, 20px);
  place-items: center;
  background: radial-gradient(ellipse at top right, #303b53, #151c29 75%);
}

.home-spotlight-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-spotlight-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px clamp(16px, 3vw, 22px);
}

.home-spotlight-copy p {
  margin: 0 0 3px;
  color: var(--ink-2);
  font-size: 0.8rem;
}

.home-spotlight-copy strong {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
}

.home-project-count,
.home-project-stage {
  color: var(--ink-2);
  font-size: 0.84rem;
}

.home-project-card {
  overflow: hidden;
}

.home-project-card .mini-card-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
  align-items: end;
  padding: 0;
}

.home-project-thumbnail {
  grid-column: 1 / -1;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  background: var(--surface-soft);
}

.home-project-summary {
  min-width: 0;
  padding: 14px 4px 16px 16px;
}

.home-project-summary h3 {
  margin: 8px 0 4px;
}

.home-project-summary p {
  margin: 0 0 6px;
  color: var(--ink-2);
}

.home-project-arrow {
  padding: 0 16px 16px 4px;
  color: var(--ink-2);
}

.release-card .link-muted {
  display: block;
  margin-top: 8px;
}

.album-tracklists,
.artist-platforms {
  margin-top: 24px;
}

.album-tracks {
  border-bottom: 1px solid var(--line);
}

.album-tracks summary {
  padding: 12px 6px;
  cursor: pointer;
  font-weight: 600;
}

.album-tracks summary span {
  margin-inline-start: 8px;
  color: var(--ink-2);
  font-size: 0.85rem;
  font-weight: 400;
}

.album-tracks ol {
  columns: 2;
  padding: 0 0 12px 32px;
  color: var(--ink-2);
}

.album-tracks li {
  break-inside: avoid;
  padding: 3px 0;
}

.album-tracks a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.artist-platforms {
  padding: clamp(15px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.artist-platforms p {
  margin-bottom: 14px;
  color: var(--ink-2);
}

@media (max-width: 760px) {
  .home-project-thumbnail {
    aspect-ratio: 16 / 7;
  }

  .album-tracks ol {
    columns: 1;
  }
}


.home-hero + #projects .feature-grid:not(:has(.feature-card:not([hidden]))),
.home-hero + #projects .mini-grid:not(:has(.mini-card:not([hidden]))) {
  display: none;
}

.catalog-card:focus-within,
.home-project-card:focus-within,
.home-spotlight:focus-visible {
  border-color: var(--line-strong);
}

.home-more-actions:not(:empty) {
  display: flex;
  justify-content: center;
}

.home-more-actions .btn:not([hidden]) {
  margin-top: 20px;
}

.home-more-actions [hidden] {
  display: none;
}

.song-verse {
  overflow-wrap: anywhere;
}

.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 48px);
  margin-bottom: clamp(22px, 4vw, 36px);
  padding: clamp(18px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.product-hero-copy,
.product-hero > .detail-figure {
  min-width: 0;
}

.product-hero h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4.4vw, 3.35rem);
  overflow-wrap: anywhere;
}

.product-domain {
  display: block;
  margin-bottom: 12px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.product-headline {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: clamp(1.05rem, 2.6vw, 1.6rem);
  font-weight: 650;
}

.product-hero-lala {
  background: radial-gradient(ellipse at 92% 8%, color-mix(in srgb, #9e4775 22%, transparent), transparent 65%), var(--surface-soft);
}

.lala-hero-visual {
  display: grid;
  justify-items: center;
  gap: 14px;
  min-width: 0;
}

.lala-kavuk {
  width: clamp(108px, 19vw, 220px);
  height: auto;
  border: 1px solid #b38559;
  border-radius: 25%;
  box-shadow: 0 14px 36px rgba(57, 20, 48, 0.25);
}

.product-hero-lala .detail-flow {
  width: 100%;
  margin: 0;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.product-hero-cpynet {
  border-color: #29443f;
  background: radial-gradient(ellipse at top right, #1d3c36, #111c21 72%);
  color: #f2fbf8;
}

.product-hero-cpynet .product-headline,
.product-hero-cpynet .detail-title-row h1 {
  color: inherit;
}

.product-hero-cpynet .product-domain,
.product-hero-cpynet .detail-lead {
  color: #c1d7d0;
}

.product-hero-cpynet .btn-primary {
  border-color: #b6f1d6;
  background: #b6f1d6;
  color: #182a26;
}

.product-hero-cpynet .btn-secondary {
  border-color: #62817a;
  background: #243733;
  color: #ebf9f3;
}

.product-hero-cpynet .btn:hover {
  border-color: #b6f1d6;
  background: #d0f4e4;
  color: #182a26;
}

.product-hero-cpynet-blog {
  border-top: 4px solid #99754b;
  background: color-mix(in srgb, #ba945c 10%, var(--surface));
}

.product-detail #workspace,
.product-detail #interface,
.publication-selection {
  margin-bottom: clamp(26px, 5vw, 44px);
}

.product-detail-cpynet .detail-interface {
  max-width: min(780px, 100%);
}

.product-resource-link {
  margin-top: 16px;
}

.publication-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.publication-grid a {
  display: grid;
  gap: 8px;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.publication-grid a:hover,
.publication-grid a:focus-visible {
  border-color: var(--line-strong);
}

.publication-grid span {
  color: var(--ink-2);
  font-size: 0.84rem;
}

@media (max-width: 760px) {
  .product-hero,
  .publication-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.detail-sections {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.detail-sections summary {
  display: none;
}

.detail-sections ul {
  padding: 8px 12px;
  gap: 3px 8px;
}

.detail-sections a[aria-current="location"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 -2px var(--link);
}

.career-roles {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.career-roles > li {
  padding: 12px 14px;
  border-inline-start: 2px solid var(--line-strong);
  background: var(--surface-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.career-roles h4 {
  margin: 4px 0 8px;
  font-size: 1rem;
}

.career-roles .career-role-period {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
}

.career-promotion {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 2px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
}

@media (max-width: 760px) {
  .detail-sections {
    margin-bottom: 16px;
  }

  .detail-sections summary {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    cursor: pointer;
    font-weight: 650;
    list-style: none;
  }

  .detail-sections summary::-webkit-details-marker {
    display: none;
  }

  .detail-sections summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-inline: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
  }

  .detail-sections details[open] summary::after {
    transform: rotate(225deg);
  }

  .detail-sections ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
  }

  .detail-sections a {
    width: 100%;
    overflow-wrap: anywhere;
  }

  .detail-page .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-page .hero-actions .btn {
    width: 100%;
    min-width: 0;
    padding-inline: 8px;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .detail-page .hero-actions .btn:first-child {
    grid-column: 1 / -1;
  }

  .detail-page .detail-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-page .detail-nav-card {
    padding: 12px;
    overflow-wrap: anywhere;
  }

  .detail-page .detail-nav-next {
    text-align: right;
  }
}

/* ==========================================================================
   UI Polish: Media Framing, Card Alignment, Contrast & Micro-interactions
   ========================================================================== */

.feature-media img[src*="happy-lines-"],
.catalog-media img[src*="happy-lines-"] {
  object-fit: contain;
  background: #edf3e4;
}

.feature-media:has(img[src*="lala-panel-desktop"]),
.catalog-media:has(img[src*="lala-panel-desktop"]) {
  padding: 10px;
  background: radial-gradient(ellipse at top right, #2e3950, #141a27 78%);
}

.feature-media img[src*="lala-panel-desktop"],
.catalog-media img[src*="lala-panel-desktop"] {
  object-fit: contain;
  border-radius: 6px;
}

.catalog-media img {
  transition: transform 320ms var(--ease);
}

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

.story-body {
  color: var(--ink);
  opacity: 0.9;
}

.now-entry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 160ms ease, box-shadow 180ms ease, transform 180ms var(--ease);
}

.now-entry h2 {
  margin: 10px 0 8px;
}

.now-entry p {
  margin-bottom: 16px;
}

.now-entry .link-arrow {
  margin-top: auto;
}

.now-entry:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.home-spotlight {
  transition: border-color 160ms ease, box-shadow 180ms ease, transform 180ms var(--ease);
}

.home-spotlight:hover {
  box-shadow: var(--shadow-md);
}

@media (prefers-reduced-motion: no-preference) {
  .feature-card,
  .catalog-card,
  .mini-card {
    transition: border-color 160ms ease, box-shadow 180ms ease, transform 180ms var(--ease);
  }

  .feature-card:hover,
  .catalog-card:hover,
  .mini-card:hover,
  .now-entry:hover,
  .home-spotlight:hover {
    transform: translateY(-2px);
  }
}

@media (max-width: 760px) {
  .eyebrow {
    row-gap: 4px;
  }

  .live-clock {
    padding: 1px 7px;
    border-left: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    font-size: 0.68rem;
  }

  .filter-bar,
  .jump-pills,
  .tech-chips {
    padding-right: 24px;
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent 100%);
    mask-image: linear-gradient(to right, #000 88%, transparent 100%);
  }

  .search-field {
    min-width: 0;
    flex: 1 1 180px;
  }
}

/* ==========================================================================
   Disable Mobile Zoom & Full-Card Clickability / Clear Tap Affordances
   ========================================================================== */

html,
body {
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

a,
button,
summary,
[role="button"] {
  -webkit-tap-highlight-color: color-mix(in srgb, var(--link) 14%, transparent);
}

/* Make entire interactive cards clickable via stretched primary link */
.feature-card,
.catalog-card,
.now-entry,
.studio-game-card,
.release-card,
.kedy-episode,
.editorial-feature {
  position: relative;
  cursor: pointer;
}

.feature-card .card-links .link-arrow::after,
.catalog-card .card-links .link-arrow::after,
.studio-game-card .card-links .link-arrow::after,
.now-entry > .link-arrow::after,
.release-card .link-arrow::after,
.kedy-episode .link-arrow::after,
.editorial-feature .link-arrow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

/* Keep secondary actions (external links, store links) clearly distinct & above card overlay */
.feature-card .link-muted,
.catalog-card .link-muted,
.studio-game-card .link-muted,
.release-card .link-muted,
.editorial-feature .btn {
  position: relative;
  z-index: 2;
}

.card-links {
  gap: 10px;
  align-items: center;
}

.card-links .link-arrow,
.now-entry > .link-arrow,
.release-card .link-arrow,
.kedy-episode .link-arrow,
.editorial-feature .link-arrow {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 600;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, gap 160ms var(--ease);
}

.feature-card:hover .card-links .link-arrow,
.catalog-card:hover .card-links .link-arrow,
.studio-game-card:hover .card-links .link-arrow,
.now-entry:hover > .link-arrow,
.release-card:hover .link-arrow,
.kedy-episode:hover .link-arrow,
.editorial-feature:hover .link-arrow {
  border-color: var(--line-strong);
  background: var(--ink);
  color: var(--bg);
}

.card-links .link-muted,
.release-card .link-muted {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.82rem;
  font-weight: 500;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.card-links .link-muted:hover,
.release-card .link-muted:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink);
}

.release-card .link-arrow,
.release-card .link-muted {
  margin-top: 8px;
}

.release-card .link-muted {
  display: inline-flex;
  margin-top: 6px;
}

/* Hover, focus-within & tactile active press affordances for all clickable cards */
.studio-game-card,
.release-card,
.kedy-episode,
.editorial-feature {
  transition: border-color 160ms ease, box-shadow 180ms ease, transform 180ms var(--ease);
}

.studio-game-card:hover,
.release-card:hover,
.kedy-episode:hover,
.editorial-feature:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.feature-card:focus-within,
.catalog-card:focus-within,
.now-entry:focus-within,
.studio-game-card:focus-within,
.release-card:focus-within,
.kedy-episode:focus-within,
.editorial-feature:focus-within,
.mini-card:focus-within {
  border-color: var(--link);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 18%, transparent);
}

.studio-game-media img[src*="happy-lines-"] {
  object-fit: contain;
  background: #edf3e4;
}

.section-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.section-link:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.album-tracks summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px;
  border-radius: var(--radius-sm);
  transition: background-color 140ms ease;
}

.album-tracks summary:hover {
  background: var(--surface-soft);
}

.album-tracks ol a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background-color 140ms ease, color 140ms ease;
}

.album-tracks ol a:hover {
  background: var(--surface-soft);
  color: var(--link);
}

@media (prefers-reduced-motion: no-preference) {
  .feature-card:active,
  .catalog-card:active,
  .now-entry:active,
  .studio-game-card:active,
  .release-card:active,
  .kedy-episode:active,
  .editorial-feature:active,
  .mini-card:active,
  .home-spotlight:active,
  .track-card:active,
  .related-card:active,
  .detail-nav-card:active,
  .btn:active {
    transform: scale(0.985);
  }
}

@media (max-width: 760px) {
  /* Prevent iOS Safari auto-zoom on input focus */
  input,
  textarea,
  select,
  .search-field input,
  .cmd-input {
    font-size: 16px;
  }

  .tool-btn {
    width: 40px;
    height: 40px;
  }


  .card-links .link-arrow,
  .card-links .link-muted,
  .now-entry > .link-arrow,
  .release-card .link-arrow,
  .release-card .link-muted,
  .kedy-episode .link-arrow,
  .editorial-feature .link-arrow,
  .section-link,
  .track-chip,
  .footer-links a {
    min-height: 42px;
  }

  .release-controls .btn {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ==========================================================================
   Project Journal Changelog Feed (now.html / tr-now.html)
   ========================================================================== */

/* ==========================================================================
   İki Durak — Bespoke Literary & Cinematic Novel Page
   ========================================================================== */

.editorial-feature img[src*="iki-durak-train"] {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 44%;
}

.novel-page {
  padding-top: 24px;
  padding-bottom: 64px;
}

.novel-stage {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
  padding: clamp(22px, 4vw, 42px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 12% 18%, rgba(56, 189, 248, 0.16), transparent 46%),
    radial-gradient(circle at 88% 82%, rgba(245, 158, 11, 0.18), transparent 48%),
    linear-gradient(125deg, #0b1420 0%, #101722 52%, #1d1610 100%);
  color: #f4f6fa;
  box-shadow: var(--shadow-md);
}

.novel-kicker {
  margin: 0 0 10px;
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f5d08a;
}

.novel-stage h1 {
  margin: 0 0 14px;
  font-size: clamp(2.35rem, 5vw, 3.6rem);
  color: #ffffff;
}

.novel-lead {
  margin: 0 0 22px;
  font-size: 1.02rem;
  line-height: 1.7;
  color: #d0d7e3;
  max-width: 54ch;
}

.novel-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 24px;
}

.novel-facts > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 3px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.novel-facts dt {
  font-size: 0.74rem;
  color: #9eabbf;
}

.novel-facts dd {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: #ffffff;
}

.novel-stage .btn-primary {
  background: #f5b952;
  border-color: #f5b952;
  color: #14110b;
}

.novel-stage .btn-primary:hover {
  background: #fbca72;
  border-color: #fbca72;
  color: #14110b;
}

.novel-stage .btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f4f6fa;
}

.novel-stage .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.34);
  color: #ffffff;
}

.novel-stage-art {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #0a1019;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.novel-stage-art img {
  width: 100%;
  height: auto;
  display: block;
}

.novel-stage-art figcaption {
  padding: 10px 14px;
  font-size: 0.78rem;
  color: #b7c2d2;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.novel-jump {
  margin-top: 22px;
  margin-bottom: 12px;
}

.novel-world {
  margin-top: clamp(28px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(22px, 4vw, 42px);
  align-items: center;
  scroll-margin-top: 84px;
}

.novel-rain-frame {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.novel-rain-frame img {
  width: 100%;
  max-height: 540px;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}

.novel-rain-frame figcaption {
  padding: 11px 16px;
  font-size: 0.8rem;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.novel-world-copy h2 {
  margin: 6px 0 12px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.novel-world-lead {
  margin: 0 0 20px;
  color: var(--ink-2);
  line-height: 1.7;
  font-size: 0.98rem;
}

.novel-characters {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.novel-char-card {
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  border-inline-start-width: 4px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.novel-char-card.is-toprak {
  border-inline-start-color: #38bdf8;
  background: linear-gradient(120deg, color-mix(in srgb, #38bdf8 8%, var(--surface)) 0%, var(--surface) 60%);
}

.novel-char-card.is-nisan {
  border-inline-start-color: #f59e0b;
  background: linear-gradient(120deg, color-mix(in srgb, #f59e0b 9%, var(--surface)) 0%, var(--surface) 60%);
}

.novel-char-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.novel-char-card h3 {
  margin: 4px 0 6px;
  font-size: 1.18rem;
}

.novel-char-card p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.6;
  font-size: 0.93rem;
}

.novel-source-btn {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.novel-source-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.novel-soundtrack {
  margin-top: clamp(32px, 5vw, 56px);
  padding: clamp(20px, 3.5vw, 34px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(22px, 4vw, 40px);
  align-items: start;
  scroll-margin-top: 84px;
}

.novel-album-side img {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  margin-bottom: 16px;
}

.novel-album-side h2 {
  margin: 4px 0 10px;
  font-size: clamp(1.38rem, 2.6vw, 1.8rem);
}

.novel-album-side p {
  margin: 0 0 18px;
  color: var(--ink-2);
  line-height: 1.65;
  font-size: 0.94rem;
}

.novel-album-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.novel-tracklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.novel-track-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 140ms ease, background-color 140ms ease, transform 150ms var(--ease);
}

.novel-track-row:hover {
  border-color: var(--line-strong);
  background: var(--bg);
}

.novel-track-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-3);
}

.novel-track-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.novel-track-play {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-3);
  transition: color 140ms ease;
}

.novel-track-row:hover .novel-track-play {
  color: var(--link);
}

.novel-video-card {
  position: relative;
  cursor: pointer;
  margin-top: clamp(28px, 4vw, 48px);
  padding: clamp(20px, 3vw, 30px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(20px, 3.5vw, 34px);
  align-items: center;
  scroll-margin-top: 84px;
  transition: border-color 160ms ease, box-shadow 180ms ease, transform 180ms var(--ease);
}

.novel-video-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.novel-video-card .link-arrow {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.novel-video-card .link-arrow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.novel-video-card:hover .link-arrow {
  border-color: var(--line-strong);
  background: var(--ink);
  color: var(--bg);
}

.novel-video-copy h2 {
  margin: 6px 0 10px;
  font-size: clamp(1.38rem, 2.6vw, 1.8rem);
}

.novel-video-copy p {
  margin: 0 0 18px;
  color: var(--ink-2);
  line-height: 1.65;
  font-size: 0.95rem;
}

.novel-video-thumb {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.novel-video-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.novel-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -62%);
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 13, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 1.1rem;
  backdrop-filter: blur(6px);
  transition: transform 180ms var(--ease), background-color 160ms ease;
}

.novel-video-card:hover .novel-video-play {
  transform: translate(-50%, -62%) scale(1.08);
  background: #f5b952;
  color: #14110b;
}

.novel-video-thumb figcaption {
  padding: 9px 14px;
  font-size: 0.78rem;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
}

.novel-page .project-progress {
  margin-top: clamp(28px, 4vw, 44px);
}

@media (prefers-reduced-motion: no-preference) {
  .novel-track-row:hover {
    transform: translateX(3px);
  }

  .novel-video-card:hover {
    transform: translateY(-2px);
  }

  .novel-video-card:active,
  .novel-track-row:active {
    transform: scale(0.985);
  }
}

@media (max-width: 900px) {
  .novel-stage,
  .novel-world,
  .novel-soundtrack,
  .novel-video-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .novel-rain-frame img {
    max-height: 460px;
  }

  .novel-album-side img {
    max-width: 180px;
  }
}

@media (max-width: 760px) {
  .novel-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .novel-facts > div {
    padding: 10px;
  }

  .novel-facts dd {
    font-size: 0.86rem;
  }

  .novel-facts dt {
    font-size: 0.68rem;
  }

  .novel-stage .hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .novel-stage .hero-actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* ==========================================================================
   Cross-Page Polish & Accessible Image Lightbox
   ========================================================================== */

/* 1. Keep Ayaz dark hero secondary/copy buttons consistent with translucent glass style */
.artist-hero .artist-cta-secondary,
.artist-hero .btn-secondary {
  background: rgba(255, 246, 244, 0.08);
  border: 1px solid rgba(255, 240, 233, 0.34);
  color: #fff6f4;
}

.artist-hero .artist-cta-secondary:hover,
.artist-hero .btn-secondary:hover {
  background: #e6c8dc;
  border-color: #e6c8dc;
  color: #25192c;
}

/* 2. Prevent flagship Home card category pills from wrapping onto 2 lines */
.feature-meta {
  gap: 8px;
}

.feature-meta .pill-badge {
  white-space: nowrap;
  flex-shrink: 0;
}

.feature-meta .meta-status {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3. Clean framing for white-background screenshots on Home & Build Notes */
.home-project-thumbnail {
  border-bottom: 1px solid var(--line);
}

.home-project-thumbnail[src*="cpynet-write"] {
  object-fit: contain;
  padding: 10px 12px 0;
  background: linear-gradient(180deg, var(--surface-soft) 0%, color-mix(in srgb, var(--line) 35%, var(--surface-soft)) 100%);
}

/* 4. Tighter, cleaner desktop section jump pills so 8 links fit cleanly on 1 row */
@media (min-width: 761px) {
  .detail-sections ul {
    padding: 7px 10px;
    gap: 2px 4px;
  }

  .detail-sections a {
    padding: 5px 8px;
    font-size: 0.8rem;
    border-radius: 7px;
    transition: background-color 140ms ease, color 140ms ease;
  }

  .detail-sections a:hover,
  .detail-sections a.is-current {
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
  }
}

/* 5. Connected vertical timeline rail on About Career section */
@media (min-width: 761px) {
  .career-row {
    position: relative;
  }

  .career-period {
    position: relative;
  }

  .career-row:not(:last-child) .career-period::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 18px;
    bottom: -34px;
    width: 1px;
    background: var(--line);
  }
}

/* ==========================================================================
   Inline Lazy YouTube Player, Footer Topics & 404 Page
   ========================================================================== */

.yt-player-hint {
  margin: 0 0 14px;
  font-size: 0.86rem;
  color: var(--ink-3);
}

.yt-player-dock {
  margin: 0 0 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: #10131b;
  color: #f4f6fa;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  scroll-margin-top: 84px;
}

.yt-player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.yt-player-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.yt-player-kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f5b952;
}

.yt-player-title {
  font-size: 0.92rem;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yt-player-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.yt-player-ext {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #e5eaf2;
  font-size: 0.78rem;
  font-weight: 600;
}

.yt-player-ext:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.yt-player-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.yt-player-close:hover {
  background: #ffffff;
  color: #10131b;
}

.yt-player-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000000;
}

.yt-player-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.novel-track-row.is-playing,
.album-tracks ol a.is-playing {
  border-color: #f5b952;
  background: color-mix(in srgb, #f5b952 14%, var(--surface));
  color: var(--ink);
  font-weight: 700;
}

.novel-track-row.is-playing .novel-track-play {
  color: #d97706;
}

.novel-tracklist-col {
  min-width: 0;
}

.footer-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.footer-topics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.footer-topic-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.76rem;
  font-weight: 500;
  transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}

.footer-topic-chip:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink);
}

.not-found-page {
  padding-top: clamp(56px, 9vw, 104px);
  padding-bottom: clamp(56px, 9vw, 96px);
}

.not-found-card {
  max-width: 640px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.not-found-card h1 {
  margin: 6px 0 12px;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
}

.not-found-card .hero-actions {
  margin-top: 22px;
}

@media (max-width: 760px) {
  .footer-cta-actions {
    align-items: stretch;
    width: 100%;
  }

  .footer-topics {
    justify-content: flex-start;
  }

  .footer-topic-chip {
    min-height: 38px;
    padding: 6px 12px;
  }

  .yt-player-close {
    width: 40px;
    height: 40px;
  }
}

/* Project detail sections */
.product-hero-lala .hero-actions,
.happy-lines-detail .game-hero .hero-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
}

.product-hero-lala .hero-actions .btn,
.happy-lines-detail .game-hero .hero-actions .btn {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding-inline: 8px;
  white-space: normal;
  text-align: center;
}

.detail-page .product-hero-lala .hero-actions .btn:first-child,
.happy-lines-detail .game-hero .hero-actions .btn:first-child {
  grid-column: auto;
}

.detail-page[data-project] #how-it-works {
  --workflow-tone: var(--accent);
  padding: clamp(18px, 3.6vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--workflow-tone) 8%, var(--surface));
}

.detail-page[data-project] #how-it-works h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.detail-page[data-project] #how-it-works .workflow-step {
  min-width: 0;
  background: var(--surface);
}

.detail-page[data-project="lala"] #how-it-works {
  --workflow-tone: #9e4775;
}

[data-project="lala"] #architecture .detail-figure {
  max-width: none;
}

.detail-page[data-project="cpynet"] #how-it-works {
  --workflow-tone: #28846f;
}

[data-project="cpynet"] .workflow-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: center;
  gap: clamp(14px, 2.5vw, 26px);
}

[data-project="cpynet"] .workflow-grid {
  grid-template-columns: 1fr;
}

[data-project="cpynet"] .workflow-content .detail-figure {
  margin: 0;
}

.detail-page[data-project="aysis"] #how-it-works {
  --workflow-tone: #bf811d;
}

[data-project="aysis"] #how-it-works .workflow-step {
  border-block-start: 3px solid color-mix(in srgb, var(--workflow-tone) 65%, var(--line));
}

.detail-page[data-project="certify"] #how-it-works {
  --workflow-tone: #027d91;
}

[data-project="certify"] .workflow-grid,
[data-project="llmtag"] .workflow-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

[data-project="certify"] #how-it-works .workflow-step,
[data-project="llmtag"] #how-it-works .workflow-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 4px 14px;
}

[data-project="certify"] .workflow-step p,
[data-project="llmtag"] .workflow-step p {
  grid-column: 2;
}

.detail-page[data-project="llmtag"] #how-it-works {
  --workflow-tone: #7563d2;
}

[data-project="llmtag"] .workflow-step h3 {
  font-family: var(--font-mono);
}

.detail-page[data-project="quizzz"] #how-it-works {
  --workflow-tone: #9066d9;
}

[data-project="quizzz"] #how-it-works .point-num {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  min-height: 32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--workflow-tone) 20%, var(--surface));
  color: var(--ink);
}

[data-project="cpynet-blog"] .publication-grid a {
  border-top: 3px solid color-mix(in srgb, #3489ae 55%, var(--line));
}

[data-project="happy-lines"] .install-questions > div {
  border-top: 3px solid color-mix(in srgb, #de8b47 56%, var(--line));
}

[data-project="ayaz-online"] .artist-platforms .hero-actions .btn {
  flex: 1 1 150px;
  justify-content: center;
}

@media (max-width: 640px) {
  .product-hero-lala .hero-actions,
  .happy-lines-detail .game-hero .hero-actions {
    grid-template-columns: 1fr;
  }

  [data-project="cpynet"] .workflow-content {
    grid-template-columns: 1fr;
  }
}

/* Imported blog and project archive */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(14px, 2.4vw, 24px);
  padding-block: 0 clamp(32px, 6vw, 64px);
  list-style: none;
}

.archive-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.archive-card:hover,
.archive-card:focus-visible {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.archive-card img,
.archive-cover {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  background: var(--surface-soft);
}

.archive-card > div {
  padding: clamp(15px, 2vw, 24px);
}

.archive-card h2 {
  margin: 0 0 8px;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.archive-card p:not(.archive-meta) {
  margin: 0;
  color: var(--ink-2);
}

.archive-meta {
  margin: 0 0 9px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.archive-entry {
  max-width: min(var(--container), 860px);
  padding-block: clamp(28px, 6vw, 70px);
}

.archive-entry-head {
  margin-bottom: clamp(20px, 4vw, 36px);
}

.archive-entry-head h1 {
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 5.5vw, 3.5rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.archive-entry-head .hero-actions {
  margin-top: 18px;
}

.archive-cover {
  margin-bottom: clamp(20px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.archive-prose {
  color: var(--ink-2);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.archive-prose :is(h2, h3, h4, h5, h6) {
  margin: 1.35em 0 0.4em;
  color: var(--ink);
}

.archive-prose ul,
.archive-prose ol {
  padding-inline-start: 1.5em;
}

.archive-prose .tag-row {
  padding-inline-start: 0;
}

.archive-prose a {
  color: var(--link);
  text-decoration: underline;
}

.archive-prose pre {
  overflow-x: auto;
  padding: 15px;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-wrap: normal;
}

.archive-prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.archive-prose hr {
  border: 0;
  border-top: 1px solid var(--line);
}

.archive-controls {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.archive-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.archive-fields label {
  display: grid;
  gap: 5px;
  min-width: 0;
  flex: 1 1 170px;
  color: var(--ink-2);
  font-size: 0.86rem;
  font-weight: 600;
}

.archive-fields label:first-child {
  flex-basis: 280px;
}

.archive-fields :is(input, select) {
  min-height: 46px;
  width: 100%;
  padding: 8px 12px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: max(1rem, 16px);
  font-weight: 400;
}

.archive-results {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}

.archive-results p {
  margin: 0;
  color: var(--ink-3);
}

.archive-contents {
  margin-bottom: clamp(24px, 4vw, 42px);
  padding: clamp(16px, 3vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.archive-contents h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.archive-contents ol {
  margin: 0;
  padding-inline-start: 1.35rem;
}

.archive-contents a {
  display: inline-block;
  padding-block: 4px;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.yt-player-fallback {
  padding: 12px 16px 16px;
}

.yt-player-fallback label {
  display: grid;
  gap: 6px;
  color: var(--ink-2);
  font-size: 0.875rem;
}

.yt-player-fallback input {
  min-width: 0;
  width: 100%;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
}

/* LALA detail: origin story, capabilities, A-to-Z strip and case study */
.lala-origin .detail-copy p { margin: 0 0 12px; }
.lala-capabilities { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.lala-steps {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  counter-reset: lala-step;
}
.lala-step {
  counter-increment: lala-step;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 0.88rem;
  color: var(--ink-2);
}
.lala-step-who { font-weight: 700; color: var(--ink); font-size: 0.8rem; letter-spacing: 0.02em; }
.lala-step-who::before { content: counter(lala-step) " · "; color: var(--ink-2); font-weight: 500; }
.lala-step[data-actor="you"] { border-color: var(--line-strong); background: var(--surface); }
.lala-case-stats {
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.lala-case-stats > div { min-width: 0; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.lala-case-stats dt { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); line-height: 1.15; }
.lala-case-stats dd { margin: 4px 0 0; font-size: 0.8rem; color: var(--ink-2); line-height: 1.4; }
@media (max-width: 900px) {
  .lala-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .lala-case-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Kavuk of lights: dark backdrop so the dots glow in both themes */
.lala-lights { position: relative; width: clamp(180px, 30vw, 340px); aspect-ratio: 1; }
.lala-lights .lala-kavuk { width: 100%; }
.lala-lights canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 25%; background: radial-gradient(circle at 50% 45%, #3a1228, #0b0508 75%); cursor: crosshair; touch-action: pan-y; }
.lala-lights.is-lit .lala-kavuk { opacity: 0; }
.lala-shots { display: grid; gap: 18px; }
.lala-shot { margin: 0; min-width: 0; }
.lala-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.lala-shot figcaption { margin-top: 8px; font-size: 0.85rem; color: var(--ink-2); }

/* YouTube (coming soon) */
.main-nav a { position: relative; }
.main-nav .nav-soon { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); }
.nav-soon { padding: 1px 6px; border-radius: 99px; background: #e5232b; color: #fff; font-size: 0.6rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.yt-page { padding-block: 40px; }
.yt-hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 36px; align-items: center; }
.yt-hero h1 { margin: 14px 0; }
.yt-hero > * { min-width: 0; }
.yt-screen, .yt-thumb { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; color: #fff; }
.yt-screen { border-radius: 20px; background: radial-gradient(circle at 30% 20%, #5a1520, #0c0809 70%); box-shadow: 0 24px 60px rgba(60, 10, 20, 0.28); }
.yt-play { display: grid; place-items: center; width: 64px; height: 44px; border-radius: 12px; background: #e5232b; font-size: 1rem; }
.yt-screen-label { position: absolute; left: 18px; bottom: 22px; font-size: 0.85rem; font-weight: 600; }
.yt-bar { position: absolute; left: 0; bottom: 0; height: 4px; width: 18%; background: #e5232b; }
.yt-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.yt-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface-soft); }
.yt-thumb { background: linear-gradient(135deg, #3a1228, #12070d); }
.yt-thumb[data-tone="2"] { background: linear-gradient(135deg, #123a4a, #07121a); }
.yt-thumb[data-tone="3"] { background: linear-gradient(135deg, #7a3a14, #1c0d05); }
.yt-thumb[data-tone="4"] { background: linear-gradient(135deg, #2c2458, #0d0a1c); }
.yt-thumb[data-tone="5"] { background: linear-gradient(135deg, #1d4429, #08140c); }
.yt-topic { position: absolute; left: 14px; bottom: 10px; font-weight: 700; font-size: 1.1rem; }
.yt-card-body { padding: 16px; }
.yt-card-body h3 { font-size: 1.02rem; margin: 6px 0; }
.yt-card-body p { font-size: 0.88rem; color: var(--ink-2); }
@media (max-width: 760px) { .yt-hero { grid-template-columns: 1fr; } }
.yt-hero .page-intro { margin-bottom: 20px; }
.status-dot { animation: status-pulse 1.6s ease-out infinite; }
@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.65); opacity: 1; }
  50% { opacity: 0.45; }
  100% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .status-dot { animation: none; } }
.home-motto { margin-block: 56px 72px; text-align: center; }
.home-motto blockquote { margin: 0 auto; max-width: 34ch; font-size: clamp(1.35rem, 3vw, 2rem); font-style: italic; line-height: 1.4; color: var(--ink); text-wrap: balance; }
.home-motto p { margin: 0; }
.home-motto figcaption { margin-top: 12px; font-size: 0.9rem; color: var(--ink-2); }
/* Section menu as dots on the right edge; phones keep the dropdown. */
@media (min-width: 761px) {
  .detail-page .detail-sections { position: fixed; z-index: 30; right: 8px; top: 50%; transform: translateY(-50%); margin: 0; border: 0; background: none; box-shadow: none; overflow: visible; backdrop-filter: none; }
  .detail-page .detail-sections ul { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: flex-end; gap: 0; padding: 0; margin: 0; overflow: visible; }
  .detail-page .detail-sections a { position: relative; display: flex; justify-content: center; align-items: center; width: 24px; min-height: 24px; padding: 0; background: none; border: 0; font-size: 0; }
  .detail-page .detail-sections a::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--ink-2); opacity: 0.4; transition: height 160ms ease, opacity 160ms ease; }
  .detail-page .detail-sections a:hover::before, .detail-page .detail-sections a:focus-visible::before { opacity: 1; }
  .detail-page .detail-sections a.is-current::before { height: 20px; opacity: 1; background: var(--ink); }
  .detail-page .detail-sections a > span { position: absolute; right: 30px; top: 50%; transform: translateY(-50%); padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-size: 0.8rem; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 140ms ease; }
  .detail-page .detail-sections a:hover > span, .detail-page .detail-sections a:focus-visible > span { opacity: 1; }
}
