/* ═══════════════════════════════════════
   Tiammomo Portfolio — Styles
   Refined Modern Dark Theme
   ═══════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --bg-base: #070b18;
  --bg-raised: #10182a;
  --bg-surface: #17213a;
  --bg-hover: #223153;

  --text-1: #f2f7ff;
  --text-2: #aab7d4;
  --text-3: #687799;

  --accent: #67e8f9;
  --accent-dim: rgba(103, 232, 249, 0.12);
  --accent-hover: #a5f3fc;
  --accent-warm: #fb7185;
  --accent-warm-dim: rgba(251, 113, 133, 0.13);

  --border: rgba(183, 213, 255, 0.08);
  --border-hover: rgba(103, 232, 249, 0.26);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);

  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 280ms;

  --max-w: 1240px;
  --work-w: 1520px;
  --gutter: 24px;

  color-scheme: dark;
  font-family: var(--font-sans);
  line-height: 1.6;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  background: var(--bg-base);
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.nav-lock {
  overflow: hidden;
}

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

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

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

ul {
  list-style: none;
}

h1, h2, h3, p {
  margin: 0;
}

.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;
}

/* ── Container ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ── Typography ── */
h1 {
  font-size: 3.7rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  font-size: 2.15rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

/* ── Section Shared ── */
.section-header {
  margin-bottom: 48px;
}

.section-header h2 {
  color: var(--text-1);
}

.section-tag {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(137, 160, 207, 0.16);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-2);
  background: rgba(137, 160, 207, 0.08);
}

.section-tag--light {
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.06);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--dur) var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-base);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 24px rgba(103, 232, 249, 0.28);
}

.btn-ghost {
  border: 1px solid var(--border-hover);
  color: var(--text-2);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.btn-lg {
  height: 52px;
  padding: 0 32px;
  font-size: 0.95rem;
}

/* ═══════════════════════════════════════
   Header
   ═══════════════════════════════════════ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 var(--gutter);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.header.is-scrolled {
  background: rgba(12, 12, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-1);
}

.header-brand-text {
  color: var(--text-1);
}

.header-brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-nav a {
  position: relative;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--dur) var(--ease);
}

.header-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform var(--dur) var(--ease);
}

.header-nav a:hover,
.header-nav a.is-active {
  color: var(--text-1);
}

.header-nav a:hover::after,
.header-nav a.is-active::after {
  transform: scaleX(1);
}

.header-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.header-nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: var(--text-1);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.header-nav-toggle[aria-expanded='true'] .header-nav-toggle-bar:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.header-nav-toggle[aria-expanded='true'] .header-nav-toggle-bar:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* ═══════════════════════════════════════
   Hero
   ═══════════════════════════════════════ */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 82vh;
  padding: 120px 0 80px;
  overflow: hidden;
  text-align: left;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, var(--work-w));
  max-width: var(--work-w);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-title {
  color: var(--text-1);
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-2);
  margin-bottom: 22px;
  max-width: 760px;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
}

.hero-highlights span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 999px;
  background: rgba(16, 24, 42, 0.58);
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

.hero-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  background-image:
    linear-gradient(90deg, rgba(7, 11, 24, 0.97) 0%, rgba(7, 11, 24, 0.76) 42%, rgba(7, 11, 24, 0.24) 100%),
    image-set(
      url("assets/images/generated/anime-portfolio-og.webp") type("image/webp"),
      url("assets/images/generated/anime-portfolio-og.png") type("image/png")
    );
  background-size: cover;
  background-position: center;
}

.hero-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.28;
}

/* ═══════════════════════════════════════
   Home Entry Paths
   ═══════════════════════════════════════ */
.home-paths {
  padding: 72px 0 36px;
}

.home-paths .container {
  max-width: var(--work-w);
}

.home-paths-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.home-paths-head h2 {
  margin-bottom: 0;
}

.home-paths-head p {
  max-width: 520px;
  color: var(--text-3);
  font-size: 0.9rem;
  line-height: 1.75;
}

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

.entry-card {
  position: relative;
  display: flex;
  min-height: 230px;
  flex-direction: column;
  overflow: hidden;
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(23, 33, 58, 0.78), rgba(16, 24, 42, 0.98)),
    var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.entry-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), rgba(251, 113, 133, 0.62));
  opacity: 0.72;
}

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

.entry-card-kicker {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
}

.entry-card h3 {
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
  font-size: 1.35rem;
}

.entry-card p {
  position: relative;
  z-index: 1;
  max-width: 620px;
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.75;
}

.entry-card-points {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.entry-card-points span {
  padding: 4px 10px;
  border: 1px solid rgba(103, 232, 249, 0.14);
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.06);
  color: var(--text-3);
  font-size: 0.75rem;
  font-weight: 700;
}

.entry-card-link {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 28px;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 700;
}

/* ═══════════════════════════════════════
   Stats
   ═══════════════════════════════════════ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: calc(100% - (2 * var(--gutter)));
  max-width: calc(var(--work-w) - (2 * var(--gutter)));
  margin: -40px auto 0;
  padding: 0;
  position: relative;
  z-index: 2;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.stats-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px 16px;
  background: var(--bg-raised);
  text-align: center;
}

.stats-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0;
}

.stats-label {
  font-size: 0.82rem;
  color: var(--text-3);
}

/* ═══════════════════════════════════════
   Work / Projects
   ═══════════════════════════════════════ */
.work {
  padding: 36px 0 120px;
}

.work .container {
  max-width: var(--work-w);
}

.work .section-header {
  margin-bottom: 32px;
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  height: 36px;
  padding: 0 16px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-3);
  background: transparent;
  border: 1px solid var(--border);
  transition: all var(--dur) var(--ease);
}

.filter-btn:hover {
  color: var(--text-2);
  border-color: var(--border-hover);
  background: var(--bg-surface);
}

.filter-btn.is-active {
  color: var(--bg-base);
  background: var(--accent);
  border-color: var(--accent);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md), 0 0 28px rgba(103, 232, 249, 0.08);
  transform: translateY(-2px);
}

.project-card.is-hidden {
  display: none;
}

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

.project-num {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0;
}

.project-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(137, 160, 207, 0.12);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text-2);
}

.project-card-media {
  margin: -4px -28px 22px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.project-card-media picture,
.project-card-media img {
  display: block;
  width: 100%;
  height: 100%;
}

.project-card-media img {
  object-fit: cover;
  object-position: top center;
  transition: transform var(--dur) var(--ease), filter var(--dur) var(--ease);
}

.project-card:hover .project-card-media img {
  transform: scale(1.03);
  filter: saturate(1.08);
}

.project-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-1);
}

.project-desc {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid rgba(137, 160, 207, 0.16);
  background: rgba(137, 160, 207, 0.1);
  color: var(--text-2);
  letter-spacing: 0;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 20px;
}

