@import "https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600;700&display=swap";

:root {
  --project-ui-font: "Inter", sans-serif;
  --project-reading-font: Georgia, "Times New Roman", serif;
  --project-display-font: "Instrument Serif", Georgia, serif;
  --project-bg: #f7f4ee;
  --project-surface: #fffcf6f0;
  --project-surface-strong: #fdfaf4;
  --project-text: #201d18;
  --project-muted: #201d18a8;
  --project-soft: #201d1814;
  --project-soft-strong: #201d1824;
  --project-shadow: 0 18px 50px #241b1014;
  --project-shadow-soft: 0 8px 20px #241b100d;
  --project-accent: #2a57c8;
  --project-accent-soft: #2a57c81a;
  --project-positive: #1b7f5c;
  --project-warning: #9b6a12;
  --project-danger: #922f2f;
}

body.project-body {
  color-scheme: light;
  background: radial-gradient(circle at top left, #ffffffb3, transparent 36%),
        linear-gradient(180deg, #fbf8f2 0%, var(--project-bg) 100%);
  min-height: 100vh;
  color: var(--project-text);
  font-family: var(--project-ui-font);
  margin: 0;
}

body.project-body.project-body--dark {
  --project-bg: #0d0d0d;
  --project-surface: #161616eb;
  --project-surface-strong: #141414;
  --project-text: #f2eee6;
  --project-muted: #f2eee6ad;
  --project-soft: #f2eee614;
  --project-soft-strong: #f2eee624;
  --project-shadow: 0 18px 50px #00000059;
  --project-shadow-soft: 0 8px 20px #0003;
  color-scheme: dark;
  background: radial-gradient(circle at 0 0, #ffffff0d, #0000 28%), linear-gradient(#070707 0%, #0d0d0d 100%);
}

.project-page {
  width: min(1240px, 100% - 48px);
  margin: 0 auto;
  padding: 28px 0 96px;
}

.project-topbar {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  display: flex;
}

.project-topbar-actions {
  align-items: center;
  gap: 12px;
  display: inline-flex;
}

.project-home-link, .project-back-link {
  color: var(--project-muted);
  text-transform: uppercase;
  letter-spacing: .14em;
  align-items: center;
  gap: 10px;
  font-size: .72rem;
  text-decoration: none;
  transition: color .25s, transform .25s;
  display: inline-flex;
}

.project-home-link:hover, .project-back-link:hover {
  color: var(--project-text);
  transform: translateY(-1px);
}

.project-home-link img {
  object-fit: contain;
  width: 34px;
  height: 34px;
}

#dark-mode-toggle {
  cursor: pointer;
  color: var(--project-text);
  background: none;
  border: none;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  padding: .5rem;
  font-size: 1.2rem;
  transition: transform .3s, color .3s;
  display: flex;
}

#dark-mode-toggle:hover {
  color: var(--project-text);
  transform: rotate(15deg);
}

#dark-mode-toggle i {
  transition: transform .5s;
}

body.project-body.project-body--dark #dark-mode-toggle i {
  transform: rotate(360deg);
}

.project-shell {
  gap: 28px;
  display: grid;
}

.project-hero {
  gap: 18px;
  padding: 22px 0 6px;
  display: grid;
}

.project-eyebrow {
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--project-muted);
  font-size: .72rem;
  font-weight: 500;
}

.project-title {
  font-family: var(--project-display-font);
  letter-spacing: -.05em;
  margin: 0;
  font-size: clamp(2.7rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: .95;
}

.project-subtitle {
  max-width: 820px;
  color: var(--project-muted);
  font-family: var(--project-reading-font);
  margin: 0;
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.8;
}

.project-meta-grid, .project-card-grid {
  gap: 14px;
  display: grid;
}

.project-meta-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

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

.project-card-grid.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-meta-card, .project-info-card, .project-tool-frame, .project-methodology, .project-footer-note {
  background: var(--project-surface);
  border: 1px solid var(--project-soft);
  box-shadow: var(--project-shadow-soft);
  border-radius: 22px;
}

.project-meta-card, .project-info-card {
  padding: 18px 18px 16px;
}

.project-label {
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--project-muted);
  margin-bottom: 10px;
  font-size: .72rem;
  font-weight: 600;
  display: block;
}

.project-meta-value {
  font-family: var(--project-reading-font);
  color: var(--project-text);
  font-size: 1.04rem;
  line-height: 1.72;
  display: block;
}

.project-tool-frame {
  box-shadow: var(--project-shadow);
  padding: 24px;
}

.project-section-head {
  gap: 8px;
  margin-bottom: 18px;
  display: grid;
}

.project-section-kicker {
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--project-muted);
  font-size: .72rem;
  font-weight: 600;
}

.project-section-title {
  font-family: var(--project-display-font);
  letter-spacing: -.03em;
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 400;
}

.project-section-copy, .project-info-card p, .project-methodology p, .project-methodology li, .project-info-card li, .project-footer-note p, .project-footer-note li {
  color: var(--project-muted);
  font-family: var(--project-reading-font);
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
}

