:root {
  --ink: #edf5ff;
  --paper: #060c18;
  --surface: #101d30;
  color-scheme: dark;
  --line: #32435b;
  --muted: #b8c8db;
  --blue: #89e6ff;
  --warm: #68dcff;
  --sans: Inter,"Helvetica Neue",Arial,"Noto Sans Thai",Tahoma,sans-serif;
  --mono: "IBM Plex Mono",ui-monospace,monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

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

button,summary,a {
  touch-action: manipulation;
}

button,input {
  font: inherit;
}

button,summary {
  cursor: pointer;
}

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

button {
  color: inherit;
}

a:focus-visible,button:focus-visible,summary:focus-visible,input:focus-visible {
  outline: 3px solid #8aeaff;
  outline-offset: 3px;
}

h1:focus,h2:focus {
  outline: none;
}

[hidden],html[lang=en] .th,html[lang=th] .en {
  display: none!important;
}

html {
  scroll-padding-top: 74px;
}

.container,.site-head,footer,.splash {
  width: min(1320px,calc(100% - 10vw));
  margin-inline: auto;
}

.site-head {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: clamp(14px,3vw,50px);
  border-bottom: 1px solid var(--line);
}

.site-head nav,.langs,footer nav,.filters,.contact-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 1.13rem;
  font-weight: 770;
  letter-spacing: -.05em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  margin-right: 6px;
  width: 34px;
  height: 34px;
  background: linear-gradient(145deg,#204072,#111f38);
  border: 1px solid #477193;
  color: #b4f5ff;
  border-radius: 9px 9px 9px 2px;
  font: 800 24px/1 var(--sans);
  letter-spacing: -.09em;
}

.site-head nav {
  margin-left: auto;
}

.site-head nav a,.langs button {
  font-size: .86rem;
  font-weight: 620;
}

.site-head nav a:hover,footer a:hover,.crumb a:hover,.web-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.langs {
  gap: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.langs button {
  border: 0;
  min-height: 30px;
  padding: 3px 8px;
  border-radius: 15px;
  background: none;
  font-size: .74rem;
}

.langs [aria-pressed=true] {
  background: #b3efff;
  color: #071727;
}

.splash {
  display: grid;
  grid-template-columns: minmax(0,.92fr) minmax(0,1.18fr);
  min-height: clamp(450px,60vw,625px);
  align-items: center;
  gap: 4%;
  padding-block: clamp(32px,5.1vw,75px);
}

.intro .location,.location {
  font: 600 .8rem/1.5 var(--mono);
  letter-spacing: .07em;
  color: var(--muted);
}

.location:before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 3px;
  background: var(--warm);
  vertical-align: middle;
  margin-right: 9px;
}

.intro h1 {
  font: 650 clamp(3.5rem,6.8vw,7rem)/.94 var(--sans);
  letter-spacing: -.088em;
  margin: .22em 0;
}

.intro h1 span {
  color: var(--blue);
}

.intro .job {
  max-width: 32ch;
  font-size: clamp(1rem,1.48vw,1.32rem);
  line-height: 1.55;
  color: var(--muted);
}

.primary {
  display: inline-flex;
  align-items: center;
  padding: 11px 20px;
  min-height: 46px;
  border-radius: 28px;
  background: #b3efff;
  color: #071727;
  margin-top: 25px;
  font-weight: 650;
  font-size: .93rem;
}

.primary:hover {
  background: var(--blue);
}

.feature {
  position: relative;
  padding: clamp(20px,3.8vw,62px) clamp(18px,3vw,45px) 16px;
  display: grid;
  gap: clamp(15px,2vw,26px);
  border-radius: 22px;
  background: radial-gradient(ellipse at 79% -20%,#d2efbe 2%,transparent 52%),linear-gradient(135deg,#adbae8,#a5b1eb 45%,#788ee3);
  perspective: 950px;
  overflow: hidden;
}

.feature-window {
  overflow: hidden;
  transform: rotateY(-7deg) rotateX(3deg) rotateZ(-2deg);
  border: 5px solid #24262b;
  border-radius: 10px;
  box-shadow: 10px 22px 28px #39406d4a;
  background: var(--surface);
  transition: transform .45s ease;
}

.feature:hover .feature-window {
  transform: rotateY(-2deg) rotateX(1deg) rotateZ(-.6deg);
}

.feature-slide img {
  width: 100%;
  aspect-ratio: 1440/900;
  object-fit: cover;
}

.feature-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.feature-switch button {
  font-size: .83rem;
  padding: 6px 12px;
  min-height: 36px;
  background: none;
  border: 0;
  border-radius: 18px;
  color: #161e37;
}

.feature-switch button[aria-pressed=true] {
  background: #19213a;
  color: white;
}

main {
  min-height: 65vh;
}

.catalog,.collection,.about,.case-page {
  padding-block: clamp(34px,5.5vw,80px);
}

.splash+.catalog {
  padding-top: 10px;
}

.section-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.section-line h2,.collection h1,.about h1 {
  font-size: clamp(2.25rem,4.3vw,4.5rem);
  letter-spacing: -.075em;
  line-height: 1.12;
}

.project-total {
  font: 600 1rem var(--mono);
  color: var(--blue);
}

.filters {
  gap: 7px;
  margin: 22px 0;
}

.filters a {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 25px;
  font-size: .87rem;
  min-height: 38px;
}

.filters a[aria-current],.filters a:hover {
  color: #091623;
  background: #b3efff;
  border-color: #b3efff;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 16px;
}

.project-item {
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.project-item:hover {
  border-color: var(--blue);
}

.project-item img {
  height: auto;
  width: 100%;
  aspect-ratio: 2.3;
  object-fit: cover;
  object-position: top;
  border-bottom: 1px solid #32435b;
}

.item-copy {
  padding: 19px 42px 21px 19px;
}

.item-copy strong {
  display: block;
  font-size: clamp(1.15rem,1.6vw,1.5rem);
  line-height: 1.23;
  letter-spacing: -.04em;
}

.item-copy small {
  display: block;
  font-size: .94rem;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 6px;
  max-width: 47ch;
}

.project-item i {
  width: 9px;
  height: 9px;
  position: absolute;
  right: 21px;
  bottom: 24px;
  border-right: 2px solid #8bdbef;
  border-top: 2px solid #8bdbef;
  transform: rotate(45deg);
}

.crumb,.end-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .88rem;
}

.crumb {
  margin-bottom: clamp(20px,3vw,44px);
}

.crumb>span {
  opacity: .5;
}

.case-hero {
  display: grid;
  grid-template-columns: minmax(0,.82fr) minmax(0,1.4fr);
  gap: clamp(20px,5vw,80px);
  align-items: start;
}

.case-intro {
  padding-block: clamp(4px,1vw,18px);
}

.case-intro h1 {
  font-size: clamp(2.7rem,5.4vw,5.6rem);
  font-weight: 680;
  line-height: 1.02;
  letter-spacing: -.074em;
  overflow-wrap: anywhere;
}

.case-intro p,.about p:not(.location) {
  font-size: clamp(1rem,1.35vw,1.25rem);
  line-height: 1.62;
  color: var(--muted);
  max-width: 40ch;
  margin-top: 16px;
}

.one-fact {
  display: grid;
  gap: 0;
  margin: 25px 0 12px;
  padding-left: 14px;
  border-left: 3px solid var(--warm);
}

.one-fact b {
  font: 640 clamp(1.6rem,2.6vw,2.6rem)/1.1 var(--sans);
  letter-spacing: -.055em;
}

.one-fact span {
  font-size: .83rem;
  color: var(--muted);
}

.web-link {
  font-size: .9rem;
  font-weight: 650;
  color: var(--blue);
  display: inline-flex;
  gap: 4px;
  margin-top: 12px;
}

.case-media {
  border-radius: 15px;
  background: #102035;
  padding: clamp(10px,1.5vw,23px);
  min-width: 0;
}

.shot-frame {
  display: block;
  cursor: zoom-in;
}

.shot-frame img {
  border: 1px solid #3a506c;
  border-radius: 7px;
  background: var(--surface);
  width: 100%;
  height: auto;
  max-height: 490px;
  aspect-ratio: 16/9;
  object-fit: contain;
}

.shot-frame>span {
  display: block;
  margin: 10px 0 0;
  font-size: .88rem;
  line-height: 1.45;
  color: #d6e5f4;
}

.gallery-selector {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 5px 2px;
  margin-top: 9px;
}

.gallery-selector button,.viewer-strip button {
  background: var(--surface);
  padding: 2px;
  border: 1px solid #45617f;
  border-radius: 5px;
  flex: 0 0 68px;
}

.gallery-selector button[aria-pressed=true],.viewer-strip button[aria-pressed=true] {
  outline: 2px solid var(--blue);
  outline-offset: 0;
}

.gallery-selector img,.viewer-strip img {
  width: 100%;
  height: 39px;
  object-fit: contain;
}

.case-flow {
  list-style: none;
  margin: 0;
  padding: clamp(24px,3vw,52px);
  border-radius: 15px;
  background: #132741;
  display: grid;
  gap: 0;
  counter-reset: flow;
}

.case-flow li {
  padding: 13px 0;
  border-bottom: 1px solid #405873;
  font-size: clamp(1.06rem,1.7vw,1.6rem);
  font-weight: 580;
}

.case-flow li::before {
  counter-increment: flow;
  content: counter(flow,decimal-leading-zero);
  font: 500 .76rem var(--mono);
  color: #7ed7f0;
  margin-right: 16px;
}

.deep,.end-links,.tiger-list {
  margin-top: clamp(20px,3vw,42px);
}

.deep {
  border-block: 1px solid var(--line);
  max-width: 100%;
}

.deep summary {
  padding: 19px 0;
  font-weight: 650;
  min-height: 48px;
}

.deep-body {
  max-width: 86ch;
  color: #ccdaeb;
  padding: 0 0 24px;
  line-height: 1.72;
}

.deep-body p,.deep-body :is(.sys-col,.case-row) {
  margin: .7rem 0;
}

.deep-body a,.contact-links a,.about nav a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.stack-row,.flow-strip,.update-row,.step-top,.stack-skills {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.stack-pill,.stack-chip,.flow-node,.step-badge,.step-time,.update-chip {
  display: inline-flex;
  font-size: .84rem;
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 6px;
}

.flow-sep {
  display: none;
}

.sys-col-title,.case-key {
  display: block;
  font-weight: 700;
}

.end-links {
  justify-content: space-between;
}

.end-links a {
  padding: 8px 0;
  text-decoration: underline;
}

.about {
  display: grid;
  grid-template-columns: minmax(0,.6fr) minmax(0,1fr);
  gap: 6%;
  align-items: center;
}

.about>img {
  width: 100%;
  height: auto;
  border-radius: 15px;
}

.about nav,footer nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.notes-index {
  max-width: 820px;
  margin-top: 20px;
}

.notes-index a {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.notes-index small {
  font-size: .93rem;
  color: var(--muted);
}

.note h1,.contact-links {
  margin-bottom: 28px;
}

.step-card {
  padding: 15px 0;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(min(190px,100%),1fr));
  gap: 13px;
  margin: 18px 0;
}

.cert-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  cursor: zoom-in;
}

.cert-thumb img {
  width: 100%;
  height: 125px;
  object-fit: contain;
}

.cert-zoom,.section-label i,.stack-domain i {
  display: none;
}

.cert-meta span {
  display: block;
  font-size: .83rem;
}

.extra-certs-bar {
  margin: 18px 0;
}

.note .stack-chip {
  margin: 3px;
}

.contact-links {
  margin-top: 20px;
}

.tm-phone {
  max-width: 490px;
  margin: 25px auto;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 15px;
}

.tm-phone-bar,.tm-chips,.tm-form,.tm-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0;
}

.tm-phone-bar {
  justify-content: space-between;
}

.tm-phone-bar span {
  display: block;
}

.tm-phone button,.tm-phone input {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #142338;
}

.tm-log {
  background: #182a41;
  border-radius: 8px;
  margin: 10px 0;
  padding: 12px;
  max-height: 300px;
  overflow: auto;
  white-space: pre-line;
}

.tm-log>div+div {
  border-top: 1px solid var(--line);
  margin-top: 9px;
  padding-top: 8px;
}

.tm-form input {
  flex: 1;
  min-width: 0;
}

footer {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding: 26px 0;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  color: var(--muted);
  font-size: .86rem;
}

footer nav {
  margin: 0;
}

.evidence-viewer {
  margin: auto;
  width: min(1080px,96vw);
  max-width: 96vw;
  max-height: 94dvh;
  padding: clamp(12px,2vw,24px);
  border: 1px solid #546e8c;
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
}

.evidence-viewer::backdrop {
  background: #02050bee;
}

.viewing-evidence {
  overflow: hidden;
}

.viewer-bar,.viewer-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.viewer-bar {
  padding-bottom: 9px;
  font: 500 .85rem var(--mono);
}

.evidence-viewer button,.viewer-note a {
  min-height: 42px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.viewer-screen {
  position: relative;
  display: grid;
  justify-items: center;
  background: #080f1c;
}

.viewer-screen img {
  max-width: 100%;
  height: min(56dvh,580px);
  object-fit: contain;
}

.viewer-screen button {
  position: absolute;
  top: 46%;
  box-shadow: 0 3px 10px #18201c35;
}

.viewer-screen [data-previous] {
  left: 6px;
}

.viewer-screen [data-next] {
  right: 6px;
}

.viewer-note {
  padding-block: 10px;
}

.viewer-note h2 {
  font-size: 1.04rem;
}

.viewer-note a {
  white-space: nowrap;
  font-size: .83rem;
}

.viewer-strip {
  display: flex;
  gap: 6px;
  overflow: auto;
  padding: 3px;
}

.viewer-strip button {
  padding: 2px;
}

html[lang=th] :is(h1,h2,.item-copy strong) {
  letter-spacing: -.035em;
  line-height: 1.18;
}

@media(max-width:850px) {
  .project-list {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .case-hero {
    grid-template-columns: 1fr;
  }
  .case-intro p {
    max-width: 56ch;
  }
  .one-fact {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
  }
  .site-head {
    gap: 15px;
  }
}

@media(max-width:640px) {
  .container,.splash,.site-head,footer {
    width: calc(100% - 32px);
  }
  .site-head {
    min-height: 58px;
    gap: 10px;
  }
  .brand-surname {
    display: none;
  }
  .brand {
    font-size: .98rem;
  }
  .brand-mark {
    width: 28px;
    height: 28px;
    font-size: 21px;
  }
  .site-head nav {
    gap: 10px;
  }
  .site-head nav a,.langs button {
    font-size: .76rem;
  }
  .langs button {
    padding: 2px 6px;
  }
  .splash {
    grid-template-columns: 1fr;
    gap: 24px;
    min-height: auto;
    padding-block: 30px;
  }
  .intro h1 {
    font-size: clamp(3.35rem,13vw,5.1rem);
  }
  .intro .job {
    max-width: 38ch;
  }
  .primary {
    margin-top: 15px;
  }
  .feature {
    padding: 19px 20px 10px;
    gap: 11px;
  }
  .feature-window {
    border-width: 3px;
  }
  .feature-switch button {
    padding: 4px 10px;
  }
  .filters {
    gap: 5px;
    margin: 15px 0;
  }
  .filters a {
    padding: 6px 10px;
  }
  .project-list {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .project-item {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
  }
  .project-item:has(img) {
    grid-template-columns: 85px 1fr;
  }
  .project-item img {
    width: 85px;
    height: 82px;
    object-fit: cover;
    object-position: top left;
    border: 0;
  }
  .item-copy {
    padding: 13px 24px 13px 13px;
  }
  .item-copy small {
    font-size: .85rem;
  }
  .project-item i {
    right: 12px;
    bottom: 45%;
    width: 7px;
    height: 7px;
  }
  .about {
    grid-template-columns: 1fr;
  }
  .about>img {
    max-width: 240px;
  }
  .case-intro h1 {
    font-size: clamp(2.4rem,10vw,3.8rem);
  }
  .case-hero {
    gap: 16px;
  }
  .case-intro p {
    margin-top: 7px;
  }
  .case-media {
    border-radius: 10px;
  }
  .viewer-screen img {
    height: auto;
    max-height: 52dvh;
  }
  .viewer-screen {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
  .viewer-screen img {
    grid-column: 1/-1;
    grid-row: 1;
  }
  .viewer-screen button {
    position: static;
    width: 100%;
    grid-row: 2;
  }
  .viewer-screen [data-previous] {
    grid-column: 1;
  }
  .viewer-screen [data-next] {
    grid-column: 2;
  }
  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media(max-width:370px) {
  .site-head {
    width: calc(100% - 20px);
    gap: 6px;
  }
  .site-head nav {
    gap: 7px;
  }
  .brand-mark {
    display: none;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    transition: none!important;
    scroll-behavior: auto!important;
  }
}

.splash[hidden]+.catalog {
  padding-top: clamp(32px,5vw,74px);
}

/* The planet is a decorative scenic layer. Project photographs stay flat and readable. */
body {
  min-height: 100vh;
  background: radial-gradient(ellipse 90% 760px at 93% 0%, #102744, transparent 72%), var(--paper);
}
.site-head { position: relative; z-index: 1; }
.site-head nav a[aria-current=page] { color: var(--blue); }
.splash {
  isolation: isolate;
  position: relative;
  margin-block: 18px clamp(28px,5vw,64px);
  min-height: clamp(420px,41vw,590px);
  padding: clamp(22px,4vw,62px);
  gap: clamp(18px,3vw,48px);
  border: 1px solid #334965;
  border-radius: 24px;
  background: #070f1c;
  overflow: hidden;
}
.splash::before, .splash::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.splash::before {
  inset: -2%;
  background: url("projects/orbital-earth.webp") center 61% / cover;
  transform: translate3d(var(--pan-x,0px),var(--pan-y,0px),0);
}
.splash::after {
  background: linear-gradient(90deg, #030916f0, #050d1d9e 34%, transparent 74%),
              linear-gradient(0deg,#030b1bd1,transparent 41%);
}
.intro h1 { font-size:clamp(3.1rem,6vw,6.3rem); letter-spacing:-.073em; }
.intro .job { color:#dfebf7; max-width:32ch; }
.intro .location { color:#b3e9fb; }
.primary { gap: 10px; box-shadow: inset 0 1px 0 #fff9, 0 5px 18px #07111b50; }
.intro .primary::after { content: "↓"; }
.feature {
  overflow: visible;
  background: none;
  padding: clamp(12px,2.5vw,34px) 0 0;
  perspective: 1150px;
}
.feature-window {
  position:relative;
  border: 1px solid #9cdeff;
  padding: 5px;
  border-radius: 13px;
  background: linear-gradient(140deg,#b4eaff 0%,#425d85 1.4%,#0d172a 6%,#233b58 88%,#71aaa9 100%);
  box-shadow: 6px 7px 0 -2px #1a3352, 7px 8px 0 -2px #779ab3, 8px 12px 20px #0008, 0 16px 70px #009cff38;
  transform: rotateY(calc(-11deg + var(--yaw,0deg))) rotateX(calc(5deg + var(--pitch,0deg))) rotateZ(-1deg);
  transition: transform .18s ease-out;
}
.feature:hover .feature-window {
  transform: rotateY(calc(-6deg + var(--yaw,0deg))) rotateX(calc(2deg + var(--pitch,0deg))) rotateZ(-.5deg);
}
.feature-slide img { aspect-ratio:1.87; object-position:top center; border-radius:8px; }
.feature-switch {
  justify-self:center; gap:2px; padding:3px;
  border:1px solid #435e7a; border-radius:24px; background:#051021ed;
}
.feature-switch button { color:#d8edff; }
.feature-switch button[aria-pressed=true] { background:#c1edff; color:#101f30; }
.section-line { align-items:center; }
.project-total { border:1px solid var(--line); padding:2px 9px; border-radius:20px; font-size:.81rem; }
.project-item,.cert-card,.case-flow,.case-media,.notes-index a,.tm-phone {
  background: linear-gradient(145deg,#18283c,#0d1829 80%);
  border:1px solid var(--line);
  box-shadow:inset 0 1px #b1dbff0b,0 8px 22px #02061036;
}
.project-list { align-items:start; }
.project-item img { aspect-ratio:2.1; }
.project-item:has(img[src*="yadee-"]) img { object-fit:contain; background:#0b2030; }
.project-item i { bottom:23px; }
.notes-index { display:grid; gap:9px; }
.notes-index a { border-radius:13px; padding:16px 20px; }
.deep { background:#0d192a; border:1px solid var(--line); border-radius:13px; padding-inline:clamp(14px,2vw,28px); }
.stack-chip,.stack-pill,.step-badge,.update-chip,.flow-node { background:#101d30; }
.case-media { border-radius:16px; }
.shot-frame img { background:#081424; }
.case-flow { padding:clamp(20px,3vw,40px); }
.case-flow li:last-child { border-bottom:0; }
.about>img { border:1px solid #486382; box-shadow:12px 14px 0 -8px #1e3c5e; }
.tm-phone input { color:var(--ink); }
.evidence-viewer { background:#0d192b; }
#contact {
  margin-block:clamp(25px,5vw,70px);
  padding:clamp(24px,5.8vw,84px);
  border:1px solid #38516c; border-radius:24px;
  background:linear-gradient(90deg,#060e1eef,#061024bf 52%,#05102838),
             url("projects/orbital-earth.webp") center 60% / cover;
}
#contact .location { color:#a3def1; margin-bottom:14px; }
.contact-links { align-items:stretch; gap:9px; margin-block:24px 0; }
.contact-links a {
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  min-height:46px; padding:10px 17px; border-radius:12px; border:1px solid #607d99;
  margin:0; text-decoration:none; color:#e5f5ff; background:#102038eb;
}
.contact-links a:not(.primary)::after { content:"↗"; color:#9ed3ee; }
.contact-links a.primary { color:#061523; background:#b3efff; border-color:#b3efff; }
.contact-links a:hover, .notes-index a:hover { border-color:var(--blue); text-decoration:underline; }
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .project-item:hover { transform: translateY(-3px); box-shadow: 0 10px 25px #01071380; }
}
@media(max-width:640px) {
  .splash { border-radius:18px; padding:24px 19px 18px; gap:16px; margin-top:10px; }
  .splash::after { background:linear-gradient(110deg,#030a18e0 0%,#040e1a77 52%,transparent),linear-gradient(0deg,#040c1bd1,transparent 45%); }
  .intro h1 { font-size:clamp(2.9rem,11.8vw,4.4rem); }
  .feature { padding:4px; gap:12px; }
  .feature-window,.feature:hover .feature-window { transform:perspective(900px) rotateY(-3deg) rotateX(2deg); }
  .feature-switch button { min-height:36px; font-size:.78rem; padding-inline:9px; }
  .project-item i { bottom:45%; }
  .contact-links a.primary { flex-basis:100%; overflow-wrap:anywhere; }
}
@media(prefers-reduced-motion:reduce) {
  .splash::before,.feature-window,.feature:hover .feature-window { transform:none; }
}
.feature-window:has([data-depth]) {
  overflow:visible; isolation:isolate; padding:0; border:0; box-shadow:none; background:transparent;
  aspect-ratio:1.87; width:88%; justify-self:center; transform-style:preserve-3d;
}
.feature-slide[data-depth] {
  position:absolute; inset:0; display:block; overflow:hidden;
  padding:4px; border:1px solid #94cbe9; border-radius:12px;
  background:linear-gradient(145deg,#b5d8ea,#344561 5%,#132039 85%,#709ab5);
  box-shadow:3px 4px 0 #213952,5px 6px 0 #5b7592,4px 14px 32px #02071799;
  transition:transform .55s cubic-bezier(.2,.75,.2,1),filter .4s;
}
.feature-slide[data-depth=front] { z-index:2; transform:translateZ(18px); }
.feature-slide[data-depth=left],.feature-slide[data-depth=right] { pointer-events:none; filter:brightness(.46) saturate(.68); }
.feature-slide[data-depth=left] { transform:translate3d(-14%,-7%,-70px) rotateY(12deg) rotateZ(-5deg) scale(.92); }
.feature-slide[data-depth=right] { transform:translate3d(14%,-6%,-68px) rotateY(-14deg) rotateZ(5deg) scale(.92); }
.feature-slide[data-depth] img { width:100%; height:100%; }
.film-player { margin-top:30px; padding:clamp(16px,2.8vw,32px); background:var(--surface); border:1px solid var(--line); border-radius:16px; }
.film-player p { margin:.4em 0 1em; color:var(--muted); }
.film-player video { display:block; width:100%; height:clamp(290px,52vh,480px); background:#050b12; border-radius:10px; }
.film-choices { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.film-choices a { padding:8px 14px; border:1px solid var(--line); border-radius:24px; }
.film-choices [aria-current] { background:#b3efff; color:#071727; }
.project-item:has(img[src*="/story-"]) img,.project-item:has(img[src*="internship-film"]) img { object-fit:contain; background:#101725; }
@media(prefers-reduced-motion:reduce) {
  .feature-slide[data-depth]:not([data-depth=front]) { visibility:hidden; }
}
.system-map { margin-top:clamp(32px,5vw,72px); }
.system-map h2,.film-player h2 { font-size:clamp(1.5rem,2.6vw,2.4rem); line-height:1.2; letter-spacing:-.035em; }
.system-map dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 clamp(18px,3vw,52px); margin:20px 0 0; }
.system-map dl>div { padding:18px 0; border-top:1px solid var(--line); }
.system-map dt { font-size:clamp(1.04rem,1.4vw,1.24rem); color:#e6f6ff; font-weight:700; }
.system-map dd { margin:6px 0 0; color:var(--muted); max-width:63ch; line-height:1.65; }
.work-origin { margin-top:18px; padding:18px 22px; border-left:3px solid #82dfff; background:#101e31; border-radius:0 12px 12px 0; }
.work-origin h3 { font-size:1rem; color:#b1eeff; }
.work-origin p { margin-top:6px; color:var(--muted); max-width:78ch; }
@media(max-width:660px) { .system-map dl { grid-template-columns:1fr; } .system-map dl>div { padding-block:14px; } }
.module-link { display:table; width:fit-content; color:#b1efff; font-size:.94rem; font-weight:650; padding:8px 13px; border:1px solid #47738a; border-radius:9px; margin-top:16px; }
.module-link:hover { background:#173149; }
.module-link>span[aria-hidden] { margin-left:5px; }
.system-map { scroll-margin-top:16px; }
