:root {
  color-scheme: light;
  --bg: #f7f8f4;
  --bg-2: #ecefe7;
  --panel: #ffffff;
  --panel-2: #f2f4ef;
  --border: #dfe4dc;
  --text: #171b1f;
  --muted: #6e7479;
  --green: #2da8d8;
  --amber: #5aa9d8;
  --ice: #6dc7ee;
  --theme: #2faee5;
  --theme-dark: #15191d;
  --shadow: 0 24px 70px rgba(43, 55, 47, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Inter, system-ui, sans-serif;
  background:
    linear-gradient(rgba(47, 174, 229, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 174, 229, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 18% 36%, rgba(47, 174, 229, 0.18), transparent 32rem),
    radial-gradient(circle at 76% 30%, rgba(109, 199, 238, 0.18), transparent 30rem),
    var(--bg);
  background-size: 40px 40px, 40px 40px, auto, auto, auto;
  color: var(--text);
  letter-spacing: 0;
}

body::before {
  display: none;
}

/* Overlapping masks soften the transition between backdrop blur strengths. */
.top-progressive-blur {
  position: fixed;
  inset: 0 0 auto;
  height: 140px;
  z-index: 90;
  pointer-events: none;
}

.top-progressive-blur > span {
  position: absolute;
  inset: 0;
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 var(--solid), transparent var(--fade));
  mask-image: linear-gradient(to bottom, #000 0%, #000 var(--solid), transparent var(--fade));
}

.top-progressive-blur > span:nth-child(1) { --blur: 1px; --solid: 65%; --fade: 100%; }
.top-progressive-blur > span:nth-child(2) { --blur: 2px; --solid: 48%; --fade: 85%; }
.top-progressive-blur > span:nth-child(3) { --blur: 4px; --solid: 32%; --fade: 70%; }
.top-progressive-blur > span:nth-child(4) { --blur: 8px; --solid: 16%; --fade: 55%; }
.top-progressive-blur > span:nth-child(5) { --blur: 16px; --solid: 0%; --fade: 40%; }

@media (max-width: 640px) {
  .top-progressive-blur { height: 112px; }
}

@media print {
  .top-progressive-blur { display: none; }
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: fixed;
  top: 1rem;
  left: clamp(1rem, 2.4vw, 2rem);
  right: clamp(1rem, 2.4vw, 2rem);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 18px 60px rgba(73, 82, 84, 0.1);
  backdrop-filter: blur(18px);
  transition: background 180ms ease, border-color 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(47, 174, 229, 0.12);
  backdrop-filter: blur(16px);
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.65rem;
  font-weight: 800;
}

.brand-avatar {
  display: block;
  width: 2.15rem;
  height: 2.15rem;
  overflow: hidden;
  border: 1px solid rgba(47, 174, 229, 0.18);
  border-radius: 999px;
  background: var(--panel);
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

.nav-links {
  gap: clamp(0.7rem, 2vw, 1.4rem);
  color: var(--muted);
  font-size: 0.9rem;
}

.nav-links a {
  transition: color 160ms ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--green);
}

.language-switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.18rem;
  min-height: 2.2rem;
  padding: 0.18rem;
  border-radius: 999px;
}

.language-switch button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.48rem 0.58rem;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.language-switch button:hover {
  color: var(--theme);
}

.language-switch button[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.48);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.72),
    inset -1px -1px 0 rgba(47, 174, 229, 0.12);
  color: #0b3448;
}

.language-switch > span {
  width: 1px;
  height: 1rem;
  background: rgba(47, 174, 229, 0.16);
}

.resume-link {
  color: var(--theme) !important;
}