.project-meta span {
  font-size: 0.74rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 100px;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.project-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap var(--dur) var(--ease);
  gap: 4px;
}

.project-link:hover {
  gap: 8px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.project-link-muted {
  color: var(--text-3);
}

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

/* ═══════════════════════════════════════
   Directory Pages / Centers
   ═══════════════════════════════════════ */
.directory-page {
  background:
    radial-gradient(ellipse 80% 42% at 50% 0%, rgba(103, 232, 249, 0.06), transparent),
    var(--bg-base);
}

.projects-page {
  background:
    linear-gradient(180deg, rgba(103, 232, 249, 0.035), transparent 520px),
    radial-gradient(ellipse 70% 38% at 50% 0%, rgba(103, 232, 249, 0.08), transparent),
    var(--bg-base);
}

.wide-container {
  width: min(100%, 1600px);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.page-hero {
  padding: 136px 0 64px;
}

.page-hero--compact {
  padding-bottom: 48px;
}

.page-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: 48px;
  align-items: end;
}

.page-hero h1 {
  max-width: 880px;
  margin-bottom: 18px;
  font-size: 3rem;
}

.page-hero p {
  max-width: 720px;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.8;
}

.page-hero-proof,
.center-sidebar,
.proof-panel {
  background: rgba(16, 24, 42, 0.74);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.page-hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px;
}

.page-hero-proof span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.08);
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 700;
}

/* ═══════════════════════════════════════
   Portfolio Page Hero
   ═══════════════════════════════════════ */
.portfolio-page-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 560px;
  overflow: hidden;
  padding: 128px 0 80px;
  border-bottom: 1px solid rgba(103, 232, 249, 0.12);
  background-image:
    linear-gradient(90deg, rgba(7, 11, 24, 0.97) 0%, rgba(7, 11, 24, 0.78) 43%, rgba(7, 11, 24, 0.26) 100%),
    linear-gradient(180deg, rgba(7, 11, 24, 0.08) 0%, rgba(7, 11, 24, 0.74) 100%),
    image-set(
      url("assets/images/generated/anime-portfolio-og.webp") type("image/webp"),
      url("assets/images/generated/anime-portfolio-og.png") type("image/png")
    );
  background-position: center;
  background-size: cover;
}

.portfolio-page-hero::before,
.portfolio-page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.portfolio-page-hero::before {
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.24;
}

.portfolio-page-hero::after {
  background:
    radial-gradient(circle at 10% 34%, rgba(103, 232, 249, 0.1), transparent 26%),
    linear-gradient(180deg, transparent 64%, rgba(4, 9, 22, 0.94) 100%);
}

.portfolio-page-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, var(--work-w));
  max-width: 860px;
  min-height: 352px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.portfolio-page-hero h1 {
  max-width: 760px;
  margin: 0 0 20px;
  color: var(--text-1);
  font-size: clamp(2.25rem, 3.7vw, 3.7rem);
  line-height: 1.08;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.46), 0 0 22px rgba(218, 231, 255, 0.12);
}

.portfolio-page-hero p:not(.hero-label) {
  max-width: 760px;
  color: var(--text-2);
  font-size: 1.04rem;
  line-height: 1.82;
}

.portfolio-page-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.portfolio-page-hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 999px;
  background: rgba(16, 24, 42, 0.58);
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.portfolio-page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.project-center,
.capability-section,
.fit-section {
  padding: 0 0 112px;
}

.projects-page .project-center {
  padding: 40px 0 72px;
}

.project-center-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.projects-page .project-center-layout {
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
}

.center-sidebar,
.proof-panel {
  position: sticky;
  top: 88px;
  padding: 22px;
}

.projects-page .center-sidebar,
.projects-page .proof-panel {
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(23, 33, 58, 0.72), rgba(16, 24, 42, 0.98)),
    var(--bg-raised);
}

.project-rail {
  min-height: 430px;
}

.center-sidebar-title {
  display: block;
  margin-bottom: 16px;
  color: var(--text-1);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

.filters--vertical {
  flex-direction: column;
  align-items: stretch;
}

.filters--vertical .filter-btn {
  width: 100%;
  justify-content: flex-start;
  border-radius: var(--radius-sm);
}

.projects-page .filters--vertical {
  gap: 10px;
}

.projects-page .filters--vertical .filter-btn {
  height: 40px;
  padding: 0 12px;
}

.center-note {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.center-note strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text-1);
  font-size: 0.88rem;
}

.center-note p,
.proof-list {
  color: var(--text-3);
  font-size: 0.84rem;
  line-height: 1.75;
}

.maintenance-note ul {
  display: grid;
  gap: 8px;
  color: var(--text-3);
  font-size: 0.82rem;
  line-height: 1.7;
}

.maintenance-note li {
  position: relative;
  padding-left: 14px;
}

.maintenance-note li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.65;
}

.center-main {
  min-width: 0;
}

.section-header--tight {
  margin-bottom: 24px;
}

.project-board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(16, 24, 42, 0.72);
}

.project-board-head h2 {
  margin-bottom: 8px;
}

.project-board-head p {
  max-width: 680px;
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.7;
}

.project-board-head--index {
  margin-bottom: 18px;
}

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

.projects-page .project-grid--center .project-card {
  min-height: 100%;
  padding: 22px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(23, 33, 58, 0.82), rgba(16, 24, 42, 0.98)),
    var(--bg-raised);
}

.projects-page .project-grid--center .project-card-media {
  margin: -2px -22px 20px;
  border-top-color: rgba(103, 232, 249, 0.12);
  border-bottom-color: rgba(103, 232, 249, 0.12);
}

.projects-page .project-grid--center .project-name {
  font-size: 1.08rem;
}

.projects-page .project-grid--center .project-desc {
  display: -webkit-box;
  min-height: 74px;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* ═══════════════════════════════════════
   Writing / Notes
   ═══════════════════════════════════════ */
.writing-page {
  background:
    linear-gradient(180deg, rgba(103, 232, 249, 0.035), transparent 520px),
    radial-gradient(ellipse 72% 36% at 50% 0%, rgba(251, 113, 133, 0.055), transparent),
    var(--bg-base);
}

.writing-masthead {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  padding: 118px 0 0;
  border-bottom: 1px solid rgba(103, 232, 249, 0.12);
  background:
    linear-gradient(90deg, rgba(4, 9, 22, 0.96) 0%, rgba(5, 11, 25, 0.9) 34%, rgba(5, 11, 25, 0.34) 68%, rgba(5, 11, 25, 0.16) 100%),
    linear-gradient(180deg, rgba(4, 9, 22, 0.12), rgba(4, 9, 22, 0.66)),
    url('assets/images/writing/generated/writing-center-hero-fantasy.png') center / cover no-repeat;
}

.writing-masthead::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 9% 36%, rgba(103, 232, 249, 0.08), transparent 24%),
    linear-gradient(180deg, transparent 62%, rgba(4, 9, 22, 0.94) 100%);
}

