:root {
  color-scheme: light;
  --paper: #f4f1ea;
  --surface: #fffdf8;
  --ink: #12263a;
  --muted: #536474;
  --line: #ccd4d5;
  --teal: #166a69;
  --teal-dark: #0d4e4d;
  --teal-pale: #dbeae6;
  --amber: #a95813;
  --amber-pale: #f2dfc3;
  --navy: #0b2239;
  --focus: #ad4d00;
  --max-width: 76rem;
  --text-width: 44rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  min-width: 20rem;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--teal-dark);
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.18em;
}

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

a:focus-visible {
  outline: 0.2rem solid var(--focus);
  outline-offset: 0.2rem;
  border-radius: 0.15rem;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  color: #ffffff;
  background: var(--navy);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 234, 0.97);
}

.header-inner,
.hero-inner,
.section,
.site-footer {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.75rem;
}

.site-name {
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 780;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: inline-block;
  padding-block: 0.45rem;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.hero {
  padding-block: clamp(3rem, 6vw, 5.5rem);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(110deg, rgba(219, 234, 230, 0.78), transparent 55%),
    var(--paper);
}

.hero-inner {
  max-width: 68rem;
}

.eyebrow,
.project-number,
.panel-label,
.card-index {
  margin: 0 0 0.75rem;
  color: var(--teal-dark);
  font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  color: var(--navy);
  line-height: 1.13;
}

h1 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.7rem, 7vw, 5.25rem);
  font-weight: 820;
  letter-spacing: -0.055em;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: -0.035em;
}

h3 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

h4 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.hero-statement {
  max-width: 42rem;
  margin: 1.5rem 0 0;
  color: var(--teal-dark);
  font-size: clamp(1.3rem, 2.8vw, 1.8rem);
  font-weight: 680;
  line-height: 1.35;
}

