:root {
  color-scheme: light;
  --paper: #f6f7f2;
  --white: #fcfdf9;
  --ink: #14242d;
  --muted: #4d5e63;
  --night: #101d29;
  --night-text: #f1f7f4;
  --night-muted: #beccd1;
  --mint: #bdf4e4;
  --green: #1f665a;
  --border: #d9e0d9;
  --mono: "Cascadia Code", "IBM Plex Mono", Consolas, monospace;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.55; }
body, button { font-size: 1rem; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
ul { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #4eb497; outline-offset: 4px; }
::selection { background: var(--mint); color: var(--night); }

.shell { width: min(100% - 6rem, 76rem); margin-inline: auto; }
.section { padding-block: clamp(3.75rem, 7vw, 6.5rem); }
.section[id] { scroll-margin-top: 1.25rem; }
.section h2 { font-size: clamp(2.35rem, 4.75vw, 4.2rem); line-height: 1.06; letter-spacing: -.065em; font-weight: 730; }
.eyebrow { font-family: var(--mono); font-size: .76rem; font-weight: 600; letter-spacing: .085em; text-transform: uppercase; }
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 5; top: 1rem; left: 1rem; padding: .75rem 1rem; background: var(--mint); color: var(--night); }

.site-header { background: var(--night); color: var(--night-text); border-bottom: 1px solid #ffffff24; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-inner { min-height: 4.6rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 700; font-size: .96rem; text-decoration: none; white-space: nowrap; }
.mark { display: grid; place-items: center; width: 2.14rem; aspect-ratio: 1; border-radius: .36rem; background: var(--mint); color: var(--night); font-family: var(--mono); font-size: .83rem; font-weight: 800; letter-spacing: -.045em; }
.site-header nav { display: flex; align-items: center; gap: clamp(.85rem, 3vw, 2.45rem); }
.site-header nav a { text-decoration: none; font-size: .9rem; font-weight: 600; white-space: nowrap; }
.site-header nav a:hover { color: var(--mint); }
.site-header .nav-contact { padding: .48rem .9rem; border: 1px solid #5b7077; border-radius: .28rem; }
.site-header .nav-contact:hover { border-color: var(--mint); }

.hero { background: var(--night); color: var(--night-text); }
.hero-layout { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); padding-block: clamp(2.65rem, 4.3vw, 4.6rem); }
.hero-eyebrow { color: var(--mint); font-size: .8rem; margin-bottom: clamp(1rem, 2vw, 1.6rem); }
.hero h1 { font-size: clamp(4.65rem, 8.25vw, 8.1rem); letter-spacing: -.084em; line-height: .88; font-weight: 760; }
.hero h1 span { color: var(--mint); }
.hero-description { margin-top: 1.6rem; font-size: clamp(1.24rem, 2.1vw, 1.65rem); line-height: 1.32; max-width: 30ch; font-weight: 540; letter-spacing: -.028em; }
.hero-education { margin-top: .85rem; font-size: .91rem; color: var(--night-muted); }
.button { display: inline-flex; justify-content: center; align-items: center; padding: .73rem 1.16rem; min-height: 2.9rem; border: 1px solid transparent; border-radius: .28rem; font-size: .92rem; font-weight: 720; text-decoration: none; transition: background-color .18s, border-color .18s; }
.button-mint { background: var(--mint); color: var(--night); }
.button-mint:hover { background: #e0fff6; }
.button-ink { background: var(--night); color: var(--night-text); }
.button-ink:hover { background: #2a4953; }
.hero-copy .button { margin-top: 1.65rem; }

.hero-figure { overflow: hidden; border: 1px solid #49616a; border-radius: .55rem; background: #182a38; }
.hero-stage { position: relative; overflow: hidden; isolation: isolate; display: grid; place-items: center; aspect-ratio: 1.48; background-color: #172b39; background-image: linear-gradient(#b0e2e014 1px, transparent 1px), linear-gradient(90deg, #b0e2e014 1px, transparent 1px), radial-gradient(ellipse at 52% 44%, #395965, #182d3b 61%, #142532); background-size: 28px 28px, 28px 28px, 100% 100%; background-position: center; }
.hero-stage::before, .hero-stage::after { position: absolute; z-index: -1; content: ""; }
.hero-stage::before { inset: 5%; border: 1px solid #bdf4e42d; }
.hero-stage::after { width: 64%; height: 15%; left: 18%; top: 77%; background: #060f18; filter: blur(19px); opacity: .9; border-radius: 50%; }
.stage-orbit { position: absolute; z-index: -1; width: 69%; height: 63%; border: 1px dashed #c1ebdf67; border-radius: 50%; transform: rotate(-20deg); }
.hero-stage img { width: 70%; height: 84%; object-fit: contain; filter: drop-shadow(10px 14px 12px #070e17a6); }
.hero-caption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; border-top: 1px solid #49616a; padding: .76rem 1rem; }
.hero-caption span { color: var(--mint); font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
.hero-caption a { font-size: .9rem; font-weight: 650; text-decoration: none; }
.hero-caption a:hover { text-decoration: underline; }

.work { padding-top: clamp(3rem, 5.5vw, 5.4rem); }
.work-heading { display: flex; justify-content: space-between; gap: 1rem 2rem; align-items: end; margin-bottom: 1.8rem; }
.work-heading p { margin-top: .75rem; color: var(--muted); }
.filters { display: flex; gap: .42rem; align-items: center; flex-wrap: wrap; }
.filters button { padding: .47rem .72rem; border: 1px solid #c7d2ca; border-radius: .26rem; background: transparent; color: var(--ink); font-size: .875rem; font-weight: 640; cursor: pointer; }
.filters button:hover { border-color: #648677; }
.filters button[aria-pressed="true"] { color: var(--white); background: var(--night); border-color: var(--night); }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.45rem; list-style: none; padding: 0; }
.project-card { display: flex; min-width: 0; }
.card-link { display: flex; flex-direction: column; flex: 1; min-width: 0; text-decoration: none; border: 1px solid var(--border); border-radius: .48rem; background: var(--white); transition: box-shadow .2s, border-color .2s; }
.card-link:hover { border-color: #8bac9f; box-shadow: 0 9px 22px #1a332612; }
.card-art { display: grid; place-items: center; overflow: hidden; aspect-ratio: 1.7; border-radius: .43rem .43rem 0 0; border-bottom: 1px solid var(--border); background: #e6ede7; }
.card-art img { width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: center; transition: transform .25s ease; }
.card-link:hover img { transform: scale(1.04); }
.card-art--control-moment-gyro img { object-fit: cover; object-position: center 46%; }
.card-art--lunar-payload-rack { background: #edf1eb; }
.card-art--lunar-payload-rack img { object-fit: contain; padding: .7rem; mix-blend-mode: multiply; }
.card-art--launch-support-fixture img { mix-blend-mode: multiply; }
.card-art--cubesat-structure img { object-fit: cover; object-position: center 60%; }
.card-art--hakuto-r-radiation-probe img, .card-art--pearl-cubesat-wiring img, .card-art--vhf-antenna-deployment img { object-fit: cover; }
.card-body { display: flex; flex-direction: column; flex: 1; align-items: flex-start; padding: clamp(1rem, 1.9vw, 1.52rem); }
.card-body .eyebrow { color: var(--green); }
.card-body h3 { margin-top: .45rem; font-size: clamp(1.17rem, 2vw, 1.52rem); line-height: 1.17; letter-spacing: -.04em; }
.card-body p:not(.eyebrow) { color: var(--muted); margin: .5rem 0 1rem; }
.card-action { margin-top: auto; color: var(--green); font-size: .9rem; font-weight: 720; }
.card-link:hover .card-action { text-decoration: underline; }

.about { border-top: 1px solid var(--border); background: #e9efe9; }
.about-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(13rem, 24rem); gap: clamp(2rem, 8vw, 8rem); align-items: center; }
.about-copy > p { color: var(--muted); margin-top: 1rem; max-width: 58ch; }
.about-copy .about-intro { font-size: clamp(1.08rem, 1.7vw, 1.38rem); line-height: 1.48; color: var(--ink); font-weight: 620; }
.about-details { margin-top: 2rem; display: grid; gap: .75rem; }
.about-details div { border-top: 1px solid #c5d1c8; padding-top: .65rem; }
.about-details dt { font-weight: 720; }
.about-details dd { color: var(--muted); }
.about-photo { border: 1px solid #bdcac1; background: var(--white); border-radius: .45rem; overflow: hidden; }
.about-photo img { height: auto; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 33%; }
.about-photo figcaption, .gallery-grid figcaption { padding: .65rem .9rem; font-size: .89rem; color: var(--muted); }
.contact { background: var(--night); color: var(--night-text); }
.contact-layout { display: flex; justify-content: space-between; align-items: center; gap: 1.6rem; }
.contact p { margin-top: .65rem; color: var(--night-muted); }
.site-footer { background: var(--night); color: var(--night-muted); border-top: 1px solid #ffffff24; font-size: .84rem; }
.footer-inner { padding-block: 1.25rem; }
.site-footer a:hover { color: var(--mint); }

.case-hero { background: var(--night); color: var(--night-text); }
.case-hero-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(2.5rem, 6vw, 5.75rem); }
.back-link { display: inline-block; margin-bottom: 2rem; color: var(--night-muted); font-size: .93rem; }
.back-link:hover { color: var(--mint); }
.case-org { color: var(--mint); margin-bottom: .75rem; }
.case-hero h1 { font-size: clamp(2.85rem, 5.8vw, 5.6rem); line-height: .99; letter-spacing: -.067em; font-weight: 740; overflow-wrap: anywhere; }
.case-summary { margin-top: 1.15rem; color: var(--night-muted); max-width: 35ch; font-size: clamp(1.06rem, 1.65vw, 1.34rem); }
.case-cover { display: grid; place-items: center; overflow: hidden; min-height: 14rem; aspect-ratio: 1.4; background: #1d2e3c; border: 1px solid #4b646c; border-radius: .55rem; }
.case-cover img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.case-body { display: grid; grid-template-columns: minmax(12rem,.65fr) minmax(0,1.75fr); gap: clamp(1.75rem,7vw,7rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.facts { align-self: start; border-top: 1px solid var(--border); }
.facts div { padding: .85rem 0; border-bottom: 1px solid var(--border); }
.facts dt { color: var(--green); font-family: var(--mono); font-size: .79rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin-top: .25rem; font-weight: 610; }
.case-narrative { display: grid; gap: 1.75rem; justify-items: start; }
.case-narrative h2, .case-gallery h2 { text-wrap: pretty; font-size: clamp(1.55rem, 3vw, 2.44rem); letter-spacing: -.045em; }
.case-narrative p { margin-top: .64rem; max-width: 70ch; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.report-link { margin-top: .15rem; }
.case-gallery { padding-top: 1rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 1.45rem; }
.gallery-grid figure { overflow: hidden; background: var(--white); border: 1px solid var(--border); border-radius: .42rem; }
.gallery-grid a { position: relative; display: grid; place-items: center; aspect-ratio: 1.64; background: #e7ede8; }
.gallery-grid a:focus-visible { outline-offset: -4px; }
.gallery-grid img { height: 100%; width: 100%; min-height: 0; object-fit: contain; }
.gallery-grid a:hover img { filter: brightness(.94); }
.next-project { padding-block: 2.25rem; background: #e9efe9; border-top: 1px solid var(--border); }
.next-project p { color: var(--green); margin-bottom: .35rem; }
.next-project a { font-size: clamp(1.35rem, 2.5vw, 2rem); font-weight: 720; letter-spacing: -.035em; }

@media (max-width: 65rem) {
  .shell { width: min(100% - 4rem, 76rem); }
  .work-heading { align-items: start; flex-direction: column; }
  .project-grid { gap: .95rem; }
}

@media (max-width: 49rem) {
  .shell { width: calc(100% - 2.5rem); }
  .header-inner { min-height: 4rem; }
  .hero-layout, .case-hero-layout { grid-template-columns: 1fr; gap: 2rem; }
  .hero h1 { font-size: clamp(4.45rem, 13.5vw, 7rem); }
  .hero-description { margin-top: 1.2rem; }
  .hero-stage { aspect-ratio: 1.45; }
  .hero-figure { max-width: 37rem; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-layout { grid-template-columns: 1fr; }
  .about-photo { max-width: 22rem; }
  .case-body { grid-template-columns: 1fr; }
  .facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
  .case-cover { aspect-ratio: 1.55; }
}

@media (max-width: 32rem) {
  .shell { width: calc(100% - 2rem); }
  .brand { font-size: .88rem; gap: .45rem; }
  .site-header nav { gap: .72rem; }
  .site-header .nav-contact { padding-inline: .63rem; }
  .project-grid, .gallery-grid { grid-template-columns: 1fr; }
  .case-hero-layout { gap: 1.5rem; }
  .back-link { margin-bottom: 1.5rem; }
  .facts { display: block; }
  .contact-layout { align-items: flex-start; flex-direction: column; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: .35rem; }
  .hero-caption a { font-size: .84rem; }
}

@media (max-width: 23rem) {
  .brand > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

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