.writing-masthead-inner {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  min-height: 312px;
  gap: 16px;
  padding-bottom: 48px;
}

.writing-masthead .section-tag {
  display: none;
}

.writing-masthead h1 {
  max-width: 520px;
  margin: 0 0 14px;
  font-family: Georgia, 'Times New Roman', 'Noto Serif SC', serif;
  font-size: clamp(3.2rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.02;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.46), 0 0 22px rgba(218, 231, 255, 0.12);
}

.writing-masthead p {
  max-width: 600px;
  color: var(--text-2);
  font-size: 1.03rem;
  line-height: 1.8;
}

.writing-signal-strip {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  max-width: 430px;
  padding-top: 24px;
  border-top: 0;
  color: var(--text-3);
}

.writing-signal-strip::before,
.writing-signal-strip::after {
  content: '';
  position: absolute;
  top: 9px;
  background: rgba(103, 232, 249, 0.42);
}

.writing-signal-strip::before {
  left: 0;
  width: 238px;
  height: 1px;
  box-shadow: 0 0 14px rgba(103, 232, 249, 0.24);
}

.writing-signal-strip::after {
  left: 250px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(103, 232, 249, 0.78);
  background: rgba(4, 9, 22, 0.7);
  transform: rotate(45deg);
  box-shadow: 0 0 16px rgba(103, 232, 249, 0.36);
}

.writing-signal-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 0.78rem;
  font-weight: 800;
}

.writing-signal-strip span + span::before {
  content: '·';
  margin: 0 9px;
  color: rgba(103, 232, 249, 0.75);
}

/* ═══════════════════════════════════════
   Component Map
   ═══════════════════════════════════════ */
.components-page {
  background:
    linear-gradient(180deg, rgba(103, 232, 249, 0.045), transparent 500px),
    radial-gradient(ellipse 70% 34% at 54% 0%, rgba(251, 113, 133, 0.05), transparent),
    var(--bg-base);
}

.components-hero {
  padding: 112px 0 40px;
}

.components-hero-card {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.components-hero-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.components-hero-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(4, 9, 22, 0.92) 0%, rgba(6, 12, 28, 0.74) 34%, rgba(6, 12, 28, 0.18) 70%),
    linear-gradient(180deg, rgba(4, 9, 22, 0.18), rgba(4, 9, 22, 0.34));
}

.components-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: inherit;
  max-width: 780px;
  flex-direction: column;
  justify-content: center;
  padding: 58px;
}

.components-hero-content h1 {
  max-width: 720px;
  margin: 14px 0 18px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1.05;
}

.components-hero-content p {
  max-width: 680px;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.85;
}

.components-hero-proof {
  max-width: 640px;
  margin-top: 30px;
  background: rgba(16, 24, 42, 0.6);
  backdrop-filter: blur(12px);
}

.components-board {
  padding: 32px 0 112px;
}

.component-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(23, 33, 58, 0.78), rgba(16, 24, 42, 0.96)),
    var(--bg-raised);
}

.component-rail a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(103, 232, 249, 0.12);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 800;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.component-rail a:hover {
  border-color: rgba(103, 232, 249, 0.26);
  background: rgba(103, 232, 249, 0.08);
  color: var(--accent);
}

.component-layer {
  scroll-margin-top: 96px;
  margin-top: 24px;
}

.component-layer-head {
  margin-bottom: 16px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(103, 232, 249, 0.08), transparent 42%),
    rgba(16, 24, 42, 0.72);
}

.component-layer-head h2 {
  margin: 8px 0;
  color: var(--text-1);
  font-size: 1.36rem;
}

.component-layer-head p {
  max-width: 820px;
  color: var(--text-3);
  font-size: 0.9rem;
  line-height: 1.75;
}

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

.component-card {
  display: grid;
  gap: 10px;
  min-height: 240px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(23, 33, 58, 0.78), rgba(16, 24, 42, 0.96)),
    var(--bg-raised);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.component-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm), 0 0 24px rgba(103, 232, 249, 0.08);
  transform: translateY(-2px);
}

