:root {
  --bg: #061238;
  --bg-soft: #0a1f55;
  --text: #eef5ff;
  --muted: #b8caef;
  --primary: #2b8cff;
  --accent: #55b9e8;
  --card: rgba(8, 25, 76, 0.38);
  --stroke: rgba(184, 223, 255, 0.22);
  --anchor-offset: 7.5rem;
  --success: #8ff0b3;
  --error: #ff9cb0;
  --header-block-size: 0px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: clip;
  background: radial-gradient(circle at 50% -20%, #0f3074 0%, var(--bg) 55%), var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(1rem, 0.28vw + 0.95rem, 1.08rem);
  line-height: 1.7;
  letter-spacing: 0.01em;
  scroll-behavior: smooth;
  scroll-padding-top: var(--anchor-offset);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: clip;
  caret-color: transparent;
}

input,
textarea {
  caret-color: var(--text);
}

::selection {
  background: rgba(85, 228, 232, 0.32);
  color: var(--text);
}

section[id] {
  scroll-margin-top: var(--anchor-offset);
}

main {
  scroll-snap-type: y proximity;
  padding-top: var(--header-block-size);
}

#aurora-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.96;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: radial-gradient(#fff 0.5px, transparent 0.5px);
  background-size: 3px 3px;
  z-index: 1;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 50;
  padding: 0.7rem 0.95rem;
  border-radius: 0.8rem;
  background: #eef5ff;
  color: #061238;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 1rem;
  width: min(1080px, calc(100% - 2rem));
  margin: 1rem auto 0;
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
}

.site-header nav {
  display: flex;
  align-items: center;
}

.section-flow-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  margin-top: clamp(1.2rem, 2.2vw, 1.8rem);
}

.section-flow-nav-hero {
  grid-column: 1 / -1;
  justify-self: center;
  align-self: end;
}

.section-flow-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.section-flow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.78rem 1rem;
  border: 1px solid rgba(184, 223, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.section-flow-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(184, 223, 255, 0.28);
  transform: translateY(-1px);
}

.section-flow-btn-primary {
  background: linear-gradient(135deg, rgba(130, 227, 255, 0.18) 0%, rgba(43, 140, 255, 0.24) 100%);
  border-color: rgba(120, 205, 255, 0.34);
  box-shadow: 0 0 24px rgba(62, 176, 255, 0.14);
}

.glass {
  backdrop-filter: blur(14px);
  background: rgba(7, 20, 62, 0.62);
}

.logo {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.logo span {
  color: var(--accent);
}

.logo:hover,
.logo:focus-visible {
  color: var(--text);
}

nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  margin-left: 0.5rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(184, 223, 255, 0.18);
  transform: translateY(-1px);
}

nav a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(184, 223, 255, 0.28);
}

.nav-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
  stroke: #eef5ff;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.96;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 0.65rem;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.65rem 0.55rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.nav-toggle span + span {
  margin-top: 0.4rem;
}

main,
footer {
  position: relative;
  z-index: 2;
}

.section-shell {
  min-height: calc(100svh - var(--anchor-offset));
  display: grid;
  align-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  padding-block: clamp(3.5rem, 8vh, 6.5rem);
}

.section-shell:first-of-type {
  padding-top: clamp(2rem, 5vh, 3.5rem);
}

.section-shell:not(:first-of-type) {
  padding-top: clamp(4.5rem, 10vh, 8rem);
  padding-bottom: clamp(4rem, 8vh, 7rem);
}

.section:not(.hero) {
  display: grid;
  align-content: center;
  gap: 1.5rem;
}

.section {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}

.section:not(.hero) {
  display: grid;
  align-content: center;
}

.hero {
  min-height: 78vh;
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(300px, 0.82fr);
  gap: clamp(1.4rem, 3vw, 2.5rem);
  align-items: start;
  position: relative;
  isolation: isolate;
}

.hero-content {
  max-width: 34rem;
  padding-top: clamp(1.25rem, 3vh, 2.4rem);
}