.section-shell {
  width: min(1320px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 7rem 0;
}

.section-shell:not(.hero),
.split-section {
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

.hero {
  min-height: 112vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(460px, 1fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  padding-top: 10rem;
  padding-bottom: 5rem;
}

.hero-copy {
  width: min(100%, 640px);
  justify-self: end;
  transform: translateY(-18px);
  overflow: visible;
}

.eyebrow,
.project-kicker {
  margin: 0 0 0.85rem;
  color: var(--green);
  font: 600 0.78rem "JetBrains Mono", monospace;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1.05rem;
  color: transparent;
  background: linear-gradient(90deg, #178fcb 0%, #42bde8 48%, #89dbf7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: clamp(5.1rem, 8.5vw, 8.25rem);
  line-height: 0.9;
  letter-spacing: 0;
  font-weight: 900;
}

.hero-name {
  display: inline-block;
  width: max-content;
  max-width: none;
  padding-right: 0.08em;
  background-size: 110% 100%;
  white-space: nowrap;
}

h2 {
  max-width: 760px;
  font-size: clamp(1.85rem, 3.7vw, 3.15rem);
  line-height: 1.06;
  letter-spacing: 0;
}

h3 {
  font-size: 1.35rem;
}

.role {
  max-width: 520px;
  margin-bottom: 1.55rem;
  color: var(--theme-dark);
  font: 800 clamp(1.75rem, 2.8vw, 2.75rem) Inter, sans-serif;
  line-height: 1.05;
}

.hero-summary {
  max-width: 540px;
  margin-bottom: 2.05rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.75;
}

.intro-line {
  margin: 0 0 0.45rem;
  color: var(--text);
  font-size: clamp(4.2rem, 7vw, 6.4rem);
  font-weight: 800;
  line-height: 0.95;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.software-logos,
.social-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.software-logos {
  margin: 0 0 1.95rem;
}

.software-logos span,
.social-links a {
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 3.4rem;
  border: 1px solid rgba(95, 102, 112, 0.16);
  border-radius: 999px;
  background: #eef0ec;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.software-logos span {
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  animation: logoIn 520ms ease forwards;
}

.software-logos span:nth-child(1) { animation-delay: 120ms; }
.software-logos span:nth-child(2) { animation-delay: 200ms; }
.software-logos span:nth-child(3) { animation-delay: 280ms; }
.software-logos span:nth-child(4) { animation-delay: 360ms; }

.software-logos img {
  width: 1.68rem;
  height: 1.68rem;
}

.social-links {
  margin-top: 1.45rem;
}

.social-links a {
  width: 2.75rem;
  height: 2.75rem;
}

.social-links img {
  width: 1.24rem;
  height: 1.24rem;
}

.software-logos span:hover,
.social-links a:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 174, 229, 0.24);
  background: #e4e8e1;
}

.button,
.details-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0 1.05rem;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font: 700 0.88rem Inter, sans-serif;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.details-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 174, 229, 0.35);
}

.button.primary {
  background: var(--theme);
  border-color: var(--theme);
  color: #ffffff;
}

.button.ghost {
  color: var(--theme);
}

.hero-portrait,
.project-card,
.skill-panel,
.workflow-item,
.education-card,
.school-logo-card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.62)), var(--panel);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-card::before,
.skill-panel::before,
.workflow-item::after,
.education-card::after,
.school-logo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(47, 174, 229, 0.16), transparent 15rem);
  transition: opacity 180ms ease;
}

.project-card:hover::before,
.skill-panel:hover::before,
.workflow-item:hover::after,
.education-card:hover::after,
.school-logo-card:hover::after {
  opacity: 1;
}

.skill-panel:hover,
.workflow-item:hover,
.education-card:hover,
.school-logo-card:hover {
  transform: translateY(-4px);
  border-color: rgba(66, 173, 211, 0.26);
  box-shadow: 0 30px 84px rgba(43, 55, 47, 0.15);
}

.hero-portrait {
  display: grid;
  place-items: center;
  min-height: 760px;
  transform: translateY(-18px);
  animation: none;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.portrait-orbit {
  position: absolute;
  width: min(34vw, 500px);
  aspect-ratio: 1;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(226, 247, 255, 0.78), rgba(184, 230, 247, 0.82));
  box-shadow: 0 34px 90px rgba(61, 70, 62, 0.12);
  transform: translateY(28px);
  animation: none;
  transition: box-shadow 220ms ease, transform 220ms ease;
}

.portrait-circle {
  position: relative;
  z-index: 1;
  width: min(32vw, 470px);
  height: min(32vw, 470px);
  overflow: visible;
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.34), rgba(66, 173, 211, 0.14)),
    #dff4fa;
  transform: translateY(28px);
}

.portrait-circle::after {
  display: none;
}

.portrait-cutout {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -3%;
  width: min(42vw, 620px);
  max-width: none;
  transform: translateX(-50%);
  transition: transform 220ms ease, filter 220ms ease;
  filter: drop-shadow(0 30px 36px rgba(36, 44, 38, 0.2)) saturate(0.98) contrast(1.02);
}

.hero-portrait:hover .portrait-cutout {
  transform: translateX(-50%) translateY(-10px) scale(1.025);
  filter: drop-shadow(0 38px 42px rgba(36, 44, 38, 0.24)) saturate(1) contrast(1.03);
}

.hero-portrait:hover .portrait-orbit {
  transform: translateY(28px);
  box-shadow: 0 42px 110px rgba(66, 173, 211, 0.22);
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading-wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 2rem;
  align-items: end;
}

.section-note {
  max-width: 620px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

.section-note strong {
  color: var(--text);
  font-weight: 800;
}

.project-grid,
.skill-grid,
.workflow-grid {
  display: grid;
  gap: 1rem;
}

.project-grid {
  gap: 1.25rem;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  overflow: hidden;
  min-height: 390px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.project-feature:nth-child(even) .project-media {
  order: 2;
}

.project-card:hover {
  border-color: rgba(47, 174, 229, 0.55);
  transform: translateY(-4px);
  box-shadow: 0 30px 84px rgba(43, 55, 47, 0.15);
}

.project-media {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  aspect-ratio: auto;
  background: var(--bg-2);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 180ms ease, transform 220ms ease;
}

.project-hover-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background:
    radial-gradient(circle at 50% 50%, rgba(47, 174, 229, 0.16), transparent 58%),
    #06141c;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms ease;
}

.project-card:hover .project-media img {
  transform: scale(1.04);
}

.project-card.is-video-playing .project-media img {
  opacity: 0;
}

.project-card.is-video-playing .project-hover-video {
  opacity: 1;
  transform: none;
}

.project-media.warm::after,
.project-media.rope::after,
.project-media.terrain::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 20, 23, 0.46));
}

