:root {
  --bg: #f5f7fb;
  --bg-accent: #ffffff;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffffff;
  --line: rgba(17, 34, 58, 0.1);
  --text: #162233;
  --muted: #627286;
  --gold: #a8752d;
  --cyan: #2f7b8f;
  --green: #2f8b66;
  --shadow: 0 20px 45px rgba(17, 34, 58, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(47, 123, 143, 0.06), transparent 30%),
    radial-gradient(circle at bottom right, rgba(168, 117, 45, 0.06), transparent 25%),
    linear-gradient(180deg, #fcfdff, #f5f7fb 28%, #f1f4f8 100%);
}

code {
  font-family: "Inter", monospace;
  color: var(--cyan);
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, #faf4ea, #ffffff);
  border: 1px solid rgba(168, 117, 45, 0.28);
  color: var(--gold);
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav a:hover {
  color: #0f1b2b;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 24px;
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 28px;
  align-items: stretch;
}

.hero-visual {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.7)),
    url("./images/05_portfolio_key_art.png") center/cover no-repeat;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.18));
  pointer-events: none;
}

.hero-copy,
.hero-metrics {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
}

.hero h1,
.section-heading h2,
.section-grid h2 {
  margin: 0;
  font-family: "Source Serif 4", serif;
  line-height: 1;
}

.hero h1 {
  font-size: clamp(3.2rem, 6vw, 5.8rem);
}

.hero-subtitle {
  margin: 10px 0 18px;
  color: var(--cyan);
  font-size: 1.05rem;
  font-weight: 600;
}

.hero-credit {
  margin: -6px 0 18px;
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-body,
.section-heading p,
.timeline-card p,
.stack-card p,
.diagram-card p,
.prompt-list p,
.section-grid p {
  color: var(--muted);
  line-height: 1.7;
}

.section-heading h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin-bottom: 10px;
}

.section-heading p {
  max-width: 860px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
}

.button.primary {
  background: linear-gradient(135deg, #a8752d, #ca9244);
  color: #ffffff;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  border-color: var(--line);
}

.hero-metrics {
  display: grid;
  gap: 14px;
}

.metric-card,
.stack-card,
.diagram-card,
.prompt-list article,
.timeline-card,
.callout {
  padding: 20px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(17, 34, 58, 0.08);
  border-radius: 22px;
}

.metric-card span,
.status-strip span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
  font-size: 0.92rem;
}

.metric-card strong,
.status-strip strong {
  font-size: 1.05rem;
}

.metric-card {
  box-shadow: 0 8px 22px rgba(17, 34, 58, 0.05);
}

.section-grid,
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.callout h3,
.stack-card h3,
.diagram-card h3,
.prompt-list h3,
.timeline-card h3 {
  margin-top: 0;
}

.stack-card h3,
.detail-card h3,
.version-head h3 {
  font-size: 1.28rem;
}

.callout ul,
.stack-card ul,
.stack-card ol {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.section-heading {
  margin-bottom: 24px;
}

.case-study-grid,
.principle-grid,
.audit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.detail-card {
  padding: 22px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(17, 34, 58, 0.08);
  border-radius: 24px;
  box-shadow: 0 12px 26px rgba(17, 34, 58, 0.05);
}

.detail-card p,
.detail-card li {
  color: var(--muted);
  line-height: 1.75;
}

.detail-card ul {
  margin: 0;
  padding-left: 18px;
}

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

.progression-list {
  display: grid;
  gap: 20px;
}

.version-panel {
  padding: 22px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(17, 34, 58, 0.08);
  border-radius: 24px;
}

.version-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.version-head h3 {
  margin: 0 0 8px;
  font-family: "Source Serif 4", serif;
  font-size: 2rem;
}

.version-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.version-explainer h4 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--text);
}

.version-explainer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(47, 123, 143, 0.1);
  color: var(--cyan);
  font-weight: 700;
}

.image-grid {
  display: grid;
  gap: 18px;
}

.image-grid--two {
  grid-template-columns: repeat(2, minmax(420px, 1fr));
}

.image-grid--three {
  grid-template-columns: repeat(3, minmax(280px, 1fr));
}

.image-grid--v1-stack {
  grid-template-columns: 1fr;
}

.image-card {
  margin: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 1);
  border: 1px solid rgba(17, 34, 58, 0.08);
  border-radius: 22px;
  box-shadow: 0 12px 26px rgba(17, 34, 58, 0.06);
  display: flex;
  flex-direction: column;
}

.image-card img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: 720px;
  object-fit: contain;
  background: #f7f9fc;
  padding: 18px;
  border-bottom: 1px solid rgba(17, 34, 58, 0.08);
}

.image-card figcaption {
  display: grid;
  gap: 6px;
  padding: 16px 18px 18px;
}

.image-card figcaption strong {
  font-size: 1rem;
}

.image-card figcaption span {
  color: var(--muted);
  line-height: 1.6;
}

.image-card--pending {
  display: grid;
}

.image-card__empty {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 24px;
  text-align: center;
  border-bottom: 1px solid rgba(17, 34, 58, 0.08);
  background:
    linear-gradient(135deg, rgba(47, 123, 143, 0.04), rgba(168, 117, 45, 0.03)),
    rgba(255, 255, 255, 0.95);
}

.image-card:not(.image-card--pending) .image-card__empty {
  display: none;
}

.image-card__empty span {
  color: var(--text);
  font-weight: 600;
}

.image-card__empty small {
  margin-top: 10px;
  color: var(--muted);
}

.timeline-card .version {
  display: inline-block;
  padding: 6px 10px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(47, 123, 143, 0.1);
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 700;
}

.stack-card.success {
  border-color: rgba(47, 139, 102, 0.24);
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.status-strip article {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(17, 34, 58, 0.08);
}

.diagram-placeholder {
  display: grid;
  place-items: center;
  min-height: 190px;
  border: 1px dashed rgba(168, 117, 45, 0.32);
  border-radius: 18px;
  margin-bottom: 16px;
  text-align: center;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(47, 123, 143, 0.04), rgba(168, 117, 45, 0.03)),
    rgba(255, 255, 255, 0.92);
}

.diagram-placeholder span {
  color: var(--text);
  font-weight: 600;
}

.diagram-placeholder small {
  margin-top: 8px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 4px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 960px) {
  .hero,
  .section-grid,
  .two-column,
  .case-study-grid,
  .principle-grid,
  .audit-grid,
  .timeline,
  .diagram-grid,
  .prompt-list,
  .status-strip,
  .image-grid--three {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
    flex-direction: column;
    align-items: flex-start;
  }

  .version-head {
    grid-template-columns: 1fr;
  }

  .version-explainer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .image-grid--two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

  .panel {
    padding: 22px;
    border-radius: 22px;
  }

  .nav {
    gap: 12px;
  }
}