.eyebrow {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.section-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.95;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
  margin: 0 0 1rem;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(1.72rem, 2.45vw + 0.88rem, 3.05rem);
  max-width: 15.5ch;
  line-height: 1.08;
  text-wrap: pretty;
}

.hero-title > span {
  display: block;
  white-space: nowrap;
}

.hero-title > span:first-child {
  color: var(--text);
}

.hero-title > span:not(:first-child) {
  background: linear-gradient(90deg, #88d6ff 0%, var(--primary) 48%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nowrap {
  white-space: nowrap;
}

.hero h1 .nowrap,
.hero-location {
  white-space: normal;
  
}

.hero-location {
  font-size: 0.85em;
  opacity: 0.85;
  font-weight: 500;
  display: inline-block;
}

.hero-title {
  max-width: none;
}

.hero-title span {
  display: block;
  white-space: nowrap;
}

h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.8rem);
  max-width: 20ch;
  text-wrap: balance;
}

h3 {
  font-size: clamp(1.08rem, 1vw + 0.92rem, 1.35rem);
}

p {
  margin: 0 0 1.15rem;
  max-width: 64ch;
  color: inherit;
  text-wrap: pretty;
}

.lead {
  color: var(--muted);
  max-width: 62ch;
  font-size: clamp(1.02rem, 0.35vw + 0.98rem, 1.16rem);
  line-height: 1.78;
}

.lead code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--stroke);
  border-radius: 0.4rem;
  padding: 0.08rem 0.35rem;
}

.cv-note {
  color: var(--muted);
  margin-top: 1.1rem;
  margin-bottom: 0;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}

.studies {
  margin-top: 1.6rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  background: rgba(8, 25, 76, 0.25);
}

.studies ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.studies li + li {
  margin-top: 0.5rem;
}

.cta-row {
  display: flex;
  gap: 0.8rem;
  margin-top: 2rem;
}