.terrain-visual {
  position: absolute;
  inset: 0;
  background:
    repeating-radial-gradient(ellipse at 50% 54%, rgba(123, 199, 255, 0.5) 0 1px, transparent 2px 22px),
    linear-gradient(135deg, rgba(123, 199, 255, 0.24), rgba(47, 174, 229, 0.12)),
    #10191e;
  animation: contour 8s linear infinite;
}

.terrain-visual span {
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 48% 52% 44% 56%;
}

.terrain-visual span:nth-child(2) {
  inset: 30%;
}

.terrain-visual span:nth-child(3) {
  inset: 42%;
}

.project-body {
  padding: clamp(1.2rem, 3vw, 2rem);
  align-self: center;
}

.project-body p,
.project-body li,
.skill-panel p,
.workflow-item p,
.education-card p {
  color: var(--muted);
  line-height: 1.65;
}

.project-body ul {
  padding-left: 1.1rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0;
}

.tag-row span {
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(47, 174, 229, 0.18);
  border-radius: 999px;
  color: #177da8;
  background: rgba(47, 174, 229, 0.06);
  font: 600 0.72rem "JetBrains Mono", monospace;
}

.details-toggle {
  width: 100%;
}

.cta-highlight {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.cta-highlight::before {
  content: "";
  position: absolute;
  inset: -55% auto -55% -48%;
  width: 34%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  opacity: 0;
  filter: blur(0.5px);
  pointer-events: none;
  z-index: 0;
}

.project-card:hover .cta-highlight::before,
.project-card:focus-within .cta-highlight::before {
  animation: ctaSweep 880ms ease;
}

.project-card:hover .cta-highlight,
.project-card:focus-within .cta-highlight {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    inset 0 0 112px rgba(93, 209, 250, 0.11),
    0 30px 120px rgba(47, 174, 229, 0.2);
}

.cta-highlight > * {
  position: relative;
  z-index: 1;
}

.project-details {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  opacity: 0;
  transition: grid-template-rows 260ms ease, opacity 220ms ease, margin-top 220ms ease;
}

.project-details.is-open {
  grid-template-rows: 1fr;
  margin-top: 1rem;
  opacity: 1;
}

.project-details > * {
  overflow: hidden;
}

.other-projects {
  margin-top: 1.35rem;
}

.project-card.environment-showcase {
  margin-top: 1.1rem;
}

.project-card.environment-showcase .project-media {
  order: 2;
}

.other-projects-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
  padding: 1.1rem;
  border-radius: 1rem;
}

.other-projects-header h3 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.other-projects-header p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.other-projects-scroll-hint {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  width: fit-content;
  margin: 0.95rem auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(23, 125, 168, 0.78);
  cursor: pointer;
  font: 700 0.72rem "JetBrains Mono", monospace;
  text-transform: uppercase;
}

.other-projects-scroll-hint span {
  padding: 0.38rem 0.78rem;
  border: 1px solid rgba(47, 174, 229, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.other-projects-scroll-hint i {
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: scrollArrowPulse 900ms ease-in-out infinite alternate;
}

.other-projects-scroll-hint.is-open {
  display: none;
}

.other-projects-collapse {
  display: none;
  width: fit-content;
  margin: 1rem auto 0;
  padding: 0.75rem 1.05rem;
  border: 0;
  border-radius: 999px;
  color: #0f3447;
  font: 800 0.82rem Inter, sans-serif;
  cursor: pointer;
}

.other-projects-collapse.is-open {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.other-projects-collapse i {
  width: 0.45rem;
  height: 0.45rem;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg) translateY(2px);
}

.other-projects-panel {
  position: relative;
  max-height: 290px;
  margin-top: 1rem;
  opacity: 1;
  overflow: hidden;
  transition: max-height 360ms ease;
}

.other-projects-panel.is-peeking::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(247, 250, 250, 0), rgba(247, 250, 250, 0.94));
}

.other-projects-panel.is-open {
  max-height: 2400px;
}

.other-project-grid {
  display: grid;
  gap: 1rem;
  overflow: hidden;
}

.other-project-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1fr);
  overflow: hidden;
  border-radius: 1rem;
}

.other-project-media {
  position: relative;
  display: grid;
  min-height: 280px;
  background: #06141c;
}

.other-project-media > img,
.other-project-media > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.other-project-media > video {
  display: block;
}

.other-project-media > img + video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 180ms ease;
}

.other-project-card:hover .other-project-media > img + video {
  opacity: 1;
}

.other-project-gallery {
  grid-template-columns: 1fr 1fr;
}

.other-project-gallery video {
  grid-row: span 2;
}

.other-project-copy {
  align-self: center;
  padding: clamp(1.15rem, 2.5vw, 2rem);
}

.other-project-copy h4 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.15rem, 1.7vw, 1.6rem);
}

.other-project-copy p {
  color: var(--muted);
  line-height: 1.65;
}

.asset-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.8rem 0 0.2rem;
}

