/* ── Night-flight design system ──────────────────────────────────────────── */
:root{
  --bg:#070b14;
  --bg-2:#0a101d;
  --panel:#0d1424;
  --panel-2:#101a2e;
  --line:rgba(148,170,200,.14);
  --ink:#e8eef8;
  --muted:#8d9ab0;
  --accent:#1276c6;          /* glow blue */
  --accent-soft:rgba(18,118,198,.14);
  --amber:#f2c069;           /* current-location amber */
  --amber-soft:rgba(242,192,105,.15);
  --radius:14px;
  --font-display:"Space Grotesk",system-ui,sans-serif;
  --font-mono:"JetBrains Mono",ui-monospace,monospace;
}
html[data-theme="day"]{
  --bg:#f2efe8;
  --bg-2:#eae6dc;
  --panel:#fbfaf6;
  --panel-2:#ffffff;
  --line:rgba(40,56,80,.14);
  --ink:#1b2535;
  --muted:#151515;
  --accent:#1276c6;
  --accent-soft:rgba(18,118,198,.10);
  --amber:#b97f1e;
  --amber-soft:rgba(185,127,30,.12);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-display);
  font-size:17px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  transition:background .4s ease,color .4s ease;
}
a{color:inherit}
img{max-width:100%}
::selection{background:var(--accent);color:#fff}

.mono{font-family:var(--font-mono)}
.wrap{max-width:1180px;margin:0 auto;padding:0 32px}

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav{
  position:fixed;inset:0 0 auto 0;z-index:50;
  backdrop-filter:blur(14px);
  background:color-mix(in srgb,var(--bg) 78%,transparent);
  border-bottom:1px solid var(--line);
}
.nav-inner{display:flex;align-items:center;gap:28px;height:60px;max-width:1180px;margin:0 auto;padding:0 32px}
.nav-brand{font-family:var(--font-mono);font-size:14px;letter-spacing:.08em;text-decoration:none}
.nav-brand b{color:var(--accent)}
.nav-links{display:flex;gap:22px;margin-left:auto}
.nav-links a{
  font-family:var(--font-mono);font-size:12.5px;letter-spacing:.06em;
  color:var(--muted);text-decoration:none;text-transform:uppercase;
  transition:color .2s;
}
.nav-links a:hover{color:var(--accent)}
.theme-btn{
  font-family:var(--font-mono);font-size:11.5px;letter-spacing:.1em;
  background:none;border:1px solid var(--line);color:var(--muted);
  border-radius:999px;padding:6px 14px;cursor:pointer;transition:all .2s;
}
.theme-btn:hover{color:var(--accent);border-color:var(--accent)}

/* burger (mobile only) — two lines that morph into an X */
.nav-burger{
  display:none;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  width:44px;height:44px;margin-right:-10px;
  background:none;border:none;cursor:pointer;padding:0;
}
.nav-burger span{display:block;width:20px;height:1.5px;background:var(--ink);transition:transform .3s ease}
.nav-burger.active span:first-child{transform:translateY(3.25px) rotate(45deg)}
.nav-burger.active span:last-child{transform:translateY(-3.25px) rotate(-45deg)}
.nav-burger:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:8px}

/* full-screen menu sliding in from the right; sits under the nav bar so the
   burger stays visible (as the X) to close it */
.mobile-menu{
  position:fixed;inset:0;z-index:49;
  background:color-mix(in srgb,var(--bg) 96%,transparent);
  backdrop-filter:blur(18px);
  display:flex;align-items:center;
  padding:80px 32px 40px;
  transform:translateX(100%);visibility:hidden;
  transition:transform .35s cubic-bezier(.3,.8,.3,1),visibility 0s .35s;
}
.mobile-menu.open{transform:none;visibility:visible;transition:transform .35s cubic-bezier(.3,.8,.3,1)}
@media (prefers-reduced-motion: reduce){.mobile-menu{transition:none}}
.mobile-menu-links{display:flex;flex-direction:column;width:100%}
.mobile-menu-links a{
  display:flex;align-items:baseline;gap:16px;
  font-size:clamp(26px,7vw,34px);font-weight:700;letter-spacing:-.02em;
  color:var(--ink);text-decoration:none;padding:12px 0;
  border-bottom:1px solid var(--line);
}
.mobile-menu-links a:last-child{border-bottom:none}
.mobile-menu-links a .num{font-size:12px;color:var(--accent);letter-spacing:.15em;flex:none}
.mobile-menu-links a:active,.mobile-menu-links a:hover{color:var(--accent)}
body.menu-open{overflow:hidden}