.btn {
  border: 1px solid transparent;
  background: linear-gradient(130deg, #82e3ff 2%, var(--primary) 52%, var(--accent) 100%);
  color: #052141;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn:disabled {
  opacity: 0.72;
  cursor: wait;
}

.btn-ghost {
  background: rgba(6, 17, 50, 0.4);
  color: var(--text);
  border-color: var(--stroke);
}

.hero-cards {
  display: grid;
  gap: 1rem;
  align-self: center;
  padding-top: clamp(0.8rem, 2vh, 1.6rem);
}

.stat-card,
.timeline-item,
.skill-card,
.contact-form {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  padding: 1rem 1.2rem;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stat-card p,
.timeline-item p,
.skill-card p {
  color: var(--muted);
  margin: 0;
  max-width: none;
}

.glow {
  box-shadow: 0 0 80px rgba(60, 177, 255, 0.22);
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(58px);
  z-index: -1;
}

.orb-a {
  width: 260px;
  height: 260px;
  background: rgba(85, 228, 232, 0.18);
  right: -80px;
  top: 15%;
}

.orb-b {
  width: 240px;
  height: 240px;
  background: rgba(75, 139, 255, 0.22);
  left: -90px;
  bottom: -20px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.about-grid p {
  margin: 0;
  color: var(--muted);
  padding: 1.2rem;
  border-left: 2px solid rgba(196, 229, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
  line-height: 1.78;
}


.value-proof {
  grid-column: 1 / -1;
  margin-top: 0.3rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  background: rgba(8, 25, 76, 0.25);
}

.value-proof h2 {
  font-size: clamp(1.1rem, 1.4vw, 1.45rem);
  margin-bottom: 0.75rem;
  max-width: none;
}

.value-proof-list {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
  display: grid;
  gap: 0.35rem;
}

.project-grid {
  margin-top: 1.4rem;
  display: grid;
  gap: 1rem;
}

.social-proof {
  margin-top: 0.8rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
}

.social-proof-title {
  margin-bottom: 0.4rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.contact-reassurance {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
}

.contact-reassurance h3 {
  margin-bottom: 0.6rem;
}

.contact-reassurance ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
  display: grid;
  gap: 0.35rem;
}

.timeline {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}

.timeline-item {
  position: relative;
  padding: 1.15rem 1.2rem 1.2rem 1.4rem;
  overflow: hidden;
}

.timeline-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent) 0%, rgba(85, 228, 232, 0) 100%);
}

.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.date {
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-badge,
.skill-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(184, 223, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #dbeaff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-item h3,
.skill-card h3 {
  margin-bottom: 0.65rem;
  line-height: 1.2;
}

.timeline-item p {
  line-height: 1.72;
}

.skills-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.skills-intro {
  align-self: start;
}

.skill-card {
  position: relative;
  display: grid;
  gap: 0.85rem;
  min-height: 100%;
  padding: 1.2rem;
}

.skill-card::after {
  content: "";
  position: absolute;
  inset: auto 1.2rem 0.95rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(85, 228, 232, 0.35) 0%, rgba(85, 228, 232, 0) 100%);
}

.skill-card p {
  line-height: 1.6;
}

.skill-list {
  list-style: none;
  margin: 0;
  padding: 0 0 1.1rem;
  display: grid;
  gap: 0.55rem;
}

.skill-list li {
  position: relative;
  padding-left: 1rem;
  color: var(--text);
  line-height: 1.45;
}

.skill-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62rem;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  box-shadow: 0 0 12px rgba(85, 228, 232, 0.35);
}

.section-flow-nav-skills {
  margin-top: 1.2rem;
}

.contact-form {
  margin-top: 1.4rem;
  display: grid;
  gap: 0.8rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  margin-top: 1rem;
}

.contact-links a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  font-size: 0.95rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-links a:hover {
  color: var(--text);
  border-color: var(--stroke);
}

.inline-link {
  color: #d8ecff;
  text-decoration: none;
  border-bottom: 1px solid rgba(184, 223, 255, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.inline-link:hover,
.inline-link:focus-visible {
  color: var(--text);
  border-color: rgba(184, 223, 255, 0.7);
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--stroke);
  background: rgba(4, 13, 42, 0.9);
  color: var(--text);
  border-radius: 0.75rem;
  padding: 0.72rem;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(136, 169, 255, 0.2);
}

input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
  border-color: rgba(255, 136, 156, 0.7);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-feedback {
  min-height: 1.3rem;
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-feedback.success {
  color: var(--success);
}

.form-feedback.error {
  color: var(--error);
}

footer {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
}

footer p {
  margin-bottom: 0;
  max-width: none;
}

.footer-easter-egg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.38rem;
  line-height: 1.7;
}

.footer-easter-egg code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
}

.dragon-egg {
  position: relative;
  display: inline-block;
  width: 0.95rem;
  height: 1.18rem;
  border-radius: 52% 52% 48% 48% / 60% 60% 40% 40%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.8) 0 0.12rem, transparent 0.13rem),
    radial-gradient(circle at 55% 55%, rgba(254, 207, 92, 0.95) 0 0.11rem, transparent 0.12rem),
    radial-gradient(circle at 62% 78%, rgba(245, 132, 53, 0.9) 0 0.09rem, transparent 0.1rem),
    linear-gradient(180deg, #9cf2f1 0%, #55e4e8 32%, #2b8cff 100%);
  box-shadow: 0 0 0 1px rgba(184, 223, 255, 0.22), 0 0 16px rgba(85, 228, 232, 0.2);
  transform: translateY(0.08rem) rotate(12deg);
}

.dragon-egg::after {
  content: "";
  position: absolute;
  inset: auto 0.14rem -0.12rem;
  height: 0.16rem;
  border-radius: 999px;
  background: rgba(85, 228, 232, 0.24);
  filter: blur(0.08rem);
}

.has-js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.has-js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero fade-out on scroll */
#home {
  --hero-exit-progress: 0;
}

.hero-content,
.hero-cards,
.section-flow-nav-hero,
.orb-a,
.orb-b {
  will-change: opacity, transform, filter;
}

.hero-content,
.hero-cards,
.section-flow-nav-hero {
  opacity: calc(1 - var(--hero-exit-progress));
  transform: translateY(calc(var(--hero-exit-progress) * -28px));
  filter: blur(calc(var(--hero-exit-progress) * 6px));
  transition:
    opacity 0.12s linear,
    transform 0.12s linear,
    filter 0.12s linear;
}

