/* ============================================================
   Felix R. Pasa Pires — interactive résumé
   Palette (60-30-10):
     60% — near-black petrol   #061719 #071E20 #081C1F
     30% — dark turquoise      #102F32 #12383A #173F42
     10% — luminous turquoise  #2ED6C7 #35E0D0 #3FE7D5
   ============================================================ */

:root {
  --bg-0: #061719;
  --bg-1: #071E20;
  --bg-2: #081C1F;
  --surf-0: #102F32;
  --surf-1: #12383A;
  --surf-2: #173F42;
  --glow-0: #2ED6C7;
  --glow-1: #35E0D0;
  --glow-2: #3FE7D5;
  --text: #E7F1EF;
  --text-dim: #90A9A6;
  --line: rgba(46, 214, 199, 0.16);
  --panel: rgba(9, 30, 32, 0.84);
  --panel-blur: 14px;
  --font: "Avenir Next", "Segoe UI", "Helvetica Neue", Inter, system-ui, -apple-system, sans-serif;
  --mono: "SF Mono", "Cascadia Code", ui-monospace, Menlo, Consolas, monospace;
  --scroll-dim: 0;
  --ease: cubic-bezier(0.22, 0.8, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(46, 214, 199, 0.35); color: var(--text); }

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: var(--glow-1); text-decoration: none; }
a:hover { color: var(--glow-2); }

:focus-visible {
  outline: 2px solid var(--glow-1);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 200;
  background: var(--surf-2); color: var(--text);
  padding: 10px 18px; border-radius: 8px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ============================================================
   Atmospheric background (parallax layer 1) + fixed 3D stage
   ============================================================ */
.atmosphere {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1100px 700px at 68% 22%, rgba(23, 63, 66, 0.55), transparent 60%),
    radial-gradient(900px 600px at 18% 78%, rgba(16, 47, 50, 0.5), transparent 65%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 55%, var(--bg-2) 100%);
}

#map-stage {
  position: fixed; inset: 0; z-index: 1;
}
#map-canvas { width: 100%; height: 100%; display: block; }

#map-stage::after { /* darkens the map as you scroll deeper */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 45%, #04100f 100%);
  opacity: var(--scroll-dim);
  transition: opacity 0.15s linear;
}

.map-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.9;
}

/* ---------- map labels ---------- */
#map-labels { position: absolute; inset: 0; pointer-events: none; }

.map-label {
  position: absolute; top: 0; left: 0;
  display: flex; align-items: center; gap: 8px;
  pointer-events: auto;
  padding: 6px 10px;
  border-radius: 10px;
  transition: opacity 0.4s var(--ease);
  text-align: left;
  white-space: nowrap;
}
.map-label.is-static { transform: translate(-50%, -100%); }
.map-label__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 3px rgba(231, 241, 239, 0.12);
  flex: none;
}
.map-label.is-current .map-label__dot {
  background: var(--glow-2);
  box-shadow: 0 0 10px rgba(63, 231, 213, 0.8), 0 0 0 3px rgba(46, 214, 199, 0.18);
}
.map-label__text { display: flex; flex-direction: column; line-height: 1.25; }
.map-label__city {
  font-size: 12px; letter-spacing: 0.14em; font-weight: 600;
  text-shadow: 0 2px 10px rgba(4, 14, 15, 0.9);
}
.map-label__period {
  font-size: 11px; color: var(--text-dim); letter-spacing: 0.06em;
  text-shadow: 0 2px 8px rgba(4, 14, 15, 0.9);
}
.map-label.is-current .map-label__period { color: var(--glow-1); }
.map-label__current {
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--glow-2);
}
.map-label__current:empty { display: none; }
.map-label:hover .map-label__city,
.map-label.is-hover .map-label__city { color: var(--glow-2); }
.map-label:hover, .map-label.is-hover { transform-origin: center bottom; }
.map-label.is-dimmed { opacity: 0.35; }
.map-label.is-selected .map-label__city { color: var(--glow-2); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 20px 32px;
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }

.header-left { display: flex; align-items: center; gap: 6px; justify-self: start; }
.lang-switch {
  display: flex; gap: 2px;
  background: rgba(9, 30, 32, 0.6);
  border: 1px solid var(--line);
  border-radius: 999px; padding: 3px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.lang-switch button {
  font-size: 11px; letter-spacing: 0.12em;
  padding: 5px 11px; border-radius: 999px;
  color: var(--text-dim);
  transition: color 0.2s, background 0.2s;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.is-active { background: var(--surf-2); color: var(--glow-2); }

#logo {
  justify-self: center;
  font-size: 26px; font-weight: 300; letter-spacing: 0.02em;
  color: var(--text);
  display: inline-flex; align-items: baseline; gap: 1px;
  will-change: transform;
  user-select: none;
}
#logo .slash { color: var(--glow-1); font-weight: 200; margin: 0 1px; }

.header-right { display: flex; align-items: center; gap: 18px; justify-self: end; }
.download-btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text);
  padding: 9px 14px;
  border: 1px solid transparent; border-radius: 8px;
  transition: border-color 0.25s, color 0.25s;
}
.download-btn:hover { border-color: var(--line); color: var(--glow-2); }
.download-btn svg { width: 14px; height: 14px; stroke: currentColor; }

#menu-toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  padding: 10px 6px;
}
#menu-toggle span {
  display: block; width: 22px; height: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
#menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
#menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* menu overlay */
#menu-overlay {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(6, 23, 25, 0.86);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: grid; place-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
#menu-overlay.is-open { opacity: 1; visibility: visible; }
.menu-list { display: grid; gap: 6px; text-align: center; list-style: none; }
.menu-list button {
  font-size: clamp(22px, 4vw, 32px); font-weight: 300;
  letter-spacing: 0.04em; color: var(--text-dim);
  padding: 8px 24px;
  transition: color 0.2s, letter-spacing 0.3s var(--ease);
}
.menu-list button:hover { color: var(--glow-2); letter-spacing: 0.09em; }

/* ============================================================
   Left vertical navigation
   ============================================================ */
.side-nav {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 50;
  width: 200px;
  display: flex; flex-direction: column; justify-content: center;
  padding: 100px 0 60px 30px;
  pointer-events: none;
}
.side-nav__index {
  position: absolute; top: 26px; left: 32px;
  pointer-events: auto;
}
.side-nav__num {
  font-family: var(--mono);
  font-size: 22px; color: var(--glow-1); letter-spacing: 0.05em;
}
.side-nav__label {
  font-size: 9.5px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--text-dim); margin-top: 2px;
}
.side-nav ol { list-style: none; display: grid; gap: 4px; position: relative; }
.side-nav ol::before {
  content: ""; position: absolute; left: 5px; top: 14px; bottom: 14px;
  width: 1px; background: linear-gradient(180deg, transparent, var(--line) 15%, var(--line) 85%, transparent);
}
.side-nav button {
  pointer-events: auto;
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 8px 0 8px 26px;
  transition: transform 0.25s var(--ease);
}
.side-nav button::before {
  content: ""; position: absolute; left: 0; top: 13px;
  width: 11px; height: 11px; border-radius: 50%;
  border: 1.5px solid var(--text-dim);
  background: var(--bg-0);
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.side-nav button:hover { transform: translateX(3px); }
.side-nav .nav-name {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-dim); transition: color 0.2s;
}
.side-nav .nav-sub {
  font-size: 10px; color: var(--text-dim); opacity: 0.7; letter-spacing: 0.06em;
}
.side-nav button:hover .nav-name { color: var(--text); }
.side-nav button.is-active::before {
  border-color: var(--glow-1); background: var(--glow-1);
  box-shadow: 0 0 10px rgba(46, 214, 199, 0.7);
}
.side-nav button.is-active .nav-name { color: var(--glow-2); }