/* ── Hero ────────────────────────────────────────────────────────────────── */
/* svh: stable on mobile (plain vh resizes as the address bar collapses,
   making the page jump mid-scroll); the vh line is the fallback */
.hero{position:relative;min-height:100vh;min-height:100svh;display:flex;align-items:center;overflow:hidden}
.hero-stack{position:absolute;inset:0;z-index:0}
.hero-stack>*{position:absolute;inset:0}
/* The hero background is the journey globe (see .pin-globe rules below): it is
   fixed behind the hero, stays put as the hero scrolls away, then docks into
   #journey. cursor spotlight — soft accent glow that follows the pointer. */
.hero-spot{
  --mx:50%;--my:42%;
  background:radial-gradient(360px circle at var(--mx) var(--my),
            color-mix(in srgb,var(--accent) 26%,transparent) 0%, transparent 62%);
  mix-blend-mode:screen;opacity:.55;transition:opacity .4s;pointer-events:none;
}
html[data-theme="day"] .hero-spot{mix-blend-mode:multiply;opacity:.3}
.hero-grain{
  background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxMjAnIGhlaWdodD0nMTIwJz48ZmlsdGVyIGlkPSduJz48ZmVUdXJidWxlbmNlIHR5cGU9J2ZyYWN0YWxOb2lzZScgYmFzZUZyZXF1ZW5jeT0nMC45JyBudW1PY3RhdmVzPScyJy8+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9JzEwMCUnIGhlaWdodD0nMTAwJScgZmlsdGVyPSd1cmwoI24pJyBvcGFjaXR5PScwLjUnLz48L3N2Zz4=");
  opacity:.05;mix-blend-mode:overlay;pointer-events:none;
}
.hero-bg{pointer-events:none;opacity:.65}
.hero-bg svg{width:100%;height:100%}
/* scrim: solid theme bg behind the text column, globe clear on the right,
   soft fade into the page at top and bottom — readable in both themes */
.hero::after{
  content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb,var(--bg) 78%,transparent) 38%, transparent 72%),
    linear-gradient(180deg, color-mix(in srgb,var(--bg) 50%,transparent) 0%, transparent 24% 78%, var(--bg) 100%);
}
/* padding-block only — the horizontal gutters come from .wrap and a
   `padding:120px 0 80px` shorthand would zero them out */
.hero-inner{position:relative;z-index:3;padding-block:120px 80px;width:100%}

.kicker{
  display:flex;align-items:center;gap:14px;
  font-family:var(--font-mono);font-size:12.5px;letter-spacing:.22em;
  text-transform:uppercase;color:var(--accent);margin:0 0 22px;
}
.kicker-line{width:42px;height:1px;background:var(--accent);display:inline-block;flex:none}

.hero-title{
  font-size:clamp(57px,11vw,72px);
  line-height:.92;letter-spacing:-.04em;margin:0;font-weight:700;
}
.hero-title .dim{color:var(--accent)}
.ht-word{display:inline-block}

.hero-role{
  font-size:clamp(16px,2.1vw,22px);color:var(--ink);margin:14px 0 0;
  display:flex;align-items:center;gap:10px;min-height:1.4em;
}
.role-static{color:var(--accent)}
.role-rot{color:var(--ink)}
.role-caret{color:var(--accent);animation:blink 1.05s step-end infinite}
@keyframes blink{50%{opacity:0}}

.hero-sub{font-size:clamp(18px,2vw,23px);color:var(--muted);max-width:560px;margin:26px 0 40px}

/* live flight-deck readout strip */
.flight-deck{
  display:grid;grid-template-columns:repeat(4,auto);gap:0;
  border:1px solid var(--line);border-radius:14px;
  background:color-mix(in srgb,var(--panel) 70%,transparent);
  backdrop-filter:blur(12px);
  overflow:hidden;max-width:max-content;
}
.fd-cell{
  padding:15px 26px;border-right:1px solid var(--line);
  display:flex;flex-direction:column;gap:7px;
}
.fd-cell:last-child{border-right:none}
.fd-label{font-family:var(--font-mono);font-size:9.5px;letter-spacing:.16em;color:var(--muted)}
.fd-value{font-size:15px;display:flex;align-items:center;gap:9px;white-space:nowrap}
.fd-value b{color:var(--accent);font-family:var(--font-mono)}
.fd-loc .fd-value{font-family:var(--font-mono);letter-spacing:.04em;font-weight:500}
#localClock{color:var(--accent);font-size:17px}

