:root {
  --ink: #182436;
  --navy: #080c18;
  --navy-2: #10182c;
  --paper: #f3eee5;
  --paper-2: #fffaf3;
  --surface-raised: #eee6da;
  --gold: #a66d12;
  --gold-soft: #f4e5c6;
  --teal: #176f78;
  --teal-soft: #d9eef0;
  --muted: #5d6978;
  --line: #d8cebf;
  --danger: #8a3f2f;
  --shadow: 0 18px 55px rgba(40, 48, 58, .10);
  --radius: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 3%, rgba(85, 216, 232, .08), transparent 27rem),
    linear-gradient(180deg, #ebe4d9 0, var(--paper) 24rem, var(--paper) 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.62;
}

a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: #0d4f58; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 999;
  padding: .7rem 1rem;
  background: var(--teal);
  color: #06111d;
}
.skip-link:focus { left: 8px; }

.draft-banner {
  border-bottom: 1px solid rgba(239, 189, 98, .24);
  background: #0d1425;
  color: #eac87c;
  padding: .55rem 1rem;
  text-align: center;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,.13);
  background: rgba(8, 12, 24, .96);
  color: var(--ink);
  backdrop-filter: blur(10px);
}

.nav-wrap {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 70px;
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  color: #eef1f8;
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.site-nav { display: flex; flex-wrap: wrap; gap: .35rem; }
.site-nav a {
  color: rgba(226,232,243,.78);
  padding: .42rem .62rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 700;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: rgba(85,215,233,.11); color: #eafcff; }

.hero {
  color: #eef1f8;
  background:
    radial-gradient(circle at 88% 22%, rgba(85, 216, 232, .13), transparent 31rem),
    linear-gradient(115deg, rgba(8,12,24,.99), rgba(16,24,44,.97)),
    var(--navy);
  overflow: hidden;
}
.hero .eyebrow { color: #55d8e8; }

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 8.5rem) 1.25rem clamp(3.5rem, 8vw, 7rem);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: end;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--teal);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.08;
  text-wrap: balance;
}

h1 { margin: 0; font-size: clamp(3rem, 7vw, 6.6rem); letter-spacing: -.045em; }
h2 { margin: 0 0 1.1rem; font-size: clamp(2rem, 4.2vw, 3.65rem); letter-spacing: -.03em; }
h3 { margin: 0 0 .6rem; font-size: clamp(1.25rem, 2.4vw, 1.72rem); }

.hero .lead {
  margin: 1.45rem 0 0;
  max-width: 760px;
  color: rgba(210,220,239,.80);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-card {
  border: 1px solid rgba(117,170,200,.22);
  border-radius: var(--radius);
  padding: 1.4rem;
  background: rgba(18,27,48,.78);
  box-shadow: var(--shadow);
}
.hero-card p { margin: 0 0 .8rem; }
.hero-card p:last-child { margin-bottom: 0; }

.button-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .72rem 1rem;
  border: 1px solid #35657b;
  border-radius: 999px;
  background: #102b3d;
  color: #eafcff;
  text-decoration: none;
  font-weight: 800;
}
.button:hover { background: var(--teal); color: #06111d; }
.button.alt { background: transparent; color: currentColor; border-color: currentColor; }

main > section, .page-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(3.2rem, 8vw, 6rem) 1.25rem;
}

.section-heading { max-width: 780px; margin-bottom: 2rem; }
.section-heading p { color: var(--muted); font-size: 1.08rem; }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.15rem; }
.card {
  grid-column: span 4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.45rem;
  background: linear-gradient(145deg, var(--paper-2), #f8f1e7);
  box-shadow: 0 9px 28px rgba(40,48,58,.07);
}
.card.wide { grid-column: span 6; }
.card.full { grid-column: 1 / -1; }
.card p:last-child { margin-bottom: 0; }
.card .meta, .meta { color: var(--muted); font-size: .88rem; }

.case-card { position: relative; overflow: hidden; padding-top: 1.8rem; }
.case-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
}
.case-card a { font-weight: 800; }

.status {
  display: inline-block;
  margin-bottom: .85rem;
  padding: .32rem .56rem;
  border-radius: 999px;
  background: var(--teal-soft);
  color: #13555c;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.status.caution { background: #f3e6c6; color: #6a4b16; }
.status.private { background: #f0ded9; color: var(--danger); }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 2rem 0; }
.metric {
  border-top: 3px solid var(--gold);
  padding: 1rem 0;
}
.metric strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--navy);
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1;
}
.metric span { display: block; margin-top: .45rem; color: var(--muted); font-size: .9rem; }

.character-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.character-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--shadow);
}

.character-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center top;
  background: #e9dfd1;
}

.character-card:not(.sheet) img {
  aspect-ratio: 4 / 5;
  object-position: center 18%;
}

.character-card figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 1rem 1rem;
  color: var(--ink);
}

.character-card figcaption strong {
  color: var(--teal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.character-card figcaption span {
  color: var(--muted);
  font-size: .88rem;
  text-align: right;
}

.workflow-figure {
  margin: 1.25rem 0 2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--shadow);
}

.workflow-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: #211914;
}

.workflow-figure figcaption {
  padding: 1rem 1.15rem 1.1rem;
  color: var(--muted);
  font-size: .92rem;
}

.workflow-figure figcaption strong {
  color: var(--teal);
}

.testbed-hero .hero-inner { align-items: center; }

.testbed-visual {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(117,170,200,.32);
  border-radius: var(--radius);
  background: rgba(18,27,48,.88);
  box-shadow: var(--shadow);
}

.testbed-visual img {
  display: block;
  width: 100%;
  height: clamp(440px, 60vw, 590px);
  object-fit: contain;
  object-position: center top;
  background: #071120;
}