.component-card--featured {
  border-color: rgba(103, 232, 249, 0.3);
  background:
    radial-gradient(circle at 92% 10%, rgba(103, 232, 249, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(23, 43, 70, 0.84), rgba(16, 24, 42, 0.96)),
    var(--bg-raised);
}

.component-card span {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
}

.component-card h3 {
  color: var(--text-1);
  font-size: 1.08rem;
}

.component-card p {
  color: var(--text-2);
  font-size: 0.84rem;
  line-height: 1.72;
}

.component-card strong {
  display: block;
  color: var(--text-3);
  font-size: 0.78rem;
  line-height: 1.65;
}

.component-card a {
  align-self: end;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
}

.component-taxonomy {
  display: grid;
  grid-template-columns: 190px repeat(6, minmax(148px, 1fr));
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(18, 29, 50, 0.86), rgba(9, 15, 30, 0.98)),
    var(--bg-raised);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.component-taxonomy-title,
.component-taxonomy a {
  min-height: 76px;
  border-right: 1px solid rgba(137, 160, 207, 0.12);
}

.component-taxonomy-title {
  display: flex;
  align-items: center;
  padding: 0 24px;
  color: var(--text-3);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
}

.component-taxonomy a {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 1px 12px;
  padding: 0 18px;
  color: var(--text-2);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.component-taxonomy a:last-child {
  border-right: 0;
}

.component-taxonomy a:hover {
  background: rgba(103, 232, 249, 0.06);
  color: var(--text-1);
}

.component-taxonomy-icon {
  display: inline-grid;
  grid-row: 1 / span 2;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(137, 160, 207, 0.18);
  border-radius: 999px;
  background: rgba(137, 160, 207, 0.08);
  color: var(--text-2);
  font-size: 0.72rem;
  font-weight: 900;
}

.component-taxonomy small {
  display: none;
}

.component-taxonomy strong {
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--text-1);
  font-size: 0.82rem;
  line-height: 1.25;
}

.component-map-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.component-sidebar {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 24px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(22, 34, 58, 0.86), rgba(12, 20, 38, 0.98)),
    var(--bg-raised);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.component-sidebar h2 {
  margin-bottom: 14px;
  color: var(--text-1);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.component-sidebar-nav {
  display: grid;
  gap: 6px;
}

.component-sidebar-nav a,
.component-sidebar-links a {
  display: flex;
  align-items: center;
  min-height: 38px;
  border-radius: 6px;
  color: var(--text-3);
  font-size: 0.78rem;
  font-weight: 800;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.component-sidebar-nav a {
  gap: 8px;
  padding: 0 12px;
}

.component-sidebar-nav a:hover,
.component-sidebar-links a:hover {
  background: rgba(103, 232, 249, 0.08);
  color: var(--accent);
  transform: translateX(2px);
}

.component-sidebar-nav span {
  color: var(--text-3);
  font-size: 0.68rem;
}

.component-sidebar-links {
  padding-top: 18px;
  border-top: 1px solid rgba(137, 160, 207, 0.12);
}

.component-sidebar-links a {
  justify-content: space-between;
  min-height: 30px;
}

.component-sidebar-links a::after {
  content: '›';
  color: var(--text-3);
}

.component-main {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 100% 0%, rgba(103, 232, 249, 0.07), transparent 24%),
    linear-gradient(180deg, rgba(13, 22, 40, 0.9), rgba(8, 13, 28, 0.98));
}

.component-main .component-layer {
  margin-top: 0;
  padding: 20px 24px 26px;
  border-bottom: 1px solid rgba(137, 160, 207, 0.1);
}

.component-main .component-layer:last-child {
  border-bottom: 0;
}

.component-layer-head.component-layer-head--row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.component-layer-head--row div {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.component-layer-head--row span {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.component-layer-head.component-layer-head--row h2 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.2;
}

.component-layer-head.component-layer-head--row p {
  max-width: 680px;
  margin: 0;
  color: var(--text-3);
  font-size: 0.78rem;
  line-height: 1.6;
  text-align: right;
}

.component-grid.component-grid--dense {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.component-mini-card {
  position: relative;
  display: block;
  min-height: 112px;
  padding: 15px 16px;
  border: 1px solid rgba(137, 160, 207, 0.13);
  border-radius: 8px;
  background: rgba(16, 24, 42, 0.92);
  color: var(--text-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}

.component-mini-card::after {
  content: '官网 ↗';
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 900;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.component-mini-card:hover {
  border-color: rgba(103, 232, 249, 0.26);
  background: rgba(18, 28, 49, 0.96);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.component-mini-card:hover::after {
  opacity: 0.9;
  transform: translateY(0);
}

.component-mini-card--featured {
  border-color: rgba(103, 232, 249, 0.24);
  background: rgba(16, 31, 50, 0.96);
}

.component-mini-card h3 {
  margin: 0 0 4px;
  color: var(--text-1);
  font-size: 0.88rem;
  line-height: 1.25;
}

.component-mini-card p {
  margin: 0;
  color: var(--text-3);
  font-size: 0.74rem;
  line-height: 1.45;
}

.component-mini-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 10px;
  color: var(--text-3);
  font-size: 0.68rem;
  line-height: 1.2;
}

.component-mini-meta b {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 7px;
  border: 1px solid rgba(103, 232, 249, 0.12);
  border-radius: 5px;
  background: rgba(103, 232, 249, 0.06);
  color: var(--text-2);
  font-weight: 800;
}

.component-mini-meta i {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-2);
  font-style: normal;
  font-weight: 800;
}

.component-mini-meta i::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.72);
}

.component-decision {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(17, 27, 48, 0.92), rgba(10, 16, 31, 0.98)),
    var(--bg-raised);
}

.component-decision-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.component-decision-head h2 {
  max-width: 620px;
  color: var(--text-2);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.6;
  text-align: right;
}

.component-decision-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 28px;
}

.component-decision-flow article {
  position: relative;
  min-height: 84px;
  padding: 14px 14px 14px 50px;
  border: 1px solid rgba(137, 160, 207, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(27, 42, 70, 0.82), rgba(14, 22, 40, 0.96)),
    rgba(16, 24, 42, 0.92);
}

.component-decision-flow article::after {
  content: '→';
  position: absolute;
  top: 50%;
  right: -22px;
  color: var(--accent);
  font-weight: 900;
  transform: translateY(-50%);
}

.component-decision-flow article:last-child::after {
  content: none;
}

.component-decision-flow span {
  position: absolute;
  top: 14px;
  left: 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
}

.component-decision-flow h3 {
  margin: 0 0 4px;
  color: var(--text-1);
  font-size: 0.78rem;
  line-height: 1.35;
}

.component-decision-flow p {
  margin: 0;
  color: var(--text-3);
  font-size: 0.7rem;
  line-height: 1.45;
}

@media (max-width: 1480px) {
  .component-grid.component-grid--dense {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .component-decision-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .component-decision-flow article:nth-child(3)::after {
    content: none;
  }
}

@media (max-width: 1180px) {
  .component-taxonomy {
    display: flex;
    overflow-x: auto;
  }

  .component-taxonomy-title,
  .component-taxonomy a {
    min-width: 190px;
  }

  .component-map-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .component-grid.component-grid--dense {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .component-map-layout {
    grid-template-columns: 1fr;
  }

  .component-sidebar {
    position: static;
  }

  .component-layer-head.component-layer-head--row {
    display: grid;
    align-items: start;
  }

  .component-layer-head.component-layer-head--row p {
    max-width: none;
    text-align: left;
  }

  .component-decision-flow {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .component-decision-flow article::after {
    content: none;
  }
}

@media (max-width: 640px) {
  .component-taxonomy-title,
  .component-taxonomy a {
    min-width: 172px;
  }

  .component-main .component-layer {
    padding: 18px;
  }

  .component-grid.component-grid--dense {
    grid-template-columns: 1fr;
  }

  .component-decision-head {
    display: grid;
  }

  .component-decision-head h2 {
    text-align: left;
  }
}

.writing-board {
  padding: 0 0 112px;
}

.writing-topic-rail,
.writing-index {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(23, 33, 58, 0.78), rgba(16, 24, 42, 0.96)),
    var(--bg-raised);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.writing-topic-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 2;
  margin-top: -32px;
  margin-bottom: 20px;
  padding: 12px;
  backdrop-filter: blur(18px);
}

.writing-topic-rail a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 800;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.writing-topic-rail a:hover,
.writing-topic-rail a.is-active {
  border-color: rgba(103, 232, 249, 0.22);
  background: rgba(103, 232, 249, 0.08);
  color: var(--accent);
}

.writing-topic-rail span {
  color: var(--text-3);
  font-size: 0.74rem;
}

.visual-notes {
  margin-top: 18px;
  scroll-margin-top: 96px;
}

.visual-notes-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(16, 24, 42, 0.72);
}

.visual-notes-head h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.visual-notes-head p {
  color: var(--text-3);
  font-size: 0.86rem;
  line-height: 1.7;
}

.visual-note-chapter-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.visual-note-chapter-nav a {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(23, 33, 58, 0.82), rgba(16, 24, 42, 0.94)),
    var(--bg-raised);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.visual-note-chapter-nav a:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm), 0 0 24px rgba(103, 232, 249, 0.08);
  transform: translateY(-2px);
}

.visual-note-chapter-nav span,
.visual-note-chapter-nav em {
  color: var(--accent);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.visual-note-chapter-nav strong {
  color: var(--text-1);
  font-size: 1.02rem;
}

.visual-topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.visual-topic-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 14px;
  min-height: 340px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(23, 33, 58, 0.82), rgba(16, 24, 42, 0.96)),
    var(--bg-raised);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.visual-topic-card:hover,