.loc-dot{position:relative;width:9px;height:9px;border-radius:50%;background:var(--amber);flex:none}
.loc-dot::after{
  content:"";position:absolute;inset:-5px;border-radius:50%;
  border:1.5px solid var(--amber);opacity:.8;
}
@media (prefers-reduced-motion: no-preference){
  .loc-dot::after{animation:pulse 1.8s ease-out infinite}
}
@keyframes pulse{
  0%{transform:scale(.5);opacity:.9}
  100%{transform:scale(2.1);opacity:0}
}

.hero-cta{
  display:inline-flex;align-items:center;gap:10px;margin-top:36px;
  font-family:var(--font-mono);font-size:13px;letter-spacing:.06em;text-decoration:none;
  color:var(--ink);border:1px solid var(--line);border-radius:999px;
  padding:12px 22px;transition:all .25s;
}
.hero-cta svg{transition:transform .25s}
.hero-cta:hover{border-color:var(--accent);color:var(--accent)}
.hero-cta:hover svg{transform:translateY(4px)}

/* entrance animation — base state is VISIBLE; we animate FROM hidden,
   so if the animation never ticks (print, throttled tab) content still shows */
@media (prefers-reduced-motion: no-preference){
  .hero-inner>*{animation:heroIn .8s cubic-bezier(.2,.7,.2,1) backwards}
  .hero-inner>.kicker{animation-delay:.05s}
  .hero-inner>.hero-title{animation-delay:.14s}
  .hero-inner>.hero-role{animation-delay:.26s}
  .hero-inner>.hero-sub{animation-delay:.36s}
  .hero-inner>.flight-deck{animation-delay:.46s}
  .hero-inner>.hero-cta{animation-delay:.56s}
}
@keyframes heroIn{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}

/* the 4-in-a-row deck is ~900px wide (long location names) — fold to 2×2
   well before it can overflow the wrap */
@media (max-width:1020px){
  .flight-deck{grid-template-columns:auto auto}
  .fd-cell{border-bottom:1px solid var(--line)}
  .fd-cell:nth-child(even){border-right:none}
  .fd-cell:nth-child(n+3){border-bottom:none}
}

/* ── Sections ────────────────────────────────────────────────────────────── */
section{padding:110px 0}
.sec-head{margin-bottom:48px}
.sec-num{font-family:var(--font-mono);font-size:12px;letter-spacing:.2em;color:var(--accent)}
.sec-head h2{font-size:clamp(32px,4vw,46px);letter-spacing:-.02em;margin:8px 0 0}
.sec-head p{color:var(--muted);max-width:560px;margin:14px 0 0}

/* ── Globe / journey (full-bleed background + draggable panels) ──────────── */
#journey{
  position:relative;overflow:hidden;
  height:min(94vh,920px);height:min(94svh,920px);min-height:660px;padding:0;
  background:transparent;                 /* the fixed globe shows through here */
  border-block:1px solid var(--line);
}
#globeWrap{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:0}
#globeWrap canvas{display:block}

/* ── Site-wide background globe ────────────────────────────────────────────────
   .pin-globe is added to <html> by globe-section.js. The single globe is fixed
   to the viewport behind every section and never moves; JS only toggles
   .is-interactive (drag/zoom/hover) while #journey owns the screen. */
.pin-globe .hero{z-index:2}            /* hero paints above the fixed globe */
/* The single globe is a fixed full-viewport background for the WHOLE site and
   never docks/scrolls away. It sits directly on top inside #journey (which is not
   raised) so it is fully interactive there; every OTHER section is raised above
   the globe (see the veil rule below) so the globe becomes a faint backdrop and
   those sections take the pointer normally. */
.pin-globe #globeWrap{
  position:fixed;inset:0;z-index:1;
  pointer-events:none;user-select:none;
}
/* drag / zoom / hover-to-pause are live while #journey owns the screen centre */
.pin-globe #globeWrap.is-interactive{pointer-events:auto}
/* placeholder that reserves the globe's in-flow space inside #journey; only the
   mobile layout stacks the globe in flow, so it is hidden by default */
.globe-slot{display:none;pointer-events:none}
/* readability veil — the globe shows behind every content section, so lay a
   translucent page-colour wash over it there to keep text legible (hero and
   journey stay clear; journey has its own vignette). */
.pin-globe #about,
.pin-globe #skills,
.pin-globe #experience,
.pin-globe #projects,
.pin-globe #contact,
.pin-globe .footer{
  position:relative;z-index:2;            /* sit above the globe (z-index:1) */
  background:color-mix(in srgb,var(--bg) 88%,transparent);
}
/* soft vignette so floating panels stay legible over the globe — anchored
   low + open at the top so the arc rising into the hero stays undimmed */
