:root {
  --ink: #03080e;
  --paper: #eef4f7;
  --line: rgba(221, 237, 245, 0.22);
  --muted: rgba(226, 238, 244, 0.68);
  --mx: 0px;
  --my: 0px;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--ink); }

body {
  color: var(--paper);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input, textarea { font: inherit; }
button { color: inherit; }

.experience {
  position: relative;
  width: 100vw;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: #02060b;
}

.scene, .scene > * { position: absolute; inset: 0; }

.scene {
  z-index: -5;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 32%, rgba(73, 108, 120, .18), transparent 28%),
    linear-gradient(130deg, #02050a 10%, #07111b 52%, #02060b 100%);
  transform: scale(1.04);
}

.reference-bg {
  z-index: 0;
  inset: 88px 3.2vw 0;
  background: url("reference-home.png") center -110px / 100vw auto no-repeat;
  opacity: .96;
  filter: saturate(.96) contrast(1.03) brightness(.94);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.08) 3%, rgba(0,0,0,.35) 8%, rgba(0,0,0,.72) 15%, #000 23%, #000 57%, rgba(0,0,0,.94) 62%, transparent 73%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.08) 3%, rgba(0,0,0,.35) 8%, rgba(0,0,0,.72) 15%, #000 23%, #000 57%, rgba(0,0,0,.94) 62%, transparent 73%);
  transform-origin: 56% 38%;
  animation: referenceDrift 16s ease-in-out infinite alternate;
  transition: opacity .7s ease, transform 1.05s cubic-bezier(.66,0,.18,1);
}
.reference-bg::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 54.65%;
  top: 64%;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(4,12,20,.88) 0 18%, rgba(4,12,20,.68) 34%, rgba(4,12,20,.28) 54%, transparent 72%);
  filter: blur(7px);
}
.reference-bg::after {
  content: "";
  position: absolute;
  inset: 3% 4% 24%;
  background: radial-gradient(ellipse at 61% 25%, rgba(243,190,145,.18), transparent 26%), radial-gradient(ellipse at 45% 46%, rgba(73,164,195,.12), transparent 48%);
  filter: blur(24px);
  mix-blend-mode: screen;
  animation: referenceGlow 8s ease-in-out infinite;
}

.stars { opacity: .34; transition: transform 2.2s cubic-bezier(.2,.8,.2,1); }
.stars-a {
  background-image: radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.5px);
  background-size: 173px 191px;
  transform: translate(calc(var(--mx) * -.35), calc(var(--my) * -.35));
}
.stars-b {
  background-image: radial-gradient(circle, rgba(167,219,237,.68) 0 1px, transparent 1.3px);
  background-size: 281px 263px;
  background-position: 90px 30px;
  opacity: .2;
  transform: translate(calc(var(--mx) * -.7), calc(var(--my) * -.7));
}

.random-stars {
  z-index: 3;
  inset: 96px 4vw 30%;
  pointer-events: none;
  opacity: .82;
  transition: opacity .55s ease;
}
.random-stars i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(225,244,249,.92);
  opacity: .06;
  animation: starTwinkle 7.3s ease-in-out infinite;
}
.random-stars i:nth-child(1)  { left: 4%;  top: 9%;  animation-duration: 8.7s; animation-delay: -1.4s; }
.random-stars i:nth-child(2)  { left: 15%; top: 31%; animation-duration: 6.9s; animation-delay: -5.1s; }
.random-stars i:nth-child(3)  { left: 25%; top: 14%; animation-duration: 9.4s; animation-delay: -3.3s; }
.random-stars i:nth-child(4)  { left: 34%; top: 42%; animation-duration: 7.8s; animation-delay: -6.6s; }
.random-stars i:nth-child(5)  { left: 43%; top: 19%; animation-duration: 10.2s; animation-delay: -2.2s; }
.random-stars i:nth-child(6)  { left: 52%; top: 36%; animation-duration: 8.1s; animation-delay: -7.4s; }
.random-stars i:nth-child(7)  { left: 61%; top: 11%; animation-duration: 9.7s; animation-delay: -4.8s; }
.random-stars i:nth-child(8)  { left: 70%; top: 29%; animation-duration: 7.1s; animation-delay: -1.8s; }
.random-stars i:nth-child(9)  { left: 79%; top: 16%; animation-duration: 8.9s; animation-delay: -6.1s; }
.random-stars i:nth-child(10) { left: 91%; top: 39%; animation-duration: 10.5s; animation-delay: -3.7s; }
.random-stars i:nth-child(11) { left: 9%;  top: 61%; animation-duration: 7.6s; animation-delay: -4.2s; }
.random-stars i:nth-child(12) { left: 20%; top: 73%; animation-duration: 9.9s; animation-delay: -8.3s; }
.random-stars i:nth-child(13) { left: 38%; top: 64%; animation-duration: 8.4s; animation-delay: -2.9s; }
.random-stars i:nth-child(14) { left: 56%; top: 77%; animation-duration: 10.8s; animation-delay: -7.1s; }
.random-stars i:nth-child(15) { left: 68%; top: 58%; animation-duration: 7.4s; animation-delay: -5.6s; }
.random-stars i:nth-child(16) { left: 83%; top: 70%; animation-duration: 9.1s; animation-delay: -1.1s; }
.random-stars i:nth-child(17) { left: 95%; top: 55%; animation-duration: 8.2s; animation-delay: -6.8s; }
.random-stars i:nth-child(18) { left: 47%; top: 51%; animation-duration: 11.1s; animation-delay: -4.5s; }

