/* ===========================================================
   Julius Bieliauskas — CV & portfolio
   Mediterranean palette: deep Aegean, sea blue, foam, sand,
   terracotta and lemon. Change tokens in :root to re-colour.
   =========================================================== */
:root {
  --deep: #072f4e;
  --sea-900: #0a3c61;
  --sea-700: #0f5a8c;
  --sea-500: #1d7bb5;
  --sea-300: #7cc3e0;
  --foam: #dff3fb;
  --cream: #fbf7ef;
  --sand: #f1e4c8;
  --sand-2: #e6cf9f;
  --terracotta: #c8643b;
  --lemon: #f2c14e;
  --olive: #7d8b4f;
  --ink: #0b2433;
  --muted: #4f6575;
  --line: rgba(11, 36, 51, .12);
  --white: #ffffff;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --radius: 18px;
  --shadow: 0 18px 40px -22px rgba(7, 47, 78, .45);
  --ease: cubic-bezier(.22, .7, .2, 1);
  --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
em { font-style: italic; }
:focus-visible { outline: 3px solid var(--lemon); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1180px, 100% - 2 * clamp(20px, 5vw, 48px)); margin-inline: auto; }
.section { position: relative; padding: clamp(80px, 11vw, 136px) 0; }
.section-sea { background: linear-gradient(165deg, #0a4a72 0%, #0f6aa0 55%, #2a8fc2 100%); color: #eaf6fb; }
.section-sand { background: var(--sand); }
.section-deep { background: var(--deep); color: #eaf6fb; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--lemon); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip-link:focus { left: 12px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--sea-700); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }
.eyebrow-light { color: var(--sea-300); }
.section-title { font-size: clamp(36px, 5.2vw, 60px); color: var(--ink); max-width: 18ch; }
.section-title em { color: var(--terracotta); }
.section-title-light { color: #fff; }
.section-title-light em { color: var(--lemon); }
.section-lede { font-size: 18px; color: var(--muted); max-width: 62ch; margin-top: 8px; }
.section-sea .section-lede { color: #cfe9f5; }
.section-deep .section-lede { color: #cfe9f5; }
.section-head { margin-bottom: clamp(36px, 5vw, 56px); }
.sub-title { font-size: 26px; margin-bottom: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 13px 24px; border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--lemon); color: var(--ink); box-shadow: 0 10px 24px -12px rgba(242, 193, 78, .9); }
.btn-solid:hover { background: #ffd66e; }
.btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .06); backdrop-filter: blur(4px); }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .16); }

/* ---------- Scroll progress ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sea-300), var(--lemon)); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  transition: background .35s var(--ease), box-shadow .35s var(--ease), height .35s var(--ease);
}
.site-header.scrolled { background: rgba(7, 47, 78, .92); backdrop-filter: blur(14px); box-shadow: 0 8px 30px -18px rgba(0, 0, 0, .5); }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand-mark { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1; color: var(--lemon); }
.brand-mark span { color: var(--sea-300); }
.brand-text { font-size: 12px; line-height: 1.25; letter-spacing: .08em; text-transform: uppercase; color: #cfe9f5; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .25); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav-link { color: #e9f6fb; text-decoration: none; font-size: 14px; font-weight: 600; padding: 9px 12px; border-radius: 999px; position: relative; transition: color .2s, background .2s; }
.nav-link:hover { background: rgba(255, 255, 255, .1); }
.nav-link.active { color: var(--lemon); }
.nav-cta { background: var(--lemon); color: var(--ink) !important; margin-left: 8px; }
.nav-cta:hover { background: #ffd66e !important; }
.menu-btn { display: none; width: 46px; height: 46px; border: 0; background: transparent; cursor: pointer; border-radius: 12px; position: relative; }
.menu-btn span { position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s, top .3s var(--ease); }
.menu-btn span:nth-child(1) { top: 17px; }
.menu-btn span:nth-child(2) { top: 27px; }
.site-header.menu-open .menu-btn span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.site-header.menu-open .menu-btn span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; color: #fff; overflow: hidden; isolation: isolate; }
.hero-media {
  position: absolute; inset: -6% 0 -6%; z-index: -2;
  background: url("assets/photos/07.jpg") center 60% / cover no-repeat;
  translate: 0 0; will-change: translate;
  animation: hero-zoom 26s var(--ease) infinite alternate;
}
@keyframes hero-zoom { from { scale: 1; } to { scale: 1.09; } }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 47, 78, .25) 0%, rgba(7, 47, 78, .35) 40%, rgba(7, 47, 78, .9) 100%),
    radial-gradient(120% 80% at 0% 100%, rgba(7, 47, 78, .85), transparent 60%);
}
.hero-inner { padding-top: calc(var(--header-h) + 40px); padding-bottom: 150px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #5fe3a1; box-shadow: 0 0 0 0 rgba(95, 227, 161, .7); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(95, 227, 161, .6); } 70% { box-shadow: 0 0 0 10px rgba(95, 227, 161, 0); } 100% { box-shadow: 0 0 0 0 rgba(95, 227, 161, 0); } }
.hero .eyebrow { color: #eaf6fb; font-size: 13px; background: rgba(7, 47, 78, .55); padding: 8px 14px; border-radius: 999px; backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .18); }
.hero-title, .hero-role, .hero-lede { text-shadow: 0 2px 18px rgba(7, 47, 78, .65); }
.role-static { color: #cfe9f5; }
.hero .eyebrow::before { display: none; }
.hero-title { font-size: clamp(56px, 10vw, 128px); line-height: .95; color: #fff; margin: 18px 0 22px; font-weight: 400; }
.hero-title span { font-style: italic; color: var(--lemon); font-weight: 400; }
.hero-role { font-family: var(--serif); font-size: clamp(22px, 3vw, 32px); margin-bottom: 20px; color: #e8f6fb; min-height: 1.4em; }
.role-static { color: var(--sea-300); }
.role-typed { color: #fff; font-style: italic; }
.caret { display: inline-block; width: 2px; height: 1.05em; background: var(--lemon); margin-left: 4px; vertical-align: -0.15em; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-lede { max-width: 58ch; font-size: 18px; color: #d7edf7; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.wave { position: absolute; left: 0; width: 100%; height: 140px; display: block; pointer-events: none; overflow: hidden; }
.wave path { transform-box: view-box; }
.wave-hero { bottom: -1px; height: 150px; z-index: 2; }
.wave-hero .wave-back { fill: rgba(125, 195, 224, .35); animation: drift 14s ease-in-out infinite alternate; }
.wave-hero .wave-front { fill: var(--cream); animation: drift 9s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translateX(-60px); } to { transform: translateX(60px); } }
.wave-top { top: -1px; height: 90px; fill: var(--cream); }
.wave-bottom { bottom: -1px; height: 90px; fill: var(--cream); }
.section-sea .wave-top { fill: var(--cream); }
.section-sea .wave-bottom { fill: var(--cream); }
#contact .wave-top { fill: var(--cream); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal { transition-delay: calc(var(--d, 0) * 1ms); }

/* ---------- Stats ---------- */
.stats { background: var(--cream); padding: 0 0 clamp(40px, 6vw, 72px); position: relative; z-index: 3; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: -40px; border: 1px solid var(--line); }
.stat { padding: 28px 26px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-num { display: block; font-family: var(--serif); font-size: clamp(40px, 5vw, 56px); line-height: 1; color: var(--sea-700); font-weight: 500; font-variant-numeric: tabular-nums; }
.stat-label { display: block; margin-top: 10px; font-size: 14px; color: var(--muted); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 7vw, 96px); align-items: center; }
.portrait { margin: 0; perspective: 1100px; }
.arch { position: relative; border-radius: 999px 999px 26px 26px; overflow: hidden; aspect-ratio: 1 / 1; box-shadow: var(--shadow); transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease); transform-style: preserve-3d; }
.arch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.arch img { width: 100%; height: 100%; object-fit: cover; }
.portrait figcaption { margin-top: 14px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; }
.about-copy p { color: var(--muted); font-size: 17.5px; }
.about-copy .section-title { margin-bottom: 18px; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px; }
.pillars li { padding: 18px 20px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--sea-500); transition: transform .3s var(--ease), box-shadow .3s; }
.pillars li:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pillars strong { display: block; font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.pillars span { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ---------- Guest journey ---------- */
.journey { background: var(--cream); color: var(--ink); border-radius: 28px; padding: clamp(22px, 4vw, 40px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5); }
.journey-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.journey-step {
  appearance: none; border: 1.5px solid var(--line); background: var(--white); border-radius: 16px;
  padding: 14px 10px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 4px;
  transition: all .3s var(--ease);
}
.journey-step:hover { border-color: var(--sea-500); transform: translateY(-2px); }
.journey-step .js-num { font-family: var(--serif); font-size: 13px; color: var(--sea-500); }
.journey-step .js-label { font-weight: 700; font-size: 15px; color: var(--ink); }
.journey-step.is-active { background: var(--sea-700); border-color: var(--sea-700); }
.journey-step.is-active .js-num, .journey-step.is-active .js-label { color: #fff; }
.journey-bar { height: 4px; background: var(--line); border-radius: 4px; margin: 20px 0 8px; overflow: hidden; }
.journey-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sea-500), var(--terracotta)); border-radius: 4px; }
.journey-bar span.run { animation: fill-bar 6.5s linear forwards; }
@keyframes fill-bar { from { width: 0; } to { width: 100%; } }
.journey-panel { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; min-height: 230px; padding-top: 12px; }
.journey-panel.swap .journey-text { animation: swap-in .5s var(--ease); }
@keyframes swap-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.journey-text h3 { font-size: clamp(28px, 3.6vw, 40px); color: var(--sea-900); }
.journey-text p { color: var(--muted); font-size: 18px; max-width: 52ch; margin: 0; }
.journey-visual { display: grid; place-items: center; }
.jv-icon {
  width: 180px; height: 180px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #ffffff, var(--foam) 55%, #bfe6f5);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, .7), 0 20px 40px -20px rgba(15, 90, 140, .55);
  animation: float 6s ease-in-out infinite;
}
.jv-icon svg { width: 84px; height: 84px; fill: none; stroke: var(--sea-700); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.jv-icon svg .accent { stroke: var(--terracotta); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Gallery ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip {
  appearance: none; border: 1.5px solid var(--line); background: var(--white); color: var(--ink);
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14.5px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: all .25s var(--ease);
}
.chip:hover { border-color: var(--sea-500); }
.chip.is-active { background: var(--sea-700); border-color: var(--sea-700); color: #fff; }
.chip .count { font-size: 12px; background: rgba(11, 36, 51, .08); padding: 1px 8px; border-radius: 999px; }
.chip.is-active .count { background: rgba(255, 255, 255, .2); }
.gallery { columns: 3 280px; column-gap: 18px; }
.ph {
  appearance: none; border: 0; padding: 0; margin: 0 0 18px; width: 100%; display: block;
  break-inside: avoid; position: relative; border-radius: 16px; overflow: hidden; cursor: zoom-in;
  background: var(--foam); box-shadow: 0 10px 24px -18px rgba(7, 47, 78, .6);
  opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease), box-shadow .4s;
}
.ph.in { opacity: 1; transform: none; }
.ph[hidden] { display: none; }
.ph img { width: 100%; height: auto; transition: transform .8s var(--ease); }
.ph::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(7, 47, 78, .85));
  opacity: 0; transition: opacity .4s;
}
.ph-meta { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; color: #fff; text-align: left; opacity: 0; transform: translateY(8px); transition: all .4s var(--ease); }
.ph-meta strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 18px; line-height: 1.2; }
.ph-meta small { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--sea-300); }
.ph:hover img, .ph:focus-visible img { transform: scale(1.05); }
.ph:hover::after, .ph:focus-visible::after { opacity: 1; }
.ph:hover .ph-meta, .ph:focus-visible .ph-meta { opacity: 1; transform: none; }
.ph:hover { box-shadow: 0 24px 40px -20px rgba(7, 47, 78, .7); }
.gallery-empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Experience ---------- */
.timeline { position: relative; display: grid; gap: 18px; padding-left: 0; }
.job {
  display: grid; grid-template-columns: 210px 1fr; gap: 24px; background: var(--white);
  border-radius: var(--radius); padding: 24px 28px; border: 1px solid var(--line); position: relative;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity .4s, border-color .3s;
}
.job::before { content: ""; position: absolute; left: -2px; top: 26px; bottom: 26px; width: 4px; border-radius: 4px; background: linear-gradient(var(--sea-300), var(--sea-500)); transition: background .3s; }
.job:hover { transform: translateX(6px); box-shadow: var(--shadow); border-color: transparent; }
.job:hover::before { background: linear-gradient(var(--lemon), var(--terracotta)); }
.job.is-hidden { display: none; }
.job-when span { display: block; font-weight: 700; color: var(--sea-700); font-size: 15px; }
.job-when small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.job h3 { font-size: 22px; margin-bottom: 8px; color: var(--ink); }
.job-role { display: block; font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--terracotta); margin-top: 2px; }
.job ul { list-style: none; }
.job li { position: relative; padding-left: 18px; color: var(--muted); font-size: 15.5px; margin-bottom: 4px; }
.job li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--sea-300); }
.exp-status { font-size: 14px; color: var(--muted); margin: 18px 0 0; min-height: 1.4em; }

