/* ==========================================================================
   SHARED - local fonts, design tokens and document foundations
   ========================================================================== */

@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Fira Code";
  src: url("fonts/fira-code.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

@property --hero-gradient-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 270deg;
}
@property --hero-fade-start {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 34%;
}

@property --hero-fade-soft {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 47%;
}

@property --hero-fade-mid {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 66%;
}

@property --hero-fade-solid {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 80%;
}
:root {
  --navy: #131E29;
  --paper: #f7f6f3;
  --white: #fff;
  --coral: #F9423A;
  --coral-soft: #fff0ed;
  --line: rgba(17, 29, 56, 0.24);
  --shadow: 0 18px 38px rgba(15, 22, 37, 0.14), 0 3px 8px rgba(15, 22, 37, 0.12);
  --radius: 18px;
  --label-size: 19px;
  --button-size: 14px;
  --ui-size: 13px;
  --shell: min(1320px, calc(100% - 80px));
  --font-body: "Poppins", "Segoe UI", sans-serif;
  --font-mono: "Fira Code", "SFMono-Regular", Consolas, monospace;
}

@view-transition { navigation: auto; }
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  color: var(--navy);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
:is(.section-heading h2, .country-tabs button, .scan-thumb figcaption,
    .case-kicker, .case-facts dt, .case-local-nav strong, .case-local-nav a,
    .scene-copy h3, .cv-entry h3, .cv-date, .cv-side-block h3,
    .skills-list dt, .certification-list strong, .certification-list time) {
  font: 700 var(--label-size)/1.2 var(--font-mono);
  text-transform: uppercase;
}
.button {
  font: 700 var(--button-size)/1.2 var(--font-mono);
  text-transform: uppercase;
}
/* Shared project and documentation section navigation */
.case-local-nav {
  --case-nav-top: clamp(156px, 16vw, 208px);
  position: sticky; top: var(--case-nav-top); align-self: start;
  max-height: calc(100vh - var(--case-nav-top) - 28px); overflow-y: auto;
}
.case-local-nav strong {
  display: block; margin-bottom: 18px; color: var(--coral);
}
.case-local-nav a {
  display: block; padding: 9px 0 9px 14px; color: var(--navy); opacity: .68;
  border-left: 2px solid transparent;
  transition: color 240ms ease, border-color 240ms ease, opacity 240ms ease;
}
.case-local-nav a:hover,
.case-local-nav a:focus-visible,
.case-local-nav a.is-active { color: var(--navy); border-color: var(--coral); opacity: 1; }
.scan-thumb figcaption, .skills-list dt, .certification-list time { color: var(--coral); }
.page-shell { width: var(--shell); margin-inline: auto; }
.glass {
  background: rgba(248, 248, 246, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 24px rgba(17, 29, 56, 0.14), inset 0 0 0 1px rgba(17, 29, 56, 0.06);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  backdrop-filter: blur(24px) saturate(1.25);
}
.skip-link {
  position: fixed; z-index: 100; top: 12px; left: 12px;
  padding: 10px 14px; background: var(--white); transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
main:focus { outline: none; }
/* ==========================================================================
   SHARED - site header, navigation and reusable controls
   ========================================================================== */
.header-gradient-blur {
  position: fixed; z-index: 0; inset: 0 0 auto;
  height: clamp(132px, 14vw, 180px); pointer-events: none;
}
.header-gradient-blur > span {
  position: absolute; inset: 0;
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  -webkit-mask: linear-gradient(to bottom, transparent var(--fade-in), #000 var(--solid-start), #000 var(--solid-end), transparent var(--fade-out));
  mask: linear-gradient(to bottom, transparent var(--fade-in), #000 var(--solid-start), #000 var(--solid-end), transparent var(--fade-out));
}
.header-gradient-blur > span:nth-child(1) { --blur: 64px; --fade-in: 0%; --solid-start: 0%; --solid-end: 5%; --fade-out: 13%; }
.header-gradient-blur > span:nth-child(2) { --blur: 32px; --fade-in: 0%; --solid-start: 0%; --solid-end: 6%; --fade-out: 22%; }
.header-gradient-blur > span:nth-child(3) { --blur: 16px; --fade-in: 0%; --solid-start: 6%; --solid-end: 13%; --fade-out: 34%; }
.header-gradient-blur > span:nth-child(4) { --blur: 8px; --fade-in: 6%; --solid-start: 13%; --solid-end: 22%; --fade-out: 49%; }
.header-gradient-blur > span:nth-child(5) { --blur: 4px; --fade-in: 13%; --solid-start: 22%; --solid-end: 34%; --fade-out: 66%; }
.header-gradient-blur > span:nth-child(6) { --blur: 2px; --fade-in: 22%; --solid-start: 34%; --solid-end: 49%; --fade-out: 84%; }
.header-gradient-blur > span:nth-child(7) { --blur: 1px; --fade-in: 34%; --solid-start: 49%; --solid-end: 66%; --fade-out: 100%; }
.header-gradient-blur > span:nth-child(8) { --blur: .5px; --fade-in: 49%; --solid-start: 66%; --solid-end: 84%; --fade-out: 100%; }
.site-header {
  position: fixed; z-index: 40; inset: 24px 40px auto;
  min-height: 52px;
  display: flex; align-items: center; justify-content: space-between;
}
.wordmark {
  position: relative; z-index: 1;
  display: flex; align-items: center; width: 64px; height: 32px;
}
.wordmark img { width: 100%; }
.site-nav {
  position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; align-items: center;
  width: min(350px, 50vw); min-height: 52px; padding: 5px; border-radius: 999px;
  view-transition-name: site-nav;
  box-shadow:
    0 8px 24px rgba(17, 29, 56, 0.14),
    0 2px 7px rgba(17, 29, 56, 0.05),
    inset 0 0 0 1px rgba(17, 29, 56, 0.06);
  transform-origin: right center;
  transition:
    transform 300ms cubic-bezier(.34, 1.56, .64, 1),
    box-shadow 300ms cubic-bezier(.2, .8, .2, 1);
}
.nav-active-pill {
  position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 5px;
  width: calc((100% - 18px) / 3); border-radius: inherit; background: var(--coral);
  transform: translateX(calc(var(--nav-index, 0) * (100% + 4px)));
  view-transition-name: active-nav-pill;
}
body[data-page="work"] { --nav-index: 0; }
body[data-page="lab"] { --nav-index: 1; }
body[data-page="cv"] { --nav-index: 2; }
.site-nav a {
  position: relative; z-index: 1; display: grid; place-items: center; min-width: 0; min-height: 40px; padding: 0 12px;
  border-radius: inherit; font: 700 var(--ui-size)/1 var(--font-mono); text-transform: uppercase;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.site-nav a[data-nav="work"] { view-transition-name: nav-work-label; }
.site-nav a[data-nav="lab"] { view-transition-name: nav-lab-label; }
.site-nav a[data-nav="cv"] { view-transition-name: nav-cv-label; }
.site-nav a.is-active { color: var(--navy); }
.site-nav a:not(.is-active):is(:hover, :focus-visible) {
  background: rgba(255, 255, 255, 0.92);
}
@media (prefers-reduced-motion: no-preference) {
  .site-nav:has(a:active) {
    transform: scale(.97);
    transition: transform 90ms ease-out, box-shadow 90ms ease-out;
  }
}
.site-nav a:focus-visible, .button:focus-visible, button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--coral) 70%, white);
  outline-offset: 3px;
}
@keyframes page-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
::view-transition,
::view-transition-group(root),
::view-transition-image-pair(root),
::view-transition-old(root),
::view-transition-new(root) {
  background: var(--paper);
}
::view-transition-group(root) { z-index: 0; }
::view-transition-old(root) {
  animation: 220ms ease-in both page-out; mix-blend-mode: normal;
}
::view-transition-new(root) {
  animation: 420ms cubic-bezier(.2, .8, .2, 1) both page-in; mix-blend-mode: normal;
}
::view-transition-group(site-nav) {
  z-index: 1;
  animation: none;
}
::view-transition-image-pair(site-nav) {
  isolation: isolate;
  background: rgba(248, 248, 246, 0.94);
}
::view-transition-group(site-nav),
::view-transition-image-pair(site-nav) {
  overflow: clip;
}
::view-transition-group(site-nav),
::view-transition-image-pair(site-nav),
::view-transition-old(site-nav),
::view-transition-new(site-nav) {
  border-radius: 999px;
  clip-path: inset(0 round 999px);
}
::view-transition-old(site-nav) { opacity: 0; animation: none; }
::view-transition-new(site-nav) { opacity: 1; animation: none; }
::view-transition-group(active-nav-pill) {
  z-index: 2;
  animation-duration: 420ms;
  animation-timing-function: cubic-bezier(.2, .8, .2, 1);
}
::view-transition-group(nav-work-label),
::view-transition-group(nav-lab-label),
::view-transition-group(nav-cv-label) { z-index: 3; animation: none; }
::view-transition-old(nav-work-label),
::view-transition-old(nav-lab-label),
::view-transition-old(nav-cv-label),
::view-transition-new(nav-work-label),
::view-transition-new(nav-lab-label),
::view-transition-new(nav-cv-label) { animation: none; }
::view-transition-old(nav-work-label),
::view-transition-old(nav-lab-label),
::view-transition-old(nav-cv-label) { opacity: 0; }
::view-transition-new(nav-work-label),
::view-transition-new(nav-lab-label),
::view-transition-new(nav-cv-label) { opacity: 1; }
@media (min-width: 641px) and (hover: hover) and (pointer: fine) {
  .site-nav:hover {
    transform: scale(1.055);
    box-shadow:
      0 19px 44px rgba(17, 29, 56, 0.24),
      0 6px 17px rgba(17, 29, 56, 0.14),
      inset 0 0 0 1px rgba(17, 29, 56, 0.07);
  }
}

/* ==========================================================================
   WORK PAGE - showreel hero and selected-project grid
   ========================================================================== */
.hero {
  position: relative; min-height: clamp(430px, min(100svh, calc(50vw + 370px)), 820px); display: grid; align-items: end; overflow: hidden;
  background: var(--paper);
}
.hero-media, .hero-media img, .hero-video, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media img, .hero-video { object-fit: cover; object-position: center; }
.hero-video {
  z-index: 1;
  opacity: 0;
  transition: opacity 500ms ease;
}
.hero-video.is-active { opacity: 1; }
.hero-shade {
  z-index: 2;
  background: none;
  transition: opacity 700ms ease;
}
.hero-shade::before {
  content: "";
  position: absolute;
  inset: 0;
  --hero-gradient-angle: 270deg;
  --hero-fade-start: 34%;
  --hero-fade-soft: 47%;
  --hero-fade-mid: 66%;
  --hero-fade-solid: 80%;
  background: linear-gradient(
    var(--hero-gradient-angle),
    transparent var(--hero-fade-start),
    rgba(247, 246, 243, 0.16) var(--hero-fade-soft),
    rgba(247, 246, 243, 0.76) var(--hero-fade-mid),
    rgba(247, 246, 243, 0.97) var(--hero-fade-solid),
    var(--paper) 100%
  );
  transition:
    --hero-gradient-angle 480ms cubic-bezier(.22, 1, .36, 1),
    --hero-fade-start 480ms cubic-bezier(.22, 1, .36, 1),
    --hero-fade-soft 480ms cubic-bezier(.22, 1, .36, 1),
    --hero-fade-mid 480ms cubic-bezier(.22, 1, .36, 1),
    --hero-fade-solid 480ms cubic-bezier(.22, 1, .36, 1);
}
.hero-content {
  position: relative;
  z-index: 3;
  padding-block: clamp(96px, 21svh, 190px) clamp(20px, 7svh, 70px);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 550ms ease, transform 700ms cubic-bezier(.2, .75, .25, 1);
}
.case-kicker { display: flex; align-items: center; gap: 11px; margin: 0 0 22px; letter-spacing: 0.02em; }
.case-kicker i { width: 4px; height: 4px; border-radius: 50%; background: var(--coral); }
.page-title {
  margin: 0; font-size: clamp(48px, 7vw, 96px); line-height: 1.05; letter-spacing: -0.055em;
}
.lab-intro > .page-title { letter-spacing: -0.025em; }
.hero-copy { width: min(470px, 100%); margin-top: 24px; }
.hero-copy p { margin: 0 0 14px; }
.contact-lines { display: flex; gap: 24px; align-items: center; margin-top: 26px; font-style: normal; }
.contact-lines span { width: 1px; height: 18px; background: var(--coral); }
.hero-actions { display: flex; gap: 16px; margin-top: 26px; }
.hero-focus-label {
  position: absolute;
  z-index: 4;
  left: 40px;
  bottom: 28px;
  display: grid;
  gap: 3px;
  max-width: calc(100% - 80px);
  padding: 13px 18px;
  border-radius: 14px;
  opacity: 0;
  transform: translateY(22px) scale(.94);
  transform-origin: left bottom;
  pointer-events: none;
  transition: opacity 500ms ease, transform 700ms cubic-bezier(.2, .75, .25, 1);
}
.hero-focus-label strong { font-size: 18px; line-height: 1.1; }
.button {
  display: inline-grid; place-items: center; min-width: 180px; min-height: 50px; padding: 12px 22px;
  border: 2px solid currentColor; border-radius: 12px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.button:hover { transform: translateY(-2px); }
.button[data-button-motion] { transform: none; }
.button-label {
  display: inline-block;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button-label { transform: none !important; }
}
body[data-page="work"] #linkedin,
body[data-page="cv"] #download-cv,
#view-ar, #try-again {
  color: var(--navy); border-color: var(--coral); background: var(--coral);
  box-shadow: 0 8px 22px rgba(249, 66, 58, 0.24);
}
body[data-page="work"] #download-cv,
body[data-page="cv"] #linkedin {
  border-color: currentColor; background: rgba(255, 255, 255, 0.05);
}
@media (min-width: 641px) {
  .hero.is-focus-mode .hero-content {
    opacity: 0;
    transform: translateY(70px);
    pointer-events: none;
  }
  .hero.is-focus-mode .hero-shade { opacity: 0.12; }

  .hero.is-focus-mode .hero-focus-label {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.work-section { padding-block: 26px 72px; }
.section-heading { display: flex; align-items: center; gap: 22px; margin-bottom: 26px; }
.section-heading h2 { flex: 0 1 auto; min-width: 0; margin: 0; color: var(--coral); }
.section-heading span { flex: 1 1 28px; min-width: 28px; height: 1px; background: var(--navy); }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.project-card { position: relative; z-index: 0; min-width: 0; }
@keyframes project-in {
  from { opacity: 0; transform: translateY(28px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.project-grid.is-reveal-ready .project-card { opacity: 0; }
.project-grid.is-reveal-ready .project-card.is-visible {
  animation: 620ms cubic-bezier(.2, .75, .25, 1) both project-in;
}
.project-card a {
  position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: var(--radius); background: #ddd; box-shadow: var(--shadow);
  transform: translateZ(0);
  transition:
    transform 280ms cubic-bezier(.2, .75, .25, 1),
    box-shadow 280ms ease;
}
.project-video {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 450ms cubic-bezier(.2,.7,.2,1);
}
.project-card:hover .project-video { transform: scale(1.035); }
.project-caption {
  position: absolute; z-index: 2; left: 10px; right: 10px; bottom: 10px;
  display: block;
  min-height: 40px; padding: 10px 13px; border-radius: 13px;
  transform-origin: bottom right;
  box-shadow:
    0 13px 26px rgba(15, 22, 37, 0.22),
    0 3px 8px rgba(15, 22, 37, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  transition:
    box-shadow 480ms ease,
    transform 620ms cubic-bezier(.16, 1, .3, 1),
    padding 520ms cubic-bezier(.16, 1, .3, 1);
}
.project-caption-copy {
  display: grid;
  min-width: 0;
  transition: transform 520ms cubic-bezier(.16, 1, .3, 1);
}
:is(.project-caption strong, .project-caption time, .case-body figcaption) {
  font: 700 var(--ui-size)/1.2 var(--font-mono); text-transform: uppercase;
}
.project-caption strong {
  padding-right: 48px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.project-caption time {
  position: absolute; top: 10px; right: 13px; padding-top: 1px;
}
.project-category {
  --project-category-height: 0px;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  color: var(--navy);
  opacity: 0;
  transform: translateY(-4px);
  clip-path: inset(0 0 100% 0);
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 700 11px/1.3 var(--font-mono);
  text-transform: uppercase;
  transition:
    max-height 520ms cubic-bezier(.16, 1, .3, 1),
    margin-top 520ms cubic-bezier(.16, 1, .3, 1),
    opacity 360ms ease,
    transform 520ms cubic-bezier(.16, 1, .3, 1),
    clip-path 600ms cubic-bezier(.16, 1, .3, 1);
}
.project-outcome {
  display: none;
}
.loading-copy, .load-error { grid-column: 1 / -1; padding: 60px 0; text-align: center; }
@media (hover: hover) and (pointer: fine) {
  .project-card:hover,
  .project-card:focus-within {
    z-index: 10;
  }
  .project-card a {
    overflow: visible;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
  }
  .project-card .project-video {
    border-radius: inherit;
    transform: none;
  }
  .project-card a.is-tilting { transition-duration: 120ms, 280ms; }
  .project-card:hover a,
  .project-card:focus-within a {
    transform: perspective(900px) translateY(-14px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) scale(1.03);
    box-shadow:
      0 46px 76px rgba(19, 30, 41, 0.32),
      0 16px 28px rgba(19, 30, 41, 0.2);
  }
  .project-card:hover .project-caption,
  .project-card:focus-within .project-caption {
    padding-block: 12px;
    transform: translateY(-10px) translateZ(88px) scale(1.02) rotateX(1.5deg);
    box-shadow:
      0 18px 34px rgba(15, 22, 37, 0.3),
      0 5px 12px rgba(15, 22, 37, 0.2),
      inset 0 0 0 1px rgba(255, 255, 255, 0.62);
  }
  .project-card:hover .project-caption time,
  .project-card:focus-within .project-caption time {
    top: 12px;
    transform: translateY(-1px) scale(.94);
  }
  .project-card:hover .project-caption-copy,
  .project-card:focus-within .project-caption-copy {
    transform: translateY(-2px);
  }
  .project-card:hover .project-category,
  .project-card:focus-within .project-category {
    max-height: var(--project-category-height);
    margin-top: 5px;
    overflow: hidden;
    opacity: .68;
    transform: translateY(0);
    clip-path: inset(0);
    white-space: normal;
    transition-delay: 80ms;
  }
  .project-outcome {
    --project-outcome-height: 0px;
    display: block;
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
    color: var(--navy);
    opacity: 0;
    transform: translateY(-4px);
    font: 400 var(--ui-size)/1.35 var(--font-body);
    transition:
      max-height 560ms cubic-bezier(.16, 1, .3, 1),
      margin-top 560ms cubic-bezier(.16, 1, .3, 1),
      opacity 380ms ease,
      transform 560ms cubic-bezier(.16, 1, .3, 1),
      clip-path 640ms cubic-bezier(.16, 1, .3, 1);
  }
  .project-card:hover .project-outcome,
  .project-card:focus-within .project-outcome {
    max-height: var(--project-outcome-height);
    margin-top: 7px;
    overflow: hidden;
    opacity: .82;
    transform: translateY(0);
    clip-path: inset(0);
    transition-delay: 160ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card a,
  .project-card .project-video,
  .project-card .project-caption,
  .project-caption-copy,
  .project-caption time,
  .project-category,
  .project-outcome {
    transform: none !important;
    transition: none;
  }
}
/* ==========================================================================
   SHARED - footer
   ========================================================================== */
.site-footer {
  position: relative; z-index: 5; width: 100%; margin: 0;
  color: var(--paper); background: var(--navy);
}
.footer-inner {
  display: grid; grid-template-columns: minmax(280px, 1fr) auto auto;
  column-gap: clamp(52px, 8vw, 120px); row-gap: 54px;
  width: var(--shell); margin-inline: auto; padding-block: 64px 30px;
}
.footer-brand-block { display: grid; align-self: start; justify-items: start; gap: 22px; }
.footer-brand { width: min(100%, 430px); }
.footer-brand img { width: 100%; height: auto; }
.footer-group { display: grid; align-content: start; justify-items: start; gap: 10px; }
.footer-heading { margin: 0 0 8px; color: var(--coral); }
.footer-heading, .footer-group a, .footer-meta {
  font: 700 var(--button-size)/1.2 var(--font-mono); text-transform: uppercase;
}
.footer-group a { position: relative; padding-block: 2px; white-space: nowrap; }
.footer-group a::after {
  content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 180ms ease;
}
.footer-group a:is(:hover, :focus-visible)::after { transform: scaleX(1); transform-origin: left; }
.footer-meta {
  display: flex; grid-column: 1 / -1; justify-content: space-between; gap: 24px;
  padding-top: 24px; border-top: 1px solid rgba(247, 246, 243, 0.25);
  color: rgba(247, 246, 243, 0.7);
}
.footer-analytics {
  max-width: 48ch; margin: 0; color: var(--paper);
  font: 400 12px/1.55 var(--font-body); text-transform: none;
}
.footer-analytics a { text-decoration: underline; text-underline-offset: 3px; }
/* ==========================================================================
  LAB PAGE - introduction, photography, scans and scenes
   ========================================================================== */

.lab-intro { padding-block: clamp(196px, calc(14vw + 100px), 290px) 0; }
.lab-intro > p { max-width: 500px; }
/* 404 */
.error-page { min-height: 100svh; overflow-x: hidden; }
.error-main { display: grid; min-height: 100svh; align-items: center; padding-block: 150px 80px; }
.error-content { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(420px, 1fr); align-items: center; gap: clamp(48px, 8vw, 130px); }
.error-number {
  margin: 0; color: var(--coral);
  font: 700 clamp(128px, 19vw, 280px)/.75 var(--font-body);
  letter-spacing: -.035em;
}
.error-message { max-width: 620px; }
.error-label { margin: 0 0 18px; color: var(--coral); font: 700 var(--label-size)/1.2 var(--font-mono); text-transform: uppercase; }
.error-message .page-title { letter-spacing: -.025em; }
.error-copy { max-width: 460px; margin: 24px 0 30px; }
#error-home {
  color: var(--navy); border-color: var(--coral); background: var(--coral);
  box-shadow: 0 8px 22px rgba(249, 66, 58, .24);
}
@media (max-width: 900px) {
  .error-main { align-items: start; padding-block: 180px 80px; }
  .error-content { grid-template-columns: 1fr; gap: 48px; }
  .error-number { font-size: clamp(116px, 26vw, 190px); }
  .error-message { max-width: 680px; }
}
.lab-section { padding-block: 26px 0; scroll-margin-top: 20px; }
.lab-section:last-of-type { padding-bottom: 72px; }
.country-tabs { display: flex; gap: 70px; margin: 8px 0 42px; }
.country-tabs button {
  padding: 10px 0; border: 0; border-bottom: 2px solid transparent; color: var(--navy);
  background: transparent; white-space: nowrap; cursor: pointer;
  transition: color 300ms ease, border-color 300ms ease, transform 300ms cubic-bezier(.22, 1, .36, 1);
}
.country-tabs button.is-active { color: var(--coral); border-color: var(--coral); transform: translateY(-2px); }
.photography-layout {
  display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 52px; align-items: center;
  min-width: 0;
}
.photography-layout[hidden] { display: none; }
.photography-layout > * { min-width: 0; max-width: 100%; }
.place-copy p { margin-top: 0; overflow-wrap: anywhere; }
.location-map { width: 180px; margin-top: 32px; }
.carousel-fade-shell { position: relative; width: 100%; min-width: 0; overflow-x: clip; }
.carousel-fade-shell::before,
.carousel-fade-shell::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: clamp(38px, 7vw, 92px);
  pointer-events: none;
}
.carousel-fade-shell::before {
  left: 0;
  background: linear-gradient(90deg, var(--paper) 0%, rgba(247, 246, 243, 0.82) 28%, transparent 100%);
}
.carousel-fade-shell::after {
  right: 0;
  background: linear-gradient(270deg, var(--paper) 0%, rgba(247, 246, 243, 0.82) 28%, transparent 100%);
}
.photo-rail {
  display: flex; gap: 18px; align-items: center; width: 100%; min-width: 0;
  overflow-x: auto; padding: 44px 18px;
  cursor: grab; scrollbar-width: none; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory;
  touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch;
}
.photo-rail::-webkit-scrollbar { display: none; }
.photo-rail:is([data-auto-scroll], .is-dragging) { scroll-snap-type: none; }
.photo-rail.is-dragging { cursor: grabbing; }
.photo-rail figure {
  flex: 0 0 auto; margin: 0; padding: 8px;
  background: white; box-shadow: var(--shadow); scroll-snap-align: center;
}
.photo-open {
  display: block; margin: 0; padding: 0; border: 0; color: inherit;
  background: transparent; cursor: zoom-in;
}
.photo-rail img { max-width: none; height: clamp(250px, 30vw, 390px); }
.image-viewer {
  width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  border: 0; background: transparent; overflow: hidden;
}
.image-viewer[open] { display: grid; place-items: center; }
.image-viewer::backdrop {
  background: rgba(10, 13, 20, .9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
@media (prefers-reduced-motion: no-preference) {
  .image-viewer[open]::backdrop { animation: image-viewer-backdrop 280ms ease-out both; }
}
@keyframes image-viewer-backdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}
.image-viewer img {
  width: 100%; max-width: none; height: 100%; max-height: none;
  min-width: 0; min-height: 0; object-fit: contain;
}
.image-viewer-close {
  position: absolute; z-index: 1;
  top: max(18px, env(safe-area-inset-top)); right: max(18px, env(safe-area-inset-right));
  padding: 10px 14px; border: 1px solid rgba(255, 255, 255, .75); border-radius: 999px;
  color: var(--navy); background: rgba(255, 255, 255, .9); cursor: pointer;
  font: 700 var(--ui-size)/1.2 var(--font-mono); text-transform: uppercase;
}
.scan-section { background: var(--coral-soft); overflow: hidden; }
.scan-marquee-shell {
  position: relative; width: 100%; overflow: hidden;
}
.scan-marquee-shell::before,
.scan-marquee-shell::after {
  content: "";
  position: absolute; z-index: 3; top: 0; bottom: 0;
  width: clamp(30px, 6vw, 92px); pointer-events: none;
}
.scan-marquee-shell::before {
  left: 0;
  background: linear-gradient(90deg, var(--coral-soft) 0%, rgba(255, 240, 237, .86) 30%, transparent 100%);
}
.scan-marquee-shell::after {
  right: 0;
  background: linear-gradient(270deg, var(--coral-soft) 0%, rgba(255, 240, 237, .86) 30%, transparent 100%);
}
.scan-rail {
  display: flex; align-items: center; gap: clamp(8px, 1vw, 18px);
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px max(10px, calc((100vw - var(--shell)) / 2)) 52px;
  cursor: grab; scrollbar-width: none;
  overscroll-behavior-inline: contain;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}
.scan-rail::-webkit-scrollbar { display: none; }
.scan-rail.is-dragging { cursor: grabbing; }
.scan-thumb {
  position: relative; flex: 0 0 auto; display: grid; place-items: center;
  width: clamp(210px, 17vw, 285px);
  height: clamp(225px, 20vw, 300px);
  margin: 0 -4px;
}
.scan-open {
  position: relative; display: grid; place-items: center;
  width: 100%; height: 100%; margin: 0; padding: 0;
  border: 0; color: inherit; background: transparent; cursor: pointer;
}
.scan-open img {
  width: 126%; max-width: none; height: 126%; max-height: none;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(19, 30, 41, .08));
  transition: transform 280ms cubic-bezier(.2, .75, .25, 1), filter 280ms ease;
}
.scan-thumb figcaption {
  display: none;
}
.scan-open:is(:hover, :focus-visible) img {
  transform: translateY(-16px) scale(1.06);
  filter: drop-shadow(0 24px 30px rgba(19, 30, 41, .2));
}
.scan-hint {
  margin: 0; padding: 0 0 26px;
  font-size: 14px; line-height: 1.5;
}

.model-viewer-dialog {
  width: min(680px, calc(100% - 32px));
  height: auto;
  max-width: none;
  max-height: calc(100dvh - 32px);
  aspect-ratio: 4 / 5;
  margin: auto;
  padding: 0;
  border: 0;
  outline: 0;
  border-radius: var(--radius);
  color: var(--navy);
  background: #ddd;
  overflow: hidden;
  box-shadow:
    0 38px 72px rgba(19, 30, 41, .32),
    0 14px 28px rgba(19, 30, 41, .20);
}
.model-viewer-dialog::backdrop {
  background: rgba(10, 13, 20, .78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
html.model-dialog-open,
body.model-dialog-open {
  overflow: hidden;
  overscroll-behavior: none;
}
.model-viewer-panel {
  position: relative;
  width: 100%;
  height: 100%;
}
.model-viewer-dialog model-viewer {
  display: block;
  width: 100%;
  height: 100%;
  outline: 0;
  background: var(--coral-soft);
  --poster-color: transparent;
}
.model-viewer-dialog:focus,
.model-viewer-dialog:focus-visible,
.model-viewer-dialog model-viewer:focus,
.model-viewer-dialog model-viewer:focus-visible {
  outline: none;
}
.model-viewer-close {
  position: absolute;
  z-index: 5;
  top: 12px;
  right: 12px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 999px;
  color: var(--navy);
  background: rgba(248, 248, 246, .76);
  box-shadow:
    0 8px 24px rgba(17, 29, 56, .14),
    inset 0 0 0 1px rgba(17, 29, 56, .06);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  backdrop-filter: blur(24px) saturate(1.25);
  cursor: pointer;
  font: 700 var(--ui-size)/1.2 var(--font-mono);
  text-transform: uppercase;
}
.model-viewer-meta {
  position: absolute;
  z-index: 4;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 52px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 13px;
  background: rgba(248, 248, 246, .76);
  box-shadow:
    0 13px 26px rgba(15, 22, 37, .22),
    0 3px 8px rgba(15, 22, 37, .16),
    inset 0 0 0 1px rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  backdrop-filter: blur(24px) saturate(1.25);
}
.model-viewer-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 700 var(--ui-size)/1.2 var(--font-mono);
  text-transform: uppercase;
}
.model-viewer-instructions {
  flex: 0 0 auto;
  font: 700 10px/1.25 var(--font-mono);
  text-transform: uppercase;
  opacity: .68;
}
.model-viewer-instructions-mobile { display: none; }
.model-ar-button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-width: 112px;
  min-height: 52px;
  padding: 10px 16px;
  color: var(--navy);
  border-color: var(--coral);
  background: var(--coral);
  box-shadow: 0 8px 22px rgba(249, 66, 58, .24);
}
@media (prefers-reduced-motion: no-preference) {
  .model-viewer-dialog[open]::backdrop { animation: image-viewer-backdrop 280ms ease-out both; }
}
@media (prefers-reduced-motion: reduce) {
  .scan-open img { transition: none; }
}
.scene { display: grid; grid-template-columns: 200px 1fr; gap: 34px; align-items: center; margin-bottom: 46px; }
.scene-copy h3, .cv-entry h3 {
  margin: 0 0 12px;
}
:is(.place-copy p, .scene-copy p) {
  font-size: 14px; line-height: 1.5;
}
:is(.cv-entry p:not(.cv-date), .cv-side-block p, .skills-list dd, .certification-list li) {
  font-size: 16px; line-height: 1.5;
}
.scene-copy p, .skills-list dd { margin: 0; }
.scene-modes { min-width: 0; }
.scene-mode-stage {
  position: relative; aspect-ratio: 85 / 36; overflow: hidden;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.scene-mode-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene-mode-image.is-active { z-index: 1; }
.scene-mode-wipe {
  position: absolute; z-index: 3; top: 0; bottom: 0; left: 0; width: 2px;
  opacity: 0; background: rgba(255, 255, 255, .94); pointer-events: none;
  box-shadow: 0 0 18px rgba(255, 255, 255, .6);
}
.scene-mode-label {
  position: absolute; z-index: 4; top: 14px; left: 14px; padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .72); border-radius: 10px; color: var(--navy);
  background: rgba(255, 255, 255, .78); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font: 700 var(--label-size)/1.2 var(--font-mono); text-transform: uppercase;
}
/* ==========================================================================
   ABOUT PAGE - profile and responsive web CV
   ========================================================================== */
.about-page { min-height: 74vh; }
.about-intro > .about-copy { max-width: 720px; }
.about-actions { display: flex; gap: 16px; margin-top: 28px; }
.cv-section { padding-block: 72px 90px; scroll-margin-top: 110px; }
.cv-grid {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(340px, .9fr);
  gap: clamp(36px, 4vw, 60px);
}
.cv-main, .cv-sidebar { min-width: 0; }
.cv-block + .cv-block { margin-top: 32px; }
.cv-entry {
  display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px;
  padding-block: 20px;
}
.cv-date { margin: 0; color: var(--coral); }
.cv-entry h3,
.cv-entry > .cv-date,
.cv-side-block h3,
.skills-list dt,
.certification-list strong,
.certification-list time {
  font: 700 var(--label-size)/1.5 var(--font-body);
}
.section-heading + .cv-entry { padding-top: 0; }
.cv-block .cv-entry:last-child { padding-bottom: 0; }
.cv-entry p:not(.cv-date) { margin: 10px 0 0; }
.cv-sidebar { display: grid; align-content: start; gap: 28px; margin-top: -26px; }
.cv-side-block {
  padding: 26px; border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .9);
  background: rgba(248, 248, 246, .64); box-shadow: 0 12px 30px rgba(17, 29, 56, .08);
}
.cv-side-block h3 {
  margin: 18px 0 5px; color: var(--navy);
}
.cv-side-block > .section-heading + h3 { margin-top: 0; }
.cv-side-block h3 + p { margin-top: 0; }
.cv-side-block h3 + p + p { margin-top: 18px; }
.cv-side-block > p:last-child { margin-bottom: 0; }
.skills-list { display: grid; gap: 18px; margin: 0; }
.skills-list div { display: grid; gap: 5px; }
.skills-list dt { color: var(--navy); }
.certification-list { display: grid; gap: 15px; margin: 0; padding: 0; list-style: none; }
.certification-list li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px;
  padding-bottom: 15px;
}
/* ==========================================================================
  RESPONSIVE - shared, Work, Lab and About adaptations
   ========================================================================== */
@media (max-width: 1024px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  :root { --shell: min(calc(100% - 32px), 820px); }
  .photography-layout { grid-template-columns: 1fr; gap: 20px; }
  .place-copy {
    display: grid; grid-template-columns: minmax(140px, 170px) minmax(0, 1fr);
    align-items: center; gap: 20px;
  }
  .place-copy .location-map { grid-column: 1; grid-row: 1; width: min(160px, 100%); margin: 0 auto; }
  .place-copy p { grid-column: 2; grid-row: 1; margin: 0; }
  .photo-rail img { height: clamp(190px, 62vw, 260px); }
  .scene { grid-template-columns: 1fr; gap: 14px; }
  .cv-grid { grid-template-columns: minmax(0, 1fr) minmax(240px, .7fr); gap: 34px; }
  .cv-entry { grid-template-columns: 126px minmax(0, 1fr); gap: 20px; }
  .footer-inner {
    grid-template-columns: 1fr; gap: 32px;
    width: var(--shell); padding-block: 46px 30px;
  }
  .footer-brand { grid-column: auto; width: min(100%, 310px); }
  .footer-meta {
    display: grid; grid-column: auto; justify-content: start; gap: 7px;
    padding-top: 20px;
  }
}
@media (max-width: 800px) {
  .cv-section { padding-block: 40px 50px; scroll-margin-top: 24px; }
  .cv-grid { grid-template-columns: 1fr; gap: 32px; }
  .cv-block + .cv-block { margin-top: 24px; }
  .cv-entry { grid-template-columns: 1fr; gap: 8px; padding-block: 18px; }
  .cv-sidebar { gap: 24px; margin-top: 0; }
  .cv-side-block { padding: 22px; border-radius: 18px; }
}
@media (max-width: 640px) {
  :root { --shell: calc(100% - 32px); --radius: 14px; }
  body { padding-bottom: 0; }
  .case-local-nav { display: none; }
  .header-gradient-blur, .hero-focus-label, .contact-lines span { display: none; }
  .site-header {
    inset: 0 0 auto;
    min-height: calc(64px + env(safe-area-inset-top));
    padding: calc(16px + env(safe-area-inset-top)) 16px 16px;
  }
  .site-nav {
    --nav-inset: 6px;
    position: fixed; z-index: 50;
    left: max(var(--nav-inset), env(safe-area-inset-left));
    right: max(var(--nav-inset), env(safe-area-inset-right));
    bottom: 6px; width: auto; min-height: 56px; transform-origin: center;
    box-shadow:
      0 7px 8px -8px rgba(17, 29, 56, 0.25),
      0 4px 6px -6px rgba(17, 29, 56, 0.16),
      inset 0 0 0 1px rgba(17, 29, 56, 0.06);
  }
  .site-nav a { min-height: 46px; padding: 0 4px; }
  .hero { display: block; min-height: 0; overflow: visible; }
  .hero-media {
    position: relative;
    height: auto; aspect-ratio: 1 / 1.08;
    overflow: hidden;
  }
  .hero-shade {
    bottom: auto;
    height: calc(108vw + 2px);
    pointer-events: none;
  }
  .hero-shade::before {
    --hero-gradient-angle: 180deg;
    --hero-fade-start: 67%;
    --hero-fade-soft: 73%;
    --hero-fade-mid: 87%;
    --hero-fade-solid: 98%;
  }
  .hero-content { margin-top: -52px; padding-block: 18px 14px; }
  .contact-lines { display: grid; gap: 2px; margin-top: 24px; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .button { min-width: 0; min-height: 52px; padding: 10px 12px; }
  .error-main { align-items: start; padding-block: calc(170px + env(safe-area-inset-top)) 80px; }
  .error-content { grid-template-columns: 1fr; gap: 44px; }
  .error-number { font-size: clamp(104px, 34vw, 150px); }
  .error-message { max-width: none; }
  .error-message .page-title { font-size: clamp(46px, 14vw, 68px); }
  #error-home { width: 100%; }
  .work-section { padding-block: 10px 30px; }
  .section-heading { gap: 14px; margin-bottom: 24px; }
  :is(.cv-block, .cv-side-section) .section-heading { margin-bottom: 26px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-caption { left: 9px; right: 9px; bottom: 9px; min-height: 0; padding: 13px; border-radius: 12px; }

  .site-footer { width: 100%; margin: 0; }
  .footer-inner { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .lab-intro { padding: calc(220px + env(safe-area-inset-top)) 0 0; }
  .lab-section { padding-block: 24px 0; }
  .lab-section:last-of-type { padding-bottom: 30px; }
  .country-tabs {
    width: calc(100% + 32px); margin: 0 -16px 24px; padding: 0 50% 4px; gap: 38px;
    overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .country-tabs::-webkit-scrollbar { display: none; }
  .country-tabs button {
    flex: 0 0 auto; padding: 10px 0; border: 0; border-bottom: 2px solid transparent;
    border-radius: 0; scroll-snap-align: center; font-size: var(--label-size); line-height: 1.2;
  }
  .country-tabs button.is-active { color: var(--coral); border-color: var(--coral); background: transparent; }
  .place-copy { grid-template-columns: 104px minmax(0, 1fr); gap: 16px; }
  .place-copy .location-map { width: 96px; }
  .photography-layout { gap: 8px; }
  .carousel-fade-shell { margin-inline: -16px; }
  .carousel-fade-shell::before, .carousel-fade-shell::after { width: 42px; }
  .photo-rail { padding-inline: 16px; }
  .scan-rail {
    gap: 6px;
    padding: 18px 4px 64px;
  }
  .scan-thumb {
    width: clamp(165px, 48vw, 215px);
    height: clamp(175px, 52vw, 225px);
    margin-inline: -3px;
  }
  .scan-hint { padding-bottom: 22px; font-size: 13px; }
  .model-viewer-dialog {
    width: min(calc(100% - 16px), 520px);
    height: auto;
    max-height: calc(100dvh - 16px);
    aspect-ratio: 4 / 5;
    border-radius: var(--radius);
  }
  .model-viewer-meta {
    left: 8px;
    right: 128px;
    bottom: 8px;
    display: grid;
    gap: 3px;
    min-height: 58px;
    padding: 10px 12px;
    border-radius: 12px;
  }
  .model-viewer-meta strong {
    font-size: var(--ui-size);
  }
  .model-viewer-instructions {
    font-size: 9px;
  }
  .model-viewer-instructions-desktop { display: none; }
  .model-viewer-instructions-mobile { display: inline; }
  .model-ar-button {
    right: 8px;
    bottom: 8px;
    width: 112px;
    min-width: 112px;
    min-height: 58px;
    padding-inline: 10px;
  }
  .scene { margin-bottom: 32px; }
  .scene-mode-stage { aspect-ratio: 2 / 1; }
  .about-actions { display: grid; }
}
@media (max-width: 640px) and (display-mode: standalone) {
  .site-header {
    padding-top: calc(42px + env(safe-area-inset-top));
  }
  .site-nav {
    --nav-inset: 24px;
    bottom: calc(env(safe-area-inset-bottom) - 10px);
  }
}