.hero-summary {
  max-width: 43rem;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-links,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.hero .hero-links {
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border: 2px solid var(--teal-dark);
  border-radius: 0.25rem;
  font-weight: 720;
  line-height: 1.35;
  text-decoration: none;
}

.button-primary {
  color: #ffffff;
  background: var(--teal-dark);
}

.button-primary:hover {
  color: #ffffff;
  background: var(--navy);
  border-color: var(--navy);
}

.button-secondary {
  color: var(--teal-dark);
  background: transparent;
}

.button-secondary:hover {
  color: var(--navy);
  border-color: var(--navy);
  background: var(--surface);
}

.section {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: var(--text-width);
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.section-heading > p:last-child {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.focus-grid,
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.focus-card,
.skills-grid article {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-top: 0.3rem solid var(--teal);
  background: var(--surface);
}

.focus-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.card-index {
  color: var(--amber);
}

.projects-section {
  padding-bottom: 1rem;
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(18rem, 0.78fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-block: clamp(3.5rem, 7vw, 6rem);
  border-top: 1px solid var(--line);
}

.project:first-of-type {
  border-top: 0;
}

.project:nth-of-type(even) .project-copy {
  order: 2;
}

.project:nth-of-type(even) .project-figure,
.project:nth-of-type(even) .evidence-panel {
  order: 1;
}

.project-lede {
  max-width: 43rem;
  margin: 1rem 0 0;
  font-size: 1.1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 0.28rem 0.55rem;
  border: 1px solid #a9c1bd;
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--teal-pale);
  font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 690;
}

.project-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.project-details > div {
  padding-left: 1rem;
  border-left: 0.2rem solid var(--amber);
}

.project-details p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.text-link {
  display: inline-block;
  margin-top: 1.6rem;
  font-weight: 760;
}

.project-figure {
  margin: 0;
}

.project-figure img,
.project-figure video {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  border: 1px solid #9eaaad;
  border-radius: 0.3rem;
  background: #ffffff;
  box-shadow: 0.6rem 0.6rem 0 var(--teal-pale);
}

.project-figure video {
  aspect-ratio: 4 / 3;
}

.project-figure .video-wide {
  aspect-ratio: 16 / 9;
}

.project .project-demo-wide,
.project:nth-of-type(even) .project-demo-wide {
  grid-column: 1 / -1;
  order: 3;
}

.figure-terminal img {
  background: #151719;
}

.project-figure figcaption {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.video-transcript {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.video-transcript summary {
  color: var(--teal-dark);
  cursor: pointer;
  font-weight: 750;
}

.video-transcript p:last-child {
  margin-bottom: 0;
}

.evidence-panel {
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border: 1px solid #bba37e;
  border-radius: 0.3rem;
  background: var(--amber-pale);
}

.evidence-panel blockquote {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.35rem, 3.3vw, 2.2rem);
  font-weight: 760;
  line-height: 1.22;
}

.evidence-panel dl {
  margin: 2rem 0 0;
}

.evidence-panel dl div {
  display: grid;
  grid-template-columns: minmax(7rem, 0.7fr) 1.3fr;
  gap: 1rem;
  padding-block: 0.75rem;
  border-top: 1px solid rgba(18, 38, 58, 0.25);
}

.evidence-panel dt {
  font-weight: 750;
}

.evidence-panel dd {
  margin: 0;
}

.flow-list {
  margin: 0;
  padding-left: 1.35rem;
}

.flow-list li {
  padding: 0.4rem 0 0.4rem 0.45rem;
  font-weight: 670;
}

.panel-note {
  margin: 1.4rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(18, 38, 58, 0.25);
  font-size: 0.9rem;
}

.evolution-section {
  background: var(--navy);
  color: #e7eef2;
  box-shadow: 0 0 0 100vmax var(--navy);
  clip-path: inset(0 -100vmax);
}

.evolution-section h2,
.evolution-section h3 {
  color: #ffffff;
}

.evolution-section .eyebrow,
.evolution-section .section-heading > p:last-child {
  color: #b9d9d4;
}

.evolution-story {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  max-width: 58rem;
  padding-block: 2.5rem;
  border-top: 1px solid #40566b;
}

.evolution-story p {
  color: #d3dee5;
}

.evolution-story a {
  color: #b8e2dc;
}

.story-marker {
  color: #f3c98f;
  font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.supporting-card {
  display: grid;
  grid-template-columns: minmax(15rem, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 7vw, 6rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-left: 0.45rem solid var(--amber);
  background: var(--surface);
}

.supporting-card + .supporting-card {
  margin-top: 1.25rem;
}

.supporting-copy p:first-child {
  margin-top: 0;
}

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

.skills-grid article {
  border-top-color: var(--amber);
}

.skills-grid ul {
  margin-bottom: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.skills-grid li + li {
  margin-top: 0.35rem;
}

.background-section,
.contact-section {
  display: grid;
  grid-template-columns: minmax(16rem, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(2rem, 8vw, 7rem);
}

.background-section .section-heading,
.contact-section .section-heading {
  margin-bottom: 0;
}

.background-copy {
  max-width: var(--text-width);
  font-size: 1.08rem;
}

.background-copy p:first-child {
  margin-top: 0;
}

.process-section {
  display: grid;
  grid-template-columns: minmax(16rem, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 8vw, 7rem);
}

.process-section .section-heading {
  margin-bottom: 0;
}

.process-statement {
  margin: 0;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border-left: 0.35rem solid var(--teal);
  background: var(--teal-pale);
  font-size: 1.12rem;
  font-weight: 640;
}

.contact-section {
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 6rem);
  border: 0;
  border-radius: 0.35rem;
  color: #e7eef2;
  background: var(--navy);
  padding-inline: clamp(1.4rem, 5vw, 4rem);
}

.contact-section h2 {
  color: #ffffff;
}

.contact-section .eyebrow {
  color: #b9d9d4;
}

.contact-section p:last-child {
  max-width: 39rem;
}

.contact-section .button-primary {
  color: var(--navy);
  border-color: #b8e2dc;
  background: #b8e2dc;
}

.contact-section .button-secondary {
  color: #ffffff;
  border-color: #8ea5b6;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 58rem) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 1rem;
  }

  .nav-list {
    justify-content: flex-start;
  }

  .project,
  .background-section,
  .process-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .project:nth-of-type(even) .project-copy,
  .project:nth-of-type(even) .project-figure,
  .project:nth-of-type(even) .evidence-panel {
    order: initial;
  }

  .project-figure,
  .evidence-panel {
    max-width: 44rem;
  }
}

@media (max-width: 42rem) {
  .header-inner,
  .hero-inner,
  .section,
  .site-footer {
    width: min(calc(100% - 1.25rem), var(--max-width));
  }

  .nav-list {
    gap: 0.15rem 0.85rem;
  }

  .focus-grid,
  .skills-grid,
  .project-details,
  .supporting-card,
  .evolution-story {
    grid-template-columns: 1fr;
  }

  .story-marker {
    margin-bottom: -0.6rem;
  }

  .button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .site-footer {
    flex-direction: column;
  }
}

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

@media (prefers-contrast: more) {
  :root {
    --paper: #ffffff;
    --surface: #ffffff;
    --ink: #000000;
    --muted: #253442;
    --line: #40505c;
    --teal-dark: #004b49;
    --focus: #8a3100;
  }

  .button,
  .focus-card,
  .skills-grid article,
  .supporting-card,
  .project-figure img,
  .project-figure video {
    border-width: 2px;
  }
}

@media (forced-colors: active) {
  .button,
  .tag-list li,
  .focus-card,
  .skills-grid article,
  .supporting-card,
  .evidence-panel,
  .project-figure img,
  .project-figure video,
  .process-statement {
    forced-color-adjust: auto;
  }

  a:focus-visible {
    outline: 0.2rem solid Highlight;
  }
}