.scroll-cue {
  position: absolute; bottom: 26px; left: 32px;
  display: flex; align-items: center; gap: 10px;
  color: var(--text-dim);
  font-size: 9.5px; letter-spacing: 0.24em; text-transform: uppercase;
  pointer-events: none;
}
.scroll-cue svg { width: 15px; height: 24px; stroke: currentColor; }
.scroll-cue .wheel { animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel {
  0%   { transform: translateY(0);   opacity: 1; }
  70%  { transform: translateY(6px); opacity: 0; }
  100% { transform: translateY(0);   opacity: 0; }
}

/* ============================================================
   Main layout & hero
   ============================================================ */
main { position: relative; z-index: 10; pointer-events: none; }
main .section { pointer-events: auto; }

.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: 128px 6vw 140px 230px;
  pointer-events: none;
}

/* the whole intro block scales down on scroll or when a place is selected,
   revealing more of the map — driven by --hero-shrink (0 → 1) set in JS */
.hero__content {
  display: flex; flex-direction: column; align-items: flex-start;
  max-width: 440px;
  pointer-events: auto;
  transform-origin: top left;
  transform:
    translate(calc(var(--hero-shrink, 0) * -10px), calc(var(--hero-shrink, 0) * -16px))
    scale(calc(1 - var(--hero-shrink, 0) * 0.38));
  opacity: calc(1 - var(--hero-shrink, 0) * 0.45);
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
  will-change: transform, opacity;
}

.hero__hi {
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 300; color: var(--text);
  opacity: 0; transform: translateY(18px);
}
.hero__name {
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 600; letter-spacing: -0.015em; line-height: 1.06;
  margin: 6px 0 8px;
  text-shadow: 0 4px 40px rgba(4, 14, 15, 0.8);
  opacity: 0; transform: translateY(18px);
}
.hero__role {
  font-size: clamp(16px, 1.8vw, 21px);
  font-weight: 400; color: var(--glow-1); letter-spacing: 0.01em;
  opacity: 0; transform: translateY(18px);
}
.hero__intro {
  margin-top: 22px;
  max-width: 400px;
  font-size: 14px; color: var(--text-dim); line-height: 1.8;
  text-shadow: 0 2px 20px rgba(4, 14, 15, 0.9);
  opacity: 0; transform: translateY(18px);
}
.hero__cta {
  margin-top: 30px;
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--glow-0);
  align-self: flex-start;
  transition: color 0.25s, gap 0.3s var(--ease);
  opacity: 0; transform: translateY(18px);
}
.hero__cta:hover { color: var(--glow-2); gap: 18px; }
.hero__cta svg { width: 13px; height: 13px; stroke: currentColor; }