.asset-strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.08);
}

.mini-link {
  width: fit-content;
  min-height: 2.5rem;
  margin-top: 0.35rem;
  padding: 0.65rem 0.95rem;
}

.fx-breakdown {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  overflow: hidden;
  transition: grid-template-rows 260ms ease, opacity 220ms ease, margin-top 220ms ease;
}

.fx-breakdown.is-open {
  grid-template-rows: 1fr;
  margin-top: 1rem;
  opacity: 1;
}

.fx-breakdown > * {
  overflow: hidden;
}

.fx-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.fx-breakdown figure {
  margin: 0;
  min-width: 0;
}

.fx-breakdown img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 0.75rem;
}

.fx-breakdown figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.fx-breakdown p {
  margin: 1rem 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}

.video-modal[hidden] {
  display: none;
}

.resume-modal {
  position: fixed;
  inset: 0;
  z-index: 310;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
}

.resume-modal[hidden] {
  display: none;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 18, 27, 0.48);
  backdrop-filter: blur(16px);
}

.resume-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 18, 27, 0.5);
  backdrop-filter: blur(18px);
}

.video-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  padding: 0.75rem;
  border-radius: 1.4rem;
}

.resume-modal-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1040px, 100%);
  height: min(86vh, 980px);
  padding: 0.85rem;
  border-radius: 1.4rem;
}

.resume-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0.25rem 0.85rem;
}

.resume-modal-header strong {
  color: var(--text);
  font-size: 1rem;
}

.resume-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.resume-modal-panel iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 1rem;
  background: #fff;
}

.video-modal-panel video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #06141c;
  border-radius: 1rem;
}

.video-modal-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  z-index: 2;
  width: 2.45rem;
  height: 2.45rem;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 800;
  cursor: pointer;
}

.resume-modal .video-modal-close {
  position: static;
  flex: 0 0 auto;
}

.breakdown-grid {
  display: grid;
  gap: 0.75rem;
}

.breakdown-grid p {
  margin: 0;
  padding: 0.85rem;
  border: 1px solid rgba(47, 174, 229, 0.1);
  border-radius: 0.45rem;
  background: rgba(247, 248, 244, 0.68);
}

.rope-diagram {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 1.8rem;
  margin-top: 0.6rem;
}

.rope-diagram span {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: var(--ice);
  box-shadow: 0 0 16px rgba(123, 199, 255, 0.5);
}

.rope-diagram i {
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  height: 1px;
  background: var(--green);
  animation: rope 2s ease-in-out infinite;
}

.slider-stack {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.slider-stack span {
  position: relative;
  display: block;
  height: 0.38rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ice) var(--value), rgba(255, 255, 255, 0.1) var(--value));
  overflow: hidden;
}

.slider-stack span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transform: translateX(-100%);
  animation: sliderSweep 3.4s ease-in-out infinite;
}

.slider-stack span:nth-child(2)::after {
  animation-delay: 420ms;
}

.slider-stack span:nth-child(3)::after {
  animation-delay: 840ms;
}

.skill-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skill-panel,
.workflow-item,
.education-card {
  padding: 1.45rem;
}

.skill-panel {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  padding: 1.45rem;
}

.skill-panel::after {
  content: "";
  position: absolute;
  right: -2rem;
  top: -2rem;
  width: 9rem;
  height: 9rem;
  border-radius: 999px;
  background: rgba(47, 174, 229, 0.045);
}

.skill-logo {
  width: 2.35rem;
  height: 2.35rem;
  margin-bottom: 1.4rem;
  opacity: 0.78;
}

.workflow-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workflow-item span {
  color: var(--amber);
  font: 700 0.82rem "JetBrains Mono", monospace;
}

.workflow-item {
  position: relative;
}

.workflow-item::before {
  content: "";
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  top: 3.35rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(47, 174, 229, 0.25), transparent);
}

.split-section {
  display: grid;
  width: min(1320px, calc(100% - 2.5rem));
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.25rem);
  align-items: stretch;
  border-top: 1px solid rgba(47, 174, 229, 0.1);
  border-bottom: 1px solid rgba(47, 174, 229, 0.1);
}

.education-brand {
  position: relative;
  display: flex;
  flex-direction: column;
}

.school-logo-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  flex: 1;
  min-height: 380px;
  margin: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(47, 174, 229, 0.1);
  border-radius: 0.8rem;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.95), transparent 16rem),
    linear-gradient(145deg, rgba(238, 241, 235, 0.96), rgba(255, 255, 255, 0.66));
  box-shadow: 0 24px 70px rgba(43, 55, 47, 0.11);
}

.school-logo-card .eyebrow {
  justify-self: start;
  margin-bottom: 1rem;
}

.school-logo-card::before {
  content: "";
  position: absolute;
  inset: 1.1rem;
  border: 1px solid rgba(47, 174, 229, 0.08);
  border-radius: 0.55rem;
}

.school-logo-card img {
  position: relative;
  width: min(58%, 300px);
  filter: drop-shadow(0 26px 34px rgba(35, 39, 35, 0.18));
}

.school-lockup {
  position: relative;
  align-self: stretch;
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(47, 174, 229, 0.1);
}