.visual-topic-card.is-active {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm), 0 0 24px rgba(103, 232, 249, 0.08);
}

.visual-topic-card:hover {
  transform: translateY(-2px);
}

.visual-topic-card h3 {
  margin: 8px 0 10px;
  color: var(--text-1);
  font-size: 1.12rem;
}

.visual-topic-card p {
  color: var(--text-2);
  font-size: 0.84rem;
  line-height: 1.7;
}

.visual-topic-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.visual-topic-card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(103, 232, 249, 0.14);
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.06);
  color: var(--text-3);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.visual-topic-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  height: 108px;
}

.visual-topic-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(103, 232, 249, 0.14);
  border-radius: 8px;
  background: #f8fbff;
}

.visual-topic-card em {
  color: var(--accent);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
}

.visual-topic-grid--compact {
  margin-bottom: 28px;
}

.visual-topic-grid--compact .visual-topic-card {
  min-height: 280px;
}

.visual-topic-grid--compact .visual-topic-preview {
  height: 78px;
}

.visual-note-chapters {
  display: grid;
  gap: 34px;
}

.visual-note-chapter {
  scroll-margin-top: 96px;
}

.visual-note-chapter-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: end;
  margin-bottom: 16px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(103, 232, 249, 0.08), transparent 42%),
    rgba(16, 24, 42, 0.72);
}

.visual-note-chapter-head h3 {
  margin-bottom: 8px;
  color: var(--text-1);
  font-size: 1.38rem;
}

.visual-note-chapter-head p {
  max-width: 860px;
  color: var(--text-3);
  font-size: 0.9rem;
  line-height: 1.75;
}

.visual-note-chapter-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 420px;
}

.visual-note-chapter-meta strong,
.visual-note-chapter-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.07);
  color: var(--text-2);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.visual-note-chapter-meta strong {
  border-color: rgba(103, 232, 249, 0.42);
  color: var(--accent);
}

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

.visual-note-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(23, 33, 58, 0.78), rgba(16, 24, 42, 0.96)),
    var(--bg-raised);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.visual-note-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md), 0 0 28px rgba(103, 232, 249, 0.08);
  transform: translateY(-2px);
}

.visual-note-card figure {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 50% 20%, rgba(103, 232, 249, 0.14), transparent 34%),
    #f8fbff;
}

.visual-note-poster {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.visual-note-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.visual-note-body {
  padding: 22px;
}

.visual-note-body h3 {
  margin-bottom: 10px;
  color: var(--text-1);
  font-size: 1.08rem;
}

.visual-note-body p {
  margin-bottom: 16px;
  color: var(--text-2);
  font-size: 0.88rem;
  line-height: 1.75;
}

.visual-note-article-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.06);
  color: var(--text-3);
  font-size: 0.74rem;
  font-weight: 900;
}

.writing-index {
  margin-top: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 99% 0%, rgba(103, 232, 249, 0.08), transparent 18%),
    linear-gradient(180deg, rgba(10, 21, 39, 0.88), rgba(8, 15, 29, 0.96)),
    var(--bg-raised);
}

.writing-index-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px 10px;
  border-bottom: 1px solid rgba(137, 160, 207, 0.12);
}

.writing-index-head h2 {
  color: var(--text-1);
  font-size: 1.08rem;
}

.writing-index-head span {
  color: var(--text-3);
  font-size: 0.82rem;
  font-weight: 800;
}

.writing-table {
  display: grid;
}

.writing-table-head {
  display: grid;
  grid-template-columns: 150px 150px 92px minmax(0, 1fr) 110px 24px;
  gap: 16px;
  align-items: center;
  min-height: 36px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(137, 160, 207, 0.12);
  background: rgba(20, 32, 56, 0.72);
  color: var(--text-3);
  font-size: 0.68rem;
  font-weight: 900;
}

.writing-table-head span,
.writing-row > .writing-pill,
.writing-row > .writing-project,
.writing-row > .writing-status,
.writing-row > time,
.writing-row > .writing-row-arrow {
  justify-self: center;
  text-align: center;
}

.writing-table-head span:nth-child(4),
.writing-row-main {
  justify-self: stretch;
  text-align: left;
}

.writing-row {
  display: grid;
  grid-template-columns: 150px 150px 92px minmax(0, 1fr) 110px 24px;
  gap: 16px;
  align-items: center;
  min-height: 66px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(137, 160, 207, 0.085);
  scroll-margin-top: 96px;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.writing-row:last-child {
  border-bottom: 0;
}

.writing-row:hover {
  background:
    linear-gradient(90deg, rgba(103, 232, 249, 0.07), rgba(103, 232, 249, 0.018)),
    rgba(103, 232, 249, 0.025);
  box-shadow: inset 2px 0 0 rgba(103, 232, 249, 0.58);
  transform: translateX(1px);
}

.writing-row h3 {
  margin-bottom: 3px;
  color: var(--text-1);
  font-size: 0.86rem;
}

.writing-row p {
  max-width: 780px;
  color: var(--text-3);
  font-size: 0.72rem;
  line-height: 1.5;
}

.writing-row-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 900;
}

.writing-pill,
.writing-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.writing-pill {
  width: fit-content;
}

.writing-index-head h2::before,
.writing-index-head h2::after,
.writing-pill::before {
  content: none;
  display: none;
}

.writing-pill--engineering {
  color: #f6d28b;
  background: rgba(146, 90, 24, 0.32);
}

.writing-pill--retro {
  color: #9bd8ce;
  background: rgba(34, 105, 96, 0.32);
}

.writing-pill--data {
  color: #a8d7b0;
  background: rgba(56, 111, 65, 0.3);
}

.writing-pill--agent {
  color: #c7b9ee;
  background: rgba(91, 73, 139, 0.34);
}

.writing-pill--hackathon {
  color: #e9b0b8;
  background: rgba(128, 61, 72, 0.34);
}

.writing-project {
  color: var(--text-2);
  font-size: 0.76rem;
  font-weight: 800;
}

.writing-status {
  color: var(--text-2);
  background: rgba(137, 160, 207, 0.14);
}

.writing-status--progress {
  color: #b8c9ea;
  background: rgba(74, 102, 152, 0.34);
}

.writing-status--draft {
  color: #d7c6a2;
  background: rgba(112, 88, 43, 0.34);
}

.writing-status--idea {
  color: #c7bfd8;
  background: rgba(85, 76, 106, 0.36);
}

.writing-row time {
  color: var(--text-3);
  font-size: 0.74rem;
  font-weight: 800;
}

.writing-row-arrow {
  color: var(--text-3);
  font-size: 1.35rem;
  line-height: 1;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.writing-row:hover .writing-row-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

.archive-section {
  padding-top: 56px;
}

.projects-page .project-index-section {
  padding: 0 0 112px;
}

.projects-page .project-index-section--inline {
  padding: 0;
  margin-bottom: 22px;
}

.archive-table {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--border);
}