body.is-loaded .hero__hi    { animation: rise 0.9s var(--ease) 0.55s forwards; }
body.is-loaded .hero__name  { animation: rise 0.9s var(--ease) 0.7s forwards; }
body.is-loaded .hero__role  { animation: rise 0.9s var(--ease) 0.85s forwards; }
body.is-loaded .hero__intro { animation: rise 0.9s var(--ease) 1.0s forwards; }
body.is-loaded .hero__cta   { animation: rise 0.9s var(--ease) 1.15s forwards; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.hero-scroll-hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  color: var(--text-dim);
  font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase;
  background: rgba(9, 30, 32, 0.55);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 22px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

/* ============================================================
   Shared section shell
   ============================================================ */
.section {
  position: relative;
  padding: 90px 6vw 90px 230px;
}
.section__head { max-width: 640px; margin-bottom: 44px; position: relative; }
.section__head::before { /* soft dark halo — keeps headings readable over the map */
  content: ""; position: absolute; inset: -28px -56px -28px -44px;
  background: radial-gradient(75% 90% at 30% 50%, rgba(4, 16, 15, 0.72), transparent 78%);
  z-index: -1; pointer-events: none;
}
.section__title {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 500; letter-spacing: 0.01em;
  display: flex; align-items: center; gap: 18px;
}
.section__title::after {
  content: ""; height: 1px; flex: 1;
  background: linear-gradient(90deg, var(--line), transparent);
}
.section__sub { margin-top: 12px; color: var(--text-dim); font-size: 14px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   Info card band (About / Expertise / Tech / Languages)
   ============================================================ */
.card-band {
  display: grid;
  grid-template-columns: 1.05fr 1.25fr 1.15fr 0.95fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.card {
  background: var(--panel);
  backdrop-filter: blur(var(--panel-blur)); -webkit-backdrop-filter: blur(var(--panel-blur));
  padding: 30px 28px 32px;
  transition: background 0.3s;
}
.card:hover { background: rgba(13, 38, 40, 0.85); }
.card__title {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--glow-1);
  margin-bottom: 20px;
}
.card__text { font-size: 13px; color: var(--text-dim); line-height: 1.8; }

.card--about .about-art { margin-bottom: 18px; width: 74px; opacity: 0.9; }
.about-sign {
  margin-top: 18px;
  font-family: "Snell Roundhand", "Segoe Script", cursive;
  font-size: 22px; color: var(--glow-1);
}

/* expertise grid */
.exp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
.exp-item {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center;
  padding: 12px 4px;
  border-radius: 12px;
  transition: transform 0.3s var(--ease), background 0.3s;
}
.exp-item:hover { transform: translateY(-4px); background: rgba(23, 63, 66, 0.4); }
.exp-item svg {
  width: 34px; height: 34px;
  stroke: var(--glow-1); fill: none; stroke-width: 1.1;
  transition: stroke 0.3s, filter 0.3s;
}
.exp-item:hover svg { stroke: var(--glow-2); filter: drop-shadow(0 0 7px rgba(63, 231, 213, 0.6)); }
.exp-item span {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); line-height: 1.45;
}

/* tech stack */
.tech-group { margin-bottom: 18px; }
.tech-group:last-child { margin-bottom: 0; }
.tech-group__label {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--glow-1); font-weight: 600;
  margin-bottom: 5px;
}
.tech-group__items { font-size: 12.5px; color: var(--text-dim); line-height: 1.75; }
.tech-group__items .sep { color: var(--surf-2); margin: 0 7px; }
.tech-group--dev .tech-group__label { color: var(--glow-2); }
.tech-group--dev .tech-group__items span:not(.sep) {
  border-bottom: 1px dashed rgba(63, 231, 213, 0.4);
}

/* spoken languages */
.lang-row {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
  align-items: center;
  padding: 7px 0;
}
.lang-row__name { font-size: 13px; }
.lang-row__dots { display: flex; gap: 6px; }
.lang-row__level {
  grid-column: 1 / -1;
  font-size: 10.5px; color: var(--text-dim); letter-spacing: 0.05em;
}
.dot {
  width: 11px; height: 11px; border-radius: 50%;
  border: 1.4px solid var(--glow-0);
  position: relative;
}
.dot--full { background: var(--glow-0); box-shadow: 0 0 6px rgba(46, 214, 199, 0.45); }
.dot--half { background: linear-gradient(90deg, var(--glow-0) 50%, transparent 50%); }

/* staggered pop-in once the card band scrolls into view */
.card-band.is-visible .dot {
  animation: dotPop 0.5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms + 0.25s);
}
@keyframes dotPop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.35); opacity: 1; box-shadow: 0 0 14px rgba(63, 231, 213, 0.8); }
  100% { transform: scale(1); opacity: 1; }
}
.card-band.is-visible .dot--full { animation-name: dotPop, dotGlow; animation-duration: 0.5s, 3.2s; animation-iteration-count: 1, infinite; }
@keyframes dotGlow {
  0%, 100% { box-shadow: 0 0 5px rgba(46, 214, 199, 0.35); }
  50%      { box-shadow: 0 0 11px rgba(63, 231, 213, 0.75); }
}

/* ============================================================
   Timeline
   ============================================================ */