.globe-veil{
  position:absolute;inset:0;z-index:1;pointer-events:none;
  background:
    radial-gradient(130% 105% at 50% 55%, transparent 58%, color-mix(in srgb,var(--bg) 55%,transparent) 100%),
    linear-gradient(90deg, color-mix(in srgb,var(--bg) 55%,transparent) 0%, transparent 26%, transparent 74%, color-mix(in srgb,var(--bg) 55%,transparent) 100%);
}
.globe-hint{
  position:absolute;left:50%;bottom:14px;transform:translateX(-50%);z-index:5;
  font-family:var(--font-mono);font-size:11px;letter-spacing:.12em;
  text-transform:uppercase;color:var(--muted);white-space:nowrap;pointer-events:none;
}

/* zoom buttons — wheel zoom is off so page scroll works over the globe */
.globe-zoom{
  position:absolute;right:16px;bottom:44px;z-index:5;
  display:flex;flex-direction:column;gap:8px;
}
.globe-zoom button{
  width:44px;height:44px;border-radius:12px;
  font-family:var(--font-mono);font-size:20px;line-height:1;
  background:color-mix(in srgb,var(--panel) 82%,transparent);
  backdrop-filter:blur(12px);
  border:1px solid var(--line);color:var(--ink);cursor:pointer;
  transition:border-color .2s,color .2s,transform .2s;
}
.globe-zoom button:hover{border-color:var(--accent);color:var(--accent);transform:translateY(-1px)}
.globe-zoom button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* mobile-only scroll handle (see the @media block) — hidden on desktop */
.globe-scroll{display:none}

/* draggable floating panels */
.drag-panel{
  position:absolute;z-index:4;
  background:color-mix(in srgb,var(--panel) 82%,transparent);
  backdrop-filter:blur(12px);
  border:1px solid var(--line);border-radius:var(--radius);
  box-shadow:0 18px 50px -20px rgba(0,0,0,.7);
  padding:18px 20px;
}
.panel-journey{width:352px;max-width:calc(100vw - 64px);padding:20px 20px 12px}
.panel-journey h2{font-size:clamp(22px,2.4vw,30px);letter-spacing:-.02em;margin:8px 0 20px}
.panel-journey p{color:var(--muted);margin:10px 0 16px;font-size:14px}
.drag-grip{
  position:absolute;top:8px;right:12px;
  font-size:15px;line-height:1;color:var(--muted);cursor:grab;
  letter-spacing:-1px;user-select:none;opacity:.6;transition:opacity .2s,color .2s;
}
.drag-panel:hover .drag-grip{opacity:1}
.drag-grip:active{cursor:grabbing;color:var(--accent)}
.drag-panel.dragging{box-shadow:0 26px 60px -18px rgba(0,0,0,.8);border-color:var(--accent)}