.projects-page .project-index-table {
  border-radius: var(--radius-md);
}

.archive-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.78fr 1.5fr 0.48fr;
  gap: 16px;
  align-items: center;
  min-height: 58px;
  padding: 14px 18px;
  background: rgba(16, 24, 42, 0.96);
  color: var(--text-2);
  font-size: 0.84rem;
}

.archive-row.is-hidden {
  display: none;
}

.archive-row--head {
  min-height: 48px;
  background: rgba(23, 33, 58, 0.96);
  color: var(--text-3);
  font-size: 0.72rem;
  font-weight: 800;
}

.archive-row strong {
  color: var(--text-1);
}

.archive-row a {
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}

.proof-list li {
  position: relative;
  padding-left: 16px;
}

.proof-list li + li {
  margin-top: 10px;
}

.proof-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.72;
}

.capability-card {
  scroll-margin-top: 96px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(16, 24, 42, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.capability-card h3 {
  margin-bottom: 10px;
  color: var(--text-1);
}

.capability-card p {
  color: var(--text-2);
  font-size: 0.88rem;
  line-height: 1.75;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.capability-card span {
  display: inline-flex;
  margin-top: 18px;
  padding: 4px 10px;
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

/* ═══════════════════════════════════════
   Now / Lab
   ═══════════════════════════════════════ */
.now {
  padding: 0 0 120px;
}

.now .section-header {
  align-items: flex-start;
  padding-top: 32px;
  margin-bottom: 32px;
  border-top: 1px solid var(--border);
}

.now .section-header > div {
  max-width: 640px;
}

.section-note {
  max-width: 500px;
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.75;
  padding-top: 8px;
}

.now-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  counter-reset: now-card;
}

.now-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px 22px;
  min-height: 184px;
  padding: 28px 30px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(103, 232, 249, 0.12), rgba(103, 232, 249, 0) 42%),
    linear-gradient(180deg, rgba(23, 33, 58, 0.96), rgba(16, 24, 42, 0.99)),
    var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  counter-increment: now-card;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.now-card::before {
  content: "0" counter(now-card);
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(103, 232, 249, 0.2);
  border-radius: var(--radius-sm);
  background: rgba(103, 232, 249, 0.08);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.now-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(251, 113, 133, 0.72), transparent 72%);
  opacity: 0.68;
}

.now-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md), 0 0 26px rgba(103, 232, 249, 0.08);
  transform: translateY(-2px);
}

.now-card-kicker {
  grid-column: 2;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 2px;
}

.now-card h3 {
  grid-column: 2;
  font-size: 1.14rem;
  line-height: 1.45;
}

.now-card p {
  grid-column: 2;
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.75;
  max-width: 680px;
}

/* ═══════════════════════════════════════
   Process
   ═══════════════════════════════════════ */
.process {
  padding: 0 0 120px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.process-card {
  padding: 32px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--dur) var(--ease);
}

.process-card:hover {
  border-color: var(--border-hover);
}

.process-step {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: 0;
}

.process-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-1);
}

.process-card p {
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-2);
}

/* ═══════════════════════════════════════
   Contact
   ═══════════════════════════════════════ */
.contact {
  padding: 0 0 120px;
}

.contact .container,
body:not(.directory-page):not(.case-page):not(.error-page) .footer .container {
  max-width: var(--work-w);
}

.directory-page .footer .container {
  max-width: 1600px;
}

.contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: 56px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.contact-inner h2 {
  margin-bottom: 8px;
}

.contact-desc {
  font-size: 0.95rem;
  color: var(--text-2);
}

.contact-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════
   Footer
   ═══════════════════════════════════════ */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

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

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-3);
}

.footer-top {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-3);
  transition: color var(--dur) var(--ease);
}

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

/* ═══════════════════════════════════════
   Case Study Pages
   ═══════════════════════════════════════ */
/* ═══════════════════════════════════════
   Case Study Pages — Refined Design
   ═══════════════════════════════════════ */
.case-page {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(103, 232, 249, 0.06), transparent),
    var(--bg-base);
}

/* ── Top Bar ── */
.case-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.case-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-1);
  transition: opacity var(--dur) var(--ease);
}

.case-header-brand:hover {
  opacity: 0.8;
}

.case-header-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}

.case-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.case-nav a {
  color: var(--text-2);
  font-size: 0.88rem;
  font-weight: 600;
  transition: color var(--dur) var(--ease);
}

.case-nav a:hover {
  color: var(--accent);
}

.case-nav-gh {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 16px;
  border-radius: 100px;
  border: 1px solid var(--border-hover);
  color: var(--text-2);
  font-size: 0.84rem;
  font-weight: 600;
  transition: all var(--dur) var(--ease);
}

.case-nav-gh:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ── Hero ── */
.case-hero {
  padding: 80px 0 72px;
}

.case-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: center;
}

.case-hero-text .section-tag {
  margin-bottom: 20px;
}

.case-hero-text h1 {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
}

.case-hero-lead {
  color: var(--text-2);
  font-size: 1.08rem;
  line-height: 1.85;
  margin-bottom: 24px;
  max-width: 560px;
}

.case-hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 620px;
  margin: 0 0 30px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--border);
}

.case-hero-facts div {
  min-width: 0;
  padding: 14px 16px;
  background: rgba(16, 24, 42, 0.94);
}

.case-hero-facts dt {
  margin-bottom: 5px;
  color: var(--text-3);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-hero-facts dd {
  margin: 0;
  color: var(--text-1);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.45;
}

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

.case-hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-hover);
  box-shadow:
    0 0 80px rgba(103, 232, 249, 0.08),
    0 8px 40px rgba(0, 0, 0, 0.4);
  background: var(--bg-surface);
}

.case-hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(103, 232, 249, 0.12), transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(251, 113, 133, 0.06), transparent 50%);
}

.case-hero-visual picture,
.case-hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 0;
}

/* ── Section ── */
.case-section {
  padding: 0 0 88px;
}

/* ── Duo Cards (Problem/Role, Use-cases/Non-goals) ── */
.case-duo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.case-duo-card {
  position: relative;
  padding: 40px;
  background:
    linear-gradient(180deg, rgba(23, 33, 58, 0.64), rgba(16, 24, 42, 0.96)),
    var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.case-duo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(251, 113, 133, 0.72), transparent 72%);
  opacity: 0.68;
}

.case-duo-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(103, 232, 249, 0.06);
}

.case-duo-card--good::before {
  background: linear-gradient(90deg, #22c55e, var(--accent), transparent 72%);
}

.case-duo-card--bad::before {
  background: linear-gradient(90deg, var(--accent-warm), rgba(251, 113, 133, 0.4), transparent 72%);
}

.case-duo-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 20px;
}