.timeline { padding-bottom: 60px; }
#timeline-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
  padding-bottom: 46px;
}
#timeline-track::after { /* connecting line */
  content: ""; position: absolute; left: 4%; right: 4%; bottom: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 8%, var(--line) 92%, transparent);
}
.tl-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
  padding: 24px 14px 40px;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), border-color 0.3s, background 0.3s;
}
.tl-item:hover {
  transform: translateY(-6px);
  border-color: var(--line);
  background: rgba(13, 38, 40, 0.55);
}
.tl-item.is-selected {
  border-color: rgba(46, 214, 199, 0.5);
  background: rgba(16, 47, 50, 0.6);
  box-shadow: 0 0 34px rgba(46, 214, 199, 0.09) inset;
}
.tl-item__art { width: 104px; height: 104px; margin-bottom: 8px; }
.tl-item__art svg { width: 100%; height: 100%; }
.tl-item:hover .tl-item__art { filter: drop-shadow(0 0 12px rgba(63, 231, 213, 0.35)); }
.tl-item__city {
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--glow-1); font-weight: 600;
}
.tl-item.is-current .tl-item__city { color: var(--glow-2); }
.tl-item__period { font-size: 11.5px; color: var(--text-dim); letter-spacing: 0.06em; }
.tl-item__current {
  display: inline-block; margin-left: 6px;
  font-size: 8.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--bg-0); background: var(--glow-1);
  border-radius: 999px; padding: 1.5px 8px;
  vertical-align: 2px;
}
.tl-item__exp { display: flex; flex-direction: column; margin-top: 9px; line-height: 1.4; }
.tl-item__exp strong { font-size: 12.5px; font-weight: 600; color: var(--text); }
.tl-item__exp span { font-size: 11px; color: var(--text-dim); }
.tl-item__badge {
  font-style: normal;
  font-size: 9px; color: var(--glow-1); letter-spacing: 0.04em;
  opacity: 0.85; max-width: 220px; margin: 3px auto 0;
}
.tl-item__node {
  position: absolute; bottom: 15.5px; left: 50%;
  width: 13px; height: 13px; margin-left: -6.5px;
  border-radius: 50%;
  border: 1.6px solid var(--glow-0);
  background: var(--bg-0);
  transition: background 0.3s, box-shadow 0.3s;
}
.tl-item.is-current .tl-item__node,
.tl-item.is-selected .tl-item__node {
  background: var(--glow-1);
  box-shadow: 0 0 14px rgba(46, 214, 199, 0.85);
}
.tl-item.is-current .tl-item__node { animation: nodePulse 2.6s ease-in-out infinite; }
@keyframes nodePulse {
  0%, 100% { box-shadow: 0 0 8px rgba(46, 214, 199, 0.6); }
  50% { box-shadow: 0 0 22px rgba(63, 231, 213, 1); }
}
.timeline__hint { font-size: 12px; color: var(--text-dim); text-align: center; text-shadow: 0 2px 12px rgba(4, 16, 15, 0.95); }

/* ============================================================
   Experience panel (map hint / detail)
   ============================================================ */
.exp-panel {
  position: fixed; z-index: 45;
  left: 50%; top: 18vh;
  width: min(400px, calc(100vw - 48px));
  background: var(--panel);
  border: 1px solid rgba(46, 214, 199, 0.25);
  border-radius: 18px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 28px 70px rgba(2, 9, 10, 0.7), 0 0 44px rgba(46, 214, 199, 0.06);
  padding: 26px 26px 22px;
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(0.985);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s,
              left 0.5s var(--ease), top 0.5s var(--ease);
}
.exp-panel.is-open { opacity: 1; visibility: visible; transform: none; }