.edu { margin-top: clamp(56px, 8vw, 88px); }
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.edu-card { background: var(--white); border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .35s; }
.edu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.edu-logo { height: 110px; display: flex; align-items: center; justify-content: center; background: var(--cream); border-radius: 12px; padding: 14px; margin-bottom: 18px; }
.edu-logo img { max-height: 100%; width: auto; object-fit: contain; }
.edu-years { font-size: 13px; font-weight: 700; color: var(--terracotta); letter-spacing: .06em; margin-bottom: 4px; }
.edu-card h4 { font-size: 21px; }
.edu-card p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.skill-card { background: var(--white); border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .35s; }
.skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.skill-card h3 { font-size: 22px; color: var(--sea-900); margin-bottom: 16px; }
.skill-card h3.mt { margin-top: 26px; }
.chips-static { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-static span { background: var(--foam); color: var(--sea-900); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600; transition: background .2s, color .2s; }
.chips-static span:hover { background: var(--sea-700); color: #fff; }
.lang-list { display: grid; gap: 10px; }
.lang-list li { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 12px; background: var(--cream); font-weight: 600; }
.lang-list strong { color: var(--terracotta); font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.contact-card { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); border-radius: 24px; padding: clamp(26px, 4vw, 40px); backdrop-filter: blur(6px); }
.contact-mail { display: block; font-family: var(--serif); font-size: clamp(22px, 3.2vw, 30px); color: #fff; text-decoration: none; word-break: break-all; border-bottom: 2px solid rgba(242, 193, 78, .6); padding-bottom: 6px; transition: color .25s, border-color .25s; }
.contact-mail:hover { color: var(--lemon); border-color: var(--lemon); }
.contact-actions { display: flex; align-items: center; gap: 14px; margin: 22px 0 26px; flex-wrap: wrap; }
.copy-note { font-size: 14px; color: #bfe6f5; }
.contact-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .15); }
.contact-links a { display: block; padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, .06); color: #eaf6fb; text-decoration: none; font-weight: 600; font-size: 15px; transition: background .2s, transform .2s; }
.contact-links a:hover { background: rgba(255, 255, 255, .14); transform: translateY(-2px); }

/* ---------- Footer & top ---------- */
.site-footer { background: #041f33; color: #9fc4d6; padding: 28px 0; font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--lemon); text-decoration: none; }
.to-top { position: fixed; right: 20px; bottom: 22px; z-index: 40; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--lemon); color: var(--ink); font-size: 20px; font-weight: 700; cursor: pointer; box-shadow: 0 12px 26px -10px rgba(0, 0, 0, .5); }
.to-top[hidden] { display: none; }

/* ---------- Lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3, 22, 36, .97);
  display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: 64px 1fr 64px;
  color: #fff;
  animation: lb-in .35s var(--ease);
}
.lb[hidden] { display: none; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-bar { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px clamp(14px, 3vw, 28px); flex-wrap: wrap; }
.lb-count { font-family: var(--serif); font-size: 18px; color: #cfe9f5; }
.lb-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.lb-tool { appearance: none; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s; }
.lb-tool:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .5); }
.lb-tool[aria-pressed="true"] { background: var(--lemon); color: var(--ink); border-color: var(--lemon); }
.lb-close { background: transparent; }
.lb-nav { appearance: none; border: 0; background: transparent; color: #fff; font-size: 52px; line-height: 1; cursor: pointer; align-self: center; height: 80px; border-radius: 12px; transition: background .2s, color .2s; }
.lb-nav:hover { background: rgba(255, 255, 255, .08); color: var(--lemon); }
.lb-prev { grid-column: 1; grid-row: 2; }
.lb-next { grid-column: 3; grid-row: 2; }
.lb-stage { grid-column: 2; grid-row: 2; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); transition: opacity .3s var(--ease); }
.lb-stage.is-full { overflow: auto; align-items: flex-start; justify-content: flex-start; }
.lb-stage.is-full img { max-width: none; max-height: none; }
.lb-caption { grid-column: 1 / -1; text-align: center; padding: 14px 20px 20px; color: #cfe9f5; font-size: 15px; margin: 0; min-height: 3em; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .journey-steps { grid-template-columns: repeat(5, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
  .gallery { columns: 2 260px; }
}
@media (max-width: 900px) {
  :root { --header-h: 66px; }
  .menu-btn { display: block; }
  .nav {
    position: fixed; top: 0; right: 0; height: 100vh; height: 100dvh; width: min(330px, 86%);
    background: var(--deep); flex-direction: column; align-items: stretch; justify-content: center; gap: 6px;
    padding: 90px 28px 40px; transform: translateX(105%); transition: transform .45s var(--ease); box-shadow: -20px 0 60px rgba(0, 0, 0, .4);
  }
  .site-header.menu-open .nav { transform: none; }
  .nav-link { font-size: 19px; padding: 14px 16px; font-family: var(--serif); }
  .nav-cta { margin: 14px 0 0; text-align: center; }
  .brand-text { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 460px; width: 100%; margin: 0 auto; }
  .job { grid-template-columns: 1fr; gap: 10px; }
  .job::before { display: none; }
  .journey-panel { grid-template-columns: 1fr; }
  .jv-icon { width: 130px; height: 130px; }
  .jv-icon svg { width: 62px; height: 62px; }
  .journey-visual { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero-inner { padding-bottom: 130px; }
  .stats-grid { grid-template-columns: 1fr 1fr; margin-top: -28px; }
  .stat { padding: 20px 16px; }
  .stat-label { font-size: 13px; }
  .pillars { grid-template-columns: 1fr; }
  .journey-steps { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .journey-step { padding: 10px 6px; border-radius: 12px; }
  .journey-step .js-label { font-size: 12px; line-height: 1.2; }
  .journey-step .js-num { font-size: 11px; }
  .gallery { columns: 2 150px; column-gap: 12px; }
  .ph { margin-bottom: 12px; border-radius: 12px; }
  .ph-meta { opacity: 1; transform: none; left: 10px; right: 10px; bottom: 10px; }
  .ph-meta strong { font-size: 14px; }
  .ph-meta small { display: none; }
  .ph::after { opacity: 1; background: linear-gradient(180deg, transparent 55%, rgba(7, 47, 78, .8)); }
  .ph:hover img { transform: none; }
  .edu-grid { grid-template-columns: 1fr; }
  .contact-links { grid-template-columns: 1fr; }
  .lb { grid-template-columns: 44px 1fr 44px; }
  .lb-nav { font-size: 40px; height: 60px; }
  .lb-tool { padding: 8px 12px; font-size: 13px; }
  .lb-tools { width: 100%; justify-content: flex-start; }
  .chip { padding: 9px 14px; font-size: 13.5px; }
  .job { padding: 20px 20px; }
  .section-title { font-size: clamp(32px, 9vw, 44px); }
}
@media (max-width: 380px) {
  .gallery { columns: 1; }
  .journey-step .js-label { font-size: 11px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal, .ph { opacity: 1; transform: none; }
  .caret { display: none; }
}