.case-duo-card--good .case-duo-icon {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.case-duo-card--bad .case-duo-icon {
  background: rgba(251, 113, 133, 0.12);
  color: var(--accent-warm);
}

.case-duo-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.case-duo-card--good .case-duo-kicker {
  color: #22c55e;
}

.case-duo-card--bad .case-duo-kicker {
  color: var(--accent-warm);
}

.case-duo-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}

.case-duo-card p {
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.8;
}

.case-duo-card code {
  border: 1px solid rgba(99, 232, 255, 0.18);
  border-radius: 6px;
  background: rgba(99, 232, 255, 0.08);
  color: var(--accent);
  font-size: 0.86em;
  padding: 2px 6px;
}

.case-duo-card .case-list {
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.82;
  list-style: none;
  padding: 0;
}

.case-duo-card .case-list li {
  position: relative;
  padding-left: 20px;
  margin-top: 10px;
}

.case-duo-card .case-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}

.case-duo-card--good .case-list li::before {
  background: #22c55e;
}

.case-duo-card--bad .case-list li::before {
  background: var(--accent-warm);
}

/* ── Screenshots ── */
.case-screenshots {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  gap: 20px;
}

.case-ss--hero {
  grid-row: span 2;
}

.case-ss {
  margin: 0;
}

.case-ss-frame {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  box-shadow: var(--shadow-md);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.case-ss:hover .case-ss-frame {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg), 0 0 28px rgba(103, 232, 249, 0.08);
}

.case-ss-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.case-ss figcaption {
  padding: 16px 4px 0;
}

.case-ss strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-1);
  margin-bottom: 4px;
}

.case-ss span {
  color: var(--text-3);
  font-size: 0.84rem;
  line-height: 1.6;
}

.case-evidence-note {
  max-width: 820px;
  margin: 26px auto 0;
  padding-left: 18px;
  border-left: 2px solid rgba(103, 232, 249, 0.45);
  color: var(--text-3);
  font-size: 0.82rem;
  line-height: 1.7;
}

/* ── Capabilities Grid ── */
.case-cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.case-cap-item {
  display: flex;
  gap: 18px;
  padding: 28px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.case-cap-item:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 24px rgba(103, 232, 249, 0.05);
  transform: translateY(-1px);
}

.case-cap-num {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(103, 232, 249, 0.2);
  background: rgba(103, 232, 249, 0.08);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.case-cap-item h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-1);
}

.case-cap-item p {
  color: var(--text-3);
  font-size: 0.84rem;
  line-height: 1.65;
}

.case-cap-item code {
  border: 1px solid rgba(99, 232, 255, 0.16);
  border-radius: 5px;
  background: rgba(99, 232, 255, 0.07);
  color: var(--accent);
  font-size: 0.82em;
  padding: 1px 5px;
}

/* ── Architecture Flow ── */
.case-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
  padding-top: 48px;
}

#architecture {
  scroll-margin-top: 24px;
}

.case-flow-track {
  position: absolute;
  top: 68px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), rgba(251, 113, 133, 0.56), var(--accent));
  opacity: 0.35;
}

.case-flow-step {
  position: relative;
  padding: 0 16px;
  text-align: center;
}

.case-flow-num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(103, 232, 249, 0.26);
  background: var(--bg-raised);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(103, 232, 249, 0.12);
}

.case-flow-step h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-1);
}

.case-flow-step p {
  color: var(--text-3);
  font-size: 0.84rem;
  line-height: 1.65;
}

/* ── Roadmap ── */
.case-roadmap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.case-roadmap-item {
  display: flex;
  gap: 20px;
  padding: 32px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.case-roadmap-item:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 24px rgba(103, 232, 249, 0.05);
  transform: translateY(-1px);
}

.case-roadmap-marker {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(103, 232, 249, 0.2);
  color: var(--accent);
  font-size: 0.8rem;
  margin-top: 2px;
}

.case-roadmap-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-1);
}

.case-roadmap-item p {
  color: var(--text-3);
  font-size: 0.86rem;
  line-height: 1.7;
}

/* ── Shared List ── */
.case-list {
  list-style: none;
  padding: 0;
}

.case-list li + li {
  margin-top: 10px;
}

/* ── Footer ── */
.case-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.case-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.case-footer-inner a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-3);
  transition: color var(--dur) var(--ease);
}

.case-footer-inner a:hover {
  color: var(--accent);
}

/* ═══════════════════════════════════════
   Error Page
   ═══════════════════════════════════════ */
.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(7, 11, 24, 0.98), rgba(7, 11, 24, 0.7)),
    image-set(
      url("assets/images/generated/anime-portfolio-og.webp") type("image/webp"),
      url("assets/images/generated/anime-portfolio-og.png") type("image/png")
    );
  background-size: cover;
  background-position: center;
}

.error-shell {
  width: min(100% - 32px, 680px);
  padding: 48px;
  background: rgba(18, 18, 30, 0.86);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
}

.error-shell h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.error-shell p {
  color: var(--text-2);
  margin-bottom: 28px;
}