.school-lockup h2 {
  margin-bottom: 0.55rem;
}

.school-name {
  margin: 0;
  color: var(--theme);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 700;
}

.education-card {
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 3vw, 2.1rem);
  min-height: 380px;
  overflow: hidden;
}

.education-card::before {
  content: "";
  position: absolute;
  right: -4rem;
  top: -4rem;
  width: 11rem;
  height: 11rem;
  border-radius: 999px;
  background: rgba(47, 174, 229, 0.055);
}

.education-card h3 {
  position: relative;
  margin-bottom: 0.7rem;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.education-card p,
.language-list {
  position: relative;
}

.language-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.language-list h4 {
  margin: 0 0 0.15rem;
  color: var(--text);
  font-size: 0.88rem;
  letter-spacing: 0;
}

.language-list > span {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.58rem 0.75rem;
  border: 1px solid rgba(47, 174, 229, 0.14);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.28);
}

.language-list .flag {
  position: relative;
  display: inline-block;
  width: 1.55rem;
  height: 1.05rem;
  overflow: hidden;
  border: 1px solid rgba(15, 52, 71, 0.18);
  border-radius: 0.22rem;
  box-shadow: 0 1px 3px rgba(15, 52, 71, 0.12);
}

.flag-cn {
  background:
    radial-gradient(circle at 28% 30%, #ffde00 0 9%, transparent 10%),
    radial-gradient(circle at 46% 18%, #ffde00 0 3%, transparent 4%),
    radial-gradient(circle at 54% 31%, #ffde00 0 3%, transparent 4%),
    radial-gradient(circle at 53% 47%, #ffde00 0 3%, transparent 4%),
    radial-gradient(circle at 44% 58%, #ffde00 0 3%, transparent 4%),
    #de2910;
}

.flag-gb {
  background:
    linear-gradient(0deg, transparent 42%, #c8102e 42% 58%, transparent 58%),
    linear-gradient(90deg, transparent 42%, #c8102e 42% 58%, transparent 58%),
    linear-gradient(0deg, transparent 35%, #fff 35% 65%, transparent 65%),
    linear-gradient(90deg, transparent 35%, #fff 35% 65%, transparent 65%),
    linear-gradient(32deg, transparent 43%, #fff 43% 49%, #c8102e 49% 55%, #fff 55% 61%, transparent 61%),
    linear-gradient(-32deg, transparent 43%, #fff 43% 49%, #c8102e 49% 55%, #fff 55% 61%, transparent 61%),
    #012169;
}

.flag-it {
  background: linear-gradient(90deg, #009246 0 33.33%, #fff 33.33% 66.66%, #ce2b37 66.66% 100%);
}

.language-list strong {
  color: var(--text);
  font-size: 0.9rem;
}

.language-list em {
  color: #177da8;
  font: normal 700 0.78rem "JetBrains Mono", monospace;
}

.contact-section {
  padding-bottom: 8rem;
}

.contact-section .section-heading {
  margin-bottom: 1.4rem;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: stretch;
  padding: clamp(1.1rem, 3vw, 2rem);
  border-radius: 1.25rem;
}

.contact-lead {
  align-self: center;
}

.contact-lead h3 {
  max-width: 520px;
  margin-bottom: 0.85rem;
  font-size: clamp(1.35rem, 2.5vw, 2.15rem);
  line-height: 1.05;
}

.contact-lead p:last-child {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.contact-link {
  display: grid;
  gap: 0.35rem;
  min-height: 5.6rem;
  padding: 1rem;
  border-radius: 1rem;
  color: var(--text);
}

.contact-link span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-link strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #0b3448;
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
}

.contact-panel .contact-actions {
  grid-column: 1 / -1;
  margin-top: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-copy.reveal.is-visible {
  transform: translateY(-18px);
}

@keyframes scan {
  from { transform: translateY(-100%); }
  to { transform: translateY(100%); }
}

@keyframes contour {
  from { background-position: 0 0; }
  to { background-position: 60px 40px; }
}

@keyframes rope {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes logoIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes scrollHintFloat {
  0%, 100% { transform: translateY(0); opacity: 0.72; }
  50% { transform: translateY(7px); opacity: 1; }
}

@keyframes scrollArrowPulse {
  from { opacity: 0.42; transform: rotate(45deg) translate(0, 0); }
  to { opacity: 1; transform: rotate(45deg) translate(3px, 3px); }
}

@keyframes ctaSweep {
  0% {
    left: -48%;
    opacity: 0;
  }
  18% {
    opacity: 0.9;
  }
  100% {
    left: 118%;
    opacity: 0;
  }
}

@keyframes portraitFloat {
  0%, 100% { transform: translateY(-18px); }
  50% { transform: translateY(-30px); }
}

@keyframes orbitFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(8px) scale(0.985); }
}

@keyframes sliderSweep {
  0%, 35% { transform: translateX(-100%); }
  70%, 100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
  }

  .nav-links {
    justify-content: flex-end;
    flex-wrap: wrap;
    font-size: 0.78rem;
  }

  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero-portrait {
    order: -1;
    justify-self: center;
  }

  .hero-copy {
    justify-self: start;
  }

  .portrait-orbit {
    width: min(66vw, 470px);
    transform: translateY(64px);
  }

  .portrait-circle {
    width: min(62vw, 440px);
    height: min(62vw, 440px);
    transform: translateY(64px);
  }

  .portrait-cutout {
    width: min(72vw, 520px);
    bottom: 2%;
  }

  .project-grid,
  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .section-heading-wide {
    grid-template-columns: 1fr;
  }

  .split-section {
    width: min(100% - 1rem, 1320px);
    grid-template-columns: 1fr;
  }

  .school-logo-card {
    min-height: 300px;
  }

  .project-feature:nth-child(even) .project-media {
    order: 0;
  }

  .project-card.environment-showcase .project-media {
    order: 0;
  }

  .project-media {
    min-height: 260px;
  }

  .skill-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header {
    position: static;
  }

  .nav-links a:not(.resume-link) {
    display: none;
  }

  .section-shell {
    width: min(100% - 1rem, 1320px);
    padding: 4.5rem 0;
  }

  .hero {
    min-height: 106vh;
    padding-top: 4rem;
    gap: 1rem;
  }

  .hero-portrait {
    min-height: 600px;
    transform: translateY(0);
  }

  .portrait-orbit {
    width: min(70vw, 310px);
    transform: translateY(102px);
  }

  .portrait-circle {
    width: min(64vw, 286px);
    height: min(64vw, 286px);
    transform: translateY(102px);
  }

  .portrait-cutout {
    width: min(76vw, 330px);
    bottom: 10%;
  }

  .hero-copy {
    transform: none;
  }

  .hero-copy.reveal.is-visible {
    transform: none;
  }

  .button,
  .details-toggle {
    width: 100%;
  }
}

/* Apple-inspired liquid glass material */
.glass-surface,
.glass-card,
.glass-button,
.glass-orb {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background-color: rgba(255, 255, 255, 0.024);
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.025) 34%, rgba(75, 190, 240, 0.04) 100%);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.58),
    inset -1px -1px 0 rgba(32, 132, 181, 0.14),
    inset 18px 20px 42px rgba(255, 255, 255, 0.1),
    inset -26px -30px 58px rgba(38, 126, 166, 0.11),
    inset 0 0 132px rgba(255, 255, 255, 0.04),
    0 38px 130px rgba(31, 112, 148, 0.11);
  backdrop-filter: blur(68px) saturate(2.15) contrast(1.12);
  -webkit-backdrop-filter: blur(68px) saturate(2.15) contrast(1.12);
}

.glass-surface::before,
.glass-card::before,
.glass-button::before,
.glass-orb::before {
  content: "";
  position: absolute;
  inset: -1px;
  width: auto;
  height: auto;
  border: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(28rem 24rem at var(--mx, 50%) var(--my, 50%), rgba(47, 174, 229, 0.1), transparent 58%),
    radial-gradient(140% 90% at 18% 8%, rgba(255, 255, 255, 0.3), transparent 46%),
    radial-gradient(120% 95% at 88% 95%, rgba(34, 145, 198, 0.16), transparent 54%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.13), transparent 44%, rgba(35, 122, 168, 0.08));
  opacity: 0.66;
  mix-blend-mode: screen;
}

.glass-surface::after,
.glass-card::after,
.glass-button::after,
.glass-orb::after {
  content: "";
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  border: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 14%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.26), transparent 16%, transparent 82%, rgba(47, 174, 229, 0.18)),
    radial-gradient(120% 100% at 50% -10%, rgba(255, 255, 255, 0.22), transparent 42%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(47, 174, 229, 0.16),
    inset 1px 0 0 rgba(255, 255, 255, 0.42),
    inset -1px 0 0 rgba(47, 174, 229, 0.14);
  opacity: 0.76;
}

.glass-surface > *,
.glass-card > *,
.glass-button > *,
.glass-orb > * {
  position: relative;
  z-index: 1;
}

.site-header.glass-surface {
  background-color: rgba(255, 255, 255, 0.034);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.6),
    inset -1px -1px 0 rgba(37, 126, 165, 0.15),
    inset 18px 18px 42px rgba(255, 255, 255, 0.1),
    inset -24px -24px 54px rgba(37, 126, 165, 0.1),
    0 26px 110px rgba(50, 112, 138, 0.1);
}

.software-logos .glass-orb,
.social-links .glass-orb {
  background-color: rgba(255, 255, 255, 0.032);
  border-color: rgba(255, 255, 255, 0.34);
}

.button.glass-button,
.details-toggle.glass-button,
.other-projects-collapse.glass-button,
.contact-link.glass-button {
  min-height: 3rem;
  border-radius: 999px;
  color: #0f3447;
  background-color: rgba(255, 255, 255, 0.03);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.button.primary.glass-button {
  color: #063348;
  border-color: rgba(255, 255, 255, 0.34);
  background-color: rgba(47, 174, 229, 0.04);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.64),
    inset -1px -1px 0 rgba(32, 134, 181, 0.18),
    inset 18px 18px 42px rgba(255, 255, 255, 0.1),
    inset -24px -24px 54px rgba(32, 134, 181, 0.15),
    0 28px 96px rgba(47, 174, 229, 0.1);
}

.button.ghost.glass-button,
.details-toggle.glass-button {
  color: #127aa5;
}

.project-card.glass-card,
.skill-panel.glass-card,
.workflow-item.glass-card,
.education-card.glass-card,
.school-logo-card.glass-card {
  border-radius: 1.1rem;
  background-color: rgba(255, 255, 255, 0.024);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.58),
    inset -1px -1px 0 rgba(34, 118, 156, 0.14),
    inset 24px 26px 58px rgba(255, 255, 255, 0.095),
    inset -32px -36px 72px rgba(34, 118, 156, 0.12),
    inset 0 0 150px rgba(255, 255, 255, 0.035),
    0 42px 136px rgba(32, 118, 158, 0.11);
}

.project-card > *,
.skill-panel > *,
.workflow-item > *,
.education-card > *,
.school-logo-card > * {
  position: relative;
  z-index: 1;
}

.glass-card:hover,
.glass-button:hover,
.glass-orb:hover {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.72),
    inset -1px -1px 0 rgba(34, 118, 156, 0.2),
    inset 22px 24px 54px rgba(255, 255, 255, 0.13),
    inset -32px -34px 70px rgba(34, 118, 156, 0.15),
    inset 0 0 150px rgba(255, 255, 255, 0.05),
    0 40px 128px rgba(32, 118, 158, 0.13);
}

.glass-card:hover::before,
.glass-button:hover::before,
.glass-orb:hover::before {
  opacity: 0.88;
}

/* Header fit and quieter glass buttons */
.site-header.glass-surface {
  position: fixed;
  left: 50%;
  right: auto;
  width: min(1480px, calc(100% - 1.5rem));
  max-width: none;
  transform: translateX(-50%);
  z-index: 100;
  padding: 0.62rem 0.86rem;
  background-color: rgba(255, 255, 255, 0.034);
  border-color: rgba(255, 255, 255, 0.34);
  gap: 1rem;
}

.site-header.glass-surface.is-scrolled {
  background-color: rgba(255, 255, 255, 0.042);
  border-color: rgba(255, 255, 255, 0.4);
}

.nav-links {
  min-width: 0;
  justify-content: flex-end;
  gap: clamp(0.9rem, 2vw, 1.9rem);
  margin-left: auto;
  font-size: clamp(0.74rem, 0.82vw, 0.86rem);
  white-space: nowrap;
}

.brand {
  flex: 0 0 auto;
}

.button.glass-button,
.details-toggle.glass-button,
.other-projects-collapse.glass-button,
.contact-link.glass-button,
.language-switch.glass-button,
.software-logos .glass-orb,
.social-links .glass-orb {
  border-color: rgba(255, 255, 255, 0.34);
  background-color: rgba(255, 255, 255, 0.03);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.64),
    inset -1px -1px 0 rgba(33, 123, 163, 0.18),
    inset 14px 16px 34px rgba(255, 255, 255, 0.095),
    inset -20px -22px 46px rgba(33, 123, 163, 0.12),
    inset 0 0 104px rgba(255, 255, 255, 0.035),
    0 26px 92px rgba(36, 105, 138, 0.09);
}

.button.primary.glass-button {
  color: #0b3448;
  border-color: rgba(255, 255, 255, 0.36);
  background-color: rgba(47, 174, 229, 0.042);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.68),
    inset -1px -1px 0 rgba(24, 128, 178, 0.22),
    inset 14px 16px 34px rgba(255, 255, 255, 0.1),
    inset -22px -24px 50px rgba(24, 128, 178, 0.16),
    inset 0 0 110px rgba(93, 209, 250, 0.045),
    0 28px 98px rgba(36, 105, 138, 0.1);
}

.button.primary.glass-button:hover,
.button.glass-button:hover,
.details-toggle.glass-button:hover,
.other-projects-collapse.glass-button:hover,
.contact-link.glass-button:hover,
.language-switch.glass-button:hover,
.software-logos .glass-orb:hover,
.social-links .glass-orb:hover {
  border-color: rgba(255, 255, 255, 0.52);
  background-color: rgba(255, 255, 255, 0.045);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.78),
    inset -1px -1px 0 rgba(33, 123, 163, 0.24),
    inset 18px 20px 42px rgba(255, 255, 255, 0.13),
    inset -26px -28px 58px rgba(33, 123, 163, 0.16),
    inset 0 0 124px rgba(255, 255, 255, 0.05),
    0 36px 118px rgba(36, 105, 138, 0.12);
}

