:root {
  --paper: #f9f8f8;
  --paper-deep: #e6f0ef;
  --ink: #1f2f42;
  --ink-soft: #536673;
  --line: #cbdcdb;
  --accent-coral: #f4824f;
  --accent-blue: #18a9a6;
  --accent-mint: #b9e1de;
  --display: "DM Sans", "Helvetica Neue", sans-serif;
  --mono: "Space Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1rem;
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.shell {
  width: min(100% - 3rem, 1180px);
  margin-inline: auto;
}

.site-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding-block: 1.65rem;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 0.7rem;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 3rem;
  object-fit: contain;
  object-position: center;
  width: 11.25rem;
}

.header-note,
.route-label,
.eyebrow,
.project-meta,
.route-caption,
.site-footer {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-note {
  align-items: center;
  color: var(--ink-soft);
  display: inline-flex;
  gap: 0.55rem;
}

.header-dot,
.status-dot {
  background: var(--accent-coral);
  border-radius: 50%;
  display: inline-block;
  height: 0.45rem;
  width: 0.45rem;
}

.hero {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 7vw, 7rem);
  grid-template-columns: minmax(0, 0.88fr) minmax(360px, 1.12fr);
  min-height: min(720px, calc(100vh - 5.5rem));
  padding-block: 3rem 5.75rem;
}

.hero-copy {
  animation: rise-in 750ms cubic-bezier(0.16, 1, 0.3, 1) both;
  position: relative;
  z-index: 1;
}

.route-label {
  align-items: center;
  color: var(--ink-soft);
  display: inline-flex;
  gap: 0.55rem;
  margin: 0 0 1.6rem;
}

.route-marker {
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--accent-coral);
  display: inline-block;
  height: 0.72rem;
  position: relative;
  width: 0.72rem;
}

.route-marker::after {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 0.28rem;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 0.28rem;
}

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

h1,
h2,
h3 {
  letter-spacing: -0.055em;
  line-height: 0.98;
}

h1 {
  font-size: clamp(3.5rem, 7vw, 6.65rem);
  max-width: 8.6ch;
  margin-bottom: 1.7rem;
}

.hero-lede {
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  max-width: 40ch;
}

.text-link,
.project-link {
  align-items: center;
  display: inline-flex;
  font-weight: 700;
  gap: 0.7rem;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25rem;
}

.text-link svg {
  height: 1.1rem;
  transition: transform 180ms ease-out;
  width: 1.1rem;
}

.text-link:hover svg,
.text-link:focus-visible svg {
  transform: translateX(0.25rem);
}

.route-visual {
  animation: reveal-route 1000ms 120ms cubic-bezier(0.16, 1, 0.3, 1) both;
  background: var(--paper-deep);
  min-height: 410px;
  overflow: hidden;
  position: relative;
}

.route-visual::before {
  background: var(--accent-mint);
  clip-path: polygon(0 0, 100% 0, 73% 100%, 0 100%);
  content: "";
  inset: 0 15% 0 0;
  opacity: 0.62;
  position: absolute;
}

.route-visual svg {
  height: 100%;
  position: absolute;
  width: 100%;
}

.route-grid {
  fill: none;
  stroke: rgba(23, 35, 43, 0.11);
  stroke-width: 1;
}

.route-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
  stroke-dasharray: 780;
  stroke-dashoffset: 780;
  animation: draw-route 1400ms 430ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.route-line-main {
  stroke: var(--accent-blue);
}

.route-line-branch {
  stroke: var(--accent-coral);
  animation-delay: 700ms;
}

.route-node {
  fill: var(--paper);
  stroke-width: 5;
}

.route-node-start,
.route-node-end {
  stroke: var(--accent-coral);
}

.route-node-project {
  fill: var(--accent-coral);
  stroke: var(--paper);
}