.stat-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:14px}
.stat-card{
  background:color-mix(in srgb,var(--panel-2) 70%,transparent);
  border:1px solid var(--line);border-radius:10px;padding:12px 10px 10px;
}
.stat-card .v{font-family:var(--font-mono);font-size:22px;color:var(--accent);line-height:1.1}
.stat-card .l{font-family:var(--font-mono);font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin-top:4px}
.stops{
  border:1px solid var(--line);border-radius:10px;
  background:color-mix(in srgb,var(--panel-2) 60%,transparent);
  max-height:min(280px,32svh);overflow-y:auto;
  overscroll-behavior:contain; /* reaching the list's end shouldn't fling the page */
}
.stops::-webkit-scrollbar{width:8px}
.stops::-webkit-scrollbar-thumb{background:var(--line);border-radius:4px}
.stop{
  display:flex;align-items:center;gap:12px;width:100%;
  background:none;border:none;border-bottom:1px solid var(--line);
  padding:9px 14px;cursor:pointer;color:var(--ink);text-align:left;
  font-family:var(--font-display);font-size:14px;transition:background .15s;
}
.stop:last-child{border-bottom:none}
.stop:hover{background:var(--accent-soft)}
.stop .code{font-family:var(--font-mono);font-size:11px;color:var(--accent);width:24px;flex:none}
.stop .nm{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stop .city{color:var(--muted);margin-left:auto;font-size:12.5px;flex:none}
.stop.current .code{color:var(--amber)}
.stop.current{background:var(--amber-soft)}
.stop.current .city::after{content:" ● now";color:var(--amber);font-family:var(--font-mono);font-size:10.5px}

@media (max-width:820px){
  #journey{height:auto;min-height:0;padding-bottom:24px}
  /* the globe is a fixed full-viewport backdrop; on mobile the in-flow
     .globe-slot reserves a 78svh clear area at the top of the section so the
     globe has room to breathe before the panels stacked below it */
  .globe-slot{display:block;height:78vh;height:78svh}
  .drag-panel{position:relative;left:auto!important;right:auto!important;top:auto!important;
    margin:14px 16px 0;width:auto;max-width:none;backdrop-filter:none}
  .panel-journey{width:auto}
  .globe-hint{position:relative;left:auto;bottom:auto;transform:none;display:block;text-align:center;
    margin-top:14px;white-space:normal;padding:0 20px}
  /* anchor zoom buttons + loading overlay to the globe area, not the section */
  .globe-zoom{top:calc(78vh - 116px);top:calc(78svh - 116px);bottom:auto}
  .globe-loading{inset:0 0 auto 0;height:78vh;height:78svh}
  /* a finger on the globe spins it, which can fight a near-vertical scroll;
     this handle (just above the zoom buttons) is a guaranteed page-scroll target:
     touch-action:pan-y lets the browser scroll the page from here, not the map */
  .globe-scroll{
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
    position:absolute;right:16px;z-index:5;
    top:calc(78vh - 248px);top:calc(78svh - 248px);
    width:44px;height:120px;border-radius:14px;
    background:color-mix(in srgb,var(--panel) 82%,transparent);backdrop-filter:blur(12px);
    border:1px solid var(--line);color:var(--muted);
    font-family:var(--font-mono);touch-action:pan-y;
    user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;
  }
  .globe-scroll .gs-ico{font-size:18px;line-height:1}
  .globe-scroll .gs-txt{font-size:8px;letter-spacing:.1em;text-transform:uppercase}
}

.globe-photo{
  width:46px;height:46px;border-radius:50%;overflow:hidden;cursor:pointer;
  border:2px solid var(--accent);box-shadow:0 0 14px rgba(18,118,198,.5);
  transform:translate(-50%,-50%);
}
.globe-photo img{width:100%;height:100%;object-fit:cover;display:block}

.globe-tip{
  font-family:var(--font-mono);font-size:12px;background:#0d1424;color:#e8eef8;
  border:1px solid rgba(148,170,200,.25);border-radius:8px;padding:7px 11px;white-space:nowrap;
}
/* lightened accent blue — #1276c6 itself is below AA contrast on this dark tooltip */
.globe-tip b{color:#4d9fe0}
.globe-tip.is-photo b{color:#5ee08a}
.globe-tip.is-photo span{color:var(--muted)}
.globe-tip.is-cluster{white-space:normal;min-width:178px;max-width:250px}
.globe-tip.is-cluster .gt-h{display:block;color:#5ee08a;margin-bottom:6px}
.gt-list{display:flex;flex-direction:column;gap:3px;margin-bottom:6px}
.gt-row{display:flex;justify-content:space-between;gap:16px}
.gt-row b{color:#e8eef8;font-weight:600}
.gt-row i{color:#9fb0c8;font-style:normal}
.gt-foot{display:block;color:var(--muted);opacity:.8;font-size:11px}

/* ── Photo table (polaroids on a table) + lightbox ──────────────────────────── */
html.pt-open, html.pt-open body{overflow:hidden}
.photo-table{position:fixed;inset:0;height:100vh;height:100dvh;z-index:2000;
  display:flex;align-items:center;justify-content:center}
.photo-table[hidden]{display:none}
.pt-backdrop{position:absolute;inset:0;background:rgba(4,7,14,.86);backdrop-filter:blur(3px);animation:pt-fade .25s ease}
.pt-panel{position:relative;z-index:1;width:min(1100px,94vw);
  height:min(86vh,820px);height:min(86dvh,820px);
  display:flex;flex-direction:column;animation:pt-fade .3s ease}
.pt-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:2px 4px 12px}
.pt-title b{display:block;font-family:var(--font-display);font-size:clamp(20px,2.4vw,30px);
  letter-spacing:-.02em;line-height:1.1}
.pt-title span{display:block;margin-top:4px;font-family:var(--font-mono);font-size:12px;
  letter-spacing:.05em;color:var(--muted)}
.pt-title{flex:1;min-width:0}
.pt-pile{position:relative;flex:1;min-height:0}
.pt-hint{margin:6px 0 0;text-align:center;font-family:var(--font-mono);font-size:10.5px;
  letter-spacing:.14em;text-transform:uppercase;color:var(--muted);opacity:.65}

/* ── Cluster place-picker (a cluster pin → choose one of its places) ── */
.pt-back{flex:none;align-self:center;font-family:var(--font-mono);font-size:12px;
  letter-spacing:.04em;cursor:pointer;padding:7px 14px;border-radius:999px;
  background:color-mix(in srgb,var(--panel) 70%,transparent);color:var(--ink);
  border:1px solid var(--line);transition:background .15s,border-color .15s,color .15s}
.pt-back:hover{border-color:var(--accent);color:var(--accent)}
.pt-back[hidden]{display:none}
.pt-picker{flex:1;min-height:0;overflow:auto;display:grid;align-content:start;gap:14px;
  grid-template-columns:repeat(auto-fill,minmax(185px,1fr));padding:4px 2px 8px}
.pt-picker[hidden]{display:none}
.pk-card{display:flex;flex-direction:column;text-align:left;cursor:pointer;overflow:hidden;
  background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:10px;
  transition:border-color .15s,transform .15s,box-shadow .15s;animation:pt-fade .3s both}
.pk-card:hover{border-color:var(--accent);transform:translateY(-3px);
  box-shadow:0 16px 34px -16px rgba(0,0,0,.7)}
.pk-thumb{display:block;aspect-ratio:4/3;background:#11151f;overflow:hidden}
.pk-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.pk-meta{display:flex;flex-direction:column;gap:3px;padding:10px 12px 12px}
.pk-meta b{font-family:var(--font-display);font-size:16px;letter-spacing:-.01em;line-height:1.15}
.pk-meta i{font-family:var(--font-mono);font-style:normal;font-size:11px;
  letter-spacing:.06em;color:var(--muted)}

.polaroid{position:absolute;width:160px;background:#fbfaf7;padding:8px 8px 0;border-radius:2px;
  cursor:pointer;will-change:transform;
  transform:translate(-50%,-50%) rotate(var(--rot,0deg));
  box-shadow:0 12px 28px -10px rgba(0,0,0,.75),0 2px 6px rgba(0,0,0,.4);
  transition:transform .18s cubic-bezier(.2,.7,.3,1),box-shadow .18s ease;
  animation:pl-drop .42s both cubic-bezier(.2,.8,.3,1)}
.polaroid img{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;background:#1a1f2b}
.polaroid figcaption{font-family:var(--font-mono);font-size:10px;color:#454545;text-align:center;
  padding:6px 2px 8px;letter-spacing:.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.polaroid:hover{transform:translate(-50%,-50%) rotate(0deg) scale(1.09);z-index:600!important;
  box-shadow:0 22px 48px -12px rgba(0,0,0,.85)}

.pt-lightbox{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;
  background:rgba(3,5,11,.95);animation:pt-fade .2s ease}
.pt-lightbox[hidden]{display:none}
.lb-fig{margin:0;display:flex;flex-direction:column;align-items:center;gap:10px}
.lb-img{max-width:92vw;max-height:84vh;object-fit:contain;border-radius:4px;
  box-shadow:0 24px 70px -22px #000;background:#11151f}
.lb-cap{font-family:var(--font-mono);font-size:12px;letter-spacing:.04em;color:var(--muted);text-align:center}
.lb-coords{display:block;margin-top:3px;font-size:11px;opacity:.7;letter-spacing:.03em}
.lb-nav,.lb-close,.pt-close{display:flex;align-items:center;justify-content:center;cursor:pointer;
  background:color-mix(in srgb,var(--panel) 70%,transparent);color:var(--ink);
  border:1px solid var(--line);border-radius:999px;transition:background .15s,border-color .15s}
.lb-nav:hover,.lb-close:hover,.pt-close:hover{background:var(--accent);border-color:var(--accent);color:#fff}
.pt-close{width:34px;height:34px;font-size:22px;line-height:1;flex:none}
.lb-close{position:absolute;top:16px;right:18px;width:40px;height:40px;font-size:24px;z-index:6}
.lb-nav{position:absolute;top:50%;transform:translateY(-50%);width:46px;height:46px;font-size:26px;z-index:6}
.lb-prev{left:16px}
.lb-next{right:16px}

@keyframes pt-fade{from{opacity:0}to{opacity:1}}
@keyframes pl-drop{from{opacity:0;transform:translate(-50%,-58%) rotate(var(--rot,0deg)) scale(.6)}
  to{opacity:1;transform:translate(-50%,-50%) rotate(var(--rot,0deg))}}
@media (max-width:820px){
  .pt-panel{width:94vw;height:90dvh}
  .pt-head{padding:2px 2px 10px}
  .pt-pile{transform:translateX(-35px)}   /* nudge the whole pile left to center it on mobile */
  .pt-picker{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}
  .pk-meta b{font-size:15px}
  .lb-nav{width:40px;height:40px}
}
@media (prefers-reduced-motion: reduce){
  .polaroid,.pt-backdrop,.pt-panel,.pt-lightbox,.pk-card{animation:none}
}

/* ── Globe loading state (until the CV feed + globe assets are ready) ────── */
#globeWrap{opacity:0;transition:opacity .9s ease}
#globeWrap.ready{opacity:1}
.globe-loading{
  position:absolute;inset:0;z-index:3;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;
  transition:opacity .5s ease;
}
.globe-loading.done{opacity:0;pointer-events:none}
.globe-loading .orbit{
  width:54px;height:54px;border-radius:50%;
  border:2px solid var(--line);border-top-color:var(--accent);
  animation:orbit-spin 1s linear infinite;
}
.globe-loading .txt{
  font-family:var(--font-mono);font-size:11.5px;letter-spacing:.18em;
  text-transform:uppercase;color:var(--muted);
}
@keyframes orbit-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion: reduce){
  .globe-loading .orbit{animation-duration:3s}
}

/* mono "// loading…" placeholders inside data-driven sections */
.load-note{font-family:var(--font-mono);font-size:12.5px;color:var(--muted)}

/* reserve rough space for feed-rendered content so the page doesn't jump
   under the reader when the data arrives mid-scroll */
#aboutText{min-height:220px}
#skillGroups{min-height:320px}
#xpTimeline{min-height:300px}

/* ── About ───────────────────────────────────────────────────────────────── */
.about-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:64px;align-items:start}
@media (max-width:900px){.about-grid{grid-template-columns:1fr}}
.about-grid p{color:var(--muted);font-size:17.5px;margin:0 0 20px}
.about-grid p:first-of-type{color:var(--ink);font-size:20px}
.about-photo{position:relative}
.about-photo image-slot{width:100%;height:380px;display:block}
.about-cap{font-family:var(--font-mono);font-size:11.5px;letter-spacing:.1em;color:var(--muted);margin-top:10px;text-transform:uppercase}

/* ── Skills ──────────────────────────────────────────────────────────────── */
.skill-meta{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;margin-bottom:42px}
@media (max-width:760px){.skill-meta{grid-template-columns:1fr}}
.meta-card{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:22px 24px}
.meta-card h3{font-family:var(--font-mono);font-size:12px;letter-spacing:.16em;text-transform:uppercase;color:var(--accent);margin:0 0 12px}
.meta-card ul{margin:0;padding:0;list-style:none;color:var(--muted);font-size:15.5px}
.meta-card li{padding:3px 0}
.meta-card .os{color:var(--muted);font-family:var(--font-mono);font-size:14px}
.skill-group-label{font-family:var(--font-mono);font-size:12px;letter-spacing:.16em;text-transform:uppercase;color:var(--muted);margin:34px 0 14px}
.chip-grid{display:flex;flex-wrap:wrap;gap:10px}
.chip{
  display:flex;align-items:center;gap:10px;
  background:var(--panel);border:1px solid var(--line);border-radius:999px;
  padding:9px 18px 9px 11px;transition:border-color .2s,transform .2s;
}
.chip:hover{border-color:var(--accent);transform:translateY(-2px)}
.chip img,.chip svg{width:22px;height:22px;display:block;flex:none}
.chip .nm{font-size:14.5px}
.chip .yr{font-family:var(--font-mono);font-size:11px;color:var(--accent)}

/* ── Experience timeline ─────────────────────────────────────────────────── */
.xp-timeline{max-width:820px}
.xp-item{position:relative;border-left:2px solid var(--line);padding:0 0 34px 24px}
.xp-item:last-child{padding-bottom:4px}
.xp-item::before{
  content:"";position:absolute;left:-6px;top:5px;width:10px;height:10px;border-radius:50%;
  background:var(--accent);box-shadow:0 0 12px var(--accent-soft),0 0 6px var(--accent);
}
.xp-item.now::before{background:var(--amber);box-shadow:0 0 12px var(--amber-soft),0 0 6px var(--amber)}
.xp-date{font-family:var(--font-mono);font-size:11.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--accent)}
.xp-item.now .xp-date{color:var(--amber)}
.xp-role{font-size:19px;font-weight:700;margin:6px 0 2px;letter-spacing:-.01em}
.xp-co{font-family:var(--font-mono);font-size:13px;color:var(--muted)}
.xp-info{margin:10px 0 0;padding-left:18px;color:var(--muted);font-size:15px}
.xp-info li{padding:2px 0}
.xp-info a{color:var(--accent)}
.xp-tools{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.tag{
  font-family:var(--font-mono);font-size:11px;color:var(--muted);
  border:1px solid var(--line);border-radius:999px;padding:3px 10px;background:var(--panel);
}
/* ── Projects ────────────────────────────────────────────────────────────── */
.prj-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px}
.prj b{font-size:15.5px}
.prj p{color:var(--muted);font-size:14px;margin:6px 0 0}
.prj a{font-family:var(--font-mono);font-size:12px;color:var(--accent);text-decoration:none}
.prj-soon{
  font-family:var(--font-mono);font-size:clamp(22px,3.4vw,36px);
  color:var(--muted);letter-spacing:.04em;margin:0;
}
.prj-soon::after{content:"_";color:var(--accent)}
@media (prefers-reduced-motion: no-preference){
  .prj-soon::after{animation:cursor-blink 1.1s steps(1) infinite}
}
@keyframes cursor-blink{50%{opacity:0}}
.spoken{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:12px}
.spoken li{display:flex;align-items:center;gap:12px;font-size:15px}
.spoken img{width:30px;height:auto;border-radius:3px;border:1px solid var(--line);flex:none}
.spoken .pf{margin-left:auto;font-family:var(--font-mono);font-size:11px;color:var(--accent)}

/* ── Contact ─────────────────────────────────────────────────────────────── */
#contact{background:var(--bg-2);border-top:1px solid var(--line);padding:120px 0}
#contact h2{font-size:clamp(40px,6vw,72px);letter-spacing:-.03em;margin:8px 0 18px}
#contact .sub{color:var(--muted);max-width:520px;margin:0 0 40px}
.contact-links{display:flex;gap:14px;flex-wrap:wrap}
.contact-links a{
  font-family:var(--font-mono);font-size:14px;text-decoration:none;
  border:1px solid var(--line);background:var(--panel);border-radius:999px;
  padding:13px 26px;transition:all .2s;
}
.contact-links a:hover{border-color:var(--accent);color:var(--accent);transform:translateY(-2px)}
.footer{
  border-top:1px solid var(--line);padding:26px 0;
  font-family:var(--font-mono);font-size:12px;color:var(--muted);
}
.footer .wrap{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap}

/* ── Reveal ──────────────────────────────────────────────────────────────── */
.rv{opacity:1;transform:none}
@media (prefers-reduced-motion: no-preference){
  .rv{opacity:0;transform:translateY(26px);transition:opacity .7s ease,transform .7s ease}
  .rv.in{opacity:1;transform:none}
}

/* ── Responsive: nav + spacing (tablet / mobile) ─────────────────────────── */
/* anchor jumps shouldn't land under the fixed nav */
section,.hero{scroll-margin-top:72px}

/* nav: links collapse into the burger menu */
@media (max-width:820px){
  .nav-inner{padding:0 20px;gap:16px}
  .nav-links{display:none}
  .theme-btn{margin-left:auto}
  .nav-burger{display:inline-flex}
}

@media (max-width:760px){
  .wrap{padding:0 20px}
  section{padding:72px 0}
  #contact{padding:90px 0}
  .sec-head{margin-bottom:32px}
  /* hero */
  .hero-inner{padding-block:116px 64px}
  .hero-title{font-size:53px}
  .kicker{font-size:11px;letter-spacing:.18em;margin-bottom:18px}
  .kicker-line{display:none}
  .hero-sub{margin:20px 0 32px}
  .flight-deck{grid-template-columns:1fr 1fr;width:100%;max-width:none}
  .fd-cell{padding:12px 16px}
  .fd-value{white-space:normal;font-size:14px}
  #localClock{font-size:15px}
  /* LOGGED stacks: countries on one line, tz below */
  .fd-stat .fd-value{flex-direction:column;align-items:flex-start;gap:3px}
  .fd-sep{display:none}
  .hero-cta{margin-top:28px}
  /* sections */
  .about-grid{gap:32px}
  .about-photo image-slot{height:300px}
  .stat-cards{gap:6px}
  .stat-card{padding:10px 8px 8px}
  .xp-item{padding:0 0 28px 18px}
  .contact-links a{padding:11px 18px;font-size:13px}
}