@media (max-width: 900px) {
  .site-header.glass-surface {
    position: fixed;
    align-items: center;
    width: min(100% - 1rem, 1480px);
    max-width: none;
  }

  .nav-links {
    gap: 0.85rem;
    font-size: 0.72rem;
  }

  .language-switch {
    min-height: 2rem;
  }

  .language-switch button {
    font-size: 0.72rem;
    padding: 0.42rem 0.48rem;
  }

  .other-projects-header,
  .other-project-card,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .other-project-media {
    min-height: 220px;
  }

  .other-projects-panel {
    max-height: 300px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header.glass-surface {
    position: fixed;
    top: 0.65rem;
  }

  .nav-links {
    flex: 1 1 auto;
    gap: 0;
  }

  .language-switch {
    margin-left: auto;
  }

  .asset-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fx-breakdown-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-gallery-thumbs {
    gap: 0.45rem;
  }
}

/* OUTLIVE case study */
.case-page main {
  padding-top: 6rem;
}

.case-hero {
  display: grid;
  grid-template-columns: minmax(340px, 0.72fr) minmax(520px, 1fr);
  align-items: center;
  column-gap: clamp(4rem, 8vw, 9rem);
  row-gap: 3rem;
  min-height: calc(100vh - 7rem);
}

.scroll-more {
  grid-column: 1 / -1;
  justify-self: center;
  display: inline-grid;
  justify-items: center;
  gap: 0.45rem;
  margin-top: -0.9rem;
  color: rgba(23, 125, 168, 0.76);
  font: 700 0.72rem "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0;
  text-decoration: none;
  animation: scrollHintFloat 1800ms ease-in-out infinite;
}

.scroll-more span {
  padding: 0.35rem 0.72rem;
  border: 1px solid rgba(47, 174, 229, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.scroll-more i {
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: scrollArrowPulse 900ms ease-in-out infinite alternate;
}

.case-hero-copy {
  min-width: 0;
  max-width: 520px;
  padding-right: 0;
}

.case-hero h1 {
  margin-bottom: 0.9rem;
  color: var(--theme);
  font-size: clamp(4rem, 6.6vw, 7.4rem);
  line-height: 0.86;
  overflow-wrap: normal;
}

.case-lead {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.22rem);
  line-height: 1.75;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.case-video-frame {
  justify-self: end;
  width: min(100%, 760px);
  min-width: 0;
  overflow: hidden;
  border-radius: 1.2rem;
  background: #06141c;
}

.case-video-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #06141c;
}

.case-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0;
}

.case-stat {
  padding: 1.15rem;
  border-radius: 1rem;
}

.case-stat span {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font: 600 0.72rem "JetBrains Mono", monospace;
  text-transform: uppercase;
}

.case-stat strong {
  display: block;
  color: var(--text);
  line-height: 1.35;
}

.case-section {
  padding-top: 6rem;
}

.case-system-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

.case-system-card {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(0, 0.92fr);
  overflow: hidden;
  border-radius: 1rem;
}

.case-system-card > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-system-card > div:not(.case-image-stack):not(.case-gallery) {
  align-self: center;
  padding: clamp(1.1rem, 2.2vw, 1.7rem);
}

.case-system-card > img {
  min-height: 320px;
}

.case-system-card h3 {
  margin-bottom: 0.6rem;
}

.case-system-card p:last-child {
  color: var(--muted);
  line-height: 1.65;
}

.case-note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.case-note-card {
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border-radius: 1rem;
}

.case-note-card h3 {
  margin-bottom: 0.65rem;
}

.case-note-card p:last-child {
  color: var(--muted);
  line-height: 1.65;
}

.case-image-stack {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(47, 174, 229, 0.18), transparent 38%),
    #06141c;
}