.planet {
  inset: auto auto -38vw -7vw;
  width: 114vw;
  height: 77vw;
  min-width: 1000px;
  min-height: 650px;
  border-radius: 52% 52% 48% 47%;
  overflow: visible;
  background:
    radial-gradient(ellipse at 63% 23%, rgba(227,169,120,.72), transparent 17%),
    radial-gradient(ellipse at 52% 17%, rgba(138,184,194,.82), rgba(34,72,86,.72) 29%, #07101a 63%, #020509 76%);
  box-shadow:
    inset -18vw -22vw 30vw rgba(0,0,0,.92),
    0 -2px 3px rgba(209,235,239,.55),
    0 -14px 54px rgba(119,194,212,.22),
    0 -28px 130px rgba(89,146,162,.13);
  transform: translate(calc(var(--mx) * .35), calc(var(--my) * .2)) rotate(-8deg);
  transition: all 1.05s cubic-bezier(.66,0,.18,1);
  animation: planetBreathe 15s ease-in-out infinite alternate;
  opacity: 0;
}

.planet-texture {
  inset: 3% 3% 0 2%;
  border-radius: 50%;
  opacity: .66;
  mix-blend-mode: screen;
  filter: blur(8px) contrast(1.2);
  background:
    radial-gradient(ellipse at 61% 21%, rgba(255,220,178,.7) 0 2%, transparent 11%),
    repeating-radial-gradient(ellipse at 55% 25%, rgba(154,204,212,.10) 0 3px, transparent 5px 19px),
    radial-gradient(ellipse at 40% 25%, rgba(57,126,148,.5), transparent 27%);
  animation: textureDrift 21s ease-in-out infinite alternate;
}

.atmosphere {
  inset: -2.2% 4% auto 4%;
  height: 9%;
  border-radius: 50%;
  filter: blur(16px);
  background: linear-gradient(90deg, transparent 5%, rgba(76,173,204,.52), rgba(235,191,151,.75) 68%, transparent 96%);
  opacity: .85;
}

.sunrise {
  inset: -5% 3% auto auto;
  width: 44%;
  height: 31%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(224,133,77,.46), rgba(206,116,69,.12) 36%, transparent 71%);
  filter: blur(28px);
  animation: glowPulse 12s ease-in-out infinite;
}

