:root {
  color-scheme: dark;
  --paper: #0b1020;
  --panel: #10182c;
  --ink: #eff3ff;
  --muted: #aebdd8;
  --accent: #9bb9ff;
  --line: #2e3d5e;
  --display: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.65 system-ui, sans-serif;
}
a { color: inherit; text-underline-offset: .3em; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.02; }
.wrap { width: min(100% - 4rem, 72rem); margin-inline: auto; }
.skip { position: fixed; inset: .6rem auto auto .6rem; z-index: 5; padding: .7rem; background: var(--paper); transform: translateY(-160%); }
.skip:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 2; background: #0b1020f5; border-bottom: 1px solid var(--line); }
.header-inner, .brand, nav, .actions, .footer { display: flex; align-items: center; }
.header-inner, .footer { justify-content: space-between; }
.header-inner { min-height: 4.4rem; gap: .75rem; }
.brand, nav a { text-decoration: none; }
.brand { gap: .75rem; white-space: nowrap; font-weight: 650; }
.brand span {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  font: .85rem var(--mono);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 50%;
}
nav { gap: clamp(.8rem, 3vw, 2rem); font-size: .9rem; color: var(--muted); }
nav a:hover, .footer a:hover, .text-link:hover { color: var(--accent); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5.5rem);
  padding-block: clamp(3rem, 8vw, 7rem);
}
.eyebrow, .date {
  color: var(--accent);
  font: 600 .82rem/1.5 var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.intro h1 {
  font-size: clamp(5rem, 10vw, 9rem);
  letter-spacing: -.085em;
  line-height: .83;
  margin: 1.05rem 0 1.45rem;
}
.intro h1 em { color: var(--accent); }
.intro > p, .detail-summary { color: var(--muted); font-size: clamp(1.06rem, 1.6vw, 1.22rem); max-width: 32rem; }
.actions { gap: 1.3rem; flex-wrap: wrap; margin-top: 1.7rem; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.85rem;
  padding: .55rem 1rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #0b1020;
  font-weight: 700;
  text-decoration: none;
  transition: background .16s ease;
}
.button:hover { background: #d0dfff; }
.text-link, .back-link { font-weight: 650; }
.portrait { position: relative; isolation: isolate; margin: 0 .85rem .85rem 0; }
.portrait::before {
  content: "";
  position: absolute;
  inset: .9rem -.9rem -.9rem .9rem;
  border: 1px solid var(--accent);
  z-index: -1;
}
.portrait img { display: block; width: 100%; height: auto; aspect-ratio: 4/4.35; object-fit: cover; object-position: center 28%; filter: grayscale(100%) contrast(.92); }

.section { padding-block: clamp(3rem, 7vw, 6rem); }
h2 { font-size: clamp(2.8rem, 6vw, 5rem); letter-spacing: -.06em; }
.work { background: var(--panel); border-block: 1px solid var(--line); }
.project-list { margin-top: 1.7rem; }
.project {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 29%);
  column-gap: clamp(1.4rem, 6vw, 5.5rem);
  align-items: center;
  padding-block: 1.45rem;
  border-top: 1px solid var(--line);
  transition: border-color .18s ease;
}
.project:last-child { border-bottom: 1px solid var(--line); }
.project:hover, .project:focus-within { border-top-color: var(--accent); }
.project .art { grid-column: 2; grid-row: 1; }
.project-copy { grid-column: 1; grid-row: 1; }
.project h3 { font-size: clamp(2.2rem, 4.4vw, 3.7rem); letter-spacing: -.05em; margin: .18rem 0 .45rem; }
.project-copy > p:not(.eyebrow), .section-note, .timeline li > p:last-child:not(.org), .detail-body p { color: var(--muted); }
.project-copy > p:not(.eyebrow) { max-width: 43rem; }
.project-link { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--accent); font-weight: 700; }
.project-link::after { content: ""; position: absolute; inset: 0; }
.project-link:focus-visible { outline: none; }
.project-link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 3px; }