.orb-a,
.orb-b {
  opacity: calc(1 - (var(--hero-exit-progress) * 0.75));
  transform: translateY(calc(var(--hero-exit-progress) * -16px));
  transition:
    opacity 0.12s linear,
    transform 0.12s linear;
}

#home.hero-exit-complete .hero-content,
#home.hero-exit-complete .hero-cards,
#home.hero-exit-complete .section-flow-nav-hero {
  pointer-events: none;
}

/* Respect accessibility */
@media (prefers-reduced-motion: reduce) {
  #home {
    --hero-exit-progress: 0 !important;
  }

  .hero-content,
  .hero-cards,
  .section-flow-nav-hero,
  .orb-a,
  .orb-b {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}

.delay-1 {
  transition-delay: 0.12s;
}

.delay-2 {
  transition-delay: 0.24s;
}

.rotated {
  display: inline-block;
  transform: rotate(-90deg);
}

/* Progressive section fade between consecutive sections */
.section {
  --section-exit-progress: 0;
}

.section > * {
  will-change: opacity, transform, filter;
}

.section.is-transitioning > *:not(.orb) {
  opacity: calc(1 - var(--section-exit-progress));
  transform: translateY(calc(var(--section-exit-progress) * -28px));
  filter: blur(calc(var(--section-exit-progress) * 5px));
  transition:
    opacity 0.12s linear,
    transform 0.12s linear,
    filter 0.12s linear;
}

.section.is-transitioning > .orb {
  opacity: calc(1 - (var(--section-exit-progress) * 0.75));
  transform: translateY(calc(var(--section-exit-progress) * -16px));
  transition:
    opacity 0.12s linear,
    transform 0.12s linear;
}

.section.section-exit-complete > *:not(.orb) {
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .section {
    --section-exit-progress: 0 !important;
  }

  .section.is-transitioning > *,
  .section.section-exit-complete > * {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    pointer-events: auto !important;
    transition: none !important;
  }
}

@media (max-width: 920px) {
  :root {
    --anchor-offset: 6rem;
  }

  .section-shell {
  min-height: calc(100svh - var(--anchor-offset));
  display: grid;
  align-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  padding-block: clamp(3.5rem, 8vh, 6.5rem);
}

.section-shell:first-of-type {
  padding-top: clamp(2rem, 5vh, 3.5rem);
}

.section-shell:not(:first-of-type) {
  padding-top: clamp(4.5rem, 10vh, 8rem);
  padding-bottom: clamp(4rem, 8vh, 7rem);
}

  .hero,
  .about-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .timeline-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    min-height: unset;
    gap: 1.2rem;
    align-items: center;
  }

  .hero-content {
    max-width: none;
    padding-top: 0;
  }

  .hero-cards {
    padding-top: 0;
  }

  .section-flow-nav-hero {
    grid-column: auto;
    align-self: auto;
  }

  .site-header {
    top: calc(env(safe-area-inset-top, 0px) + 0.45rem);
    margin-top: 0.45rem;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem;
  }

.nav-icon {
    display: none;
  }

  .site-header nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding-top: 0.4rem;
  }

  .site-header.menu-open nav {
    display: flex;
  }

  .site-header nav a {
    margin: 0;
    padding: 0.65rem 0.8rem;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.02);
  }

  .site-header nav a:active {
    background: rgba(255, 255, 255, 0.08);
  }

  .nav-toggle {
    display: inline-block;
  }

  .cta-row {
    flex-wrap: wrap;
  }

  .cta-row .btn {
    flex: 1 1 220px;
  }

  .orb-a {
    width: 170px;
    height: 170px;
    right: -50px;
    opacity: 0.5;
  }

  .orb-b {
    width: 150px;
    height: 150px;
    left: -45px;
    opacity: 0.45;
  }

  #aurora-canvas {
    opacity: 0.55;
  }
}