.project-info-card h3, .project-methodology h3, .project-footer-note h3 {
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--project-text);
  margin: 0 0 10px;
  font-size: .84rem;
  font-weight: 600;
}

.project-info-card ul, .project-methodology ul, .project-footer-note ul {
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  display: grid;
}

.project-methodology, .project-footer-note {
  padding: 22px 24px;
}

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

.project-stage {
  --project-stage-surface: var(--project-surface-strong);
  --project-stage-surface-soft: color-mix(in srgb, var(--project-surface-strong) 72%, var(--project-bg) 28%);
  --project-stage-surface-muted: color-mix(in srgb, var(--project-surface-strong) 50%, var(--project-bg) 50%);
  --project-stage-border: var(--project-soft-strong);
  --project-stage-text: var(--project-text);
  --project-stage-muted: var(--project-muted);
  --project-stage-blue-surface: color-mix(in srgb, var(--project-accent) 10%, var(--project-surface-strong) 90%);
  --project-stage-green-surface: color-mix(in srgb, var(--project-positive) 12%, var(--project-surface-strong) 88%);
  --project-stage-amber-surface: color-mix(in srgb, var(--project-warning) 13%, var(--project-surface-strong) 87%);
  --project-stage-red-surface: color-mix(in srgb, var(--project-danger) 12%, var(--project-surface-strong) 88%);
  position: relative;
}

.project-stage > #root, .project-stage > #app {
  min-height: 120px;
}

.project-stage:not(.project-stage--game), .project-stage:not(.project-stage--game) * {
  font-family: var(--project-ui-font);
}

.project-stage:not(.project-stage--game) :is(h1, h2, h3, h4, h5, h6) {
  color: var(--project-stage-text);
  letter-spacing: -.02em;
}

.project-stage:not(.project-stage--game) :is(p, li, span, small, label, td, th, strong, em) {
  color: inherit;
}

.project-stage:not(.project-stage--game) svg text, .project-stage:not(.project-stage--game) .recharts-surface text {
  font-family: var(--project-ui-font) !important;
}

.project-stage:not(.project-stage--game) :is(input, select, textarea) {
  box-shadow: none;
  color: var(--project-stage-text) !important;
  border-color: var(--project-stage-border) !important;
  background: var(--project-stage-surface) !important;
}

.project-stage:not(.project-stage--game) :is(input, select, textarea)::placeholder {
  color: color-mix(in srgb, var(--project-stage-text) 42%, transparent);
}

.project-stage:not(.project-stage--game) :is(button, .tab-button) {
  font-family: var(--project-ui-font);
}

.project-stage:not(.project-stage--game) [class*="bg-white"] {
  background-color: var(--project-stage-surface) !important;
}

.project-stage:not(.project-stage--game) [class*="bg-gray-50"], .project-stage:not(.project-stage--game) [class*="bg-slate-50"], .project-stage:not(.project-stage--game) [class*="bg-gray-100"], .project-stage:not(.project-stage--game) [class*="bg-slate-100"] {
  background-color: var(--project-stage-surface-soft) !important;
}

.project-stage:not(.project-stage--game) [class*="bg-gray-200"], .project-stage:not(.project-stage--game) [class*="bg-slate-200"] {
  background-color: var(--project-stage-surface-muted) !important;
}

.project-stage:not(.project-stage--game) [class*="bg-blue-50"], .project-stage:not(.project-stage--game) [class*="bg-indigo-50"] {
  background-color: var(--project-stage-blue-surface) !important;
}

.project-stage:not(.project-stage--game) [class*="bg-green-50"] {
  background-color: var(--project-stage-green-surface) !important;
}

.project-stage:not(.project-stage--game) [class*="bg-red-50"] {
  background-color: var(--project-stage-red-surface) !important;
}

.project-stage:not(.project-stage--game) [class*="bg-amber-50"], .project-stage:not(.project-stage--game) [class*="bg-yellow-50"] {
  background-color: var(--project-stage-amber-surface) !important;
}

.project-stage:not(.project-stage--game) [class*="border-gray-"], .project-stage:not(.project-stage--game) [class*="border-slate-"], .project-stage:not(.project-stage--game) [class*="border-blue-"], .project-stage:not(.project-stage--game) [class*="border-red-"], .project-stage:not(.project-stage--game) [class*="border-green-"], .project-stage:not(.project-stage--game) [class*="border-amber-"], .project-stage:not(.project-stage--game) [class*="border-yellow-"] {
  border-color: var(--project-stage-border) !important;
}

.project-stage:not(.project-stage--game) [class*="text-gray-900"], .project-stage:not(.project-stage--game) [class*="text-slate-900"] {
  color: var(--project-stage-text) !important;
}

.project-stage:not(.project-stage--game) [class*="text-gray-800"], .project-stage:not(.project-stage--game) [class*="text-slate-800"] {
  color: color-mix(in srgb, var(--project-stage-text) 90%, transparent) !important;
}

.project-stage:not(.project-stage--game) [class*="text-gray-700"], .project-stage:not(.project-stage--game) [class*="text-slate-700"] {
  color: color-mix(in srgb, var(--project-stage-text) 82%, transparent) !important;
}