.career { display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(2rem, 7vw, 6rem); }
.section-note { margin-top: .9rem; max-width: 20rem; }
.timeline { padding: 0; margin: 0; list-style: none; }
.timeline li { border-top: 1px solid var(--line); padding: 1.1rem 0 1.4rem; }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline h3 { font-size: clamp(1.5rem, 2.7vw, 2.25rem); margin: .45rem 0 .25rem; }
.org { font-weight: 650; margin-bottom: .45rem; }
.contact { background: #162446; border-top: 1px solid var(--line); }
.contact-inner { display: grid; grid-template-columns: 1.25fr .75fr; gap: 1.3rem; align-items: end; }
.contact p { color: #d2def6; margin-top: .7rem; }
.contact-email { font-weight: 700; color: #c3d5ff; font-size: clamp(1rem, 2.3vw, 1.35rem); justify-self: end; overflow-wrap: anywhere; }
.footer { min-height: 4.6rem; font-size: .9rem; color: var(--muted); }

.back-link { color: var(--accent); }
.detail { padding-block: clamp(2.1rem, 7vw, 5.5rem); }
.detail-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: clamp(2rem, 6vw, 5rem); margin-top: 2.15rem; }
.detail h1 { font-size: clamp(3.1rem, 7vw, 6.85rem); letter-spacing: -.07em; margin: .9rem 0 .65rem; }
.project-platform { display: block; margin-top: .3rem; color: var(--muted); }
.detail-subtitle { font-size: clamp(1.12rem, 2vw, 1.45rem); font-weight: 700; line-height: 1.3; margin-bottom: .85rem; }
.detail-summary { margin-bottom: 1.35rem; }
.detail-body { margin-top: clamp(2.75rem, 7vw, 5.4rem); border-bottom: 1px solid var(--line); }
.detail-body section { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: 1.2rem 2rem; border-top: 1px solid var(--line); padding: 1.5rem 0; }
.detail-body h2 { font-size: clamp(1.65rem, 3.4vw, 2.6rem); }
.detail-body p { max-width: 64ch; }

.art{height:clamp(10rem,20vw,15rem);position:relative;display:grid;place-items:center;overflow:hidden;isolation:isolate}
.baseball{background:radial-gradient(ellipse at 50% 30%,#354f67,#142938 74%)}
.art::before{content:"";position:absolute;inset:0;background-image:linear-gradient(#ffffff0b 1px,transparent 1px),linear-gradient(90deg,#ffffff0b 1px,transparent 1px);background-size:25px 25px;z-index:-1}
.field{width:clamp(6rem,13vw,9.2rem);aspect-ratio:1;border:2px solid #adcee3;transform:rotate(45deg);position:relative;background:#87bfd71c;box-shadow:0 0 0 12px #97b9ce17}
.field i{position:absolute;width:.66rem;aspect-ratio:1;background:#d7ecf3}
.field i:nth-child(1){inset:-.33rem auto auto -.33rem}
.field i:nth-child(2){inset:-.33rem -.33rem auto auto}
.field i:nth-child(3){inset:auto auto -.33rem -.33rem}
.field i:nth-child(4){inset:auto -.33rem -.33rem auto}
.field b{position:absolute;inset:42%;border:1px solid #adcee3;border-radius:50%}

.art { border: 1px solid #b0c7ff40; }
.project-logo::before { display: none; }
.project-logo.dinka { background: #244437; }
.project-logo.cloud { background: #eff4fb; }
.project-logo.rank { background: #faf3ef; }
.project-logo img { position: absolute; inset: 12% 9%; width: 82%; height: 76%; object-fit: contain; }
.project-logo.dinka img { inset: 6% 0; width: 100%; height: 88%; }
.project .art { height: clamp(7rem, 15vw, 11rem); }
.project .field { width: clamp(3.5rem, 8vw, 6.3rem); }
.detail-hero .art { min-height: 18rem; }

@media (max-width: 48rem) {
  .wrap { width: calc(100% - 2.5rem); }
  .hero, .career, .contact-inner, .detail-hero { grid-template-columns: 1fr; }
  .hero { gap: 2.35rem; }
  .intro h1 { font-size: clamp(4.3rem, 13vw, 7rem); }
  .portrait { width: min(calc(100% - .85rem), 26rem); }
  .portrait img { aspect-ratio: 5/3.6; object-position: center 25%; }
  .contact-email { justify-self: start; }
  .detail-hero .art { min-height: 12rem; }
}
@media (max-width: 35rem) {
  .project { grid-template-columns: minmax(0, 1fr); row-gap: 1rem; }
  .project-copy { grid-column: 1; grid-row: 2; }
  .project .art { grid-column: 1; grid-row: 1; height: 8.5rem; }
  .detail-body section { grid-template-columns: 1fr; }
}
@media (max-width: 28rem) {
  .wrap { width: calc(100% - 2rem); }
  .brand { font-size: 0; gap: 0; }
  .header-inner { min-height: 3.85rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .project { transition: none; }
}