@media (min-width: 1200px) and (min-height: 780px) {
  #skills.section {
    display: grid;
    width: min(1240px, calc(100% - 2rem));
    grid-template-columns: minmax(220px, 0.64fr) minmax(0, 1.36fr);
    column-gap: 1.4rem;
    row-gap: 1rem;
    align-items: center;
  }

  .skills-intro {
    margin: 0;
    max-width: 18rem;
  }

  .skills-intro h2 {
    font-size: clamp(1.45rem, 1.3vw + 0.95rem, 2rem);
    max-width: 11ch;
    margin-bottom: 0;
  }

  .skills-grid {
    margin-top: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    align-self: center;
  }

  .skill-card {
    gap: 0.6rem;
    padding: 0.95rem 1rem;
  }

  .skill-card::after {
    inset-inline: 1rem;
    bottom: 0.75rem;
  }

  .skill-card h3 {
    margin-bottom: 0.35rem;
    font-size: 1.12rem;
  }

  .skill-card p {
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .skill-kicker {
    padding: 0.28rem 0.55rem;
    font-size: 0.66rem;
  }

  .skill-list {
    gap: 0.38rem;
    padding-bottom: 0.7rem;
  }

  .skill-list li {
    font-size: 0.9rem;
    line-height: 1.32;
  }

  .skill-list li::before {
    top: 0.5rem;
  }

  .section-flow-nav-skills {
    grid-column: 1 / -1;
    margin-top: 1rem;
  }
}

@media (max-width: 640px) {
  :root {
    --anchor-offset: 5.5rem;
  }

  body {
    padding-bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px));
  }

  .section {
    width: min(1080px, calc(100% - 1.25rem));
  }

  .section-shell {
    padding-block: 2.35rem;
  }

  .site-header {
    width: min(1080px, calc(100% - 1.25rem));
    padding: 0.65rem 0.8rem;
  }

  .section-shell:first-of-type {
    padding-top: max(2.35rem, env(safe-area-inset-top, 0px));
  }

  .site-header nav {
    position: fixed;
    left: 50%;
    bottom: calc(0.7rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 40;
    display: flex;
    width: min(520px, calc(100% - 1.25rem));
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.45rem;
    border: 1px solid rgba(184, 223, 255, 0.28);
    border-radius: 999px;
    background: rgba(7, 20, 62, 0.58);
    backdrop-filter: blur(16px);
    box-shadow: 0 14px 30px rgba(6, 18, 56, 0.45);
  }

  .site-header nav a {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    padding: 0.58rem 0.5rem;
    border-radius: 999px;
    font-size: 0.76rem;
  }

  .site-header nav a span {
    white-space: nowrap;
  }

  .site-header nav .nav-icon {
    width: 0.88rem;
    height: 0.88rem;
  }

  .nav-toggle,
  .site-header.menu-open .nav-toggle {
    display: none;
  }

  h1 {
    font-size: clamp(1.7rem, 7.4vw, 2.3rem);
  }

  h2 {
    font-size: clamp(1.45rem, 7vw, 2rem);
  }

  .lead {
    font-size: 0.96rem;
    line-height: 1.6;
  }

  .stat-card,
  .timeline-item,
  .skill-card,
  .contact-form {
    padding: 0.95rem;
  }

  .timeline-item {
    padding-left: 1.1rem;
  }

  .skill-card::after {
    inset-inline: 0.95rem;
    bottom: 0.85rem;
  }

  .about-grid p {
    padding: 1rem;
    background: rgba(4, 13, 42, 0.65);
  }

  .btn {
    width: 100%;
    min-height: 44px;
  }

  .section-flow-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .section-flow-btn {
    width: 100%;
  }

  footer {
    padding: 2.2rem 1rem;
  }
}


@media (max-width: 640px) {
  .noise {
    opacity: 0.02;
  }
}

body.low-motion #aurora-canvas,
body.low-motion .orb,
body.low-motion .noise {
  opacity: 0 !important;
  display: none !important;
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .section-flow-btn,
  .section-flow-btn:hover,
  .btn,
  .btn:hover {
    transition: none;
    transform: none;
  }
}