.testbed-visual figcaption {
  padding: 1rem 1.15rem 1.15rem;
  color: rgba(220,231,244,.78);
  font-size: .88rem;
}

.testbed-visual figcaption strong { color: #a7eff7; }

.testbed-bridge {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr) auto) minmax(0, 1fr);
  gap: .7rem;
  align-items: stretch;
}

.testbed-bridge article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  background: var(--paper-2);
  box-shadow: 0 9px 28px rgba(40,48,58,.07);
}

.testbed-bridge article > span {
  display: grid;
  width: 2rem;
  height: 2rem;
  margin-bottom: .8rem;
  place-items: center;
  border-radius: 50%;
  background: var(--navy-2);
  color: #a7eff7;
  font-weight: 900;
}

.testbed-bridge article p { margin-bottom: 0; color: var(--muted); font-size: .92rem; }
.testbed-bridge > b { align-self: center; color: var(--gold); font-size: 1.5rem; }

.evidence-stack { display: grid; gap: 1rem; }
.evidence-stack article {
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.4rem;
  background: var(--paper-2);
}
.evidence-stack article:nth-child(2) { border-left-color: var(--gold); }
.evidence-stack article:nth-child(3) { border-left-color: var(--danger); }
.evidence-stack article p:last-child { margin-bottom: 0; }

.status-callout {
  margin: 1.25rem 0 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid #ca8f86;
  border-left: 5px solid #9d4f45;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: #fff1ed;
  color: #5c2722;
}

.development-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.development-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--shadow);
}

.development-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  object-position: center top;
  background: #e9dfd1;
}

.development-card-copy { padding: 1rem 1.15rem 1.2rem; }
.development-card-copy h3 { margin: .2rem 0 .75rem; }
.development-card-copy p { font-size: .92rem; }
.development-card-copy p:last-child { margin-bottom: 0; }

.asset-status {
  margin: 0 0 .35rem;
  color: #8a3e36;
  font-size: .72rem !important;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.scene-reference {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 0;
  margin: 1.5rem 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  box-shadow: var(--shadow);
}

.scene-reference img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  object-position: center;
  background: #e9dfd1;
}

.scene-reference figcaption { padding: 1.35rem 1.45rem; }
.scene-reference figcaption h3 { margin: .25rem 0 .8rem; }
.scene-reference figcaption p { font-size: .93rem; }
.scene-reference figcaption p:last-child { margin-bottom: 0; }

.callout {
  margin: 2rem 0;
  border-left: 5px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.4rem;
  background: #fff8e8;
}
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

.flow {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
  margin: 2rem 0;
}
.flow span {
  padding: .55rem .75rem;
  border-radius: 999px;
  border: 1px solid #2d4f66;
  background: #10182c;
  color: #dce7f4;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.flow b { color: var(--gold); }

.timeline { border-left: 2px solid var(--line); margin: 2rem 0 0 1rem; }
.timeline article { position: relative; padding: 0 0 2rem 2rem; }
.timeline article::before {
  content: "";
  position: absolute;
  top: .22rem; left: -.5rem;
  width: .9rem; height: .9rem;
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: var(--teal);
}
.timeline article.planned::before { background: var(--paper); border-color: var(--gold); }
.timeline article p { margin: .4rem 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-2); }
table { width: 100%; min-width: 690px; border-collapse: collapse; }
th, td { padding: .82rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: #ede7de; color: var(--navy); font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }

.two-col { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr); gap: 2rem; align-items: start; }
.prose { max-width: 780px; }
.prose p, .prose li { font-size: 1.04rem; }
.prose li + li { margin-top: .45rem; }

.resume-section { padding: 2rem 0; border-bottom: 1px solid var(--line); }
.resume-section:last-child { border-bottom: 0; }
.resume-section h2 { font-size: 2rem; }
.compact-list { columns: 2; column-gap: 2.5rem; padding-left: 1.2rem; }
.compact-list li { break-inside: avoid; margin-bottom: .5rem; }

.site-footer {
  margin-top: 3rem;
  padding: 2.3rem 1.25rem;
  border-top: 1px solid var(--line);
  background: #060e1a;
  color: rgba(210,220,239,.78);
}
.footer-inner { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.site-footer a { color: #a7eff7; }

.small { font-size: .84rem; color: var(--muted); }
.no-margin { margin: 0; }

@media (max-width: 860px) {
  .hero-inner, .two-col, .character-gallery, .development-gallery, .scene-reference, .testbed-bridge { grid-template-columns: 1fr; }
  .card, .card.wide { grid-column: span 6; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .nav-wrap { align-items: flex-start; flex-direction: column; gap: .5rem; }
  .site-header { position: static; }
  .testbed-bridge > b { justify-self: center; transform: rotate(90deg); }
}

@media (max-width: 580px) {
  .card, .card.wide { grid-column: 1 / -1; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .site-nav { gap: .15rem; }
  .site-nav a { padding: .36rem .48rem; font-size: .8rem; }
  .compact-list { columns: 1; }
  h1 { font-size: clamp(2.8rem, 16vw, 4.3rem); }
}

@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 10.5pt; }
  .draft-banner, .site-header, .site-footer, .button-row { display: none !important; }
  .hero { background: #fff; color: #000; }
  .hero-inner, main > section, .page-main { max-width: none; padding: 1rem 0; }
  .hero .lead, .hero-card { color: #222; }
  .hero-card, .card, .table-wrap { box-shadow: none; break-inside: avoid; }
  .grid { display: block; }
  .card { margin-bottom: 1rem; }
  a { color: #000; text-decoration: none; }
  a[href]::after { content: ""; }
  .metric strong { color: #000; }
}
