:root {
  color-scheme: dark;
  --bg: #080908;
  --panel: #101410;
  --panel-strong: #151a16;
  --line: rgba(244, 247, 243, 0.13);
  --text: #f4f7f3;
  --muted: #b6bdb8;
  --soft: #858f88;
  --green: #7ddfc3;
  --amber: #f2c35f;
  --cyan: #75c7e6;
  --red: #ff8f7d;
  --shadow: rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

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

a:hover {
  color: var(--green);
}

a:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 0.95rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  color: var(--muted);
  font-size: 0.94rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 8, 0.86);
  backdrop-filter: blur(18px);
}

.nav-wrap,
.wrap {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.nav-wrap {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(125, 223, 195, 0.52);
  border-radius: 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-links a:hover {
  color: var(--text);
}

.hero {
  position: relative;
  display: grid;
  min-height: 76svh;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #080908;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 9, 8, 0.98) 0%, rgba(8, 9, 8, 0.82) 35%, rgba(8, 9, 8, 0.35) 72%, rgba(8, 9, 8, 0.82) 100%),
    linear-gradient(180deg, rgba(8, 9, 8, 0.20), rgba(8, 9, 8, 0.96));
  z-index: 1;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.76;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.4rem 0 2.9rem;
}

.eyebrow {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  font-size: clamp(2.65rem, 6.3vw, 5rem);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  max-width: 850px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.25;
}

.lead {
  max-width: 760px;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  background: rgba(244, 247, 243, 0.06);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 720;
}

.button.primary {
  border-color: rgba(125, 223, 195, 0.72);
  background: var(--green);
  color: #07100c;
}

.button:hover {
  border-color: rgba(125, 223, 195, 0.68);
  color: var(--text);
}

.button.primary:hover {
  color: #07100c;
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.signal {
  border: 1px solid rgba(244, 247, 243, 0.16);
  border-radius: 8px;
  padding: 0.52rem 0.7rem;
  background: rgba(8, 9, 8, 0.68);
  color: var(--muted);
  font-size: 0.86rem;
}

.section {
  border-bottom: 1px solid var(--line);
  padding: 5.2rem 0;
}

.section.alt {
  background: #0c0f0c;
}

.section-head {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-head p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 1rem;
}

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

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

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

.grid.sidebar {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.card,
.note-card,
.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(244, 247, 243, 0.045);
  box-shadow: 0 18px 45px var(--shadow);
}

.card {
  padding: 1.25rem;
}

.card:hover,
.note-card:hover {
  border-color: rgba(125, 223, 195, 0.42);
}

.kicker {
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 740;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.card h3,
.note-card h3 {
  margin-top: 0.7rem;
}

.card p,
.note-card p {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  border: 1px solid rgba(244, 247, 243, 0.14);
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.metric {
  padding: 1.1rem;
}

.metric strong {
  display: block;
  color: var(--text);
  font-size: 1.65rem;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.media-band {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #050605;
}

.media-band img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.media-band.diagram {
  padding: 1.2rem 0;
}

.media-band.diagram img {
  width: min(1440px, calc(100% - 2rem));
  max-height: none;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
}

.note-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 1.25rem;
}

.note-card .button {
  align-self: flex-start;
  margin-top: auto;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.step {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.step-num {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border: 1px solid rgba(125, 223, 195, 0.45);
  border-radius: 8px;
  color: var(--green);
  font-weight: 800;
}

.step h3 {
  margin-top: 0;
}

.step p {
  margin-top: 0.3rem;
  color: var(--muted);
}

.page-hero {
  padding: 5rem 0 3.7rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(115deg, rgba(125, 223, 195, 0.10), transparent 34%),
    linear-gradient(245deg, rgba(242, 195, 95, 0.10), transparent 38%),
    #080908;
}

.page-hero .lead {
  max-width: 870px;
}

.resume-hero h1 {
  max-width: 980px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  color: var(--soft);
  font-size: 0.88rem;
}

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

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.toc a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.36rem 0.7rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.content-block {
  max-width: 900px;
}

.content-block p,
.content-block li {
  color: var(--muted);
}

.content-block p + p,
.content-block ul,
.content-block ol {
  margin-top: 1rem;
}

.content-block ul,
.content-block ol {
  padding-left: 1.2rem;
}

.system-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.system-node {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem;
  background: rgba(244, 247, 243, 0.045);
}

.system-node strong {
  display: block;
  color: var(--text);
}

.system-node span {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.callout {
  border-left: 3px solid var(--green);
  padding: 1rem 1.1rem;
  background: rgba(125, 223, 195, 0.075);
  color: var(--muted);
}

.callout.amber {
  border-left-color: var(--amber);
  background: rgba(242, 195, 95, 0.075);
}

.scope-note {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  border: 1px solid rgba(117, 199, 230, 0.3);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  background: rgba(117, 199, 230, 0.07);
  color: var(--muted);
}

.scope-note p {
  color: var(--muted);
}

.evidence-label {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(117, 199, 230, 0.4);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.resume-entry {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1.2rem, 3vw, 2rem);
  background: rgba(244, 247, 243, 0.035);
}

.resume-entry + .resume-entry {
  margin-top: 1rem;
}

.entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.entry-head h3 {
  margin-top: 0.45rem;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
}

.entry-head p:not(.kicker) {
  margin-top: 0.4rem;
  color: var(--muted);
}

.resume-project {
  margin-top: 1.35rem;
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
}

.resume-project h3 {
  max-width: 900px;
}

.resume-project p {
  margin-top: 0.7rem;
  color: var(--muted);
}

.resume-project.compact {
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(244, 247, 243, 0.035);
}

.case-lines {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.case-lines p {
  margin-top: 0;
}

.case-lines strong {
  color: var(--text);
}

.compact-entry {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.gap-top {
  margin-top: 1rem;
}

.gap-top-lg {
  margin-top: 1.2rem;
}

.footer {
  padding: 2.2rem 0;
  color: var(--soft);
  font-size: 0.9rem;
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 900px) {
  .nav-wrap {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem 0;
  }

  .nav-links {
    width: 100%;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    overflow: visible;
    white-space: normal;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .grid.sidebar,
  .system-map {
    grid-template-columns: 1fr;
  }

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

  .scope-note .evidence-label {
    justify-self: start;
  }

  .entry-head {
    flex-direction: column;
  }

  .section {
    padding: 3.8rem 0;
  }

  .hero-content {
    padding: 3rem 0 2.6rem;
  }

  .signal-row {
    display: none;
  }

  th,
  td {
    padding: 0.8rem 0.6rem;
  }

  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}

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