/* ========== Tokens ========== */
:root{
  --ink:        #031927;
  --ink-2:      #0a2a3e;
  --teal:       #508aa8;
  --sky:        #9dd1f1;
  --mist:       #c8e0f4;
  --paper:      #f5f9fc;
  --paper-2:    #ecf4fb;
  --paper-warm: #fbf8f3;
  --line:       rgba(3,25,39,.12);
  --line-soft:  rgba(3,25,39,.06);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans:  "Manrope", system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;

  --max:   1200px;
  --pad:   clamp(20px, 4vw, 56px);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; }
button{ font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ========== NAV ========== */
.nav{
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px var(--pad);
  color: var(--mist);
  mix-blend-mode: normal;
  transition: background .4s ease, backdrop-filter .4s ease, border-color .4s ease, box-shadow .4s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled{
  background: rgba(245,249,252,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  border-bottom-color: var(--line-soft);
}

/* ── Nav theme variants (set by IntersectionObserver) ── */
.nav--light.is-scrolled{
  background: rgba(245,249,252,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
  color: var(--ink);
}
.nav--dark.is-scrolled{
  background: rgba(2,14,28,.82);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(157,209,241,.14);
  box-shadow: 0 4px 24px rgba(0,0,0,.3);
  color: var(--mist);
}
/* links + mark adapt in dark mode */
.nav--dark .nav-mark,
.nav--dark .nav-links a,
.nav--dark .lang-btn{
  color: var(--mist);
}
.nav--dark .nav-links a:hover{
  color: #fff;
}
.nav--light .nav-mark,
.nav--light .nav-links a,
.nav--light .lang-btn{
  color: var(--ink);
}
/* smooth transition on theme swap */
.nav{
  transition: background .5s ease, color .35s ease, border-color .4s ease, box-shadow .4s ease;
}
.nav-mark{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .02em;
  transition: transform .3s ease;
}
.nav-mark:hover{ transform: translateY(-1px); }
.nav-mark svg{ transition: transform 1s ease; }
.nav-mark:hover svg{ transform: rotate(90deg); }
.nav-mono{ font-family: var(--mono); font-size: 12px; opacity: .7; }

.nav-links{
  display: flex;
  gap: clamp(14px, 2.2vw, 28px);
  font-size: 14px;
}
.nav-links a{
  position: relative;
  text-decoration: none;
  padding: 6px 0;
  opacity: .82;
  transition: opacity .2s;
}
.nav-links a::after{
  content:"";
  position: absolute;
  left: 0; right: 100%;
  bottom: 2px;
  height: 1px;
  background: currentColor;
  transition: right .25s ease;
}
.nav-links a:hover{ opacity: 1; }
.nav-links a:hover::after{ right: 0; }

.lang-toggle{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  opacity: .85;
  transition: opacity .2s;
}
.lang-toggle:hover{ opacity: 1; }
.lang-opt{ padding: 0 2px; opacity: .5; transition: opacity .2s; }
.lang-opt.is-active{ opacity: 1; }
.lang-sep{ opacity: .4; }

/* ========== HERO ========== */
.hero{
  position: relative;
  min-height: 100vh;
  padding: 120px var(--pad) 80px;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(80,138,168,.4), transparent 60%),
    radial-gradient(800px 500px at 10% 100%, rgba(157,209,241,.18), transparent 60%),
    linear-gradient(180deg, #031927 0%, #062538 65%, #0a3a55 100%);
  color: var(--mist);
  overflow: hidden;
  display: flex;
  align-items: center;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><g fill='%23c8e0f4' stroke='%239dd1f1' stroke-width='.6'><path d='M14 2 L15.6 11 L24 12.8 L15.6 14.6 L14 24 L12.4 14.6 L4 12.8 L12.4 11 Z'/></g></svg>") 14 14, auto;
}
.hero a, .hero button, .hero .btn{
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><g fill='%23fff' stroke='%239dd1f1' stroke-width='.8'><path d='M16 2 L17.8 12.4 L28 14.4 L17.8 16.4 L16 27 L14.2 16.4 L4 14.4 L14.2 12.4 Z'/></g></svg>") 16 16, pointer;
}

/* Star cursor in footer (same as hero) */
.foot{
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><g fill='%23c8e0f4' stroke='%239dd1f1' stroke-width='.6'><path d='M14 2 L15.6 11 L24 12.8 L15.6 14.6 L14 24 L12.4 14.6 L4 12.8 L12.4 11 Z'/></g></svg>") 14 14, auto;
}
.foot a, .foot button{
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><g fill='%23fff' stroke='%239dd1f1' stroke-width='.8'><path d='M16 2 L17.8 12.4 L28 14.4 L17.8 16.4 L16 27 L14.2 16.4 L4 14.4 L14.2 12.4 Z'/></g></svg>") 16 16, pointer;
}
.stars{
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff 30%, transparent 60%),
    radial-gradient(1px 1px at 22% 64%, #fff 30%, transparent 60%),
    radial-gradient(1.5px 1.5px at 38% 30%, #c8e0f4 30%, transparent 60%),
    radial-gradient(1px 1px at 56% 82%, #fff 30%, transparent 60%),
    radial-gradient(1.4px 1.4px at 68% 12%, #fff 30%, transparent 60%),
    radial-gradient(1px 1px at 74% 56%, #9dd1f1 30%, transparent 60%),
    radial-gradient(1.2px 1.2px at 88% 38%, #fff 30%, transparent 60%),
    radial-gradient(1px 1px at 94% 76%, #fff 30%, transparent 60%),
    radial-gradient(1px 1px at 6% 88%, #fff 30%, transparent 60%),
    radial-gradient(1.3px 1.3px at 48% 8%, #fff 30%, transparent 60%),
    radial-gradient(1px 1px at 32% 92%, #c8e0f4 30%, transparent 60%),
    radial-gradient(1.6px 1.6px at 4% 42%, #fff 30%, transparent 60%),
    radial-gradient(1.1px 1.1px at 16% 50%, #c8e0f4 30%, transparent 60%),
    radial-gradient(.9px .9px at 28% 4%, #fff 30%, transparent 60%),
    radial-gradient(1.3px 1.3px at 44% 58%, #fff 30%, transparent 60%),
    radial-gradient(1px 1px at 52% 24%, #9dd1f1 30%, transparent 60%),
    radial-gradient(1.4px 1.4px at 62% 70%, #fff 30%, transparent 60%),
    radial-gradient(.9px .9px at 78% 22%, #fff 30%, transparent 60%),
    radial-gradient(1.2px 1.2px at 82% 88%, #c8e0f4 30%, transparent 60%),
    radial-gradient(1px 1px at 90% 6%, #fff 30%, transparent 60%),
    radial-gradient(1.5px 1.5px at 70% 90%, #fff 30%, transparent 60%),
    radial-gradient(.9px .9px at 36% 76%, #fff 30%, transparent 60%),
    radial-gradient(1.1px 1.1px at 18% 30%, #fff 30%, transparent 60%),
    radial-gradient(1px 1px at 2% 14%, #c8e0f4 30%, transparent 60%),
    radial-gradient(1.3px 1.3px at 58% 46%, #fff 30%, transparent 60%),
    radial-gradient(.9px .9px at 86% 54%, #9dd1f1 30%, transparent 60%);
  opacity: .85;
  animation: twinkle 6s ease-in-out infinite;
}
@keyframes twinkle{
  0%, 100% { opacity: .55; }
  50%      { opacity: .95; }
}
.constellation{
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: .7;
}

.hero-grid{
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(20px, 4vw, 60px);
  align-items: center;
}

.hero-pill{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
  background: rgba(157,209,241,.12);
  border: 1px solid rgba(157,209,241,.35);
  color: var(--mist);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .02em;
}
.pill-dot{
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #6ee7b7;
  box-shadow: 0 0 0 0 rgba(110,231,183,.7);
  animation: ping 2s infinite;
}
@keyframes ping{
  0%   { box-shadow: 0 0 0 0 rgba(110,231,183,.7); }
  70%  { box-shadow: 0 0 0 10px rgba(110,231,183,0); }
  100% { box-shadow: 0 0 0 0 rgba(110,231,183,0); }
}

.hero-h1{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(46px, 7.4vw, 104px);
  line-height: 1.02;
  letter-spacing: -.01em;
  margin: 24px 0 18px;
  color: #fff;
  text-wrap: balance;
}
.hero-italic{
  font-style: italic;
  color: var(--sky);
  display: inline-block;
}
.hero-line-3{ display: block; }

.hero-role{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--mist);
  opacity: .85;
  margin: 0 0 36px;
}
.hero-role-mark{
  display: inline-block;
  color: var(--sky);
  animation: spin 12s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

.hero-ctas{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary{
  background: var(--sky);
  color: var(--ink);
}
.btn-primary:hover{
  background: #fff;
  transform: translateY(-2px);
}
.btn-primary svg{ transition: transform .2s; }
.btn-primary:hover svg{ transform: translateX(4px); }
.btn-ghost{
  border: 1px solid rgba(200,224,244,.5);
  color: var(--mist);
}
.btn-ghost:hover{
  background: rgba(200,224,244,.12);
  border-color: var(--mist);
  transform: translateY(-2px);
}

/* Hero illustration */
.hero-illu{
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.hero-illu-halo{
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(157,209,241,.22), transparent 70%);
  filter: blur(20px);
}
.hero-astronaut{
  position: relative;
  width: 80%;
  filter: invert(96%) sepia(8%) saturate(381%) hue-rotate(177deg) brightness(108%) contrast(96%) drop-shadow(0 10px 30px rgba(0,0,0,.35));
}
.hero-hedge{
  position: absolute;
  bottom: 0;
  right: -2%;
  width: 32%;
  filter: invert(85%) sepia(12%) saturate(400%) hue-rotate(180deg) brightness(102%) drop-shadow(0 6px 16px rgba(0,0,0,.3));
  opacity: .85;
}
.floaty      { animation: floaty 6s ease-in-out infinite; }
.floaty-slow { animation: floaty 9s ease-in-out infinite; }
@keyframes floaty{
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

.hero-scroll{
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--mist);
  text-decoration: none;
  opacity: .7;
}
.hero-scroll svg{ animation: bob 2s ease-in-out infinite; }
@keyframes bob{
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

/* ========== SECTION SCAFFOLD ========== */
section{
  position: relative;
  padding: clamp(80px, 12vw, 140px) var(--pad);
}
.section-head{
  max-width: var(--max);
  margin: 0 auto clamp(40px, 5vw, 64px);
}
.eyebrow{
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 18px;
}
.eyebrow-light{ color: var(--sky); }
.h2{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: 1.05;
  letter-spacing: -.01em;
  margin: 0;
  text-wrap: balance;
}
.h2 em{
  font-style: italic;
  color: var(--teal);
}
.h2-light{ color: #fff; }
.h2-light em{ color: var(--sky); }
.section-sub{
  margin-top: 12px;
  color: var(--ink-2);
  opacity: .7;
  font-size: 15px;
}

/* ========== ABOUT ========== */
.about{
  background: var(--paper);
}
.about-grid{
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.about-photo{ margin: 0; }
.photo-frame{
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: visible;
  isolation: isolate;
}
.photo-frame::before{
  content: "";
  position: absolute;
  inset: -14px;
  background: url("assets/illu/watercolor-landscape.jpg") center/cover;
  filter: blur(3px) saturate(.8);
  opacity: .55;
  border-radius: 50%;
  z-index: -1;
}

/* — Coin flip — */
.coin{
  position: absolute;
  inset: 0;
  padding: 0;
  border: none;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  perspective: 1100px;
  z-index: 2;
}
.coin-inner{
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform-style: preserve-3d;
  transition: transform .8s cubic-bezier(.4,.1,.2,1);
  box-shadow: 0 18px 40px -20px rgba(3,25,39,.4);
}
.coin.is-flipped .coin-inner{ transform: rotateY(180deg); }
.coin:hover .coin-inner{ box-shadow: 0 22px 48px -18px rgba(3,25,39,.5); }
.coin-face{
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.coin-back{ transform: rotateY(180deg); }
.coin-face img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.coin-front img{ filter: grayscale(.05) contrast(1.02); }
.coin-back img{ object-fit: cover; object-position: center 46%; transform: scale(1.02); }

.coin-hint{
  position: absolute;
  bottom: 4%; right: 12%;
  z-index: 5;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--mist);
  box-shadow: 0 8px 20px -10px rgba(3,25,39,.6);
  pointer-events: none;
  opacity: .85;
  transition: transform .4s ease, opacity .3s ease;
}
.coin:hover ~ .coin-hint{ transform: rotate(40deg); opacity: 1; }
.coin.is-flipped ~ .coin-hint{ transform: rotate(180deg); }
.photo-orbit{
  position: absolute;
  inset: -28px;
  width: calc(100% + 56px);
  height: calc(100% + 56px);
  pointer-events: none;
  animation: spin 80s linear infinite;
}
.photo-tag{
  position: absolute;
  z-index: 4;
  padding: 6px 14px;
  background: var(--ink);
  color: var(--mist);
  font-family: var(--mono);
  font-size: 12px;
  border-radius: 999px;
  box-shadow: 0 8px 20px -10px rgba(3,25,39,.5);
}
.photo-tag-1{ top: 8%; right: -8px; }
.photo-tag-2{ bottom: 8%; left: -8px; background: var(--sky); color: var(--ink); }

.about-text{ font-size: 17px; }
.about-lead{
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 24px;
}
.about-text p{ margin: 0 0 18px; }
.about-quick{
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.about-quick li{
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.qk-num{
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
  color: var(--teal);
}
.qk-lbl{
  font-size: 13px;
  opacity: .7;
  text-wrap: balance;
}

/* ========== JOURNEY (zigzag) ========== */
.journey{
  background: var(--paper-2);
  background-image:
    radial-gradient(800px 400px at 90% 10%, rgba(157,209,241,.25), transparent 70%);
  overflow: hidden;
}
.journey-deco{
  position: absolute;
  pointer-events: none;
  animation: spin 24s linear infinite;
}
.journey-deco-1{ width: 70px; top: 18%; left: 6%; animation-duration: 30s; }
.journey-deco-2{ width: 48px; top: 60%; right: 8%; animation-duration: 22s; animation-direction: reverse; }
.journey-deco-3{ width: 110px; bottom: 12%; left: 10%; animation: none; }

.timeline{
  list-style: none;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0;
  position: relative;
}
.timeline::before{
  content: "";
  position: absolute;
  top: 36px;
  bottom: 36px;
  left: 50%;
  transform: translateX(-.5px);
  width: 1.5px;
  background: linear-gradient(to bottom, transparent, var(--teal) 6%, var(--teal) 94%, transparent);
  opacity: .35;
}

.tl-item{
  display: grid;
  grid-template-columns: 1fr 64px 1fr;
  gap: 0;
  align-items: center;
  padding: clamp(24px, 4vw, 48px) 0;
}
.tl-item:nth-child(odd)  .tl-card{ grid-column: 1; margin-right: 24px; }
.tl-item:nth-child(odd)  .tl-illu{ grid-column: 3; margin-left: 24px; justify-self: start; }
.tl-item:nth-child(even) .tl-card{ grid-column: 3; margin-left: 24px; order: 3; }
.tl-item:nth-child(even) .tl-illu{ grid-column: 1; margin-right: 24px; justify-self: end; order: 1; }
.tl-spine{ grid-column: 2; justify-self: center; order: 2; }

.tl-num{
  position: relative;
  z-index: 2;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--teal);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  box-shadow: 0 0 0 6px var(--paper-2);
  transition: transform .35s ease, background .35s, color .35s, box-shadow .35s;
}
.tl-item:hover .tl-num{
  transform: scale(1.08);
  background: var(--ink);
  color: var(--sky);
  box-shadow: 0 0 0 6px var(--paper-2), 0 0 0 9px rgba(80,138,168,.25);
}

.tl-card{
  position: relative;
  padding: 22px 24px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 32px -24px rgba(3,25,39,.18);
  transition: transform .35s ease, box-shadow .35s ease;
}
.tl-item[data-tint="sky"]   .tl-card{ background: #e7f2fb; border-color: rgba(80,138,168,.18); }
.tl-item[data-tint="mist"]  .tl-card{ background: #dceaf5; border-color: rgba(80,138,168,.22); }
.tl-item[data-tint="cream"] .tl-card{ background: #fbf6ec; border-color: rgba(170,140,80,.18); }
.tl-item[data-tint="teal"]  .tl-card{ background: #d6e6ed; border-color: rgba(80,138,168,.28); }

.tl-item:hover .tl-card{
  transform: translateY(-4px);
  box-shadow: 0 26px 44px -22px rgba(3,25,39,.28);
}

.tl-date{
  display: inline-flex;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: .04em;
  color: var(--teal);
  margin-bottom: 12px;
  padding: 6px 10px;
  background: rgba(255,255,255,.55);
  border-radius: 999px;
  align-items: center;
}
.tl-from{ font-weight: 600; color: var(--ink); }
.tl-sep{ opacity: .5; }
.tl-team{
  padding-left: 10px;
  margin-left: 4px;
  border-left: 1px solid rgba(80,138,168,.4);
}

.tl-title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.2;
  margin: 0 0 10px;
  color: var(--ink);
  text-wrap: balance;
}
.tl-desc{
  margin: 0 0 14px;
  color: var(--ink-2);
  opacity: .85;
  font-size: 15px;
}
.tl-item:nth-child(odd) .chips{ justify-content: flex-start; }

.tl-illu{
  margin: 0;
  width: clamp(120px, 18vw, 200px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  position: relative;
  transition: transform .5s ease;
}
.tl-illu::before{
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(157,209,241,.35), transparent 70%);
  z-index: 0;
}
.tl-illu img{
  position: relative;
  z-index: 1;
  width: 88%;
  height: 88%;
  object-fit: contain;
  transition: transform .6s ease;
}
.tl-item:hover .tl-illu img{
  transform: rotate(-4deg) scale(1.06);
}
/* Subtle alternating tilt for personality */
.tl-item:nth-child(1) .tl-illu img{ transform: rotate(-3deg); }
.tl-item:nth-child(2) .tl-illu img{ transform: rotate(4deg); }
.tl-item:nth-child(3) .tl-illu img{ transform: rotate(-2deg); }
.tl-item:nth-child(4) .tl-illu img{ transform: rotate(5deg); }
.tl-item:nth-child(5) .tl-illu img{ transform: rotate(-4deg); }
.tl-item:nth-child(6) .tl-illu img{ transform: rotate(3deg); }
.tl-item:nth-child(7) .tl-illu img{ transform: rotate(-3deg); }

.chips{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chips li{
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  color: var(--ink);
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: .02em;
  border: 1px solid rgba(80,138,168,.22);
  transition: background .2s, transform .2s;
}
.chips li:hover{
  background: #fff;
  transform: translateY(-2px);
}
.chip-link{
  text-decoration: none;
  color: var(--teal) !important;
}

/* ========== PORTFOLIO ========== */
.portfolio{ background: var(--paper-warm); }

.project-grid{
  max-width: var(--max);
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-card{
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .35s ease;
  box-shadow: 0 1px 0 rgba(3,25,39,.03), 0 14px 36px -26px rgba(3,25,39,.22);
}
.project-card:hover{
  transform: translateY(-6px);
  border-color: var(--teal);
  box-shadow: 0 26px 60px -28px rgba(3,25,39,.32);
}

.project-card-num{
  position: absolute;
  top: 16px; left: 16px;
  z-index: 3;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  padding: 6px 11px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* — Cover: stacked screenshots — */
.project-card-cover{
  position: relative;
  display: block;
  aspect-ratio: 16/10;
  background: linear-gradient(140deg, var(--paper-2), var(--mist));
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.project-card-cover-alt{ background: linear-gradient(140deg, var(--mist), #d9e8f2); }

.project-card-stack{
  position: absolute;
  inset: 0;
}
.pc-img{
  position: absolute;
  border-radius: 7px;
  background: #fff;
  object-fit: cover;
  object-position: top center;
  box-shadow: 0 12px 30px -14px rgba(3,25,39,.45);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
  border: 1px solid rgba(255,255,255,.7);
}
.pc-img-front{
  width: 72%;
  aspect-ratio: 16/10;
  left: 7%;
  bottom: 12%;
  z-index: 3;
  transform: rotate(-2deg);
}
.pc-img-mid{
  width: 38%;
  aspect-ratio: 9/16;
  right: 9%;
  bottom: 9%;
  z-index: 2;
  transform: rotate(3deg);
}
.pc-img-back{
  width: 58%;
  aspect-ratio: 16/10;
  right: 6%;
  top: 10%;
  z-index: 1;
  opacity: .9;
  transform: rotate(2.5deg);
}
.project-card:hover .pc-img-front{ transform: rotate(-3deg) translateY(-4px); }
.project-card:hover .pc-img-mid{ transform: rotate(5deg) translateY(-2px); }
.project-card:hover .pc-img-back{ transform: rotate(4deg) translate(3px, -3px); }

.project-card-count{
  position: absolute;
  bottom: 12px; right: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .05em;
  color: var(--ink);
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}
.project-card-count i,
.project-card-count svg{ width: 14px; height: 14px; }

/* — Body — */
.project-card-body{
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 24px 26px;
  flex: 1;
}
.project-card-title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.18;
  color: var(--ink);
  margin: 0;
}
.project-card-platform{
  width: fit-content;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--teal);
  padding: 4px 9px;
  border-radius: 999px;
  margin-bottom: 8px;
  white-space: nowrap;
}
.project-card-blurb{
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0;
}
.project-card-chips{
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}
.project-card-chips span{
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--paper-warm);
  border: 1px solid var(--line);
  padding: 4px 9px;
  border-radius: 999px;
}
.project-card-cta{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--teal);
}
.project-card-cta svg{ transition: transform .3s ease; }
.project-card:hover .project-card-cta svg{ transform: translateX(5px); }

/* ========== STUDIES (snake flow) ========== */
.studies{
  background: var(--paper);
  background-image:
    radial-gradient(700px 400px at 5% 30%, rgba(157,209,241,.18), transparent 70%),
    radial-gradient(500px 300px at 95% 80%, rgba(80,138,168,.12), transparent 70%);
}
.flow-deco{
  position: absolute;
  pointer-events: none;
  animation: spin 30s linear infinite;
}
.flow-deco-1{ width: 56px; top: 15%; right: 10%; }
.flow-deco-2{ width: 36px; top: 55%; left: 8%; animation-direction: reverse; animation-duration: 18s; }
.flow-deco-3{ width: 46px; bottom: 12%; right: 12%; animation-duration: 24s; }

.flow{
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 1100px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(48px, 7vw, 96px) clamp(20px, 3vw, 48px);
}

/* Snake order: row 1 left-to-right, row 2 reversed, row 3 left-to-right */
.flow-step:nth-child(1){ grid-column: 1; grid-row: 1; }
.flow-step:nth-child(2){ grid-column: 2; grid-row: 1; }
.flow-step:nth-child(3){ grid-column: 3; grid-row: 1; }
.flow-step:nth-child(4){ grid-column: 3; grid-row: 2; }
.flow-step:nth-child(5){ grid-column: 2; grid-row: 2; }
.flow-step:nth-child(6){ grid-column: 1; grid-row: 2; }
.flow-step:nth-child(7){ grid-column: 1; grid-row: 3; }
.flow-step:nth-child(8){ grid-column: 2; grid-row: 3; }

.flow-step{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  min-height: auto;
  padding: 0;
}

/* Horizontal dashed connector between siblings in same row */
.flow-step::after{
  content: "";
  position: absolute;
  top: 44px;            /* center of 88px node */
  height: 0;
  border-top: 2px dashed var(--teal);
  opacity: .45;
  z-index: 0;
}
/* Row 1: connector goes RIGHT, from items 1 and 2 */
.flow-step:nth-child(1)::after,
.flow-step:nth-child(2)::after{
  left: calc(50% + 50px);
  width: calc(100% - 50px);
}
/* Row 2 (reversed): connector goes LEFT, from items 4 and 5 */
.flow-step:nth-child(4)::after,
.flow-step:nth-child(5)::after{
  right: calc(50% + 50px);
  width: calc(100% - 50px);
}
/* Row 3: connector goes RIGHT, from item 7 */
.flow-step:nth-child(7)::after{
  left: calc(50% + 50px);
  width: calc(100% - 50px);
}

/* Vertical connectors at row turns: starts AFTER the card content, spans the row gap */
.flow-step:nth-child(3)::before,
.flow-step:nth-child(6)::before{
  content: "";
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-1px);
  width: 0;
  height: calc(clamp(48px, 7vw, 96px) - 24px);
  border-left: 2px dashed var(--teal);
  opacity: .45;
  z-index: 0;
}

/* U-turn curves between rows */
.flow-turn{
  pointer-events: none;
  z-index: 0;
  align-self: stretch;
  height: auto;
  width: 80px;
}
.flow-turn-1{
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
  margin-right: -36px;
}
.flow-turn-2{
  grid-column: 1;
  grid-row: 2 / span 2;
  justify-self: start;
  margin-left: -36px;
}

/* Node (circle with icon) */
.flow-node{
  position: relative;
  z-index: 1;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid var(--teal);
  box-shadow:
    0 0 0 6px var(--paper),
    0 0 0 8px rgba(80,138,168,.18),
    0 14px 30px -16px rgba(3,25,39,.3);
  transition: transform .4s ease, background .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.flow-node svg{
  width: 36px;
  height: 36px;
  stroke: var(--ink);
  stroke-width: 1.6;
  transition: stroke .35s ease, transform .5s ease;
}
.flow-step:hover .flow-node{
  transform: scale(1.08) rotate(-4deg);
  background: var(--ink);
  border-color: var(--ink);
  box-shadow:
    0 0 0 6px var(--paper),
    0 0 0 9px var(--sky),
    0 18px 36px -16px rgba(3,25,39,.45);
}
.flow-step:hover .flow-node svg{
  stroke: var(--sky);
  transform: rotate(4deg) scale(1.05);
}

/* Color tinting by type */
.flow-step[data-kind="degree"] .flow-node{ border-color: #031927; background: #fbf6ec; }
.flow-step[data-kind="degree"] .flow-badge{ background: #031927; color: var(--sky); }
.flow-step[data-kind="cert"]   .flow-node{ border-color: #508aa8; background: #e7f2fb; }
.flow-step[data-kind="cert"]   .flow-badge{ background: #508aa8; color: #fff; }
.flow-step[data-kind="talk"]   .flow-node{ border-color: #9dd1f1; background: #dceaf5; }
.flow-step[data-kind="talk"]   .flow-badge{ background: #9dd1f1; color: var(--ink); }

/* Card */
.flow-card{
  position: relative;
  z-index: 1;
  margin-top: 18px;
  max-width: 280px;
  text-align: center;
}
.flow-meta{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.flow-date{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink);
  opacity: .65;
}
.flow-badge{
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.flow-duration{
  font-family: var(--mono);
  font-size: 11px;
  color: var(--teal);
  opacity: .75;
}
.flow-title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.25;
  margin: 0 0 4px;
  color: var(--ink);
  text-wrap: balance;
}
.flow-school{
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
  opacity: .75;
}

/* ========== SKILLS (post-it wall) ========== */
.skills{
  background: var(--paper-2);
  background-image:
    radial-gradient(600px 400px at 0% 100%, rgba(157,209,241,.22), transparent 70%),
    /* subtle pinboard grid */
    linear-gradient(rgba(80,138,168,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80,138,168,.06) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  background-position: 0 0, 0 0, 0 0;
}
.postit-wall{
  max-width: 880px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 4vw, 56px);
}
.postit{
  position: relative;
  padding: 36px 32px 28px;
  background: #fffdf6;
  border-radius: 4px;
  transform: rotate(var(--rot, 0deg));
  box-shadow:
    0 1px 0 rgba(3,25,39,.08),
    0 18px 28px -16px rgba(3,25,39,.32),
    0 36px 50px -36px rgba(3,25,39,.18);
  transition: transform .35s ease, box-shadow .35s ease;
  isolation: isolate;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.postit::before{
  /* subtle paper grain edge gradient */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.45), transparent 30%, transparent 70%, rgba(3,25,39,.04));
  border-radius: inherit;
}
.postit:hover{
  transform: rotate(calc(var(--rot, 0deg) * .25)) translateY(-6px) scale(1.03);
  box-shadow:
    0 1px 0 rgba(3,25,39,.1),
    0 22px 32px -16px rgba(3,25,39,.4),
    0 40px 60px -30px rgba(3,25,39,.25);
  z-index: 3;
}
/* Tint variations */
.postit[data-tint="mist"]  { background: #dceaf5; }
.postit[data-tint="sky"]   { background: #e7f2fb; }
.postit[data-tint="cream"] { background: #fbf6ec; }
.postit[data-tint="teal"]  { background: #d6e6ed; }

/* Pushpin */
.postit-pin{
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pin, var(--teal));
  box-shadow:
    inset -2px -2px 0 rgba(0,0,0,.18),
    inset 3px 3px 0 rgba(255,255,255,.4),
    0 4px 8px -2px rgba(3,25,39,.4);
  z-index: 2;
}
.postit-pin::after{
  /* needle shadow */
  content: "";
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 6px;
  background: rgba(3,25,39,.15);
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  filter: blur(1px);
}

/* Number badge */
.postit-num{
  font-family: var(--serif);
  font-style: italic;
  font-size: 42px;
  line-height: 1;
  color: var(--teal);
  opacity: .9;
}
.postit[data-tint="cream"] .postit-num{ color: #031927; }
.postit[data-tint="teal"]  .postit-num{ color: #031927; opacity: .65; }

/* Name */
.postit-name{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 2.6vw, 36px);
  line-height: 1.1;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

/* Description */
.postit-desc{
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  opacity: .85;
}

/* Skills list */
.postit-list{
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.postit-list li{
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
}
.postit-list li::before{
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  opacity: .6;
}
.postit[data-tint="cream"] .postit-list li::before{ background: #031927; opacity: .7; }

/* Lucide icon in corner */
.postit-icon{
  align-self: flex-end;
  width: 24px;
  height: 24px;
  stroke: var(--ink);
  stroke-width: 1.4;
  opacity: .55;
  margin-top: 4px;
  transition: transform .4s ease, opacity .3s;
}
.postit:hover .postit-icon{
  transform: rotate(-8deg) scale(1.15);
  opacity: 1;
}

/* IA accent */
.postit-ai{
  outline: 1px dashed rgba(3,25,39,.18);
  outline-offset: -8px;
}

/* Wide post-it (3rd row, full-width) */
.postit-wide{
  grid-column: 1 / -1;
  min-height: 0;
  padding: 28px 36px 24px;
}
.postit-wide-grid{
  display: grid;
  grid-template-columns: 1.1fr 2.6fr;
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
}
.postit-wide-head{ display: flex; flex-direction: column; gap: 8px; }
.postit-wide-head .postit-name{ font-size: clamp(24px, 2.2vw, 30px); }
.postit-wide-head .postit-desc{ font-size: 13.5px; }

.lang-row{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 18px;
}
.lang-row li{
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 4px;
  padding: 12px 12px 14px;
  background: rgba(255,255,255,.45);
  border: 1px solid rgba(3,25,39,.08);
  border-radius: 6px;
  text-align: center;
}
.lang-flag{
  font-size: 22px;
  line-height: 1;
  margin-bottom: 2px;
}
.lang-name{
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.1;
  color: var(--ink);
}
.lang-bar{
  display: inline-flex;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
}
.lang-bar i{
  width: 18px;
  height: 4px;
  border-radius: 2px;
  background: rgba(3,25,39,.18);
  display: block;
}
.lang-bar[data-level="1"] i:nth-child(-n+1),
.lang-bar[data-level="2"] i:nth-child(-n+2),
.lang-bar[data-level="3"] i:nth-child(-n+3),
.lang-bar[data-level="4"] i:nth-child(-n+4){ background: var(--teal); }
.lang-lvl{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-2);
  opacity: .7;
  margin-top: 2px;
}

/* ========== ORBIT RADAR ========== */
.orbit-radar-wrap{
  max-width: var(--max);
  margin: 0 auto;
}

.radar-stage{
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 8px auto 0;
  aspect-ratio: 900 / 460;
}
.con-svg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.con-line{
  stroke: var(--teal);
  stroke-width: 1.4;
  stroke-opacity: .45;
  stroke-dasharray: 4 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: conDrift 60s linear infinite;
}
@keyframes conDrift{
  to { stroke-dashoffset: -200; }
}

/* orbital decorative layer */
.con-orbit-path{
  stroke: var(--teal);
  stroke-width: 1;
  stroke-opacity: .22;
  fill: none;
}
.con-planet{
  filter: drop-shadow(0 0 4px rgba(157,209,241,.65));
}
.con-nodes circle{
  fill: var(--teal);
  opacity: .9;
  animation: conNodePulse 4s ease-in-out infinite;
}
.con-nodes circle:nth-child(2n){ animation-duration: 5.2s; }
.con-nodes circle:nth-child(3n){ animation-duration: 6s; }
@keyframes conNodePulse{
  0%, 100% { opacity: .35; }
  50%      { opacity: 1; }
}

/* scattered decorative stars */
.con-spark{
  position: absolute;
  color: var(--teal);
  opacity: .35;
  pointer-events: none;
  z-index: 0;
  text-shadow: 0 0 6px rgba(157,209,241,.6);
  animation: footTwinkle 5s ease-in-out infinite;
}
.con-spark-1 { left:  3%; top: 14%; font-size: 14px; color: #9dd1f1; animation-delay: .0s;  animation-duration: 4.6s; }
.con-spark-2 { left: 47%; top: 22%; font-size: 11px; color: #b97a44; animation-delay: 1.1s; animation-duration: 5.2s; }
.con-spark-3 { left: 70%; top: 9%;  font-size: 16px; color: #508aa8; animation-delay: .5s;  animation-duration: 4.2s; }
.con-spark-4 { left: 96%; top: 48%; font-size: 12px; color: #9dd1f1; animation-delay: 1.8s; animation-duration: 5.6s; }
.con-spark-5 { left: 66%; top: 52%; font-size: 10px; color: #5a7e4e; animation-delay: 2.4s; animation-duration: 4.8s; }
.con-spark-6 { left: 90%; top: 86%; font-size: 15px; color: #508aa8; animation-delay: .9s;  animation-duration: 5.0s; }
.con-spark-7 { left: 33%; top: 64%; font-size: 11px; color: #9dd1f1; animation-delay: 2.0s; animation-duration: 4.4s; }
.con-spark-8 { left: 6%;  top: 70%; font-size: 13px; color: #b97a44; animation-delay: 1.4s; animation-duration: 5.4s; }
.con-spark-9 { left: 46%; top: 95%; font-size: 10px; color: #508aa8; animation-delay: 3.0s; animation-duration: 4.6s; }
.con-spark-10{ left: 78%; top: 36%; font-size: 12px; color: #9dd1f1; animation-delay: .3s;  animation-duration: 5.8s; }
/* Extra stars for deep space feel */
.con-spark-11{ left: 22%; top: 56%; font-size: 6px;  color: #c8e0f4; animation-delay: .7s;  animation-duration: 3.8s; opacity: .5; }
.con-spark-12{ left: 58%; top: 32%; font-size: 5px;  color: #fff;    animation-delay: 1.6s; animation-duration: 4.2s; opacity: .4; }
.con-spark-13{ left: 82%; top: 14%; font-size: 7px;  color: #9dd1f1; animation-delay: 2.2s; animation-duration: 5.0s; opacity: .45; }
.con-spark-14{ left: 11%; top: 64%; font-size: 5px;  color: #fff;    animation-delay: .4s;  animation-duration: 3.6s; opacity: .35; }
.con-spark-15{ left: 44%; top: 76%; font-size: 6px;  color: #c8e0f4; animation-delay: 3.1s; animation-duration: 4.8s; opacity: .4; }
.con-spark-16{ left: 74%; top: 56%; font-size: 5px;  color: #fff;    animation-delay: 1.9s; animation-duration: 5.2s; opacity: .35; }
.con-spark-17{ left: 35%; top: 88%; font-size: 9px;  color: #508aa8; animation-delay: 2.6s; animation-duration: 4.4s; }
.con-spark-18{ left: 88%; top: 8%;  font-size: 14px; color: #9dd1f1; animation-delay: .1s;  animation-duration: 6.2s; }
.con-spark-19{ left: 5%;  top: 22%; font-size: 8px;  color: #c8e0f4; animation-delay: 1.3s; animation-duration: 4.6s; }
.con-spark-20{ left: 52%; top: 18%; font-size: 5px;  color: #fff;    animation-delay: 2.8s; animation-duration: 3.4s; opacity: .3; }

.radar-labels{
  position: absolute;
  inset: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ===== Dog coin flip ===== */
.dog-coin{
  position: absolute;
  inset: 0;
  padding: 0;
  border: none;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  perspective: 1100px;
  z-index: 2;
}
.dog-coin-inner{
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform-style: preserve-3d;
  transition: transform .8s cubic-bezier(.4,.1,.2,1);
  box-shadow: 0 12px 30px -15px rgba(3,25,39,.5);
}
.dog-coin.is-flipped .dog-coin-inner{ transform: rotateY(180deg); }
.dog-coin:hover .dog-coin-inner{ box-shadow: 0 18px 38px -14px rgba(3,25,39,.55); }
.dog-coin-face{
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 3px solid rgba(255,255,255,.85);
}
.dog-coin-back{ transform: rotateY(180deg); }
.dog-coin-face img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.dog-coin-back img{ object-position: center 30%; }
.radar-core{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(110px, 17%, 148px);
  aspect-ratio: 1;
  z-index: 4;
  cursor: pointer;
  outline: none;
}
.radar-core::before{
  content: "";
  position: absolute;
  inset: -38%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(157,209,241,.55), rgba(157,209,241,0) 70%);
  z-index: -1;
  animation: coreHalo 5s ease-in-out infinite;
}
@keyframes coreHalo{
  0%, 100% { opacity: .5; transform: scale(.92); }
  50%      { opacity: .9; transform: scale(1.06); }
}
.radar-core-photo{
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,.85);
  background: transparent;
  z-index: 2;
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.radar-core-photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}
.radar-core-ring{
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px dashed var(--teal);
  opacity: .5;
  animation: spin 24s linear infinite;
}
.radar-core:hover .radar-core-photo,
.radar-core:focus-visible .radar-core-photo{
  transform: scale(1.08) rotate(-3deg);
}
.radar-core-label{
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(245,249,252,.92);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  box-shadow: 0 6px 14px -10px rgba(3,25,39,.3);
}
.radar-core:hover .radar-core-label,
.radar-core:focus-visible .radar-core-label{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.rc-fx{
  position: absolute;
  left: 50%;
  top: 6%;
  font-size: 14px;
  color: #c2607f;
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(3,25,39,.2);
  z-index: 3;
}
.rc-fx-2{ font-size: 11px; color: #b97a44; }
.rc-fx-3{ font-size: 17px; color: #d9607f; }
@keyframes rcHeartFloat{
  0%   { opacity: 0; transform: translate(-50%, 0) scale(.5) rotate(-10deg); }
  25%  { opacity: 1; transform: translate(-50%, -14px) scale(1) rotate(0); }
  100% { opacity: 0; transform: translate(-50%, -40px) scale(1.1) rotate(12deg); }
}
.radar-core:hover .rc-fx-1,
.radar-core:focus-visible .rc-fx-1{ animation: rcHeartFloat 1.3s ease-out infinite; }
.radar-core:hover .rc-fx-2,
.radar-core:focus-visible .rc-fx-2{ animation: rcHeartFloat 1.5s ease-out .4s infinite; left: 34%; }
.radar-core:hover .rc-fx-3,
.radar-core:focus-visible .rc-fx-3{ animation: rcHeartFloat 1.4s ease-out .75s infinite; left: 66%; }
.rl{
  position: absolute;
}
.rl-chip{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: var(--planet-size, 90px);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 10px;
  border: none;
  box-shadow:
    0 0 0 1.5px rgba(255,255,255,.12),
    0 8px 24px rgba(0,0,0,.55),
    inset 0 -5px 14px rgba(0,0,0,.3);
  transition: transform .28s cubic-bezier(.34,1.56,.64,1), box-shadow .28s ease;
  cursor: default;
  position: relative;
  overflow: visible;
}
.rl-icon{
  width: 22px;
  height: 22px;
  color: rgba(255,255,255,.92);
  position: relative;
  flex-shrink: 0;
  stroke-width: 1.9;
}

.rl:hover .rl-chip{
  transform: translateY(-4px) scale(1.1);
  box-shadow:
    0 0 0 2px rgba(255,255,255,.22),
    0 14px 32px rgba(0,0,0,.6),
    0 0 28px rgba(157,209,241,.3),
    inset 0 -5px 14px rgba(0,0,0,.3);
  z-index: 2;
}
.rl-name{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.92);
  text-align: center;
  line-height: 1.2;
  max-width: 70px;
}

/* ===== Per-icon hover animations ===== */

/* MUSCULATION — pump (lift the dumbbell) */
@keyframes rlPump {
  0%, 100% { transform: translateY(0) scaleY(1); }
  25%      { transform: translateY(-3px) scaleY(.92); }
  50%      { transform: translateY(0) scaleY(1); }
  75%      { transform: translateY(-3px) scaleY(.92); }
}
.rl-top:hover .rl-icon{ animation: rlPump .8s ease-in-out infinite; }

/* PIANO — musical notes float up */
.rl-fx-note{
  position: absolute;
  bottom: 100%;
  left: 14px;
  font-size: 14px;
  color: var(--teal);
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(3,25,39,.2);
  z-index: 3;
}
.rl-fx-note-2{ left: 36px; font-size: 12px; color: rgba(255,255,255,.8); }
.rl-fx-note-3{ left: 22px; font-size: 16px; color: rgba(255,255,255,.6); }
@keyframes rlNoteFloat{
  0%   { opacity: 0; transform: translate(0, 0) rotate(-8deg) scale(.6); }
  20%  { opacity: 1; transform: translate(0, -8px) rotate(0) scale(1); }
  100% { opacity: 0; transform: translate(8px, -28px) rotate(12deg) scale(1.1); }
}
.rl-tr:hover .rl-fx-note-1{ animation: rlNoteFloat 1.2s ease-out infinite; }
.rl-tr:hover .rl-fx-note-2{ animation: rlNoteFloat 1.4s ease-out .35s infinite; }
.rl-tr:hover .rl-fx-note-3{ animation: rlNoteFloat 1.3s ease-out .7s infinite; }

/* HYROX — draw the activity line */
.rl-r  .rl-icon path{
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}
@keyframes rlDraw{
  from { stroke-dashoffset: 100; }
  to   { stroke-dashoffset: 0; }
}
.rl-r:hover .rl-icon path{
  animation: rlDraw 1s ease-out infinite;
}

/* VOYAGES — plane takes off */
@keyframes rlTakeoff{
  0%   { transform: translate(0, 0) rotate(0); }
  40%  { transform: translate(4px, -3px) rotate(12deg); }
  60%  { transform: translate(6px, -5px) rotate(15deg); opacity: .7; }
  61%  { transform: translate(-8px, 4px) rotate(-8deg); opacity: 0; }
  62%  { transform: translate(-8px, 4px) rotate(-8deg); opacity: 0; }
  100% { transform: translate(0, 0) rotate(0); opacity: 1; }
}
.rl-br:hover .rl-icon{ animation: rlTakeoff 1.4s ease-in-out infinite; }

/* CROSSFIT — flame intensifies */
@keyframes rlFlicker{
  0%, 100% { transform: scale(1) translateY(0);    filter: drop-shadow(0 0 0   rgba(217,119,87,0)); }
  20%      { transform: scale(1.18) translateY(-1px); filter: drop-shadow(0 0 6px rgba(217,119,87,.7)); }
  40%      { transform: scale(1.08) translateY(-1px); filter: drop-shadow(0 0 4px rgba(240,160,96,.6)); }
  60%      { transform: scale(1.25) translateY(-2px); filter: drop-shadow(0 0 8px rgba(217,119,87,.85)); }
  80%      { transform: scale(1.12);                  filter: drop-shadow(0 0 5px rgba(240,160,96,.7)); }
}
.rl-b:hover .rl-icon{ color: #d9603a; animation: rlFlicker .45s ease-in-out infinite; }

/* ESCALADE — climb up */
@keyframes rlClimb{
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-4px) scale(1.08); }
}
.rl-bl:hover .rl-icon{ animation: rlClimb .8s ease-in-out infinite; }

/* RANDONNÉE — tree sway in wind */
@keyframes rlSway{
  0%, 100% { transform: rotate(-4deg); }
  50%      { transform: rotate(4deg); }
}
.rl-l:hover .rl-icon{ color: #5a7e4e; animation: rlSway 1.1s ease-in-out infinite; transform-origin: 50% 90%; }

/* JEUX VIDÉO — buttons getting pressed */
@keyframes rlBtn{
  0%, 65%, 100% { stroke: currentColor; stroke-width: 2; opacity: 1; }
  10%, 25%      { stroke: #d9603a;       stroke-width: 3.5; opacity: .9; }
}
.rl-tl:hover .rl-icon line:nth-of-type(1){ animation: rlBtn 1.2s ease-out 0s    infinite; }
.rl-tl:hover .rl-icon line:nth-of-type(2){ animation: rlBtn 1.2s ease-out .15s  infinite; }
.rl-tl:hover .rl-icon line:nth-of-type(3){ animation: rlBtn 1.2s ease-out .35s  infinite; }
.rl-tl:hover .rl-icon line:nth-of-type(4){ animation: rlBtn 1.2s ease-out .55s  infinite; }

/* ── Planet gradient colours ── */
.rl-top .rl-chip{ background: radial-gradient(circle at 35% 30%, #f8d882, #c97030); --planet-size: 106px; } /* Musculation – amber, BIG */
.rl-tr  .rl-chip{ background: radial-gradient(circle at 35% 30%, #c4a8e8, #5a3590); --planet-size: 72px;  } /* Piano – violet, small */
.rl-r   .rl-chip{ background: radial-gradient(circle at 35% 30%, #f5956a, #b8301a); --planet-size: 84px;  } /* Hyrox – coral */
.rl-br  .rl-chip{ background: radial-gradient(circle at 35% 30%, #7ad8d0, #226878); --planet-size: 114px; } /* Voyages – teal, BIGGEST */
.rl-b   .rl-chip{ background: radial-gradient(circle at 35% 30%, #f97840, #8e1c08); --planet-size: 80px;  } /* Crossfit – fire */
.rl-bl  .rl-chip{ background: radial-gradient(circle at 35% 30%, #f9c6d4, #c4406a); --planet-size: 106px; } /* Pâtisserie – rose, BIG */
.rl-l   .rl-chip{ background: radial-gradient(circle at 35% 30%, #72b890, #245840); --planet-size: 78px;  } /* Randonnée – forest */
.rl-tl  .rl-chip{ background: radial-gradient(circle at 35% 30%, #78b8f5, #1a3a8e); --planet-size: 68px;  } /* Jeux vidéo – blue, small */

/* ── Planet positions — 3 distinct orbits, solar-system feel ── */
.rl{ transform: translate(-50%, -50%); }
/* Inner orbit */
.rl-tr  { left: 56%;  top: 11%; }  /* Piano       — inner, top-center  */
.rl-tl  { left: 30%;  top: 34%; }  /* Jeux vidéo  — inner, left-center */
/* Middle orbit */
.rl-top { left: 12%;  top: 20%; }  /* Musculation — mid, far-left, BIG */
.rl-b   { left: 70%;  top: 84%; }  /* Crossfit    — mid, bottom-right  */
.rl-r   { left: 88%;  top: 38%; }  /* Hyrox       — mid, right         */
/* Outer orbit */
.rl-br  { left: 90%;  top: 68%; }  /* Voyages     — outer, far-right, BIGGEST */
.rl-bl  { left: 18%;  top: 80%; }  /* Escalade    — outer, bottom-left, small */
.rl-l   { left: 6%;   top: 52%; }  /* Randonnée   — outer, far-left    */

/* ========== ORBIT ========== */
.orbit{
  background:
    radial-gradient(900px 500px at 15% 60%, rgba(80,138,168,.32), transparent 65%),
    radial-gradient(700px 400px at 85% 30%, rgba(157,209,241,.18), transparent 65%),
    radial-gradient(500px 350px at 55% 90%, rgba(80,138,168,.2), transparent 70%),
    linear-gradient(180deg, #062538 0%, #031927 50%, #062538 100%);
  overflow: hidden;
}
.orbit .eyebrow{ color: rgba(157,209,241,.7); }
.orbit .h2,
.orbit .section-sub{ color: #e8f0f8; }
.orbit .h2 em{ color: #9dd1f1; }
.stars-orbit{ opacity: .45; }

/* ── Shooting stars ── */
.shoot{
  position: absolute;
  width: 180px;
  height: 1.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.9) 55%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  top: 10%;
  right: 8%;
}
.shoot-2{
  top: 22%;
  right: 38%;
  width: 140px;
}
@keyframes shootAcross1{
  0%   { opacity: 0; transform: rotate(-32deg) translateX(0); }
  7%   { opacity: .95; }
  88%  { opacity: .95; }
  100% { opacity: 0; transform: rotate(-32deg) translateX(-520px); }
}
@keyframes shootAcross2{
  0%   { opacity: 0; transform: rotate(-24deg) translateX(0); }
  7%   { opacity: .85; }
  88%  { opacity: .85; }
  100% { opacity: 0; transform: rotate(-24deg) translateX(-440px); }
}
.shoot-1.fire{ animation: shootAcross1 .75s ease-out forwards; }
.shoot-2.fire{ animation: shootAcross2 .65s ease-out .55s forwards; }
.orbit-grid{
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.orbit-card{
  padding: 28px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform .3s ease;
}
.orbit-card:hover{ transform: translateY(-4px); }
.orbit-head{
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
}
.orbit-illu{
  width: 56px;
  height: 56px;
  object-fit: contain;
  transition: transform .5s ease;
}
.orbit-card:hover .orbit-illu{
  transform: rotate(10deg) scale(1.1);
}
.orbit-head h3{
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  margin: 0;
}
.orbit-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.orbit-list li{
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.orbit-list li:last-child{ border: 0; }
.orbit-lvl{
  font-family: var(--mono);
  font-size: 12px;
  color: var(--teal);
}
.orbit-tags{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.orbit-tags li{
  padding: 6px 12px;
  font-size: 13px;
  background: var(--paper-2);
  border-radius: 999px;
  transition: background .2s;
}
.orbit-tags li:hover{ background: var(--mist); }

/* ========== FOOTER ========== */
.foot{
  position: relative;
  padding: clamp(80px, 12vw, 140px) var(--pad) 40px;
  background:
    radial-gradient(800px 500px at 100% 100%, rgba(80,138,168,.4), transparent 70%),
    radial-gradient(600px 400px at 0% 0%, rgba(157,209,241,.18), transparent 70%),
    linear-gradient(180deg, #0a3a55 0%, #031927 60%);
  color: var(--mist);
  overflow: hidden;
}
.stars-foot{ opacity: .55; }

/* Big twinkling stars in footer */
.foot-bigstar{
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: .35;
  filter: drop-shadow(0 0 6px rgba(200,224,244,.55));
  animation: footTwinkle 5s ease-in-out infinite;
}
@keyframes footTwinkle{
  0%, 100% { opacity: .22; transform: scale(.82) rotate(0deg); }
  50%      { opacity: 1;   transform: scale(1.08) rotate(8deg); }
}
.foot-bigstar-1{ top:  9%;  left: 7%;   width: 22px; animation-delay: 0s;    animation-duration: 4.6s; }
.foot-bigstar-2{ top: 22%;  right: 11%; width: 28px; animation-delay: 1.2s;  animation-duration: 5.4s; }
.foot-bigstar-3{ top: 54%;  left: 19%;  width: 16px; animation-delay: .6s;   animation-duration: 4.2s; }
.foot-bigstar-4{ bottom: 26%; right: 6%; width: 32px; animation-delay: 2.0s; animation-duration: 6.0s; }
.foot-bigstar-5{ top: 14%;  left: 44%;  width: 14px; animation-delay: 2.6s;  animation-duration: 4.8s; }
.foot-bigstar-6{ bottom: 14%; left: 9%;  width: 20px; animation-delay: 3.2s; animation-duration: 5.2s; }
.foot-bigstar-7{ top: 40%;  right: 32%; width: 18px; animation-delay: 1.0s;  animation-duration: 4.4s; }

.foot-inner{
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
.foot-lead{
  margin: 22px 0 36px;
  max-width: 50ch;
  color: var(--mist);
  opacity: .8;
}
.contact-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}
.contact-list a{
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(200,224,244,.15);
  text-decoration: none;
  transition: padding-left .3s ease, border-color .3s ease;
}
.contact-list a:hover{
  padding-left: 8px;
  border-color: var(--sky);
}
.cl-lbl{
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--sky);
  opacity: .75;
  transition: opacity .2s, transform .2s;
}
.cl-lbl svg{ width: 22px; height: 22px; stroke-width: 1.6; }
.contact-list a:hover .cl-lbl{ opacity: 1; transform: translateY(-1px) scale(1.08); }
.cl-val{
  font-family: var(--serif);
  font-size: 22px;
}

.foot-illu{
  position: relative;
  display: grid;
  place-items: center;
}
.foot-rocket{
  width: clamp(160px, 20vw, 240px);
  height: clamp(160px, 20vw, 240px);
  stroke: var(--sky);
  stroke-width: 1.2;
  fill: none;
  filter: drop-shadow(0 10px 30px rgba(157,209,241,.4));
  transform: rotate(-12deg);
  transition: transform .6s ease;
}
.foot-rocket:hover{
  transform: rotate(-4deg) scale(1.05) translateY(-8px);
}

.foot-bottom{
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 80px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(200,224,244,.18);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  font-family: var(--mono);
  opacity: .75;
}
.foot-bottom a{
  color: var(--sky);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  padding-bottom: 1px;
  transition: color .2s;
}
.foot-bottom a:hover{ color: #fff; text-decoration-thickness: 2px; }
.foot-credit{ opacity: 1; }
.foot-heart{ color: #b97a44; }
.foot-claude{ color: var(--sky); }

/* ========== LIGHTBOX ========== */
/* ========== GALLERY VIEWER ========== */
.gallery{
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3,25,39,.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 64px 1fr 64px;
  grid-template-areas:
    "head head head"
    "prev stage next"
    "thumbs thumbs thumbs";
  align-items: center;
  gap: 12px;
  padding: 24px 28px 22px;
  opacity: 0;
  transition: opacity .28s ease;
}
.gallery.is-open{ opacity: 1; }
.gallery[hidden]{ display: none; }

.gal-head{
  grid-area: head;
  text-align: center;
  padding: 4px 60px 0;
}
.gal-meta{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sky);
  margin: 0 0 6px;
}
.gal-title{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 3vw, 28px);
  color: var(--mist);
  margin: 0;
}
.gal-close{
  position: absolute;
  top: 22px; right: 26px;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(200,224,244,.12);
  color: var(--mist);
  border: 1px solid rgba(200,224,244,.3);
  transition: background .2s, transform .3s;
  z-index: 2;
}
.gal-close:hover{ background: rgba(200,224,244,.22); transform: rotate(90deg); }

.gal-arrow{
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(200,224,244,.1);
  color: var(--mist);
  border: 1px solid rgba(200,224,244,.28);
  transition: background .2s, transform .2s, opacity .2s;
}
.gal-arrow:hover{ background: rgba(200,224,244,.22); }
.gal-arrow:active{ transform: scale(.94); }
.gal-arrow:disabled{ opacity: .25; pointer-events: none; }
.gal-prev{ grid-area: prev; justify-self: start; }
.gal-next{ grid-area: next; justify-self: end; }

.gal-stage{
  grid-area: stage;
  margin: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.gal-canvas{
  display: block;
  background: linear-gradient(135deg, var(--paper-2), var(--mist));
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.6);
  max-height: calc(100vh - 290px);
  max-width: min(1100px, 100%);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.gal-canvas img{
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 334px);
  width: auto; height: auto;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 30px -14px rgba(3,25,39,.5);
}
.gal-canvas-tall img{ max-width: min(360px, 70vw); }

.gal-caption{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  max-width: 60ch;
}
.gal-counter{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--sky);
}
.gal-label{
  font-family: var(--serif);
  font-size: 19px;
  color: var(--mist);
}
.gal-note{
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(200,224,244,.7);
}

.gal-thumbs{
  grid-area: thumbs;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 4px 0 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.gal-thumbs::-webkit-scrollbar{ display: none; }
.gal-thumb{
  flex: 0 0 auto;
  width: 76px; height: 50px;
  border-radius: 7px;
  overflow: hidden;
  border: 2px solid transparent;
  opacity: .5;
  transition: opacity .2s, border-color .2s, transform .2s;
  background: #fff;
}
.gal-thumb img{ width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.gal-thumb:hover{ opacity: .85; }
.gal-thumb.is-active{ opacity: 1; border-color: var(--sky); transform: translateY(-2px); }

@media (max-width: 720px){
  .gallery{
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "stage"
      "thumbs";
    padding: 18px 14px 16px;
  }
  .gal-head{ padding: 4px 50px 0; }
  .gal-arrow{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    z-index: 2;
  }
  .gal-prev{ left: 10px; }
  .gal-next{ right: 10px; }
  .gal-canvas{ max-height: calc(100vh - 250px); padding: 14px; }
  .gal-canvas img{ max-height: calc(100vh - 290px); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px){
  .nav-links{ display: none; }
  .hero-grid{ grid-template-columns: 1fr; gap: 30px; }
  .hero-illu{ order: -1; max-width: 320px; margin: 0 auto; }
  .about-grid{ grid-template-columns: 1fr; }
  .about-photo{ max-width: 360px; margin: 0 auto; }
  .timeline::before{ left: 24px; transform: none; }
  .tl-item{
    grid-template-columns: 48px 1fr;
    gap: 12px;
    padding: 18px 0;
  }
  .tl-item:nth-child(odd)  .tl-card,
  .tl-item:nth-child(even) .tl-card{
    grid-column: 2; grid-row: 2;
    margin: 0;
    text-align: left;
    order: 2;
  }
  .tl-item:nth-child(odd)  .tl-illu,
  .tl-item:nth-child(even) .tl-illu{
    grid-column: 2; grid-row: 1;
    margin: 0 0 4px;
    justify-self: start;
    width: 90px;
    order: 1;
  }
  .tl-item:nth-child(odd) .chips,
  .tl-item:nth-child(even) .chips{ justify-content: flex-start; }
  .tl-spine{
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    margin-top: 4px;
  }
  .tl-num{
    width: 40px; height: 40px;
    font-size: 11px;
    box-shadow: 0 0 0 4px var(--paper-2);
  }
  .pinboard{ columns: 1; }
  .project-grid{ grid-template-columns: 1fr; gap: 22px; }
  .postit-wall{ grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .postit-wide-grid{ grid-template-columns: 1fr; gap: 16px; }
  .lang-row{ grid-template-columns: repeat(2, 1fr); }
  .rl{ font-size: 11px; padding: 4px 8px; }
  .rl-name{ font-size: 13px; }
  .rl-num{ font-size: 9px; padding: 1px 5px; }
  .orbit-grid{ grid-template-columns: 1fr; }
  .foot-inner{ grid-template-columns: 1fr; }
  .foot-illu{ order: -1; max-width: 260px; margin: 0 auto; }
  .contact-list a{ grid-template-columns: 36px 1fr; }
  .cl-val{ font-size: 18px; }
  .about-quick{ grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .qk-num{ font-size: 24px; }

  /* Flow: collapse to single column with spine on the left */
  .flow{
    max-width: 100%;
    padding-left: 8px;
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .flow-step:nth-child(n){
    grid-column: 1;
    grid-row: auto;
  }
  .flow-step{
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 16px;
  }
  .flow-step::after{ display: none; }
  .flow-turn{ display: none; }
  .flow-node{
    width: 64px; height: 64px;
    flex-shrink: 0;
  }
  .flow-node svg{ width: 28px; height: 28px; }
  .flow-card{
    margin-top: 4px;
    max-width: 100%;
    text-align: left;
  }
  .flow-meta{ justify-content: flex-start; }
}
@media (max-width: 560px){
  .nav{ padding: 12px 16px; }
  .nav-mono{ display: none; }
  .lang-toggle{ padding: 4px 10px; }
  .hero{ padding: 100px 20px 80px; }
  .postit-wall{ grid-template-columns: 1fr; }
  .postit{ min-height: auto; }
  .foot-bottom{ flex-direction: column; align-items: flex-start; }
  .about-quick{ grid-template-columns: 1fr; }
  .flow-step{ padding: 12px 0; }
  .flow-node{ width: 56px; height: 56px; }
  .flow-node svg{ width: 24px; height: 24px; }
}