.haze { pointer-events: none; filter: blur(55px); mix-blend-mode: screen; }
.haze-a {
  inset: 13% 14% 8% 21%;
  background: radial-gradient(ellipse at center, rgba(150,190,197,.15), transparent 66%);
  animation: hazeFloat 17s ease-in-out infinite alternate;
}
.haze-b {
  inset: 8% -12% 0 46%;
  background: radial-gradient(ellipse at center, rgba(197,117,74,.13), transparent 60%);
  animation: hazeFloat 21s ease-in-out -7s infinite alternate-reverse;
}
.grain {
  opacity: .09;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  animation: grainShift .24s steps(2) infinite;
}

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  height: 88px;
  padding: 0 clamp(24px, 3.3vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.brand img { display:block; width:206px; height:68px; object-fit:contain; object-position:left center; }

.nav-action {
  position: relative;
  min-width: 170px;
  height: 43px;
  padding: 0 20px;
  border: 1px solid rgba(226,239,245,.37);
  background: rgba(4,10,16,.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 300;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: background .35s, border-color .35s, transform .35s;
}
.nav-action::before, .nav-action::after, .nav-action i::before, .nav-action i::after {
  content: ""; position: absolute; width: 8px; height: 8px; border-color: rgba(245,251,252,.9); transition: width .4s, height .4s;
}
.nav-action::before { top: -1px; left: -1px; border-top: 1px solid; border-left: 1px solid; }
.nav-action::after { top: -1px; right: -1px; border-top: 1px solid; border-right: 1px solid; }
.nav-action i::before { bottom: -1px; left: -1px; border-bottom: 1px solid; border-left: 1px solid; }
.nav-action i::after { bottom: -1px; right: -1px; border-bottom: 1px solid; border-right: 1px solid; }
.nav-action:hover { background: rgba(183,218,229,.09); border-color: rgba(229,242,246,.68); transform: translateY(-1px); }
.nav-action:hover::before, .nav-action:hover::after, .nav-action:hover i::before, .nav-action:hover i::after { width: 13px; height: 13px; }
.nav-arrow { font-size: 21px; line-height: 0; transform: translateY(-1px); }

.home-view, .contact-view { position: absolute; inset: 88px 0 0; transition: opacity .48s ease, visibility .48s; }
.mission-frame { position: absolute; inset: 12px clamp(24px, 2.2vw, 38px) 24px; }
.frame-line { position: absolute; display: block; background: var(--line); transform-origin: left top; }
.frame-top, .frame-bottom { left: 0; width: 100%; height: 1px; animation: lineDrawX 1.2s .15s cubic-bezier(.2,.8,.2,1) both; }
.frame-top { top: 0; }
.frame-bottom { bottom: 0; }
.frame-left, .frame-right { top: 0; width: 1px; height: 100%; animation: lineDrawY 1.2s .35s cubic-bezier(.2,.8,.2,1) both; }
.frame-left { left: 0; }
.frame-right { right: 0; }
.frame-divider { top: 65%; left: 0; width: 100%; height: 1px; animation: lineDrawX 1.2s .48s cubic-bezier(.2,.8,.2,1) both; }
.frame-column { top: 65%; left: 54.5%; width: 1px; height: 35%; animation: lineDrawY .8s .78s cubic-bezier(.2,.8,.2,1) both; }
.crosshair { position: absolute; width: 31px; height: 31px; opacity: .82; }
.crosshair::before, .crosshair::after { content: ""; position: absolute; background: rgba(233,244,248,.75); }
.crosshair::before { width: 31px; height: 1px; top: 15px; left: 0; }
.crosshair::after { height: 31px; width: 1px; left: 15px; top: 0; }
.cross-tl { top: -15px; left: -15px; }.cross-tr { top: -15px; right: -15px; }.cross-bl { bottom: -15px; left: -15px; }.cross-br { bottom: -15px; right: -15px; }
.cross-left-mid { top: calc(65% - 15px); left: -15px; }
.cross-mid { top: calc(65% - 15px); left: calc(54.5% - 15px); }
.cross-right-mid { top: calc(65% - 15px); right: -15px; }

.home-copy {
  position: absolute;
  left: clamp(48px, 7.2vw, 116px);
  right: clamp(48px, 5.8vw, 94px);
  bottom: clamp(52px, 7.6vh, 84px);
  display: grid;
  grid-template-columns: 47.3vw 1fr;
  gap: 4vw;
  align-items: end;
}
.home-copy h1 { margin: 0; max-width: 48vw; font-size: clamp(40px, 3.55vw, 68px); font-weight: 300; line-height: 1.16; letter-spacing: -.042em; }
.home-copy h1 span { display: block; opacity: 0; transform: translateY(25px); animation: copyReveal .9s .7s forwards; }
.home-copy h1 span + span { animation-delay: .84s; }
.thesis { max-width: 510px; padding-left: 0; border-left: 0; font-size: clamp(15px, 1.05vw, 20px); line-height: 1.54; font-weight: 300; letter-spacing: -.012em; }
.thesis p { margin: 0; opacity: 0; transform: translateY(20px); animation: copyReveal .8s 1.04s forwards; }
.thesis p + p { margin-top: 20px; color: var(--muted); animation-delay: 1.18s; }
.scroll-cue { position: absolute; right: 2.8vw; top: 50%; display: flex; align-items: center; gap: 12px; transform: rotate(90deg) translateX(50%); transform-origin: right; color: rgba(219,236,241,.36); font-size: 8px; letter-spacing: .26em; }
.scroll-cue i { width: 43px; height: 1px; background: currentColor; overflow: hidden; }

.contact-view { z-index: 5; opacity: 0; visibility: hidden; display: grid; place-items: center; overflow: hidden; padding: clamp(16px, 2.5vh, 28px) 24px; }
.contact-stack { width: min(1180px, 100%); margin: 0 auto; }
.contact-card {
  position: relative;
  width: min(620px, calc(100vw - 48px));
  padding: clamp(22px, 2.5vh, 34px) clamp(28px, 3.2vw, 48px);
  border: 1px solid rgba(217,235,242,.28);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(28,49,64,.34), rgba(4,13,22,.55));
  backdrop-filter: blur(30px) saturate(1.12);
  box-shadow: 0 32px 90px rgba(0,0,0,.32), inset 0 1px rgba(255,255,255,.05);
  transform: translateY(30px) scale(.96);
  transition: transform .7s .3s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
  margin: 0 auto;
}
.card-glint { position: absolute; inset: -70% auto -70% -35%; width: 20%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); transform: rotate(14deg); animation: glassSweep 11s 2s ease-in-out infinite; pointer-events: none; }
.form-intro { margin-bottom: 18px; }
.eyebrow { display: block; color: rgba(168,214,230,.55); font-family: monospace; font-size: 9px; letter-spacing: .2em; margin-bottom: 15px; }
.form-intro h2 { margin: 0; font-size: clamp(27px, 2.3vw, 36px); font-weight: 300; letter-spacing: -.035em; }
.form-intro p { margin: 6px 0 0; color: var(--muted); font-size: 14px; font-weight: 300; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-card label { display: block; margin-bottom: 10px; }
.contact-card label > span { display: block; margin: 0 0 6px 2px; font-size: 11px; font-weight: 500; color: rgba(239,246,248,.9); }
.contact-card input, .contact-card textarea {
  width: 100%;
  border: 1px solid rgba(207,231,239,.17);
  border-radius: 11px;
  background: rgba(3,12,21,.18);
  color: #f1f7f9;
  padding: 10px 13px;
  outline: none;
  font-size: 14px;
  font-weight: 300;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.contact-card textarea { min-height: 72px; resize: vertical; }
.contact-card input::placeholder, .contact-card textarea::placeholder { color: rgba(221,235,240,.36); }
.contact-card input:focus, .contact-card textarea:focus { border-color: rgba(183,222,235,.55); background: rgba(25,54,71,.28); box-shadow: 0 0 0 3px rgba(94,168,192,.06); }
.send-button {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(217,238,244,.38);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(104,150,177,.7), rgba(61,106,139,.72));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #f5f9fa;
  cursor: pointer;
  overflow: hidden;
  transition: transform .3s, filter .3s, box-shadow .3s;
}
.send-button:hover { transform: translateY(-2px); filter: brightness(1.15); box-shadow: 0 13px 35px rgba(57,121,156,.2); }
.send-icon { display: inline-block; transition: transform .3s; }
.send-button:hover .send-icon { transform: translate(4px,-4px); }
.sent-note { position: absolute; left: 50%; bottom: 17px; transform: translate(-50%, 8px); font-size: 10px; color: rgba(218,235,240,.55); opacity: 0; transition: .35s; white-space: nowrap; }
.sent-note.is-visible { opacity: 1; transform: translate(-50%, 0); }

.portfolio-panel {
  margin-top: 22px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s .58s ease, transform .75s .58s cubic-bezier(.2,.8,.2,1);
}
.portfolio-heading { display: flex; align-items: center; gap: 10px; margin: 0 0 10px 2px; color: rgba(232,241,245,.78); font-size: 12px; letter-spacing: .1em; }
.portfolio-heading span { position: relative; flex: 0 0 16px; width: 16px; height: 16px; overflow: hidden; color: transparent; font-size: 0; }
.portfolio-heading span::before, .portfolio-heading span::after { content: ""; position: absolute; left: 50%; top: 50%; background: #f5f9fb; transform: translate(-50%,-50%); }
.portfolio-heading span::before { width: 16px; height: 1px; }
.portfolio-heading span::after { width: 1px; height: 16px; }
.portfolio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.portfolio-card {
  min-height: 94px;
  padding: 13px 20px;
  border: 1px solid rgba(207,231,239,.17);
  border-radius: 7px;
  background: linear-gradient(125deg, rgba(7,20,31,.92), rgba(2,9,16,.84));
  display: grid;
  grid-template-columns: 72px 1fr 18px;
  align-items: center;
  gap: 18px;
  color: inherit;
  text-decoration: none;
  backdrop-filter: blur(18px);
  transition: border-color .3s, background .3s, transform .3s, box-shadow .3s;
}
.portfolio-card:hover { transform: translateY(-3px); border-color: rgba(207,231,239,.38); background: linear-gradient(125deg, rgba(17,39,54,.94), rgba(4,15,25,.88)); box-shadow: 0 18px 42px rgba(0,0,0,.2); }
.portfolio-logo { width: 62px; height: 62px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.portfolio-logo img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; object-position: left center; }
.semivalley-logo img, .manus-logo img { width: 58px; height: 58px; object-position: center; }
.portfolio-copy { min-width: 0; }
.portfolio-copy strong { display: block; margin-bottom: 6px; font-size: 17px; font-weight: 300; letter-spacing: -.018em; }
.portfolio-copy small { display: block; max-width: 330px; color: var(--muted); font-size: 12px; font-weight: 300; line-height: 1.45; }
.portfolio-arrow { justify-self: end; color: rgba(239,247,249,.88); font-size: 24px; font-weight: 200; transition: transform .3s; }
.portfolio-card:hover .portfolio-arrow { transform: translateX(4px); }

.contact-atmosphere { position: absolute; z-index: 2; inset: 76px -3vw -5vh; overflow: hidden; opacity: 0; visibility: hidden; transform: translate(calc(var(--mx) * .12), calc(var(--my) * .08)) scale(1.045); transition: opacity .9s .18s ease, visibility .9s, transform 1.1s cubic-bezier(.2,.8,.2,1); pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.22) 9%, #000 22%); mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.22) 9%, #000 22%); }
.contact-atmosphere::before { content: ""; position: absolute; inset: -22% -12% -18%; background: radial-gradient(ellipse at 18% 67%, rgba(109,181,207,.16) 0%, rgba(76,142,168,.075) 24%, transparent 48%), radial-gradient(ellipse at 78% 44%, rgba(234,195,160,.105) 0%, rgba(182,132,102,.045) 25%, transparent 50%), radial-gradient(ellipse at 52% 68%, rgba(151,208,221,.075), transparent 43%); filter: blur(38px); animation: atmosphericDrift 18s ease-in-out infinite alternate; }
.contact-atmosphere::after { content: ""; position: absolute; left: -14%; top: 47%; width: 132%; height: 34%; background: linear-gradient(100deg, transparent 5%, rgba(157,218,233,.045) 31%, rgba(238,242,232,.095) 55%, rgba(211,169,137,.045) 71%, transparent 94%); filter: blur(30px); transform: rotate(-7deg) translate3d(-2%,0,0); animation: atmosphericRibbon 16s ease-in-out infinite alternate; }
.glass-bloom { position: absolute; inset: 19% 11% 3%; background: radial-gradient(ellipse at 50% 54%, rgba(168,220,231,.11) 0%, rgba(105,169,191,.045) 34%, transparent 67%); filter: blur(36px); mix-blend-mode: screen; animation: atmosphericBreathe 9s ease-in-out infinite; }
.glass-refraction { position: absolute; top: -28%; right: -17%; width: 48vw; height: 138%; min-width: 560px; background: linear-gradient(105deg, transparent 24%, rgba(199,229,235,.025) 39%, rgba(247,235,216,.085) 52%, rgba(184,215,225,.035) 63%, transparent 76%); filter: blur(24px); transform: rotate(9deg); opacity: .7; animation: refractionFloat 14s ease-in-out infinite alternate; }
.hud { position: absolute; z-index: 4; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s .55s; pointer-events: none; color: rgba(92,169,197,.4); font-family: monospace; font-size: 11px; }
.hud-scale { position: absolute; top: 29%; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hud-left { left: 7.4vw; }.hud-right { right: 7.4vw; }
.hud-scale::after { content: ""; position: absolute; top: 28px; bottom: -10px; width: 1px; background: repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 9px); }
.hud-label { margin-bottom: 2px; letter-spacing: .14em; }
.hud-scale i { font-style: normal; opacity: .65; }.hud-scale b { font-weight: 400; border: 1px solid currentColor; padding: 3px 8px; transform: translateX(12px); }
.transition-iris { position: absolute; z-index: 30; inset: 50% auto auto 50%; width: 20px; height: 20px; border-radius: 50%; background: rgba(5,13,21,.28); transform: translate(-50%,-50%) scale(0); pointer-events: none; }

.is-contact .home-view { opacity: 0; visibility: hidden; transition-delay: .2s; }
.is-contact .contact-view { opacity: 1; visibility: visible; }
.is-contact .contact-card { transform: translateY(0) scale(1); }
.is-contact .portfolio-panel { opacity: 1; transform: translateY(0); }
.is-contact .reference-bg { opacity: 0; transform: scale(1.09); }
.is-contact .random-stars { opacity: 0; }
.is-contact .planet { width: 135vw; height: 84vw; left: -12vw; bottom: -49vw; transform: translate(calc(var(--mx) * .22), calc(var(--my) * .12)) rotate(-3deg); filter: saturate(.82) brightness(.78); opacity: 1; }
.is-contact .scene { transform: scale(1.07); transition: transform 1.05s cubic-bezier(.66,0,.18,1); }
.is-contact .contact-atmosphere { opacity: 1; visibility: visible; transform: translate(calc(var(--mx) * .12), calc(var(--my) * .08)) scale(1); }
.is-contact .hud { opacity: 1; visibility: visible; }
.is-contact .transition-iris { animation: iris 1.05s cubic-bezier(.66,0,.18,1); }

@keyframes planetBreathe { to { box-shadow: inset -18vw -22vw 30vw rgba(0,0,0,.92), 0 -2px 4px rgba(220,242,245,.62), 0 -19px 70px rgba(119,194,212,.27), 0 -35px 150px rgba(89,146,162,.16); } }
@keyframes referenceDrift { from { transform: scale(1.035) rotate(-1.65deg) translate3d(-.4%, .6%, 0); } to { transform: scale(1.12) rotate(1.65deg) translate3d(.55%, -1.6%, 0); filter: saturate(1.055) contrast(1.065) brightness(1.045); } }
@keyframes referenceGlow { 0%,100% { opacity:.38; transform:scale(.96); } 50% { opacity:1; transform:scale(1.085); } }
@keyframes starTwinkle {
  0%, 68%, 100% { opacity: .05; transform: scale(.75); box-shadow: 0 0 0 transparent; }
  73% { opacity: .2; transform: scale(.95); }
  76% { opacity: .68; transform: scale(1.45); box-shadow: 0 0 7px rgba(188,229,240,.34); }
  81% { opacity: .09; transform: scale(.8); box-shadow: 0 0 1px rgba(188,229,240,.08); }
}
@keyframes textureDrift { to { transform: translate(2.4%, -1.4%) scale(1.035); opacity: .78; } }
@keyframes glowPulse { 50% { opacity: .68; transform: scale(1.09); } }
@keyframes hazeFloat { to { transform: translate(3%, -2%) scale(1.06); } }
@keyframes grainShift { 0%{transform:translate(0)}25%{transform:translate(-2%,1%)}50%{transform:translate(1%,-2%)}75%{transform:translate(2%,2%)}100%{transform:translate(-1%,-1%)} }
@keyframes lineDrawX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes lineDrawY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes copyReveal { to { opacity: 1; transform: translateY(0); } }
@keyframes glassSweep { 0%,35% { transform: translateX(0) rotate(14deg); } 60%,100% { transform: translateX(850px) rotate(14deg); } }
@keyframes atmosphericDrift { from { transform: translate3d(-2%, 2%, 0) scale(.98); opacity: .72; } to { transform: translate3d(3%, -2%, 0) scale(1.06); opacity: 1; } }
@keyframes atmosphericRibbon { from { transform: rotate(-7deg) translate3d(-3%, 2%, 0) scaleY(.9); opacity: .42; } to { transform: rotate(-5deg) translate3d(4%, -3%, 0) scaleY(1.12); opacity: .78; } }
@keyframes atmosphericBreathe { 0%,100% { transform: scale(.94); opacity: .42; } 50% { transform: scale(1.08); opacity: .9; } }
@keyframes refractionFloat { from { transform: rotate(9deg) translate3d(-3%, -1%, 0); opacity: .42; } to { transform: rotate(6deg) translate3d(5%, 2%, 0); opacity: .76; } }
@keyframes iris { 0% { transform: translate(-50%,-50%) scale(0); opacity: 0; } 45% { transform: translate(-50%,-50%) scale(90); opacity: .7; } 100% { transform: translate(-50%,-50%) scale(160); opacity: 0; } }

@media (max-width: 800px) {
  .site-header { height: 76px; }
  .brand img { width:174px; height:auto; }
  .nav-action { min-width: auto; height: 39px; padding: 0 13px; font-size: 12px; }
  .home-view, .contact-view { inset: 76px 0 0; }
  .mission-frame { inset: 10px 18px 18px; }
  .cross-mid, .cross-left-mid, .cross-right-mid, .frame-column { display:none; }
  .home-copy { left: 36px; right: 36px; bottom: 52px; grid-template-columns: 1fr; gap: 28px; }
  .home-copy h1 { font-size: clamp(38px, 10.5vw, 55px); }
  .thesis { padding-left: 0; border: 0; font-size: 15px; max-width: 490px; }
  .thesis p + p { margin-top: 12px; }
  .reference-bg { inset: 76px 4.2vw 0; background-position: center -42px; background-size: auto 78%; -webkit-mask-image: linear-gradient(to bottom,transparent 0%,rgba(0,0,0,.35) 8%,#000 18%,#000 46%,transparent 68%); mask-image: linear-gradient(to bottom,transparent 0%,rgba(0,0,0,.35) 8%,#000 18%,#000 46%,transparent 68%); }
  .random-stars { inset: 80px 5vw 43%; }
  .planet { width: 160vw; height: 106vw; bottom: -35vw; left: -30vw; }
  .scroll-cue { display:none; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .contact-view { align-items: start; overflow-y: auto; padding-top: 24px; }
  .contact-card { padding: 27px 23px 32px; border-radius: 18px; }
  .form-intro { margin-bottom: 23px; }
  .contact-card label { margin-bottom: 12px; }
  .contact-card input, .contact-card textarea { padding: 11px 13px; }
  .portfolio-panel { margin-top: 26px; }
  .portfolio-grid { grid-template-columns: 1fr; gap: 10px; }
  .portfolio-card { min-height: 88px; padding: 13px 16px; grid-template-columns: 58px 1fr 14px; gap: 12px; }
  .portfolio-logo { width: 52px; height: 52px; }
  .semivalley-logo img, .manus-logo img { width: 50px; height: 50px; }
  .contact-atmosphere { inset: 76px -12vw -8vh; }
  .glass-refraction { right: -58vw; width: 110vw; min-width: 0; }
  .hud-left { left: 3vw; }.hud-right { right: 3vw; }
}

@media (max-height: 720px) and (min-width: 801px) {
  .site-header { height: 72px; }
  .home-view, .contact-view { inset: 72px 0 0; }
  .contact-view { padding: 12px 24px; }
  .contact-card { padding: 17px 34px 19px; }
  .form-intro { margin-bottom: 11px; }
  .form-intro h2 { font-size: 26px; }
  .form-intro p { font-size: 12px; }
  .eyebrow { margin-bottom: 8px; }
  .contact-card label { margin-bottom: 7px; }
  .contact-card input, .contact-card textarea { padding: 7px 11px; }
  .contact-card textarea { min-height: 54px; }
  .send-button { height: 38px; }
  .portfolio-panel { margin-top: 12px; }
  .portfolio-heading { margin-bottom: 7px; }
  .portfolio-card { min-height: 72px; padding: 8px 17px; }
  .portfolio-logo { height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .planet, .reference-bg, .stars-a, .stars-b, .random-stars, .contact-atmosphere { transform: none !important; }
  .experience { --mx: 0px !important; --my: 0px !important; }
}
