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

* {
  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,
select,
[contenteditable="true"],
[role="textbox"] {
  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;
}

#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(1180px, 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;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.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);
  opacity: var(--logo-lastname-opacity);
  transition: opacity 0.12s linear, color 0.2s ease;
}

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

nav a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 0.5rem;
  color: var(--muted);
  margin-left: 0;
  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);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid rgba(184, 223, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.lang-option {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.58rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lang-option:hover {
  color: var(--text);
}

.lang-option.is-active {
  background: linear-gradient(140deg, rgba(124, 214, 255, 0.3), rgba(43, 140, 255, 0.35));
  color: #fff;
  box-shadow: 0 8px 18px rgba(28, 126, 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-title > .hero-location {
  display: block;
  font-size: 0.85em;
  opacity: 0.85;
  font-weight: 500;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: #7fc9ff;
  -webkit-text-fill-color: currentColor;
}

.hero-title > .hero-location:last-child {
  font-size: 0.68em;
}

.hero-title > .hero-location > span {
  display: inline;
  white-space: normal;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: inherit;
  -webkit-text-fill-color: currentColor;
}

.hero-location-easteregg {
  position: relative;
  display: inline;
  color: inherit;
  --location-map-closed-transform: translate(0, -50%) scale(0.96);
  --location-map-open-transform: translate(0, -50%) scale(1);
}

.hero-location-city {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: none;
  white-space: inherit;
  display: inline;
}

.hero-location-map {
  position: absolute;
  left: calc(100% + 0.85rem);
  top: 50%;
  z-index: 8;
  width: 13rem;
  opacity: 0;
  transform: var(--location-map-closed-transform);
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.28s ease;
}

.hero-location-map-card {
  position: relative;
  padding: 0.5rem;
  border: 1px solid rgba(158, 211, 255, 0.2);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(26, 53, 125, 0.68) 0%, rgba(7, 18, 53, 0.92) 100%),
    rgba(7, 18, 53, 0.9);
  box-shadow: 0 20px 40px rgba(2, 10, 36, 0.34);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
}

.hero-location-map-card::after {
  content: "";
  position: absolute;
  left: -0.42rem;
  top: 50%;
  width: 0.8rem;
  height: 0.8rem;
  background: rgba(8, 20, 58, 0.94);
  border-left: 1px solid rgba(158, 211, 255, 0.18);
  border-bottom: 1px solid rgba(158, 211, 255, 0.18);
  transform: translateY(-50%) rotate(45deg);
}

.hero-location-map-stage {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 380 / 220;
  border-radius: 0.8rem;
  overflow: hidden;
  --evrehailles-x: 57.5%;
  --evrehailles-y: 57.25%;
  background:
    radial-gradient(circle at 48% 52%, rgba(76, 149, 255, 0.08), transparent 44%),
    linear-gradient(180deg, rgba(5, 16, 48, 0.72), rgba(7, 18, 53, 0.96));
}

.hero-location-map-graphic {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.hero-location-map-pin-marker {
  position: absolute;
  left: var(--evrehailles-x);
  top: var(--evrehailles-y);
  z-index: 2;
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid #f5fbff;
  border-radius: 999px;
  background: #8ce8ff;
  box-shadow:
    0 0 0 0.35rem rgba(94, 215, 255, 0.18),
    0 0 22px rgba(94, 215, 255, 0.45);
  transform: translate(-50%, -50%);
}

.hero-location-map-pin-marker::before,
.hero-location-map-pin-marker::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.hero-location-map-pin-marker::before {
  width: 1.45rem;
  height: 1.45rem;
  border: 1px solid rgba(142, 227, 255, 0.5);
}

.hero-location-map-pin-marker::after {
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid rgba(142, 227, 255, 0.22);
}

@media (hover: hover) and (pointer: fine) {
  .hero-location-easteregg:hover .hero-location-map {
    opacity: 1;
    transform: var(--location-map-open-transform);
    pointer-events: auto;
  }
}

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

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

.hero-title .hero-location .hero-location-easteregg {
  position: relative;
  display: inline-block;
  width: max-content;
  white-space: nowrap;
  cursor: help;
  outline: none;
}

.hero-title .hero-location .hero-location-easteregg:focus-visible .hero-location-city {
  outline: 2px solid rgba(140, 232, 255, 0.72);
  outline-offset: 0.18em;
  border-radius: 0.12em;
}

.hero-title .hero-location .hero-location-city {
  display: inline;
  white-space: nowrap;
  color: #b4e7ff;
  text-shadow:
    0 0 0.35rem rgba(117, 208, 255, 0.28),
    0 0 1rem rgba(117, 208, 255, 0.16);
}

.hero-title .hero-location .hero-location-map {
  display: block;
  max-width: calc(100vw - 2rem);
  white-space: normal;
}

.hero-title .hero-location .hero-location-map-card,
.hero-title .hero-location .hero-location-map-stage,
.hero-title .hero-location .hero-location-map-pin-marker {
  display: block;
  white-space: normal;
}

.hero-title .hero-location .hero-location-map-card {
  width: 100%;
}

.hero-title .hero-location .hero-location-map-stage {
  width: 100%;
}

.hero-location-easteregg:hover .hero-location-map,
.hero-location-easteregg.is-map-open .hero-location-map,
.hero-location-easteregg:focus .hero-location-map,
.hero-location-easteregg:focus-within .hero-location-map {
  opacity: 1;
  transform: var(--location-map-open-transform);
  pointer-events: auto;
}

@media (max-width: 760px) {
  .hero-location-easteregg {
    --location-map-closed-transform: translate(-50%, 0.5rem) scale(0.96);
    --location-map-open-transform: translate(-50%, 0) scale(1);
  }

  .hero-location-map {
    left: 50%;
    top: auto;
    bottom: calc(100% + 0.85rem);
  }

  .hero-location-map-card::after {
    left: 50%;
    top: auto;
    bottom: -0.42rem;
    border-left: 0;
    border-right: 1px solid rgba(158, 211, 255, 0.18);
    transform: translateX(-50%) rotate(45deg);
  }
}

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;
}

.scan-key {
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.lead .scan-key,
.stat-card .scan-key,
.timeline-item .scan-key,
.skill-card .scan-key,
.vlc-player .scan-key {
  text-shadow: 0 0 16px rgba(238, 245, 255, 0.1);
}

.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:
    linear-gradient(165deg, rgba(94, 151, 255, 0.18) 0%, rgba(18, 45, 112, 0.14) 26%, rgba(5, 15, 47, 0.32) 100%),
    var(--card-readable);
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  padding: 1rem 1.2rem;
  backdrop-filter: blur(15px) saturate(145%);
  -webkit-backdrop-filter: blur(15px) saturate(145%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11), 0 10px 28px rgba(3, 10, 35, 0.28);
  isolation: isolate;
}

.stat-card p,
.timeline-item p,
.skill-card p {
  color: var(--muted);
  margin: 0;
  max-width: none;
  text-shadow: 0 1px 14px rgba(2, 8, 28, 0.45);
}

.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;
}

.about-grid .scan-key + .scan-key {
  margin-left: 0.04em;
}


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

.activities-layout {
  margin-top: 2rem;
  display: grid;
  gap: 1.15rem;
}

.activities-group {
  display: grid;
  gap: 0.9rem;
}

.activities-group-head {
  display: grid;
  gap: 0.45rem;
  align-items: start;
}

.activities-group-head p {
  margin: 0;
  max-width: 76ch;
  color: var(--muted);
  font-size: 0.95rem;
}

.activities-current-grid,
.activities-past-grid {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.activity-sports-stack {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.activity-card {
  display: grid;
  gap: 0.3rem;
  align-content: start;
}

.activity-card-current {
  padding: 1.2rem 1.25rem 1.25rem 1.45rem;
}

.activity-card-current .timeline-head {
  align-items: start;
}

.activity-card-current h3 {
  font-size: clamp(1.12rem, 0.9vw + 0.96rem, 1.42rem);
}

.activity-card-current p {
  line-height: 1.68;
}

.activity-card-sport h3 {
  font-size: clamp(1.02rem, 0.5vw + 0.96rem, 1.22rem);
}

.activity-card-sport p {
  line-height: 1.58;
}

.activities-group-secondary {
  padding-top: 0.2rem;
}

.activities-group-secondary .activities-group-head p {
  max-width: 68ch;
  font-size: 0.9rem;
}

.activity-card-past {
  padding: 0.95rem 1rem 1rem 1.2rem;
}

.activity-card-past h3 {
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.activity-card-past p {
  font-size: 0.94rem;
  line-height: 1.55;
}

.activity-context-note {
  margin-top: 0.35rem;
  width: fit-content;
  padding: 0.35rem 0.6rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(85, 228, 232, 0.28);
  background: rgba(85, 228, 232, 0.1);
  color: #d4fbff;
  font-size: 0.8rem;
  line-height: 1.35 !important;
}

.project-grid {
  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;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

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

.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;
  white-space: nowrap;
}

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

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

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
  color: #d8ecff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(184, 223, 255, 0.35);
}

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

.project-link svg {
  width: 1rem;
  height: 1rem;
}


.vlc-player {
  position: relative;
  margin-top: 1.6rem;
  display: grid;
  gap: 0;
  padding: 3px;
  border-width: 2px;
  border-style: solid;
  border-color: #ffffff #545454 #545454 #ffffff;
  border-radius: 0;
  background: #c0c0c0;
  color: #111;
  box-shadow: 0 22px 54px rgba(3, 10, 35, 0.42);
  font-family: "MS Sans Serif", Tahoma, Inter, system-ui, sans-serif;
  image-rendering: pixelated;
}

.vlc-player::before {
  position: absolute;
  right: 0.7rem;
  top: -0.85rem;
  z-index: 1;
  padding: 0.18rem 0.42rem;
  border-width: 2px;
  border-style: solid;
  border-color: #ffffff #545454 #545454 #ffffff;
  background: #ffff99;
  color: #111;
  content: "not an emulator";
  font-family: "Courier New", monospace;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  transform: rotate(2deg);
}

.vlc-player-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 30px;
  justify-content: space-between;
  padding: 0.28rem 0.35rem 0.28rem 0.55rem;
  background: linear-gradient(90deg, #000080 0%, #1084d0 100%);
  color: #fff;
}

.vlc-player-head p {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  margin: 0;
  overflow: hidden;
  font-family: "Courier New", monospace;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: lowercase;
}

.win95-app-icon,
.win95-folder-icon,
.win95-volume-icon,
.win95-play-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  image-rendering: pixelated;
}

.win95-app-icon {
  width: 17px;
  height: 17px;
  border: 1px solid #000;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 46%, #000 46% 54%, transparent 54%),
    linear-gradient(0deg, transparent 46%, #000 46% 54%, transparent 54%),
    linear-gradient(45deg, transparent 47%, #000 47% 53%, transparent 53%),
    linear-gradient(-45deg, transparent 47%, #000 47% 53%, transparent 53%),
    radial-gradient(circle at center, #000 0 2px, transparent 2px 4px, #fff 4px 100%);
  box-shadow: inset -1px -1px 0 #8c8c8c, inset 1px 1px 0 #fff;
}

.win95-window-controls {
  display: inline-flex;
  gap: 0.18rem;
  flex: 0 0 auto;
}

.win95-window-controls span,
.win95-window-controls button {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  padding: 0;
  border-width: 2px;
  border-style: solid;
  border-color: #ffffff #545454 #545454 #ffffff;
  background: #c0c0c0;
  cursor: pointer;
}

.win95-window-controls button:active {
  border-color: #545454 #ffffff #ffffff #545454;
}

.win95-control-minimize::before,
.win95-control-maximize::before,
.win95-control-close::before,
.win95-control-close::after {
  position: absolute;
  content: "";
  background: #111;
}

.win95-control-minimize::before {
  left: 4px;
  right: 4px;
  bottom: 3px;
  height: 2px;
}

.win95-control-maximize::before {
  inset: 3px;
  border: 2px solid #111;
  background: transparent;
}

.win95-control-close::before,
.win95-control-close::after {
  left: 4px;
  top: 7px;
  width: 8px;
  height: 2px;
}

.win95-control-close::before {
  transform: rotate(45deg);
}

.win95-control-close::after {
  transform: rotate(-45deg);
}

.vlc-player-subtitle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.42rem 0.65rem;
  border-bottom: 1px solid #808080;
  color: #111;
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.vlc-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 0.38rem 0.55rem 0;
}

.vlc-volume-control {
  position: relative;
  display: grid;
  justify-items: end;
}

.win95-volume-button {
  min-height: 28px;
  padding: 0 0.55rem;
  border-width: 2px;
  border-style: solid;
  border-color: #ffffff #545454 #545454 #ffffff;
  border-radius: 0;
  background: #c0c0c0;
  color: #111;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
}

.win95-volume-button[aria-expanded="true"],
.win95-volume-button:active {
  border-color: #545454 #ffffff #ffffff #545454;
  background: #d8d8d8;
}

.win95-volume-button:focus-visible,
.vlc-volume-panel input:focus-visible {
  outline: 1px dotted #111;
  outline-offset: -5px;
}

.win95-volume-icon {
  position: relative;
  width: 17px;
  height: 14px;
}

.win95-volume-icon::before {
  position: absolute;
  left: 0;
  top: 4px;
  width: 5px;
  height: 6px;
  background: #111;
  box-shadow: 5px -3px 0 -1px #111, 5px 3px 0 -1px #111;
  content: "";
}

.win95-volume-icon::after {
  position: absolute;
  right: 0;
  top: 2px;
  width: 6px;
  height: 10px;
  border-right: 2px solid #111;
  border-radius: 50%;
  content: "";
}

.win95-volume-button.is-muted .win95-volume-icon::after {
  right: 1px;
  top: 1px;
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(45deg, transparent 43%, #b00020 43% 57%, transparent 57%),
    linear-gradient(-45deg, transparent 43%, #b00020 43% 57%, transparent 57%);
}

.vlc-volume-panel {
  z-index: 4;
  width: min(210px, calc(100vw - 3rem));
  margin-top: 0.32rem;
  padding: 0.55rem;
  border-width: 2px;
  border-style: solid;
  border-color: #ffffff #545454 #545454 #ffffff;
  background: #c0c0c0;
  box-shadow: 2px 2px 0 #111;
}

.vlc-volume-panel label {
  display: block;
  margin-bottom: 0.42rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.vlc-volume-panel input {
  width: 100%;
  accent-color: #000080;
  cursor: pointer;
}

.win95-folder-icon {
  width: 18px;
  height: 14px;
  border: 1px solid #8c7a00;
  background: #f5d34c;
  box-shadow: inset -2px -2px 0 #b89d22, inset 1px 1px 0 #fff5a8;
}

.win95-folder-icon::before {
  position: absolute;
  left: -1px;
  top: -5px;
  width: 9px;
  height: 5px;
  border: 1px solid #8c7a00;
  border-bottom: 0;
  background: #f5d34c;
  content: "";
}

.vlc-now-playing {
  display: grid;
  gap: 0.22rem;
  margin: 0.45rem 0.55rem 0.55rem;
  padding: 0.7rem;
  border-width: 2px;
  border-style: solid;
  border-color: #545454 #ffffff #ffffff #545454;
  background:
    linear-gradient(rgba(57, 255, 106, 0.12) 50%, transparent 50%) 0 0 / 100% 4px,
    radial-gradient(circle at 12% 18%, rgba(57, 255, 106, 0.24), transparent 22%),
    #000;
  color: #39ff6a;
  font-family: "JetBrains Mono", Consolas, monospace;
  text-shadow: 0 0 5px rgba(57, 255, 106, 0.7);
}

.vlc-now-label {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  margin: 0;
  color: #9cffae;
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.vlc-now-label::before {
  content: ">>";
}

.terminal-status-icon {
  width: 0.86rem;
  height: 0.86rem;
  color: #39ff6a;
  filter: drop-shadow(0 0 4px rgba(57, 255, 106, 0.9));
  stroke-width: 3;
}

.vlc-now-playing h3 {
  margin: 0;
  font-size: clamp(0.98rem, 1.1vw, 1.12rem);
}

.vlc-now-meta {
  margin: 0;
  overflow: hidden;
  color: #9cffae;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.soundcloud-embed {
  margin: 0 0.55rem 0.55rem;
  overflow: hidden;
  border-width: 2px;
  border-style: solid;
  border-color: #545454 #ffffff #ffffff #545454;
  border-radius: 0;
  background: #fff;
}

.soundcloud-embed iframe {
  display: block;
  width: 100%;
  height: 166px;
  border: 0;
}

.music-feedback {
  margin: 0 0.55rem 0.55rem;
  padding: 0.28rem 0.45rem;
  border-width: 2px;
  border-style: solid;
  border-color: #545454 #ffffff #ffffff #545454;
  color: #111;
  font-size: 0.78rem;
}

.music-track-list {
  list-style: none;
  margin: 0 0.55rem 0.55rem;
  padding: 0.24rem;
  display: grid;
  gap: 0.16rem;
  border-width: 2px;
  border-style: solid;
  border-color: #545454 #ffffff #ffffff #545454;
  background: #fff;
}

.music-track-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  min-height: 34px;
  padding: 0.22rem 0.36rem;
  border: 1px solid transparent;
  color: #111;
}

.music-track-list li.is-active {
  border-color: #000080;
  background: #000080;
  color: #fff;
}

.music-track-info {
  min-width: 0;
}

.music-track-title {
  margin: 0;
  overflow: hidden;
  color: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-track-meta {
  margin: 0.02rem 0 0;
  color: inherit;
  font-size: 0.68rem;
  opacity: 0.72;
}

.music-track-action {
  min-height: 26px;
  padding: 0 0.58rem;
  border-width: 2px;
  border-style: solid;
  border-color: #ffffff #545454 #545454 #ffffff;
  border-radius: 0;
  background: #c0c0c0;
  color: #111;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 800;
}

.win95-play-icon {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}

.music-track-action:hover,
.music-track-action:focus-visible {
  outline: 1px dotted #111;
  outline-offset: -5px;
}

.music-track-action:active,
.music-track-action.is-active {
  border-color: #545454 #ffffff #ffffff #545454;
  background: #d8d8d8;
}

.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 {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  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);
}

.brand-icon {
  width: 1.05em;
  height: 1.05em;
  flex: 0 0 auto;
  fill: currentColor;
}

.brand-link-github {
  color: rgba(238, 245, 255, 0.9);
}

.brand-link-github:hover {
  color: var(--text);
}

.keyboard-hint {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 18;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(184, 223, 255, 0.16);
  border-radius: 999px;
  background: rgba(7, 20, 62, 0.52);
  backdrop-filter: blur(12px);
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  box-shadow: 0 10px 24px rgba(6, 18, 56, 0.22);
}

.keyboard-hint-nudge {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.65rem);
  width: max-content;
  max-width: min(18rem, calc(100vw - 2rem));
  padding: 0.52rem 0.68rem;
  border: 1px solid rgba(184, 223, 255, 0.2);
  border-radius: 0.7rem;
  background: rgba(7, 20, 62, 0.82);
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.35;
  letter-spacing: 0;
  box-shadow: 0 14px 30px rgba(6, 18, 56, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.35rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.keyboard-hint-nudge.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 18;
  width: 2.8rem;
  height: 2.8rem;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(184, 223, 255, 0.18);
  border-radius: 999px;
  background: rgba(7, 20, 62, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #dbeaff;
  box-shadow: 0 10px 24px rgba(6, 18, 56, 0.22);
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top i {
  width: 1.15rem;
  height: 1.15rem;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  color: var(--text);
  border-color: rgba(184, 223, 255, 0.28);
}

.keyboard-hint-key {
  appearance: none;
  display: inline-flex;
  padding: 0;
  border: 0;
  border-radius: 0.45rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.keyboard-hint-key kbd {
  min-width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.28rem;
  border: 1px solid rgba(184, 223, 255, 0.18);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  line-height: 1;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.keyboard-hint-key:hover kbd,
.keyboard-hint-key:focus-visible kbd {
  border-color: rgba(184, 223, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.keyboard-hint-key:focus-visible {
  outline: 2px solid rgba(140, 232, 255, 0.72);
  outline-offset: 0.18rem;
}

.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;
}

.footer-projects-link {
  color: var(--text);
  font-weight: 700;
  text-underline-offset: 4px;
}


.secret-lab-link {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.secret-lab-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 999px;
}

.dragon-egg {
  display: inline-block;
  flex: 0 0 auto;
  width: 1.18rem;
  aspect-ratio: 123 / 162;
  background: url("../images/portfolio/ocre-cropped.webp") center / contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(254, 207, 92, 0.34));
  transform: translateY(0.12rem);
}

.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 (max-width: 1120px) and (min-width: 921px) {
  .site-header {
    padding: 0.72rem 0.95rem;
  }

  .site-header nav {
    gap: 0.34rem;
  }

  nav a {
    padding: 0.46rem 0.66rem;
    font-size: 0.84rem;
    gap: 0.38rem;
  }

  .lang-option {
    font-size: 0.72rem;
    padding: 0.35rem 0.5rem;
  }
}

@media (max-height: 920px) and (min-width: 921px) {
  :root {
    --anchor-offset: 6.2rem;
  }

  html,
  body {
    font-size: clamp(0.95rem, 0.2vw + 0.9rem, 1rem);
  }

  .site-header {
    top: 0.55rem;
    margin-top: 0.55rem;
    padding: 0.65rem 1rem;
  }

  nav a {
    padding: 0.48rem 0.72rem;
    font-size: 0.88rem;
  }

  .section-shell {
    min-height: calc(100dvh - var(--anchor-offset));
    padding-block: clamp(1.6rem, 3.5vh, 2.8rem);
  }

  .section-shell:first-of-type {
    min-height: calc(100dvh - var(--header-block-size));
    padding-top: clamp(0.6rem, 1.6vh, 1.1rem);
    padding-bottom: clamp(0.6rem, 1.6vh, 1rem);
  }

  .section-shell:not(:first-of-type) {
    padding-top: clamp(1.9rem, 4vh, 3rem);
    padding-bottom: clamp(1.9rem, 4vh, 3rem);
  }

  .section:not(.hero) {
    gap: 1rem;
  }

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

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

  h1 {
    font-size: clamp(1.9rem, 2vw + 0.9rem, 2.75rem);
    margin-bottom: 0.8rem;
  }

  h2 {
    font-size: clamp(1.45rem, 1.5vw + 0.9rem, 2.1rem);
    margin-bottom: 0.8rem;
  }

  h3 {
    font-size: clamp(1rem, 0.65vw + 0.88rem, 1.18rem);
    margin-bottom: 0.5rem;
  }

  p {
    margin-bottom: 0.9rem;
  }

  .lead {
    font-size: 1rem;
    line-height: 1.58;
    max-width: 58ch;
  }

  .cta-row {
    margin-top: 1.35rem;
  }

  .btn,
  .section-flow-btn {
    min-height: 42px;
    padding: 0.66rem 0.95rem;
  }

  .section-flow-nav {
    gap: 1rem;
    margin-top: 1rem;
  }

  .section-flow-nav-hero {
    align-self: end;
    margin-top: 0.5rem;
  }

  .section-flow-copy {
    font-size: 0.8rem;
  }

  .hero-cards,
  .timeline,
  .activities-layout,
  .activities-current-grid,
  .activity-sports-stack,
  .activities-past-grid,
  .project-grid,
  .skills-grid {
    gap: 0.75rem;
  }

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

  .stat-card,
  .timeline-item,
  .skill-card,
  .contact-form,
  .studies,
  .about-grid p {
    padding: 0.9rem 1rem;
  }

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

  .activity-card-current,
  .activity-card-past {
    padding-left: 1.1rem;
  }

  .timeline-head {
    margin-bottom: 0.5rem;
  }

  .timeline-item p,
  .skill-card p,
  .about-grid p,
  .studies li,
  .contact-reassurance li {
    line-height: 1.52;
  }

  .about-grid {
    gap: 0.75rem;
  }

  .skills-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .skill-card {
    gap: 0.65rem;
  }

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

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

  .activity-card-current .timeline-head {
    min-height: 0;
  }

  .activity-card-current .timeline-badge {
    margin-left: 0;
    white-space: normal;
    max-width: 8.5rem;
  }

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

  .skill-list li {
    font-size: 0.92rem;
    line-height: 1.3;
  }

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

  #activities .timeline,
  #projects .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  #activities .timeline > :last-child {
    grid-column: 1 / -1;
  }

  .contact-links {
    gap: 0.6rem 1rem;
  }

  .orb-a {
    width: 200px;
    height: 200px;
    right: -60px;
  }

  .orb-b {
    width: 180px;
    height: 180px;
    left: -60px;
    bottom: -10px;
  }
}

@media (max-height: 780px) and (min-width: 921px) {
  .section-shell {
    padding-block: 1.25rem;
  }

  .section-shell:first-of-type {
    padding-top: 0.4rem;
    padding-bottom: 0.5rem;
  }

  .section-shell:not(:first-of-type) {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    font-size: clamp(1.72rem, 1.8vw + 0.88rem, 2.45rem);
  }

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

  .hero-cards,
  .timeline,
  .project-grid,
  .skills-grid,
  .about-grid {
    gap: 0.65rem;
  }

  .stat-card,
  .timeline-item,
  .skill-card,
  .contact-form,
  .studies,
  .about-grid p {
    padding: 0.82rem 0.9rem;
  }
}

@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;
  }

  .timeline-badge {
    white-space: normal;
  }

  .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: nowrap;
    gap: 0.65rem;
    align-items: center;
    position: sticky;
  }

  .site-header nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.55rem;
    border: 1px solid rgba(184, 223, 255, 0.34);
    border-radius: 0.95rem;
    background: rgba(5, 16, 56, 0.9);
    backdrop-filter: blur(16px);
    box-shadow: 0 16px 32px rgba(3, 12, 38, 0.58);
  }

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

  .site-header nav a {
    margin: 0;
    padding: 0.65rem 0.8rem;
    border-radius: 0.65rem;
    color: #f4f8ff;
    border: 1px solid rgba(184, 223, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    text-shadow: 0 1px 1px rgba(2, 7, 24, 0.45);
  }

  .site-header nav a:active {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(184, 223, 255, 0.32);
  }

  .lang-switch {
    width: 100%;
    justify-content: center;
    margin-top: 0.35rem;
  }

  .lang-option {
    flex: 1 1 0;
    max-width: 140px;
    text-align: center;
  }

  .nav-toggle {
    display: inline-block;
    margin-left: auto;
    border-radius: 999px;
    border-color: rgba(184, 223, 255, 0.32);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
  }

  .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) {
  #activities.section {
    display: grid;
    width: min(1280px, calc(100% - 2rem));
    grid-template-columns: minmax(230px, 0.54fr) minmax(0, 1.46fr);
    column-gap: 1.5rem;
    row-gap: 1rem;
    align-items: start;
  }

  #activities.section > .reveal:first-child {
    margin: 0;
    max-width: 18rem;
  }

  #activities.section > .reveal:first-child h2 {
    max-width: 12ch;
    margin-bottom: 0;
  }

  #activities .timeline {
    margin-top: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    align-self: start;
  }

  #activities .activities-layout {
    margin-top: 0;
    gap: 1rem;
    align-self: start;
  }

  #activities .activities-current-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #activities .activities-past-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  #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;
  }

  .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 {
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    transform: none;
    z-index: 40;
    width: 100%;
  }

  .site-header nav a {
    justify-content: flex-start;
    padding: 0.62rem 0.66rem;
    border-radius: 0.7rem;
    font-size: 0.82rem;
  }

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

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

  .lang-option {
    font-size: 0.72rem;
    padding: 0.36rem 0.5rem;
  }

  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;
  }

  .keyboard-hint {
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.38rem 0.55rem;
    font-size: 0.72rem;
  }
}

@media (hover: none), (pointer: coarse) {
  .vlc-volume-control {
    display: none;
  }

  .keyboard-hint {
    display: none;
  }

  .back-to-top {
    display: inline-flex;
  }
}


@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;
  }
}