.project-stage:not(.project-stage--game) [class*="text-gray-600"], .project-stage:not(.project-stage--game) [class*="text-slate-600"] {
  color: var(--project-stage-muted) !important;
}

.project-stage:not(.project-stage--game) [class*="text-gray-500"], .project-stage:not(.project-stage--game) [class*="text-slate-500"], .project-stage:not(.project-stage--game) [class*="text-gray-400"] {
  color: color-mix(in srgb, var(--project-stage-text) 64%, transparent) !important;
}

.project-stage:not(.project-stage--game) [class*="text-blue-900"], .project-stage:not(.project-stage--game) [class*="text-blue-800"], .project-stage:not(.project-stage--game) [class*="text-blue-700"], .project-stage:not(.project-stage--game) [class*="text-blue-600"] {
  color: color-mix(in srgb, var(--project-accent) 72%, var(--project-stage-text) 28%) !important;
}

.project-stage:not(.project-stage--game) [class*="text-green-900"], .project-stage:not(.project-stage--game) [class*="text-green-800"], .project-stage:not(.project-stage--game) [class*="text-green-700"], .project-stage:not(.project-stage--game) [class*="text-green-600"] {
  color: color-mix(in srgb, var(--project-positive) 82%, var(--project-stage-text) 18%) !important;
}

.project-stage:not(.project-stage--game) [class*="text-red-900"], .project-stage:not(.project-stage--game) [class*="text-red-800"], .project-stage:not(.project-stage--game) [class*="text-red-700"], .project-stage:not(.project-stage--game) [class*="text-red-600"] {
  color: color-mix(in srgb, var(--project-danger) 84%, var(--project-stage-text) 16%) !important;
}

.project-stage:not(.project-stage--game) [class*="text-amber-900"], .project-stage:not(.project-stage--game) [class*="text-amber-800"], .project-stage:not(.project-stage--game) [class*="text-amber-700"], .project-stage:not(.project-stage--game) [class*="text-yellow-800"], .project-stage:not(.project-stage--game) [class*="text-yellow-700"], .project-stage:not(.project-stage--game) [class*="text-yellow-600"] {
  color: color-mix(in srgb, var(--project-warning) 84%, var(--project-stage-text) 16%) !important;
}

.project-stage:not(.project-stage--game) .recharts-cartesian-axis-tick-value, .project-stage:not(.project-stage--game) .recharts-legend-item-text, .project-stage:not(.project-stage--game) .recharts-label, .project-stage:not(.project-stage--game) .recharts-text, .project-stage:not(.project-stage--game) .recharts-polar-angle-axis-value, .project-stage:not(.project-stage--game) .recharts-polar-radius-axis-tick-value {
  fill: var(--project-stage-muted) !important;
}

.project-stage:not(.project-stage--game) .recharts-cartesian-grid line, .project-stage:not(.project-stage--game) .recharts-polar-grid-angle line, .project-stage:not(.project-stage--game) .recharts-polar-grid-concentric circle {
  stroke: var(--project-stage-border) !important;
}

.project-stage:not(.project-stage--game) .recharts-default-tooltip, .project-stage .custom-tooltip, .project-stage .tooltip-content {
  box-shadow: var(--project-shadow-soft);
  background: color-mix(in srgb, var(--project-stage-surface) 94%, transparent) !important;
  border: 1px solid var(--project-stage-border) !important;
  color: var(--project-stage-text) !important;
}

.project-stage:not(.project-stage--game) canvas + div, .project-stage:not(.project-stage--game) table {
  color: var(--project-stage-text);
}

.project-stage:not(.project-stage--game) .tab-button.active {
  background-color: var(--project-accent);
  color: #fff;
}

.project-chip-row {
  flex-wrap: wrap;
  gap: 8px;
  display: flex;
}

.project-chip {
  background: var(--project-accent-soft);
  color: var(--project-text);
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 999px;
  align-items: center;
  padding: 7px 12px;
  font-size: .74rem;
  font-weight: 500;
  display: inline-flex;
}

.project-note {
  background: var(--project-accent-soft);
  color: var(--project-text);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: .92rem;
  line-height: 1.6;
}

.project-note strong {
  color: var(--project-text);
}

.project-footer-note {
  gap: 12px;
  display: grid;
}

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

@media (width <= 900px) {
  .project-page {
    width: min(100% - 32px, 1240px);
    padding-top: 22px;
  }

  .project-card-grid.two-up, .project-card-grid.three-up, .project-method-grid {
    grid-template-columns: 1fr;
  }

  .project-tool-frame, .project-methodology, .project-footer-note {
    padding: 20px;
  }
}

@media (width <= 640px) {
  .project-page {
    width: min(100% - 24px, 1240px);
    padding-bottom: 72px;
  }

  .project-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
  }

  .project-topbar-actions {
    justify-content: space-between;
    width: 100%;
  }

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

  .project-title {
    font-size: clamp(2.35rem, 10vw, 3.2rem);
  }

  .project-subtitle {
    font-size: 1rem;
  }
}