.panel__loc { display: flex; align-items: baseline; gap: 9px; margin-bottom: 3px; }
.panel__city { font-size: 19px; font-weight: 600; }
.panel__country { font-size: 12px; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; }
.panel__company { font-size: 14px; color: var(--glow-1); font-weight: 600; margin-top: 8px; }
.panel__role { font-size: 13px; color: var(--text); }
.panel__period { font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); margin-top: 2px; letter-spacing: 0.04em; }
.panel__badge {
  display: inline-block; margin-top: 9px;
  font-size: 10px; color: var(--glow-2);
  border: 1px dashed rgba(63, 231, 213, 0.45);
  border-radius: 999px; padding: 3px 11px;
  line-height: 1.5;
}
.panel__summary { margin-top: 14px; font-size: 12.8px; color: var(--text-dim); line-height: 1.7; }

.panel__sub {
  font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--glow-1); margin: 16px 0 7px;
}
.panel__skills { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.panel__skills li {
  font-size: 10.5px; letter-spacing: 0.04em;
  background: rgba(23, 63, 66, 0.55);
  border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 11px;
}
.panel__results { list-style: none; display: grid; gap: 7px; }
.panel__results li {
  position: relative; padding-left: 16px;
  font-size: 12px; color: var(--text-dim); line-height: 1.55;
}
.panel__results li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--glow-0);
  box-shadow: 0 0 6px rgba(46, 214, 199, 0.7);
}

.panel__switch {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.panel__prev, .panel__next {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--glow-1);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.panel__prev:hover, .panel__next:hover { border-color: var(--glow-1); color: var(--glow-2); transform: scale(1.08); }
.panel__count { font-family: var(--mono); font-size: 11px; color: var(--text-dim); }

.panel__close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-dim);
  transition: color 0.2s, background 0.2s;
}
.panel__close:hover { color: var(--text); background: rgba(23, 63, 66, 0.6); }
.panel__back {
  display: block; margin: 14px auto 0;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.2s;
}
.panel__back:hover { color: var(--glow-2); }

/* ============================================================
   Impact metrics
   ============================================================ */
#metrics-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 30px 26px;
  backdrop-filter: blur(var(--panel-blur)); -webkit-backdrop-filter: blur(var(--panel-blur));
  transition: transform 0.35s var(--ease), border-color 0.3s;
}
.metric:hover { transform: translateY(-5px); border-color: rgba(46, 214, 199, 0.4); }
.metric__value {
  display: block;
  font-family: var(--mono);
  font-size: clamp(28px, 3vw, 40px);
  color: var(--glow-2);
  text-shadow: 0 0 24px rgba(63, 231, 213, 0.35);
  letter-spacing: -0.02em;
}
.metric__label { display: block; margin-top: 8px; font-size: 12px; color: var(--text-dim); line-height: 1.55; }

/* ============================================================
   Selected work
   ============================================================ */
#work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.work-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 30px 26px;
  backdrop-filter: blur(var(--panel-blur)); -webkit-backdrop-filter: blur(var(--panel-blur));
  display: flex; flex-direction: column;
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s;
}
.work-card:hover {
  transform: translateY(-6px);
  border-color: rgba(46, 214, 199, 0.4);
  box-shadow: 0 22px 50px rgba(2, 9, 10, 0.55);
}
.work-card__org {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--glow-1); margin-bottom: 10px;
}
.work-card__title { font-size: 17px; font-weight: 600; line-height: 1.35; }
.work-card__desc { margin-top: 11px; font-size: 12.8px; color: var(--text-dim); line-height: 1.7; flex: 1; }
.work-card__link {
  margin-top: 18px; align-self: flex-start;
  display: inline-flex; gap: 8px; align-items: center;
  font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--glow-1);
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
}
.work-card__link:hover { color: var(--glow-2); border-color: var(--glow-2); }

/* ============================================================
   Contact
   ============================================================ */
.contact-wrap {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px;
  align-items: start;
}
.contact-info { color: var(--text-dim); font-size: 13.5px; line-height: 2; text-shadow: 0 2px 14px rgba(4, 16, 15, 0.95); }
.contact-info a { display: block; font-size: 15px; }
.contact-info .direct-label { margin-top: 22px; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }

#contact-form {
  display: grid; gap: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  backdrop-filter: blur(var(--panel-blur)); -webkit-backdrop-filter: blur(var(--panel-blur));
}
.field label {
  display: block;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 7px;
}
.field input, .field textarea {
  width: 100%;
  font: inherit; font-size: 14px; color: var(--text);
  background: rgba(8, 28, 31, 0.8);
  border: 1px solid var(--surf-1);
  border-radius: 10px;
  padding: 12px 15px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--glow-0);
  box-shadow: 0 0 0 3px rgba(46, 214, 199, 0.14);
}
.field-error { display: block; min-height: 16px; margin-top: 4px; font-size: 11px; color: #ff9d8a; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

#contact-form button[type="submit"] {
  justify-self: start;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--bg-0); font-weight: 600;
  background: linear-gradient(120deg, var(--glow-0), var(--glow-2));
  border-radius: 999px;
  padding: 13px 32px;
  transition: transform 0.25s var(--ease), box-shadow 0.3s, opacity 0.2s;
}
#contact-form button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(46, 214, 199, 0.3);
}
#contact-form button[type="submit"]:disabled { opacity: 0.6; transform: none; }
.form-status { font-size: 13px; min-height: 20px; }
.form-status.is-success { color: var(--glow-2); }
.form-status.is-error { color: #ff9d8a; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  position: relative; z-index: 10;
  padding: 40px 6vw 36px 230px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 26px;
  justify-content: space-between;
  color: var(--text-dim); font-size: 12px;
  background: rgba(6, 23, 25, 0.7);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.site-footer .foot-logo { color: var(--text); font-weight: 500; }
.site-footer .foot-logo .slash { color: var(--glow-1); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1180px) {
  .card-band { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1023px) {
  .side-nav { display: none; }
  .hero, .section, .site-footer { padding-left: 6vw; }
  .hero { padding-top: 130px; }
}

@media (max-width: 900px) {
  #timeline-track { grid-template-columns: repeat(2, 1fr); }
  #timeline-track::after { display: none; }
  #metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 819px) {
  /* panel becomes a bottom sheet */
  .exp-panel {
    left: 0 !important; right: 0; top: auto !important; bottom: 0;
    width: 100%;
    max-height: 72vh; overflow-y: auto;
    border-radius: 20px 20px 0 0;
    transform: translateY(30px);
  }
  .exp-panel.is-open { transform: none; }
  .panel__back { display: none; }
}

@media (max-width: 640px) {
  .site-header { padding: 14px 16px; grid-template-columns: auto 1fr auto; }
  .header-left { order: 2; justify-self: center; }
  #logo { order: 1; justify-self: start; font-size: 22px; }
  .header-right { order: 3; gap: 6px; }
  .download-btn .dl-text { display: none; }

  .hero { padding: 110px 6vw 120px; }
  .hero__intro { font-size: 13.5px; }
  .card-band { grid-template-columns: 1fr; }
  .exp-grid { grid-template-columns: repeat(3, 1fr); }

  /* vertical timeline on phones */
  #timeline-track { grid-template-columns: 1fr; gap: 0; padding-left: 26px; }
  #timeline-track::after {
    display: block;
    left: 6px; right: auto; top: 20px; bottom: 20px;
    width: 1px; height: auto;
  }
  .tl-item { flex-direction: row; text-align: left; align-items: flex-start; flex-wrap: wrap; padding: 20px 12px 20px 18px; gap: 4px 14px; }
  .tl-item__art { width: 64px; height: 64px; margin: 0; flex: none; }
  .tl-item__node { left: -26px; top: 30px; bottom: auto; margin: 0; }
  .tl-item__exp { margin-top: 4px; width: 100%; }
  #metrics-grid { grid-template-columns: 1fr; }
  #work-grid { grid-template-columns: 1fr; }
  .map-label__period { display: none; }
  .hero-scroll-hint { display: none; }
}

/* ============================================================
   Reduced motion — every feature stays, movement calms down
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
  }
  .hero__hi, .hero__name, .hero__role, .hero__intro, .hero__cta { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; }
  .scroll-cue .wheel { animation: none; }
}