.case-image-stack img {
  position: absolute;
  width: 72%;
  height: 58%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 0.85rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.case-image-stack img:nth-child(1) {
  left: 7%;
  top: 9%;
  transform: rotate(-4deg);
}

.case-image-stack img:nth-child(2) {
  right: 7%;
  top: 23%;
  transform: rotate(3deg);
}

.case-image-stack img:nth-child(3) {
  left: 17%;
  bottom: 8%;
  transform: rotate(-1deg);
}

.case-gallery {
  display: grid;
  gap: 0.8rem;
  align-self: stretch;
  padding: clamp(0.75rem, 1.5vw, 1rem);
  background:
    radial-gradient(circle at 30% 20%, rgba(47, 174, 229, 0.18), transparent 40%),
    #06141c;
}

.case-gallery-main {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8.5;
  object-fit: cover;
  border-radius: 0.9rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.case-gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.case-gallery-thumb {
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.09);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.68;
  transition: transform 180ms ease, opacity 180ms ease, border-color 180ms ease;
}

.case-gallery-thumb:hover,
.case-gallery-thumb.is-active {
  transform: translateY(-2px);
  opacity: 1;
  border-color: rgba(47, 174, 229, 0.7);
}

.case-gallery-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8.5;
  object-fit: cover;
}

@media (max-width: 900px) {
  .case-hero,
  .case-system-card {
    grid-template-columns: 1fr;
  }

  .case-hero-copy {
    padding-right: 0;
  }

  .case-video-frame {
    justify-self: stretch;
    width: 100%;
  }

  .case-snapshot,
  .case-system-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-system-grid {
    grid-template-columns: 1fr;
  }

  .case-note-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 560px) {
  .case-page main {
    padding-top: 3rem;
  }

  .case-snapshot,
  .case-system-grid {
    grid-template-columns: 1fr;
  }
}