.route-tick {
  fill: none;
  stroke: var(--paper);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.route-caption {
  color: var(--ink-soft);
  position: absolute;
}

.route-caption-top {
  left: 1.35rem;
  top: 1.2rem;
}

.route-caption-bottom {
  bottom: 1.2rem;
  right: 1.35rem;
}

.route-destination-label {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.62rem;
  left: 53%;
  letter-spacing: 0.06em;
  padding: 0.45rem 0.65rem;
  position: absolute;
  top: 58%;
  transform: translate(0.8rem, -50%);
  white-space: nowrap;
}

.projects {
  border-top: 1px solid var(--line);
  padding-block: 5.5rem 6.7rem;
}

.section-heading {
  align-items: end;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 0.65fr;
  margin-bottom: 4rem;
}

.eyebrow {
  color: var(--accent-blue);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(2.75rem, 5vw, 5rem);
  margin-bottom: 0;
}

.section-intro {
  color: var(--ink-soft);
  margin-bottom: 0.2rem;
  max-width: 28ch;
}

.project-route {
  align-items: stretch;
  display: grid;
  gap: 1.45rem;
  grid-template-columns: 4rem minmax(0, 1fr);
}

.project-index {
  align-items: center;
  color: var(--accent-coral);
  display: flex;
  flex-direction: column;
  font-family: var(--mono);
  font-size: 0.76rem;
  gap: 1rem;
  padding-top: 1.3rem;
}

.index-line {
  background: var(--accent-coral);
  flex: 1;
  min-height: 7rem;
  width: 2px;
}

.project-entry {
  border-top: 3px solid var(--ink);
  padding-top: 1.15rem;
}

.project-meta {
  align-items: center;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
}

.project-status {
  align-items: center;
  display: inline-flex;
  gap: 0.5rem;
}

.project-code {
  color: var(--accent-blue);
}

.project-body {
  align-items: end;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  padding-block: 2.2rem 2.5rem;
}

h3 {
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  margin-bottom: 0.8rem;
}

.project-body p {
  color: var(--ink-soft);
  margin-bottom: 0;
  max-width: 38ch;
}

.project-link {
  flex: 0 0 auto;
  font-size: 0.9rem;
  text-underline-offset: 0.28rem;
}

.project-link svg {
  height: 1.35rem;
  transition: transform 180ms ease-out;
  width: 1.35rem;
}

.project-link:hover svg,
.project-link:focus-visible svg {
  transform: translate(0.2rem, -0.2rem);
}

.future-note {
  align-items: center;
  color: var(--ink-soft);
  display: flex;
  gap: 1.2rem;
  margin: 3.5rem 0 0 5.45rem;
}

.future-note p {
  margin: 0;
}

.future-note p span {
  color: var(--ink);
  font-weight: 700;
}

.future-line {
  background: var(--line);
  display: block;
  height: 1px;
  width: 3rem;
}

.closing {
  align-items: start;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 5rem 1fr;
  margin-bottom: 6rem;
  padding: 4rem clamp(1.5rem, 6vw, 6rem) 4.5rem;
}

.closing .eyebrow {
  color: var(--accent-mint);
}

.closing h2 {
  font-size: clamp(3rem, 7vw, 7rem);
}

.closing h2 em {
  color: var(--accent-coral);
  font-style: normal;
}

.closing-mark {
  align-items: center;
  border: 1px solid var(--accent-coral);
  color: var(--accent-coral);
  display: flex;
  font-size: 2rem;
  height: 3.5rem;
  justify-content: center;
  line-height: 1;
  width: 3.5rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  padding-block: 1.4rem 2rem;
}

.site-footer span:first-child {
  color: var(--ink);
  font-weight: 700;
}

a:focus-visible {
  outline: 3px solid var(--accent-coral);
  outline-offset: 5px;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes reveal-route {
  from { clip-path: inset(0 0 0 16%); opacity: 0; }
  to { clip-path: inset(0); opacity: 1; }
}

@keyframes draw-route {
  to { stroke-dashoffset: 0; }
}

@media (max-width: 820px) {
  .hero {
    gap: 3.5rem;
    grid-template-columns: 1fr;
    min-height: auto;
    padding-block: 4.2rem 4.5rem;
  }

  .hero-copy {
    max-width: 44rem;
  }

  .route-visual {
    min-height: 330px;
  }

  .section-heading {
    align-items: start;
    grid-template-columns: 1fr;
    margin-bottom: 3rem;
  }

  .section-intro {
    max-width: 40ch;
  }
}

@media (max-width: 580px) {
  .shell {
    width: min(100% - 2rem, 1180px);
  }

  .site-header {
    padding-block: 1.1rem;
  }

  .brand-logo {
    height: 2.5rem;
    width: 9rem;
  }

  .header-note {
    font-size: 0.58rem;
  }

  .hero {
    padding-block: 3.6rem 4rem;
  }

  h1 {
    font-size: clamp(3.1rem, 15vw, 5rem);
  }

  .route-visual {
    min-height: 235px;
  }

  .route-caption {
    font-size: 0.56rem;
  }

  .route-destination-label {
    font-size: 0.54rem;
    left: 31%;
    top: 52%;
  }

  .projects {
    padding-block: 4rem 4.5rem;
  }

  .project-route {
    gap: 0.8rem;
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .project-index {
    font-size: 0.62rem;
    padding-top: 0.95rem;
  }

  .project-body {
    align-items: start;
    flex-direction: column;
    gap: 2rem;
    padding-block: 1.65rem 2rem;
  }

  .project-meta {
    align-items: start;
    flex-direction: column;
    gap: 0.7rem;
  }

  h3 {
    font-size: clamp(2.4rem, 12vw, 4rem);
  }

  .future-note {
    align-items: start;
    margin-left: 2.8rem;
  }

  .future-line {
    flex: 0 0 auto;
    margin-top: 0.7rem;
    width: 1.4rem;
  }

  .closing {
    gap: 2rem;
    grid-template-columns: 1fr;
    margin-bottom: 4rem;
    padding: 2.5rem 1.4rem 3rem;
  }

  .closing h2 {
    font-size: clamp(2.9rem, 14vw, 5rem);
  }

  .site-footer {
    align-items: start;
    flex-direction: column;
    gap: 0.6rem;
    padding-bottom: 1.5rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