@media (max-width: 1200px) {
  .project-center-layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .proof-panel {
    position: static;
    grid-column: 2;
  }

  .project-grid--center {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .writing-table-head,
  .writing-row {
    grid-template-columns: 128px 120px 84px minmax(0, 1fr) 92px 20px;
    gap: 12px;
  }

  .visual-note-chapter-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .visual-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .visual-note-chapter-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .visual-note-chapter-meta {
    justify-content: flex-start;
    max-width: none;
  }

  .visual-note-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ═══════════════════════════════════════
   Responsive — Tablet
   ═══════════════════════════════════════ */
@media (max-width: 960px) {
  .header-nav-toggle {
    display: flex;
  }

  .header-nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    background: rgba(12, 12, 20, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
  }

  .header.nav-open .header-nav {
    opacity: 1;
    visibility: visible;
  }

  .header-nav a {
    font-size: 1.5rem;
    font-weight: 600;
  }

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

  .entry-grid,
  .capability-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-hero-inner,
  .project-center-layout {
    grid-template-columns: 1fr;
  }

  .portfolio-page-hero {
    min-height: 500px;
    padding: 116px 0 66px;
    background-position: 58% center;
  }

  .portfolio-page-hero-inner {
    min-height: 318px;
  }

  .portfolio-page-hero p:not(.hero-label) {
    max-width: 680px;
  }

  .home-paths-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .projects-page .project-center-layout {
    grid-template-columns: 1fr;
  }

  .project-rail {
    min-height: 0;
  }

  .center-sidebar,
  .proof-panel {
    position: static;
  }

  .proof-panel {
    grid-column: auto;
  }

  .filters--vertical {
    flex-direction: row;
  }

  .filters--vertical .filter-btn {
    width: auto;
  }

  .visual-note-grid {
    grid-template-columns: 1fr;
  }

  .writing-table-head {
    display: none;
  }

  .writing-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    align-items: start;
    min-height: 0;
    padding: 18px;
  }

  .writing-row-main {
    order: -1;
    grid-column: 1 / -1;
  }

  .writing-pill,
  .writing-project,
  .writing-status,
  .writing-row time {
    justify-self: start;
  }

  .writing-row-arrow {
    justify-self: end;
    align-self: center;
  }

  .project-board-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .archive-row {
    grid-template-columns: 1fr 1fr;
  }

  .archive-row--head {
    display: none;
  }

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

  .case-hero-grid,
  .case-duo,
  .case-screenshots,
  .case-cap-grid,
  .case-flow,
  .case-roadmap {
    grid-template-columns: 1fr;
  }

  .case-ss--hero {
    grid-row: auto;
  }

  .case-hero {
    padding-top: 48px;
  }

  .case-hero-text h1 {
    font-size: 2.5rem;
  }

  .case-flow-track {
    display: none;
  }

  .case-flow-step {
    text-align: left;
    padding: 0;
  }

  .case-flow-num {
    margin: 0 0 16px;
  }

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

  .contact-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding: 36px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .filters {
    justify-content: flex-start;
  }
}

/* ═══════════════════════════════════════
   Responsive — Mobile
   ═══════════════════════════════════════ */
@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  .hero {
    padding: 100px 0 60px;
    min-height: 78vh;
  }

  .hero-desc {
    font-size: 0.96rem;
    line-height: 1.75;
  }

  .hero-highlights span {
    min-height: 30px;
    font-size: 0.76rem;
  }

  .home-paths,
  .components-board,
  .projects-page .project-center,
  .projects-page .project-index-section,
  .project-center,
  .writing-board,
  .capability-section,
  .fit-section {
    padding-bottom: 72px;
  }

  .components-hero {
    padding: 96px 0 28px;
  }

  .components-hero-card {
    min-height: 620px;
  }

  .components-hero-card img {
    object-position: 62% center;
  }

  .components-hero-card::before {
    background:
      linear-gradient(180deg, rgba(4, 9, 22, 0.9) 0%, rgba(6, 12, 28, 0.72) 48%, rgba(6, 12, 28, 0.24) 100%),
      linear-gradient(90deg, rgba(4, 9, 22, 0.56), rgba(4, 9, 22, 0.14));
  }

  .components-hero-content {
    justify-content: flex-start;
    padding: 28px;
  }

  .components-hero-content p {
    font-size: 0.92rem;
  }

  .entry-grid,
  .capability-grid,
  .project-grid--center {
    grid-template-columns: 1fr;
  }

  .entry-card,
  .capability-card,
  .center-sidebar,
  .proof-panel {
    padding: 22px;
  }

  .entry-card {
    min-height: 210px;
  }

  .home-paths-head {
    gap: 12px;
    margin-bottom: 22px;
  }

  .home-paths-head p {
    font-size: 0.86rem;
  }

  .entry-card-points {
    margin-top: 18px;
  }

  .page-hero {
    padding-top: 112px;
  }

  .portfolio-page-hero {
    min-height: 500px;
    padding: 102px 0 56px;
    background-image:
      linear-gradient(180deg, rgba(7, 11, 24, 0.93) 0%, rgba(7, 11, 24, 0.7) 54%, rgba(7, 11, 24, 0.34) 100%),
      linear-gradient(90deg, rgba(7, 11, 24, 0.68), rgba(7, 11, 24, 0.18)),
      image-set(
        url("assets/images/generated/anime-portfolio-og.webp") type("image/webp"),
        url("assets/images/generated/anime-portfolio-og.png") type("image/png")
      );
    background-position: 62% center;
  }

  .portfolio-page-hero-inner {
    min-height: 342px;
  }

  .portfolio-page-hero h1 {
    font-size: 2.25rem;
  }

  .portfolio-page-hero p:not(.hero-label) {
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .portfolio-page-hero-tags span {
    min-height: 30px;
    font-size: 0.76rem;
  }

  .portfolio-page-hero-actions {
    margin-top: 28px;
  }

  .writing-masthead {
    min-height: 420px;
    padding: 104px 0 0;
    background-position: 61% center;
  }

  .writing-masthead-inner {
    min-height: 300px;
    padding-bottom: 42px;
  }

  .writing-masthead h1 {
    font-size: 2.85rem;
  }

  .writing-masthead p {
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .writing-index-head,
  .writing-row {
    padding: 20px;
  }

  .visual-notes-head {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .visual-note-chapter-nav {
    grid-template-columns: 1fr;
  }

  .visual-topic-grid {
    grid-template-columns: 1fr;
  }

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

  .component-layer-head {
    padding: 20px;
  }

  .component-card {
    min-height: 0;
    padding: 18px;
  }

  .visual-topic-card {
    min-height: auto;
  }

  .visual-note-chapter-head {
    padding: 20px;
  }

  .visual-note-chapter-head h3 {
    font-size: 1.18rem;
  }

  .visual-note-chapter-meta {
    gap: 6px;
  }

  .visual-note-body {
    padding: 20px;
  }

  .writing-topic-rail {
    align-items: stretch;
    margin-top: -24px;
  }

  .writing-topic-rail a {
    width: 100%;
    justify-content: space-between;
  }

  .writing-index-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .writing-row {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 0;
  }

  .writing-row-arrow {
    justify-self: start;
  }

  .project-board-head {
    padding: 20px;
  }

  .page-hero h1 {
    font-size: 2.2rem;
  }

  .page-hero p {
    font-size: 0.95rem;
  }

  .page-hero-proof {
    padding: 16px;
  }

  .archive-table {
    gap: 10px;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .archive-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
  }

  .stats {
    grid-template-columns: 1fr 1fr;
    margin-top: -28px;
  }

  .stats-item {
    padding: 20px 12px;
  }

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

  .project-card-media {
    margin-left: -28px;
    margin-right: -28px;
  }

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

  .now-card {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px 16px;
    min-height: 0;
    padding: 24px 20px;
  }

  .now-card::before {
    width: 40px;
    height: 40px;
  }

  .btn {
    width: 100%;
  }

  .hero-actions,
  .case-hero-actions {
    flex-direction: column;
  }

  .case-hero-facts {
    grid-template-columns: 1fr;
  }

  .case-header {
    height: auto;
    min-height: 72px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .case-nav {
    gap: 14px;
  }

  .case-duo-card,
  .case-roadmap-item {
    padding: 24px;
  }

  .case-hero-visual {
    border-radius: var(--radius-md);
  }

  .case-hero-text h1 {
    font-size: 2.1rem;
  }

  .case-hero-lead {
    font-size: 0.95rem;
  }

  .case-cap-item {
    flex-direction: column;
    gap: 12px;
  }

  .case-footer-inner {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .error-shell {
    padding: 24px;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.65rem;
  }
}

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