/* ==========================================================
   patellakshmi — "engineering blueprint" theme
   Change the colours below to restyle the whole site.
   ========================================================== */
:root {
  --bg: #0b1220;
  --bg-2: #0f1a2e;
  --card: rgba(255, 255, 255, 0.035);
  --line: rgba(148, 163, 184, 0.16);
  --text: #e2e8f0;
  --dim: #94a3b8;
  --accent: #5eead4;      /* teal — signals, data */
  --accent-2: #fbbf24;    /* amber — highlights */
  --grid: rgba(94, 234, 212, 0.05);
  --radius: 14px;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  color: var(--text);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(ellipse at 70% -10%, #13314a 0%, var(--bg) 55%);
  background-color: var(--bg);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; margin: 0 0 .5rem; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.small { font-size: .85rem; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem clamp(1rem, 4vw, 3rem);
  background: rgba(11, 18, 32, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); font-size: .9rem; }
.brand:hover { text-decoration: none; }
.logo { display: block; flex: none; filter: drop-shadow(0 4px 10px rgba(94, 234, 212, 0.22)); transition: filter .3s; }
.logo .lg-br { transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.brand:hover .logo, .ft-brand:hover .logo { filter: drop-shadow(0 6px 14px rgba(94, 234, 212, 0.45)); }
.brand:hover .logo .lg-br-l, .ft-brand:hover .logo .lg-br-l { transform: translateX(-1.5px); }
.brand:hover .logo .lg-br-r, .ft-brand:hover .logo .lg-br-r { transform: translateX(1.5px); }
.logo .lg-sweep { animation: chip-sweep 3.6s linear infinite; filter: drop-shadow(0 0 2px #5eead4); }
@keyframes chip-sweep { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .logo, .logo .lg-br { transition: none; } .logo .lg-sweep { animation: none; display: none; } }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  font-family: var(--mono); font-weight: 500; color: var(--bg); background: var(--accent);
}
.nav-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.nav-links a { color: var(--dim); font-size: .9rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav .nav-cta { color: var(--accent); }
/* menu button — refined glass */
.nav-toggle {
  display: none; flex-direction: column; align-items: flex-end; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 11px; margin: 0; flex: none; position: relative; z-index: 2;
  -webkit-appearance: none; appearance: none;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(148, 163, 184, 0.22); border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color .2s, background .2s, transform .15s;
}
.nav-toggle:hover { border-color: rgba(94, 234, 212, 0.45); }
.nav-toggle:active { transform: scale(.94); }
.nav-toggle span { display: block; flex: none; width: 20px; height: 1.6px; border-radius: 2px; background: #e2e8f0; transition: width .25s; }
.nav-toggle span:nth-child(2) { width: 13px; background: var(--accent); }
.nav-toggle:hover span:nth-child(2) { width: 20px; }

/* full-screen menu (phones & tablets) — circular reveal from the menu button */
.mmenu {
  --ox: calc(100% - 38px); --oy: calc(env(safe-area-inset-top, 0px) + 37px);
  position: fixed; inset: 0; z-index: 100; overflow-y: auto; overscroll-behavior: contain;
  background:
    linear-gradient(rgba(94, 234, 212, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(94, 234, 212, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(180deg, #0c1527 0%, #0a1120 100%);
  clip-path: circle(0px at var(--ox) var(--oy)); visibility: hidden;
  transition: clip-path .55s cubic-bezier(.7, 0, .2, 1), visibility 0s linear .55s;
}
.mmenu.is-open { clip-path: circle(150% at var(--ox) var(--oy)); visibility: visible; transition: clip-path .6s cubic-bezier(.7, 0, .2, 1), visibility 0s; }
.mmenu-inner {
  min-height: 100%; display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 15px) 18px calc(env(safe-area-inset-bottom, 0px) + 1.2rem);
  max-width: 560px; margin: 0 auto;
}
.mmenu-head { display: flex; align-items: center; gap: .75rem; padding-bottom: 1rem; margin-bottom: .4rem; border-bottom: 1px solid rgba(148, 163, 184, 0.14); }
.mm-profile {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: .85rem; padding: .7rem .8rem; border-radius: 16px; color: var(--text);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(255, 255, 255, 0.02) 60%);
  border: 1px solid rgba(251, 191, 36, 0.22);
}
.mm-profile:hover { text-decoration: none; border-color: rgba(251, 191, 36, 0.45); }
.mm-photo { position: relative; flex: none; display: block; width: 52px; aspect-ratio: 35 / 45; }
.mm-photo img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; background: #fff;
  border: 1.5px solid #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15), 0 8px 18px -8px rgba(251, 191, 36, 0.7); }
.mm-online { position: absolute; right: -4px; bottom: -4px; width: 12px; height: 12px; border-radius: 50%; background: #4ade80; border: 2.5px solid #0c1527; }
.mm-id { display: flex; flex-direction: column; justify-content: center; gap: .12rem; min-width: 0; }
.mm-who { font-family: var(--serif); font-size: 1.22rem; line-height: 1.15; letter-spacing: -.01em; }
.mm-role { font-size: .78rem; font-weight: 600; line-height: 1.3; color: #e2e8f0; }
.mm-org { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .55rem; font-size: .66rem; line-height: 1.3; color: var(--accent-2); }
.mm-loc { display: inline-flex; align-items: center; gap: .2rem; color: var(--dim); }
.mm-loc svg { flex: none; }
.mmenu-close {
  position: relative; width: 44px; height: 44px; flex: none; align-self: center; -webkit-appearance: none; appearance: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(148, 163, 184, 0.22); border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.mmenu-close span { position: absolute; left: 50%; top: 50%; width: 18px; height: 1.6px; margin: -.8px 0 0 -9px; border-radius: 2px; background: #e2e8f0; transition: transform .45s cubic-bezier(.2, .8, .2, 1) .15s; }
.mmenu-close span:first-child { transform: rotate(0deg); }
.mmenu-close span:last-child { transform: rotate(0deg); }
.mmenu.is-open .mmenu-close span:first-child { transform: rotate(45deg); }
.mmenu.is-open .mmenu-close span:last-child { transform: rotate(-45deg); }

.mm-groups { display: flex; flex-direction: column; gap: .5rem; }
.mm-group ul { list-style: none; margin: 0; padding: 0; }
.mm-label { margin: .9rem 0 .2rem; font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); opacity: .75; }
.mm-group li { border-bottom: 1px solid rgba(148, 163, 184, 0.1); }
.mm-group li, .mmenu-foot { opacity: 0; transform: translateY(12px); transition: opacity .3s ease, transform .45s cubic-bezier(.2, .8, .2, 1); }
.mmenu.is-open .mm-group li, .mmenu.is-open .mmenu-foot { opacity: 1; transform: none; transition-delay: calc(var(--k) * 40ms + 220ms); }
.mm-row {
  position: relative; display: grid; grid-template-columns: 1.8rem 22px 1fr auto auto; align-items: center; column-gap: .75rem;
  padding: .9rem .25rem .9rem .5rem; color: var(--text); -webkit-tap-highlight-color: transparent;
  transition: padding .25s, background .25s;
}
.mm-row:hover, .mm-row:active { text-decoration: none; background: linear-gradient(90deg, rgba(94, 234, 212, 0.06), transparent 70%); padding-left: .85rem; }
.mm-num { font-size: .66rem; color: var(--dim); opacity: .7; }
.mm-ic { display: grid; place-items: center; color: var(--dim); transition: color .25s; }
.mm-name { font-family: var(--serif); font-size: 1.45rem; line-height: 1.1; letter-spacing: -.01em; }
.mm-here { display: none; font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); padding: .15rem .45rem; border: 1px solid rgba(251, 191, 36, 0.45); border-radius: 999px; }
.mm-arrow { display: grid; place-items: center; color: var(--dim); opacity: .6; transition: transform .25s, color .25s, opacity .25s; }
.mm-row:hover .mm-ic, .mm-row:active .mm-ic { color: var(--accent); }
.mm-row:hover .mm-arrow, .mm-row:active .mm-arrow { color: var(--accent); opacity: 1; transform: translateX(3px); }
.mm-row.is-here::before { content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 2.5px; border-radius: 2px; background: linear-gradient(180deg, #fde047, var(--accent-2)); }
.mm-row.is-here .mm-here { display: inline-block; }
.mm-row.is-here .mm-ic, .mm-row.is-here .mm-num { color: var(--accent-2); opacity: 1; }

.mmenu-foot { margin-top: auto; padding-top: 1.6rem; }
.mm-status { display: flex; align-items: center; gap: .5rem; margin: 0 0 .8rem; font-size: .7rem; color: var(--dim); }
.mm-pulse { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); animation: role-pulse 2s infinite; }
.mm-actions { display: grid; grid-template-columns: 1fr 1fr auto; gap: .55rem; }
.mm-act {
  display: flex; align-items: center; justify-content: center; gap: .5rem; height: 48px; padding: 0 1rem; border-radius: 14px;
  font-weight: 600; font-size: .92rem; color: var(--text);
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(148, 163, 184, 0.22);
}
.mm-act:hover { text-decoration: none; border-color: rgba(94, 234, 212, 0.45); }
.mm-primary { color: #06201c; background: linear-gradient(135deg, #5eead4, #99f6e4); border-color: transparent; }
.mm-square { width: 48px; padding: 0; }
.mmenu-sign { margin: 1rem 0 0; text-align: center; font-size: .64rem; color: var(--dim); opacity: .7; }
.nav-toggle:focus, .mmenu-close:focus, .mm-row:focus, .mm-act:focus, .mm-profile:focus { outline: none; }
.nav-toggle:focus-visible, .mmenu-close:focus-visible, .mm-row:focus-visible, .mm-act:focus-visible, .mm-profile:focus-visible { outline: 2px solid rgba(94, 234, 212, 0.55); outline-offset: 2px; border-radius: 14px; }
body.menu-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .mmenu, .mmenu.is-open, .mm-group li, .mmenu-foot, .mmenu-close span { transition: none; }
  .mm-group li, .mmenu-foot { transform: none; }
}
@media (min-width: 1101px) { .mmenu { display: none; } }   /* desktop uses the top links */
@media (prefers-reduced-motion: reduce) { .mmenu, .mmenu-list li, .mmenu-foot { transition: none; transform: none; } }

/* ---------- layout ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem); }
.section { padding: 5rem 0 2rem; }
.section-title {
  display: flex; align-items: baseline; gap: 1rem;
  font-family: var(--serif); font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 400;
  border-bottom: 1px solid var(--line); padding-bottom: .8rem; margin-bottom: 2rem;
}
/* sections are numbered automatically (01, 02, …) in page order */
main { counter-reset: sec; }
.section-title { counter-increment: sec; }
.section-title::before {
  content: counter(sec, decimal-leading-zero);
  font-family: var(--mono); font-size: .9rem; color: var(--accent);
}
.lead { color: var(--dim); font-size: 1.1rem; max-width: 80ch; margin-top: -1rem; margin-bottom: 2rem; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center;
  min-height: calc(100vh - 70px); padding: 3rem 0;
}
.eyebrow { color: var(--accent); font-size: .9rem; margin: 0 0 1rem; }

/* hero: small passport photo with sparkle animation, beside the role badges */
.hero-id { display: flex; align-items: stretch; gap: 1.4rem; margin: 0 0 1.4rem; }   /* photo height = height of the role badges */
.hero-id .roles { margin: 0; align-content: flex-end; gap: .45rem; }   /* compact stack, anchored to the bottom of the photo */
.role { max-width: 100%; }
.avatar {
  position: relative; flex: none; margin: 0; align-self: stretch; height: auto; width: auto; aspect-ratio: 35 / 45;   /* passport ratio; width follows the height */
  max-height: 244px;   /* cap: prevents a resize loop when the badges wrap on narrow screens */
  border-radius: 14px; padding: 3px; overflow: visible;
  animation: avatar-float 6s ease-in-out infinite, avatar-glow 3.2s ease-in-out infinite;
}
/* rotating shimmer border */
.avatar-ring { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.avatar-ring::before {
  content: ''; position: absolute; inset: -60%;
  background: conic-gradient(from 0deg, var(--accent), transparent 25%, var(--accent-2) 50%, transparent 75%, var(--accent));
  animation: avatar-spin 4s linear infinite;
}
.avatar img {
  position: relative; z-index: 1; display: block; width: 100%; height: 100%;
  object-fit: cover; border-radius: 11px; background: #fff;
}
/* light sweep across the photo */
.avatar::after {
  content: ''; position: absolute; z-index: 2; inset: 3px; border-radius: 11px; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%) no-repeat;
  background-size: 250% 100%; background-position: 150% 0;
  animation: avatar-sweep 5s ease-in-out infinite;
}
/* twinkling sparkles (4-point stars) */
.spark {
  position: absolute; z-index: 3; width: 14px; height: 14px; pointer-events: none;
  background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 4px var(--accent-2));
  opacity: 0; animation: spark-twinkle 2.6s ease-in-out infinite;
}
.spark.s1 { top: -7px; right: -7px; animation-delay: 0s; }
.spark.s2 { bottom: 14px; left: -8px; width: 10px; height: 10px; animation-delay: .7s; background: var(--accent-2); }
.spark.s3 { top: 26px; left: -6px; width: 8px; height: 8px; animation-delay: 1.4s; background: var(--accent); }
.spark.s4 { bottom: -6px; right: 12px; width: 11px; height: 11px; animation-delay: 1.9s; }
@keyframes avatar-spin { to { transform: rotate(360deg); } }
@keyframes avatar-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes avatar-glow { 0%, 100% { box-shadow: 0 0 14px -2px rgba(94, 234, 212, 0.35); } 50% { box-shadow: 0 0 26px 2px rgba(251, 191, 36, 0.35); } }
@keyframes avatar-sweep { 0%, 55% { background-position: 150% 0; } 85%, 100% { background-position: -60% 0; } }
@keyframes spark-twinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); } 45% { opacity: 1; transform: scale(1) rotate(45deg); } 60% { opacity: .9; transform: scale(.85) rotate(60deg); } }
@media (prefers-reduced-motion: reduce) {
  .avatar, .avatar-ring::before, .avatar::after, .spark { animation: none; }
  .spark { opacity: .8; }
}

/* hero role badges */
.roles { list-style: none; margin: 0 0 1.4rem; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.role {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .45rem .9rem .45rem .75rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  font-size: .88rem; line-height: 1.2; white-space: nowrap;
}
.role.is-current { border-color: rgba(94, 234, 212, 0.45); background: rgba(94, 234, 212, 0.07); }
.role-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.role.is-current .role-dot { background: var(--accent); box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.6); animation: role-pulse 2s infinite; }
/* role badge with an animated yellow edge: a light runs around the border */
@property --edge { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.role.is-glow {
  position: relative; border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.07);
  animation: glow-pulse 2.6s ease-in-out infinite;
}
.role.is-glow::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--edge), transparent 0 55%, rgba(251, 191, 36, 0.6) 68%, #fde68a 76%, #fbbf24 82%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: edge-run 2.8s linear infinite;
}
.role.is-glow .role-dot { background: var(--accent-2); box-shadow: 0 0 6px rgba(251, 191, 36, 0.8); }
.role.is-glow .role-org { color: var(--accent-2); }
@keyframes edge-run { to { --edge: 360deg; } }
@keyframes glow-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); } 50% { box-shadow: 0 0 16px 0 rgba(251, 191, 36, 0.28); } }
@media (prefers-reduced-motion: reduce) { .role.is-glow, .role.is-glow::before { animation: none; } .role.is-glow::before { background: rgba(251, 191, 36, 0.7); } }
/* "royal" badge: bright red + gold light streaks chasing round the edge, with sparkles */
.role.is-royal {
  border-color: rgba(239, 68, 68, 0.45);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.13), rgba(251, 191, 36, 0.10));
  animation: royal-pulse 2.4s ease-in-out infinite;
}
.role.is-royal::before {
  padding: 2px;
  background: conic-gradient(from var(--edge),
    #ff3b3b 0deg, #ef4444 20deg, transparent 70deg, transparent 150deg,
    #fbbf24 180deg, #fde68a 196deg, #fbbf24 212deg, transparent 260deg, transparent 330deg, #ff3b3b 360deg);
  animation: edge-run 2.2s linear infinite;
}
.role.is-royal.is-current .role-dot, .role.is-royal .role-dot { background: #fbbf24; box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.55), 0 0 10px rgba(251, 191, 36, 0.9); animation: none; }
.role.is-royal.is-current .role-org, .role.is-royal .role-org { color: #fcd34d; border-left-color: rgba(251, 191, 36, 0.4); }
.rspark {
  position: absolute; z-index: 2; width: 11px; height: 11px; pointer-events: none;
  background: #fff7d6; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 4px #fbbf24) drop-shadow(0 0 2px #ef4444);
  opacity: 0; animation: spark-twinkle 2.2s ease-in-out infinite;
}
.rspark.r1 { top: -6px; left: 18%; }
.rspark.r2 { bottom: -6px; right: 22%; width: 9px; height: 9px; animation-delay: .75s; background: #fca5a5; }
.rspark.r3 { top: -5px; right: 6%; width: 8px; height: 8px; animation-delay: 1.4s; background: #fde68a; }
@keyframes royal-pulse {
  0%, 100% { box-shadow: 0 0 10px -2px rgba(239, 68, 68, 0.45); }
  50% { box-shadow: 0 0 20px 1px rgba(251, 191, 36, 0.45); }
}
@media (prefers-reduced-motion: reduce) {
  .role.is-royal, .rspark { animation: none; }
  .rspark { opacity: .85; }
  .role.is-royal::before { background: linear-gradient(90deg, #ef4444, #fbbf24); }
}
/* "gold" badge: always pill-shaped, yellow + gold light streaks chasing round the edge, golden sparkles */
.role.is-gold {
  border-radius: 999px;
  border-color: rgba(251, 191, 36, 0.5);
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.16), rgba(217, 119, 6, 0.12));
  animation: gold-pulse 2.4s ease-in-out infinite;
}
.role.is-gold::before {
  padding: 2px;
  background: conic-gradient(from var(--edge),
    #fde047 0deg, #facc15 18deg, transparent 70deg, transparent 150deg,
    #f59e0b 180deg, #fff3b0 196deg, #d97706 214deg, transparent 260deg, transparent 330deg, #fde047 360deg);
  animation: edge-run 2.2s linear infinite;
}
.role.is-gold.is-current .role-dot, .role.is-gold .role-dot {
  background: #fde047; animation: none;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.6), 0 0 12px rgba(250, 204, 21, 0.95);
}
.role.is-gold.is-current .role-org, .role.is-gold .role-org { color: #fde68a; border-left-color: rgba(251, 191, 36, 0.45); }
.role.is-gold .role-name { color: #fff8dc; }
.gspark {
  position: absolute; z-index: 2; width: 11px; height: 11px; pointer-events: none;
  background: #fffbe6; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 4px #facc15) drop-shadow(0 0 2px #d97706);
  opacity: 0; animation: spark-twinkle 2.1s ease-in-out infinite;
}
.gspark.g1 { top: -6px; left: 14%; }
.gspark.g2 { top: -5px; right: 9%; width: 8px; height: 8px; animation-delay: .5s; background: #fde047; }
.gspark.g3 { bottom: -6px; right: 26%; width: 10px; height: 10px; animation-delay: 1s; background: #fcd34d; }
.gspark.g4 { bottom: -5px; left: 34%; width: 7px; height: 7px; animation-delay: 1.45s; }
.gspark.g5 { top: 50%; right: -5px; width: 9px; height: 9px; margin-top: -4px; animation-delay: 1.8s; background: #fbbf24; }
@keyframes gold-pulse {
  0%, 100% { box-shadow: 0 0 10px -2px rgba(250, 204, 21, 0.45); }
  50% { box-shadow: 0 0 22px 2px rgba(245, 158, 11, 0.5); }
}
@media (prefers-reduced-motion: reduce) {
  .role.is-gold, .gspark { animation: none; }
  .gspark { opacity: .85; }
  .role.is-gold::before { background: linear-gradient(90deg, #fde047, #d97706); }
}
@keyframes role-pulse { 70% { box-shadow: 0 0 0 7px rgba(94, 234, 212, 0); } 100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0); } }
.role-name { font-weight: 600; color: var(--text); }
.role-org { color: var(--dim); font-size: .78rem; padding-left: .55rem; border-left: 1px solid var(--line); }
.role.is-current .role-org { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .role.is-current .role-dot { animation: none; } }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.8rem, 7vw, 5rem); letter-spacing: -.02em; }
.tagline { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--dim); max-width: 34ch; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 2rem 0; }
/* lock tagline + buttons to the exact width of the name above them */
.hero-lockup { display: grid; width: fit-content; max-width: 100%; }
.hero-lockup h1 { margin-bottom: .6rem; }
.hero-lockup .tagline,
.hero-lockup .hero-actions { width: 0; min-width: 100%; }          /* fill the name's width without widening it */
.hero-lockup .tagline { max-width: none; text-align: justify; text-align-last: left; hyphens: manual; }
.tagline-lead { color: var(--text); font-weight: 600; }
.hero-lockup .hero-actions { flex-wrap: nowrap; }
.hero-lockup .hero-actions .btn { flex: 1 1 0; text-align: center; white-space: nowrap; }
.btn {
  display: inline-block; padding: .7rem 1.3rem; border-radius: 999px;
  background: var(--accent); color: var(--bg); font-weight: 600; font-size: .95rem;
  border: 1px solid var(--accent); transition: transform .15s, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); }
.stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stats li { border-left: 2px solid var(--accent); padding-left: .8rem; }
.stats strong { display: block; font-family: var(--serif); font-size: 1.8rem; font-weight: 400; color: var(--accent-2); }
.stats span { font-size: .8rem; color: var(--dim); }

.hero-viz { margin: 0; text-align: center; }
.hero-viz canvas { width: 100%; max-width: 420px; aspect-ratio: 1; cursor: grab; touch-action: pan-y; }
.hero-viz canvas:active { cursor: grabbing; }
.hero-viz figcaption { display: flex; justify-content: center; gap: 1.4rem; font-size: .85rem; color: var(--dim); }
.hero-viz b { color: var(--accent); font-weight: 500; display: inline-block; min-width: 4.5ch; text-align: right; }
.viz-note { font-size: .75rem; color: var(--dim); opacity: .7; }

/* ---------- full-stack band (between hero and About) — compact & interactive ---------- */
.stack-band {
  position: relative; margin: 1rem 0 0; padding: 1.6rem clamp(1rem, 2.6vw, 2rem);
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background:
    radial-gradient(ellipse 40% 80% at 50% 60%, rgba(251, 191, 36, 0.06), transparent 70%),
    radial-gradient(ellipse 40% 80% at 90% 30%, rgba(94, 234, 212, 0.07), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}
.stack-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px minmax(0, 0.9fr); gap: 1.3rem; align-items: center; }

/* column 1 */
.stack-text { display: flex; flex-direction: column; gap: .7rem; min-width: 0; }
.stack-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.stack-kicker { margin: 0 0 .25rem; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  background: linear-gradient(90deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stack-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.15; margin: 0; }
.stack-lead { margin: 0; color: var(--dim); font-size: .88rem; line-height: 1.5; }
.stack-play {
  flex: none; display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .65rem; margin-top: .1rem;
  font-size: .7rem; color: var(--dim); background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
}
.stack-play:hover { color: var(--text); border-color: rgba(94, 234, 212, 0.4); }
.sp-ic { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.stack-play[aria-pressed="true"] { color: var(--accent); border-color: rgba(94, 234, 212, 0.35); }
.stack-play[aria-pressed="true"] .sp-ic { background: var(--accent); animation: role-pulse 2s infinite; }

.stack-panel {
  position: relative; padding: .85rem 1rem .8rem; border-radius: 12px;
  background: rgba(var(--c), 0.07); border: 1px solid rgba(var(--c), 0.35);
  transition: background .35s, border-color .35s;
}
.sp-top { display: flex; align-items: center; gap: .7rem; margin-bottom: .35rem; }
.sp-level { font-size: .7rem; color: rgb(var(--c)); }
.sp-meter { flex: 1; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.sp-meter span { display: block; height: 100%; background: rgb(var(--c)); transition: width .45s cubic-bezier(.2, .8, .2, 1), background .35s; }
.sp-name { margin: 0; font-weight: 600; font-size: 1.02rem; }
.sp-detail { margin: .15rem 0 0; font-size: .74rem; color: var(--dim); }
.sp-seen { margin: .45rem 0 0; font-size: .8rem; color: var(--text); }
.sp-seen .mono { font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--c)); margin-right: .3rem; }
.sp-link { display: inline-block; margin-top: .5rem; font-size: .74rem; color: rgb(var(--c)); }
.sp-link:hover { text-decoration: none; filter: brightness(1.2); }

/* column 2 — 3D tower of solid glass slabs (see stack.ejs). JS sets --rx / --rz (sway, tilt, drag). */
@property --gap { syntax: '<length>'; inherits: true; initial-value: 22px; }
.iso { position: relative; height: 380px; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.iso.is-dragging { cursor: grabbing; }
.iso-glow {
  position: absolute; left: 50%; top: 58%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--ac, 94, 234, 212), .22), transparent 65%); filter: blur(6px); transition: background .5s;
}
.iso-scene {
  --sz: 150px; --t: 9px; --rx: 58deg; --rz: -42deg; --scale: 1; --li: 0;
  --top: calc(var(--n) * var(--gap) + 34px);
  position: absolute; left: 50%; top: 71%; width: var(--sz); height: var(--sz);
  margin: calc(var(--sz) / -2) 0 0 calc(var(--sz) / -2);
  transform: scale(var(--scale)) rotateX(var(--rx)) rotateZ(var(--rz)); transform-style: preserve-3d;
  transition: --gap .6s cubic-bezier(.2, .8, .2, 1);
}
.iso:hover .iso-scene, .iso.is-dragging .iso-scene { --gap: 28px; }          /* exploded view */

/* circuit-board base with pulse rings */
.iso-base {
  position: absolute; inset: -22%; transform: translateZ(-6px); transform-style: preserve-3d; border-radius: 18px;
  border: 1px solid rgba(94, 234, 212, .22);
  background:
    radial-gradient(circle at 50% 50%, rgba(94, 234, 212, .12), transparent 60%),
    repeating-linear-gradient(0deg, rgba(94, 234, 212, .09) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(90deg, rgba(94, 234, 212, .09) 0 1px, transparent 1px 12px);
  box-shadow: 0 0 40px rgba(94, 234, 212, .08) inset;
}
.ring { position: absolute; left: 50%; top: 50%; width: 70%; height: 70%; margin: -35% 0 0 -35%; border-radius: 50%;
  border: 1.5px solid rgba(251, 191, 36, .55); opacity: 0; animation: iso-ring 4.5s ease-out infinite; }
.ring.r2 { animation-delay: 1.5s; } .ring.r3 { animation-delay: 3s; }
@keyframes iso-ring { 0% { transform: scale(.4); opacity: .8; } 100% { transform: scale(1.35); opacity: 0; } }

/* a slab = top + 4 sides */
.slab {
  position: absolute; inset: 0; cursor: pointer; transform-style: preserve-3d;
  transform: translateZ(calc(var(--i) * var(--gap) + var(--lift, 0px)));
  transition: transform .55s cubic-bezier(.2, .9, .25, 1.15);
}
.slab.is-active { --lift: 16px; }
.f { position: absolute; display: block; backface-visibility: visible; transition: background .45s, box-shadow .45s, border-color .45s; }
.f-top {
  inset: 0; transform: translateZ(var(--t)); display: grid; place-items: center; border-radius: 3px; overflow: hidden;
  border: 1px solid rgba(var(--c), .55);
  background:
    radial-gradient(rgba(var(--c), .45) 1px, transparent 1.5px) 0 0 / 12px 12px,
    linear-gradient(135deg, rgba(var(--c), .26), rgba(var(--c), .06));
  box-shadow: inset 0 0 18px rgba(var(--c), .12);
}
/* chip outline + traces on the top face */
.f-top::before {
  content: ''; position: absolute; inset: 24%; border-radius: 6px; border: 1px solid rgba(var(--c), .45);
  background:
    linear-gradient(rgba(var(--c), .35), rgba(var(--c), .35)) 50% -60% / 1px 60% no-repeat,
    linear-gradient(rgba(var(--c), .35), rgba(var(--c), .35)) 50% 160% / 1px 60% no-repeat,
    linear-gradient(90deg, rgba(var(--c), .35), rgba(var(--c), .35)) -60% 50% / 60% 1px no-repeat,
    linear-gradient(90deg, rgba(var(--c), .35), rgba(var(--c), .35)) 160% 50% / 60% 1px no-repeat;
}
/* scanning light on the selected slab */
.f-top::after {
  content: ''; position: absolute; inset: -40%; opacity: 0; pointer-events: none;
  background: linear-gradient(120deg, transparent 42%, rgba(255, 255, 255, .55) 50%, transparent 58%);
}
.slab.is-active .f-top::after { opacity: 1; animation: iso-scan 1.8s ease-in-out infinite; }
@keyframes iso-scan { from { transform: translateX(-45%); } to { transform: translateX(45%); } }
.f-s { left: 0; right: 0; top: 100%; height: var(--t); transform-origin: top; transform: rotateX(90deg); background: rgba(var(--c), .5); }
.f-n { left: 0; right: 0; top: calc(-1 * var(--t)); height: var(--t); transform-origin: bottom; transform: rotateX(-90deg); background: rgba(var(--c), .22); }
.f-e { top: 0; bottom: 0; left: 100%; width: var(--t); transform-origin: left; transform: rotateY(-90deg); background: rgba(var(--c), .34); }
.f-w { top: 0; bottom: 0; left: calc(-1 * var(--t)); width: var(--t); transform-origin: right; transform: rotateY(90deg); background: rgba(var(--c), .18); }
.slab-ic { position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  color: rgb(var(--c)); opacity: .55; transition: opacity .45s, transform .45s; pointer-events: none; }
.slab-ic svg { width: 24px; height: 24px; }
.slab:hover .f-top { border-color: rgba(var(--c), .95); }
.slab.is-active .f-top {
  border-color: rgb(var(--c));
  background:
    radial-gradient(rgba(var(--c), .7) 1px, transparent 1.5px) 0 0 / 12px 12px,
    linear-gradient(135deg, rgba(var(--c), .55), rgba(var(--c), .16));
  box-shadow: 0 0 30px rgba(var(--c), .7), inset 0 0 22px rgba(var(--c), .35);
}
.slab.is-active .f-s { background: rgba(var(--c), .85); box-shadow: 0 0 14px rgba(var(--c), .7); }
.slab.is-active .f-e { background: rgba(var(--c), .6); }
.slab.is-active .slab-ic { opacity: 1; transform: scale(1.12); background: rgba(11, 18, 32, .55); box-shadow: 0 0 14px rgba(var(--c), .6); }

/* vertical data beams (two crossed planes so they never vanish edge-on) and travelling packets */
.via { position: absolute; left: calc(var(--px) * var(--sz)); top: calc(var(--py) * var(--sz)); width: 0; height: 0; transform-style: preserve-3d; pointer-events: none; }
.via i {
  position: absolute; left: -1px; top: 0; width: 2px; height: var(--top); transform-origin: 1px 0;
  background: linear-gradient(to bottom, rgba(251, 191, 36, .55), rgba(94, 234, 212, .55)); opacity: .45;
}
.via i:first-child { transform: rotateX(90deg); }
.via i:last-child { transform: rotateZ(90deg) rotateX(90deg); }
.pk {
  position: absolute; left: calc(var(--px) * var(--sz) - 3px); top: calc(var(--py) * var(--sz) - 3px); width: 6px; height: 6px; border-radius: 50%;
  pointer-events: none; opacity: 0; background: #fff;
  animation: pk-up 2.8s cubic-bezier(.45, .05, .55, .95) var(--d) infinite;
}
.pk.up { box-shadow: 0 0 6px #fde68a, 0 0 14px #fbbf24; }
.pk.down { box-shadow: 0 0 6px #99f6e4, 0 0 14px #5eead4; animation-name: pk-down; animation-duration: 3.4s; }
@keyframes pk-up { 0% { transform: translateZ(0); opacity: 0; } 12%, 85% { opacity: 1; } 100% { transform: translateZ(var(--top)); opacity: 0; } }
@keyframes pk-down { 0% { transform: translateZ(var(--top)); opacity: 0; } 12%, 85% { opacity: 1; } 100% { transform: translateZ(0); opacity: 0; } }

/* floating label next to the selected slab (always faces the viewer) */
.iso-label {
  position: absolute; left: 50%; top: 50%; display: flex; align-items: center; gap: .45rem; white-space: nowrap; pointer-events: none;
  padding: .22rem; border-radius: 7px; font-size: .72rem; font-weight: 600; color: var(--text);
  background: rgba(11, 18, 32, .82); border: 1px solid rgba(var(--lc, 94, 234, 212), .7);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45), 0 0 14px rgba(var(--lc, 94, 234, 212), .35);
  transform: translateZ(calc(var(--li) * var(--gap) + 16px + var(--t) + 2px)) rotateZ(calc(-1 * var(--rz))) rotateX(calc(-1 * var(--rx))) translate(70px, -50%);
  transition: transform .55s cubic-bezier(.2, .9, .25, 1.15), border-color .4s, box-shadow .4s;
}
.iso-label::before { content: ''; position: absolute; right: 100%; top: 50%; width: 44px; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--lc, 94, 234, 212), .9)); }
.iso-label::after { content: ''; position: absolute; right: calc(100% + 42px); top: calc(50% - 3px); width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--lc, 94, 234, 212)); box-shadow: 0 0 8px rgb(var(--lc, 94, 234, 212)); }
.iso-label b { font-size: .64rem; padding: .05rem .35rem; border-radius: 4px; color: var(--bg); background: rgb(var(--lc, 94, 234, 212)); }
.iso-hint { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; text-align: center; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); opacity: .6; pointer-events: none; }

/* detail panel: text eases in when the layer changes */
.stack-panel.is-swap .sp-name, .stack-panel.is-swap .sp-detail, .stack-panel.is-swap .sp-seen, .stack-panel.is-swap .sp-link { animation: sp-in .45s cubic-bezier(.2, .8, .2, 1) both; }
.stack-panel.is-swap .sp-detail { animation-delay: .05s; } .stack-panel.is-swap .sp-seen { animation-delay: .1s; } .stack-panel.is-swap .sp-link { animation-delay: .14s; }
@keyframes sp-in { from { opacity: 0; transform: translateY(6px); } }
.stack-panel::before {
  content: ''; position: absolute; left: 0; top: 12%; bottom: 12%; width: 3px; border-radius: 0 3px 3px 0;
  background: rgb(var(--c)); box-shadow: 0 0 12px rgba(var(--c), .8); transition: background .35s, box-shadow .35s;
}

/* column 3 — compact selector */
.stack-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .15rem; }
.stack-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .3rem .65rem .3rem .7rem; border-radius: 8px; cursor: pointer; outline: none;
  border: 1px solid transparent; border-left: 3px solid rgba(var(--c), 0.3);
  transition: background .3s, border-color .3s, transform .3s;
}
.stack-item:hover { background: rgba(var(--c), 0.05); }
.si-ic { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  color: rgb(var(--c)); background: rgba(var(--c), 0.1); border: 1px solid rgba(var(--c), 0.3); transition: background .3s, color .3s; }
.si-ic svg { width: 12px; height: 12px; }
.si-name { flex: 1; min-width: 0; font-weight: 600; font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-tag { flex: none; font-size: .64rem; color: var(--dim); opacity: .7; }
.stack-item.is-active, .stack-item:focus-visible {
  background: rgba(var(--c), 0.1); border-color: rgba(var(--c), 0.35); border-left-color: rgb(var(--c));
  transform: translateX(4px);
}
.stack-item.is-active .si-ic { background: rgb(var(--c)); color: var(--bg); }
.stack-item.is-active .si-tag { color: rgb(var(--c)); opacity: 1; }

@media (prefers-reduced-motion: reduce) { .slab, .stack-item, .sp-meter span, .iso-label { transition: none; } .ring, .pk, .slab.is-active .f-top::after { animation: none; } .pk { display: none; } }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: rgba(94, 234, 212, 0.4); }
/* min(…, 100%) keeps every grid within the screen, even on the narrowest phones */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }

/* flagship launches — large stacked cards with generous vertical spacing */
.launches { display: flex; flex-direction: column; gap: 3rem; }
.launch {
  --tone: var(--accent);
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 2.5rem 3rem; align-items: start;
  padding: 3rem 3rem 3rem 3.4rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 90% at 0% 0%, color-mix(in srgb, var(--tone) 16%, transparent), transparent 70%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  box-shadow: 0 20px 50px -25px rgba(0, 0, 0, 0.7);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.launch:nth-child(even) { --tone: var(--accent-2); }
.launch:nth-child(3) { --tone: #38bdf8; }   /* Bluetooth blue (Proximity Lock & Unlock) */
.launch:nth-child(4) { --tone: #f472b6; }   /* rose (Smart Helmet) */
.launch:nth-child(5) { --tone: #a78bfa; }   /* violet (Payment System) */
.launch:nth-child(6) { --tone: #4ade80; }   /* green (Solar Grid & Inverter) */
/* coloured spine on the left edge */
.launch::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: linear-gradient(180deg, var(--tone), transparent);
}
.launch:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--tone) 45%, transparent);
  box-shadow: 0 28px 60px -25px rgba(0, 0, 0, 0.8);
}
/* large faint sequence number in the corner */
.launch-index {
  position: absolute; left: 3rem; bottom: -1.6rem;
  font-size: clamp(5rem, 12vw, 9rem); font-weight: 500; line-height: 1;
  color: var(--tone); opacity: .07; pointer-events: none;
}
.launch-top { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.launch .badge { background: var(--tone); }
.launch-product {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.01em;
  font-size: clamp(2rem, 4.5vw, 3rem); margin: 1.4rem 0 .6rem;
}
.launch-product a { color: var(--text); }
.launch-platform { color: var(--tone); margin: 0 0 1.4rem; font-size: .95rem; }
.launch-role {
  font-weight: 600; margin: 0; padding-top: 1.2rem;
  border-top: 1px dashed var(--line);
}
.launch-summary { font-size: 1.05rem; margin: 0 0 1.6rem; color: var(--text); }
.launch-points {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.6rem;
}
.launch-points li {
  position: relative; padding: .9rem 1rem .9rem 2.4rem;
  font-size: .92rem; color: var(--dim);
  background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); border-radius: 10px;
}
.launch-points li::before {
  content: '✓'; position: absolute; left: .9rem; top: .85rem;
  color: var(--tone); font-weight: 600;
}

/* about */
.about-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; align-items: start; }
.prose p { margin: 0 0 1.2rem; font-size: 1.05rem; }

.edu h3 { color: var(--accent); font-size: .85rem; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; }
.edu-item { position: relative; padding-left: 1.1rem; }
.edu-item + .edu-item { margin-top: 1.4rem; padding-top: 1.4rem; border-top: 1px dashed var(--line); }
/* small timeline dot beside each school */
.edu-item::before {
  content: ''; position: absolute; left: 0; width: 7px; height: 7px; border-radius: 50%;
  top: .55rem; background: var(--accent);
}
.edu-item + .edu-item::before { top: calc(1.4rem + .55rem); background: var(--accent-2); }
.edu-school { font-weight: 600; margin: .3rem 0 .2rem; color: var(--text); }
.edu-degree { margin: 0; font-size: .95rem; }
.edu-years { margin: .4rem 0 .3rem; font-size: .85rem; }
.edu-item p:last-child { margin-bottom: 0; }

/* expertise */
.skill-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.skill-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px;
  font-size: 1.4rem; color: var(--accent); background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.25);
}
.skill h3 { font-size: 1.1rem; }
.skill-num { margin: 0 0 .25rem; font-size: .7rem; color: var(--dim); opacity: .7; }
/* circular proficiency ring */
.skill-ring {
  --v: 90; position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: conic-gradient(var(--accent) 0, var(--accent-2) calc(var(--v) * 1%), rgba(148, 163, 184, 0.15) 0);
}
.skill-ring::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: #0f1a2e; }
.skill-ring span { position: relative; font-size: .78rem; font-weight: 500; color: var(--text); }
.skill-ring small { font-size: .6em; color: var(--dim); }
.skills-nav { display: none; }
.meter { height: 4px; border-radius: 2px; background: var(--line); margin: 1rem 0; overflow: hidden; }
.meter span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1.2s cubic-bezier(.2, .8, .2, 1);
}
.visible .meter span { width: var(--v); }
.points { margin: 0; padding-left: 1.1rem; color: var(--dim); font-size: .92rem; }
.points li { margin: .25rem 0; }
.points li::marker { color: var(--accent); }

/* experience timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.5rem; border-left: 1px solid var(--line); }
.timeline > li { position: relative; padding: 0 0 2.5rem 1.5rem; }
.timeline > li::before {
  content: ''; position: absolute; left: calc(-1.5rem - 6px); top: .45rem;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline h3 { font-size: 1.25rem; }
.company { color: var(--accent-2); margin: 0 0 .6rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.tag { font-size: .75rem; padding: .2rem .6rem; border-radius: 6px; border: 1px solid var(--line); color: var(--accent); }

/* ---------- experience: career rail + role cards ---------- */
.xp-rail {
  list-style: none; margin: 0 0 1.6rem; padding: 0; display: flex; align-items: flex-start;
  overflow-x: auto; scrollbar-width: none;
}
.xp-rail::-webkit-scrollbar { display: none; }
.xp-stop { position: relative; flex: 1 0 auto; min-width: 96px; }
.xp-stop + .xp-stop::before {            /* connector line between stops */
  content: ''; position: absolute; top: 17px; right: calc(50% + 22px); left: calc(-50% + 22px); height: 2px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.35), rgba(var(--t), 0.6));
}
.xp-stop a { display: flex; flex-direction: column; align-items: center; gap: .35rem; color: var(--text); text-align: center; }
.xp-stop a:hover { text-decoration: none; }
.xp-dot {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  font-size: .62rem; font-weight: 600; color: rgb(var(--t));
  background: rgba(var(--t), 0.12); border: 2px solid rgba(var(--t), 0.6); transition: transform .2s, box-shadow .2s;
}
.xp-stop a:hover .xp-dot { transform: scale(1.08); box-shadow: 0 0 14px rgba(var(--t), 0.5); }
.xp-stop.is-now .xp-dot { background: rgb(var(--t)); color: #fff; border-color: rgb(var(--t)); box-shadow: 0 0 0 4px rgba(var(--t), 0.18), 0 0 18px rgba(var(--t), 0.5); }
.xp-stop-name { font-size: .78rem; font-weight: 600; white-space: nowrap; }
.xp-now { font-size: .58rem; letter-spacing: .14em; color: rgb(var(--t)); padding: .05rem .4rem; border: 1px solid rgba(var(--t), 0.5); border-radius: 999px; }

.xp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.xp-card {
  position: relative; display: flex; flex-direction: column; padding: 1.5rem 1.5rem 1.3rem;
  border-top: 3px solid rgb(var(--t));
  background: linear-gradient(160deg, rgba(var(--t), 0.07), rgba(255, 255, 255, 0.02) 50%);
}
.xp-card:hover { border-color: rgba(var(--t), 0.5); border-top-color: rgb(var(--t)); }
.xp-card.is-now { grid-column: 1 / -1; box-shadow: 0 18px 40px -26px rgba(var(--t), 0.6); }
.xp-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.xp-logo {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  font-size: .78rem; font-weight: 600; letter-spacing: .04em; color: rgb(var(--t));
  background: rgba(var(--t), 0.12); border: 1px solid rgba(var(--t), 0.45);
}
.xp-card.is-now .xp-logo { background: rgb(var(--t)); color: #fff; }
.xp-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.xp-company { font-weight: 600; font-size: .95rem; }
.xp-period { font-size: .74rem; color: var(--dim); }
.xp-badge { flex: none; font-size: .68rem; padding: .25rem .6rem; border-radius: 999px; color: #fff; background: rgb(var(--t)); }
.xp-num { flex: none; font-size: .72rem; color: var(--dim); opacity: .7; }
.xp-role { font-family: var(--serif); font-weight: 400; font-size: clamp(1.25rem, 2.2vw, 1.55rem); line-height: 1.25; margin: 0 0 .5rem; }
.xp-summary { margin: 0 0 .9rem; color: var(--dim); font-size: .95rem; }
.xp-launch { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin: 0 0 1rem; font-size: .88rem; }
.xp-launch-ic { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: #fff; background: rgb(var(--t)); }
.xp-launch .mono { font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: rgb(var(--t)); }
.xp-points { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .45rem; }
.xp-card.is-now .xp-points { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.6rem; }
.xp-points li { position: relative; padding-left: 1.2rem; font-size: .88rem; color: var(--text); line-height: 1.5; text-align: left; }
.xp-points li::before { content: ''; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg); background: rgb(var(--t)); }
.xp-card .tags { margin-top: auto; }
.xp-card .tag { color: rgb(var(--t)); border-color: rgba(var(--t), 0.35); }

/* achievements */
.achievement { display: flex; gap: 1.2rem; align-items: flex-start; }
.year { color: var(--accent-2); font-size: .9rem; padding-top: .15rem; }
.achievement h3 { font-size: 1.05rem; }
.achievement p { margin: 0; }

/* achievements: impact numbers strip */
.impact {
  list-style: none; margin: 0 0 3rem; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.06), rgba(251, 191, 36, 0.04));
}
.impact li {
  display: flex; flex-direction: column; gap: .45rem; padding: 1.4rem 1.4rem 1.3rem;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0;
}
.impact-value {
  font-family: var(--serif); font-size: clamp(1.9rem, 3.2vw, 2.4rem); line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.impact-label { font-size: .85rem; color: var(--dim); line-height: 1.4; }

/* achievements: milestones & recognition — compact two-column list */
.ms {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem;
  border-top: 1px solid var(--line);
}
.ms > li { border-bottom: 1px solid var(--line); }
.ms-row {
  display: flex; align-items: flex-start; gap: .9rem; padding: 1.05rem .6rem;
  color: var(--text); border-radius: 8px; transition: background .2s;
}
a.ms-row:hover { text-decoration: none; background: rgba(94, 234, 212, 0.05); }
.ms-icon {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin-top: .05rem;
  border-radius: 8px; color: var(--accent);
  background: rgba(94, 234, 212, 0.08); border: 1px solid rgba(94, 234, 212, 0.28);
}
.ms-icon svg { width: 16px; height: 16px; }
.ms-body { display: flex; flex-direction: column; gap: .25rem; min-width: 0; flex: 1; }
.ms-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .6rem; font-weight: 600; font-size: .98rem; }
.ms-org {
  font-weight: 400; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--dim); padding: .08rem .45rem; border: 1px solid var(--line); border-radius: 4px;
}
.ms-year { font-weight: 400; font-size: .75rem; color: var(--accent-2); }
.ms-detail { font-size: .88rem; color: var(--dim); line-height: 1.5; }
.ms-arrow { flex: none; align-self: center; color: var(--dim); transition: transform .2s, color .2s; }
a.ms-row:hover .ms-arrow { color: var(--accent); transform: translateX(4px); }

/* Achievements icons: every icon tile is 30 × 30 px with a 16 px symbol (.fa-icon, .ms-icon) */

/* sub-section headings inside a section (e.g. "Flagship Achievements") */
.subhead { margin: 0 0 1.6rem; }
.subhead-title {
  position: relative; display: flex; align-items: center; gap: .8rem;
  font-family: var(--serif); font-weight: 400; letter-spacing: -.01em;
  font-size: clamp(1.5rem, 2.6vw, 1.9rem); line-height: 1.2; margin: 0 0 .45rem; color: var(--text);
}
.subhead-title::before {   /* short accent bar */
  content: ''; flex: none; width: 4px; height: 1.1em; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.subhead-text { margin: 0; padding-left: calc(4px + .8rem); color: var(--dim); font-size: .98rem; max-width: 75ch; }

/* flagship achievements — clean, professional 2×2 grid */
.fas {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem; margin-bottom: 3rem;
}
.fa {
  position: relative; display: flex; flex-direction: column;
  padding: 2rem 2rem 1.8rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  transition: border-color .2s ease;
}
/* thin accent rule along the top edge */
.fa::before {
  content: ''; position: absolute; left: 2rem; right: 2rem; top: -1px; height: 2px;
  background: var(--accent); border-radius: 0 0 2px 2px;
}
.fa:hover { border-color: rgba(94, 234, 212, 0.35); }
.fa-head { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.3rem; }
.fa-icon {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  color: var(--bg); background: var(--accent);
}
.fa-icon svg { width: 16px; height: 16px; }
.fa-meta { display: flex; flex-direction: column; gap: .15rem; min-width: 0; flex: 1; }
.fa-label { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.fa-org { font-size: .85rem; color: var(--dim); }
.fa-num { flex: none; align-self: flex-start; font-size: .8rem; color: var(--dim); opacity: .7; }
.fa-title {
  font-family: var(--serif); font-weight: 400; letter-spacing: -.01em;
  font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.15; margin: 0 0 .8rem; color: var(--text);
}
.fa-title a { color: inherit; }
.fa-title a:hover { color: var(--accent); text-decoration: none; }
.fa-ext { font-size: .55em; color: var(--accent); vertical-align: super; }
.fa-detail { margin: 0 0 1.4rem; font-size: .98rem; color: var(--dim); line-height: 1.65; }
.fa-points {
  list-style: none; margin: auto 0 0; padding: 1.2rem 0 0; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem 1.2rem;
}
.fa-points li { position: relative; padding-left: 1rem; font-size: .86rem; color: var(--text); line-height: 1.45; }
.fa-points li::before {
  content: ''; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 1px;
  background: var(--accent); transform: rotate(45deg);
}
.fa-year { color: var(--accent-2); }

/* research & patents */
.sub { color: var(--accent); font-size: .85rem; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; margin: 1.5rem 0 1rem; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.paper { border-left: 3px solid var(--accent-2); }
.paper-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.25rem, 2.2vw, 1.6rem); margin: .8rem 0 .4rem; }
.paper-title a { color: var(--text); }
.paper p { margin: .4rem 0; }
.patent h3 { font-size: 1.05rem; }
.patent p { margin: .3rem 0; }
.badge {
  display: inline-block; font-size: .72rem; padding: .15rem .55rem; border-radius: 6px;
  color: var(--bg); background: var(--accent); font-weight: 500; letter-spacing: .05em;
}
.badge-amber { background: var(--accent-2); }

/* math */
.quote {
  font-family: var(--serif); font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-style: italic;
  color: var(--dim); border-left: 3px solid var(--accent-2); margin: 0 0 2rem; padding-left: 1.2rem;
}
.equation { text-align: center; }
.eq { font-family: var(--serif); font-size: 1.35rem; margin: .3rem 0 .6rem; color: var(--text); }
.mag-card { margin: 1.2rem 0 0; text-align: center; }
.mag-card canvas { width: 100%; height: auto; }
.fig-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; margin-top: 1.2rem; }
.fig-card { margin: 0; display: flex; flex-direction: column; gap: .8rem; }
.fig-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .4rem 1rem; }
.fig-title { font-weight: 600; }
.fig-eq { color: var(--accent-2); font-size: .85rem; }
.fig-card canvas { width: 100%; height: auto; aspect-ratio: 520 / 260; display: block; }
.fig-card figcaption { line-height: 1.5; }

/* contact */
.contact-card { text-align: center; padding: 3rem 1.5rem; }
.contact-head { font-family: var(--serif); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.contact-lines { display: flex; justify-content: center; flex-wrap: wrap; gap: .8rem 1.2rem; margin: 1.6rem 0; }
.contact-line {
  display: inline-flex; align-items: center; gap: .6rem; font-size: 1.05rem; color: var(--text);
  padding: .6rem 1.1rem; border: 1px solid var(--line); border-radius: 999px; transition: border-color .2s, color .2s;
}
.contact-line:hover { text-decoration: none; border-color: rgba(94, 234, 212, 0.5); color: var(--accent); }
.contact-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: var(--accent); background: rgba(94, 234, 212, 0.1); }
.contact-ic svg { width: 14px; height: 14px; }
.links { display: flex; justify-content: center; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.5rem; }

/* ---------- contact: two columns — invitation & methods | locations ---------- */
.ct-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.6rem; align-items: stretch; }
.ct-kicker { margin: 0; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.ct-headline { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.15; margin: .4rem 0 .7rem; }
.ct-text { margin: 0; color: var(--dim); font-size: 1rem; }
.ct-tags { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; margin: 1.1rem 0 0; padding: 0; }
.ct-tags li { font-size: .78rem; padding: .32rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.ct-status { display: flex; align-items: center; gap: .5rem; margin: 1.1rem 0 1.3rem; font-size: .74rem; color: #86efac; }
.ct-methods { border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, 0.025); overflow: hidden; }
.ct-row { display: flex; align-items: center; gap: .9rem; padding: .95rem 1.1rem; transition: background .2s; }
.ct-row + .ct-row { border-top: 1px solid var(--line); }
.ct-row:hover { background: rgba(var(--c), 0.05); }
.ct-ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: rgb(var(--c)); background: rgba(var(--c), 0.12); border: 1px solid rgba(var(--c), 0.35); }
.ct-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ct-label { font-weight: 600; font-size: .95rem; }
.ct-value { font-size: .76rem; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-btns { display: flex; gap: .4rem; flex: none; }
.ct-btn {
  flex: none; display: inline-flex; align-items: center; gap: .35rem; height: 36px; padding: 0 .9rem; border-radius: 10px;
  font: 600 .8rem var(--sans); color: var(--text); background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(var(--c, 148, 163, 184), 0.4);
  cursor: pointer; -webkit-appearance: none; appearance: none; transition: background .2s, border-color .2s;
}
.ct-btn:hover { text-decoration: none; background: rgba(var(--c), 0.12); border-color: rgb(var(--c)); }
.ct-btn-solid { color: #04210f; background: rgb(var(--c)); border-color: rgb(var(--c)); }
.ct-btn-solid:hover { background: rgb(var(--c)); filter: brightness(1.08); }
.ct-copy.is-done { color: rgb(var(--c)); border-color: rgb(var(--c)); }

.ct-locations { display: flex; flex-direction: column; padding: 1.3rem; border-radius: 18px; border: 1px solid var(--line);
  background: radial-gradient(ellipse 80% 60% at 70% 0%, rgba(251, 191, 36, 0.07), transparent 70%), rgba(255, 255, 255, 0.025); }
.ct-loc-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.ct-km { font-size: .7rem; color: var(--accent-2); padding: .2rem .6rem; border: 1px solid rgba(251, 191, 36, 0.4); border-radius: 999px; }
.ct-map-art { width: 100%; height: auto; margin: .8rem 0 .4rem; border-radius: 12px; background: rgba(9, 15, 28, 0.6); border: 1px solid rgba(148, 163, 184, 0.12); }
.ct-map-art .mg { stroke: rgba(148, 163, 184, 0.1); stroke-width: 1; }
.ct-map-art .mroute { fill: none; stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round; animation: route-flow 1.6s linear infinite; }
.ct-map-art .mpin { fill: #5eead4; stroke: #0b1220; stroke-width: 2; }
.ct-map-art .mpin-cur { fill: #fbbf24; stroke: #0b1220; stroke-width: 2; }
.ct-map-art .mpulse { transform-box: fill-box; transform-origin: center; animation: map-pulse 2.4s ease-out infinite; }
.ct-map-art .mlabel { font: 600 10px var(--mono); fill: #e2e8f0; letter-spacing: .12em; }
.ct-map-art .mcoord { font: 9px var(--mono); fill: #94a3b8; }
@keyframes route-flow { to { stroke-dashoffset: -18; } }
@keyframes map-pulse { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.ct-addrs { display: flex; flex-direction: column; gap: .2rem; }
.ct-addr { display: flex; gap: .8rem; padding: .85rem .2rem; }
.ct-addr + .ct-addr { border-top: 1px solid var(--line); }
.ct-addr-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--accent); background: rgba(94, 234, 212, 0.1); border: 1px solid rgba(94, 234, 212, 0.3); }
.ct-addr.is-current .ct-addr-ic { color: #1a1204; background: var(--accent-2); border-color: var(--accent-2); }
.ct-addr-body { min-width: 0; }
.ct-addr-label { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .2rem; font-weight: 600; font-size: .92rem; }
.ct-addr-tag { font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: .12rem .5rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 400; }
.ct-addr.is-current .ct-addr-tag { color: var(--accent-2); border-color: rgba(251, 191, 36, 0.45); }
.ct-addr address { font-style: normal; color: var(--dim); font-size: .88rem; line-height: 1.5; }
.ct-map { display: inline-flex; align-items: center; gap: .3rem; margin-top: .35rem; font-size: .72rem; color: var(--accent); }
.ct-addr.is-current .ct-map { color: var(--accent-2); }
.ct-map:hover { text-decoration: none; filter: brightness(1.2); }

/* ---------- connect: full-width artistic cover band ---------- */
.connect { position: relative; overflow: hidden; margin-top: 4rem; padding: 5rem clamp(1rem, 4vw, 3rem) 4rem; isolation: isolate;
  background: linear-gradient(180deg, #0b1220 0%, #0d1830 55%, #0a1120 100%); border-top: 1px solid var(--line); }
.cn-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(226, 232, 240, 0.35) 1px, transparent 1.3px), radial-gradient(rgba(94, 234, 212, 0.25) 1px, transparent 1.3px);
  background-size: 46px 46px, 73px 73px; background-position: 0 0, 23px 31px; }
.cn-blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: blob-drift 18s ease-in-out infinite alternate; }
.cn-blob.b1 { width: 420px; height: 420px; left: -120px; top: -140px; background: #0a66c2; }
.cn-blob.b2 { width: 380px; height: 380px; right: -100px; bottom: -160px; background: #5eead4; opacity: .35; animation-duration: 22s; }
.cn-blob.b3 { width: 300px; height: 300px; left: 45%; top: 30%; background: #fbbf24; opacity: .18; animation-duration: 26s; }
@keyframes blob-drift { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(60px, 40px) scale(1.15); } }
.cn-inner { max-width: 1000px; margin: 0 auto; text-align: center; }
.cn-kicker { margin: 0; font-size: .7rem; letter-spacing: .24em; text-transform: uppercase;
  background: linear-gradient(90deg, #60a5fa, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cn-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; margin: .6rem 0 .7rem; letter-spacing: -.02em; }
.cn-lead { margin: 0 auto 2.6rem; max-width: 46ch; color: var(--dim); font-size: 1.05rem; }
.cn-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 1.4rem; text-align: left; }
.cn-card {
  --b: 148, 163, 184; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .35rem;
  padding: 2rem 1.8rem 1.7rem; border-radius: 22px; color: var(--text);
  background: linear-gradient(150deg, rgba(var(--b), 0.22), rgba(255, 255, 255, 0.03) 55%), rgba(11, 18, 32, 0.6);
  border: 1px solid rgba(var(--b), 0.45); box-shadow: 0 30px 60px -35px rgba(var(--b), 0.8);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s, border-color .35s;
}
.cn-card:hover { text-decoration: none; transform: translateY(-6px); border-color: rgba(var(--b), 0.85); box-shadow: 0 40px 70px -30px rgba(var(--b), 0.9); }
.cn-li { --b: 10, 102, 194; }
.cn-gh { --b: 203, 213, 225; }
.cn-mark { position: absolute; right: -50px; bottom: -60px; color: rgb(var(--b)); opacity: .09; transform: rotate(-12deg); transition: transform .5s, opacity .5s; pointer-events: none; }
.cn-card:hover .cn-mark { transform: rotate(-4deg) scale(1.05); opacity: .14; }
.cn-ic { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; margin-bottom: .8rem; color: #fff; background: rgb(var(--b)); box-shadow: 0 14px 30px -12px rgba(var(--b), 0.9); }
.cn-gh .cn-ic { color: #0b1220; }
.cn-name { font-family: var(--serif); font-size: 1.8rem; line-height: 1.1; }
.cn-handle { font-size: .78rem; color: var(--dim); word-break: break-all; }
.cn-desc { margin-top: .4rem; color: var(--text); opacity: .85; font-size: .95rem; }
.cn-cta { display: inline-flex; align-items: center; gap: .4rem; align-self: flex-start; margin-top: 1.2rem; padding: .55rem 1rem; border-radius: 999px;
  font-weight: 600; font-size: .85rem; color: #fff; background: rgba(var(--b), 0.9); }
.cn-gh .cn-cta { color: #0b1220; }
@media (prefers-reduced-motion: reduce) { .cn-blob, .ct-map-art .mroute, .ct-map-art .mpulse { animation: none; } }

/* footer — joins the Connect band seamlessly */
.footer {
  margin: 4rem 0 0; padding: 1.4rem clamp(1rem, 4vw, 3rem) calc(env(safe-area-inset-bottom, 0px) + 1.4rem);
  border-top: 1px solid var(--line); font-size: .8rem; color: var(--dim); background: #0a1120;
}
.connect + .footer { margin-top: 0; border-top: 1px solid rgba(148, 163, 184, 0.12); }
.ft-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.6rem; flex-wrap: wrap; }
.ft-brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--dim); }
.ft-brand:hover { text-decoration: none; color: var(--text); }
.ft-brand .brand-mark { width: 30px; height: 30px; font-size: .75rem; border-radius: 8px; }
.ft-copy { font-size: .76rem; }
.ft-links { display: flex; gap: 1.3rem; font-size: .74rem; }
.ft-links a { color: var(--dim); }
.ft-links a:hover { color: var(--accent); text-decoration: none; }
.ft-top {
  display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 999px; font-size: .74rem;
  color: var(--text); border: 1px solid rgba(148, 163, 184, 0.25); background: rgba(255, 255, 255, 0.03); transition: border-color .2s, color .2s;
}
.ft-top:hover { text-decoration: none; color: var(--accent); border-color: rgba(94, 234, 212, 0.5); }

/* footer visitor counter — glass pill, live ping, odometer digits */
.ft-visits {
  position: relative; display: inline-flex; align-items: center; gap: .7rem; padding: .42rem 1rem .42rem .5rem; border-radius: 999px; overflow: hidden;
  color: var(--dim); isolation: isolate; cursor: default;
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.09), rgba(56, 189, 248, 0.04) 55%, rgba(251, 191, 36, 0.07));
  border: 1px solid rgba(94, 234, 212, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 12px 32px -20px rgba(94, 234, 212, 0.7);
  animation: fvIn .7s cubic-bezier(.16, 1, .3, 1) both;
}
.ft-visits[hidden] { display: none; }
.ft-visits::after {   /* slow light sweep across the glass */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.09) 50%, transparent 65%);
  transform: translateX(-120%); animation: fvSweep 7s ease-in-out 1.5s infinite;
}
.fv-orb { position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.28), rgba(94, 234, 212, 0) 70%); }
.fv-orb i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #5eead4; box-shadow: 0 0 10px #5eead4, 0 0 2px #fff inset; }
.fv-orb i::before, .fv-orb i::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid #5eead4; animation: fvPing 2.6s ease-out infinite; }
.fv-orb i::after { animation-delay: 1.3s; }
.fv-main { display: inline-flex; align-items: baseline; gap: .45rem; }
.fv-num { display: inline-flex; font-family: 'Fraunces', Georgia, serif; font-size: 1.32rem; line-height: 1.1; height: 1.1em; color: #f1f5f9;
  text-shadow: 0 0 18px rgba(94, 234, 212, 0.45); font-variant-numeric: tabular-nums; }
.fv-d { display: inline-block; height: 1.1em; overflow: hidden; width: .64em; text-align: center;
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
.fv-reel { display: block; transition: transform 1.9s cubic-bezier(.16, 1, .3, 1); will-change: transform; }
.fv-reel span { display: block; height: 1.1em; }
.fv-c { display: inline-block; width: .28em; text-align: center; opacity: .7; }
.fv-label { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: #5eead4; }
.fv-sep { flex: none; width: 1px; height: 20px; background: linear-gradient(transparent, rgba(148, 163, 184, 0.45), transparent); }
.fv-sub { font-size: .7rem; white-space: nowrap; }
.fv-sub b { font-weight: 500; color: var(--text); }
@keyframes fvPing { from { transform: scale(1); opacity: .9; } to { transform: scale(3.4); opacity: 0; } }
@keyframes fvSweep { 0% { transform: translateX(-120%); } 35%, 100% { transform: translateX(120%); } }
@keyframes fvIn { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }
@media (max-width: 380px) { .ft-visits { gap: .5rem; padding-right: .8rem; } .fv-num { font-size: 1.15rem; } .fv-sub { font-size: .64rem; } }
@media (prefers-reduced-motion: reduce) {
  .ft-visits, .ft-visits::after, .fv-orb i::before, .fv-orb i::after { animation: none; }
  .fv-reel { transition: none; }
}

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

.email, .points li, .prose p { overflow-wrap: anywhere; }

/* full (justified) text alignment for paragraphs and descriptions */
.prose p, .lead, .card p,
.launch-summary, .fa-detail, .timeline li, .contact-card p {
  text-align: justify; text-justify: inter-word;
  hyphens: auto; -webkit-hyphens: auto;
}
/* headings inside justified blocks stay left-aligned */
.timeline h3, .timeline .company, .timeline .mono { text-align: left; hyphens: manual; }
/* short checklist items stay left-aligned: justifying 1–2 line labels leaves large gaps between words */
.launch-points li, .fa-points li, .points li, .card li, .edu .edu-degree, .edu .edu-school { text-align: left; hyphens: manual; }
/* keep short labels, numbers and centred blocks as they were */
.equation p, .contact-card p, .launch-top, .edu .mono, .card .mono, .timeline .mono { text-align: inherit; }
.contact-card p { text-align: center; }
.equation p { text-align: center; }

/* ---------- responsive: laptop → tablet → phone ---------- */

/* small laptops / tablets in landscape: collapse menu into a hamburger */
@media (max-width: 1100px) {
  .nav-toggle { display: flex; }
  .nav-links { display: none; }
}

/* tablets (portrait) */
@media (max-width: 900px) {
  .role { white-space: normal; font-size: .8rem; padding: .4rem .75rem .4rem .65rem; }
  .role-org { font-size: .72rem; }
  .stack-grid { grid-template-columns: minmax(0, 1fr) 190px; gap: 1rem 1.2rem; }
  .stack-list { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
  .stack-item { border: 1px solid var(--line); border-left: 3px solid rgba(var(--c), 0.35); }
  .stack-item.is-active { transform: none; }
  .iso { height: 230px; }
  .iso-scene { --scale: .85; }
  .fas { grid-template-columns: 1fr; }
  .ct-grid { grid-template-columns: 1fr; }
  .xp-grid { grid-template-columns: 1fr; }
  .xp-card.is-now .xp-points { grid-template-columns: 1fr; }
  .fig-grid { grid-template-columns: 1fr; }
  .ms { grid-template-columns: 1fr; }
  .launch { grid-template-columns: 1fr; gap: 1.6rem; padding: 2.4rem 2rem 2.4rem 2.4rem; }
  .launch-index { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; gap: 1.5rem; padding-top: 2rem; }
  .hero-viz { order: 2; }
  .hero-viz canvas { max-width: 300px; }
  .about-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 3.5rem 0 1rem; }
}

/* phones */
@media (max-width: 560px) {
  body { font-size: 15px; }
  .hero-viz canvas { max-width: 230px; }
  .hero-viz figcaption { gap: .8rem; font-size: .78rem; flex-wrap: wrap; }
  .hero-actions .btn { flex: 1 1 auto; text-align: center; }
  .hero-lockup .hero-actions { flex-wrap: wrap; }
  .hero-lockup .hero-actions .btn { flex: 1 1 auto; }
  .role { white-space: normal; font-size: .82rem; }
  .hero-id { gap: 1rem; align-items: flex-start; }
  .avatar { align-self: flex-start; width: 96px; height: auto; border-radius: 11px; padding: 2px; }   /* phones: fixed size, passport ratio */
  .avatar img, .avatar::after { border-radius: 9px; }
  .avatar::after { inset: 2px; }
  .stats { gap: 1.2rem .8rem; }
  .stats strong { font-size: 1.5rem; }
  .card { padding: 1.2rem; }
  .launch { padding: 1.8rem 1.3rem 1.8rem 1.6rem; }
  .launches { gap: 2rem; }
  .launch-points { grid-template-columns: 1fr; gap: .7rem; }
  .achievement { flex-direction: column; gap: .3rem; }
  .impact { grid-template-columns: repeat(2, 1fr); }
  .impact li { padding: 1.3rem 1rem; }
  .impact li:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* no empty cell when the count is odd */
  .fa { padding: 1.6rem 1.3rem 1.4rem; }
  .stack-band { padding: 1.2rem .9rem; }
  .stack-grid { grid-template-columns: minmax(0, 1fr) 112px; gap: .8rem; }
  .iso { height: 170px; }
  .iso-scene { --scale: .62; }
  .iso-hint { display: none; }
  .stack-lead { display: none; }
  .stack-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .si-name { font-size: .76rem; white-space: normal; line-height: 1.2; }
  .si-tag { display: none; }
  .stack-item { padding: .35rem .5rem .35rem .55rem; gap: .45rem; }
  .fa::before { left: 1.3rem; right: 1.3rem; }
  .fa-points { grid-template-columns: 1fr; }
  .timeline { padding-left: 1rem; }
  .timeline > li { padding-left: 1rem; }
  .timeline > li::before { left: calc(-1rem - 6px); }
  .section-title { gap: .6rem; }
  .brand .mono { font-size: .8rem; }
  .footer { flex-direction: column; }
}

/* ================= phones: compact, aligned layout (iPhone SE → Pro Max) ================= */
@media (max-width: 560px) {
  .section { padding: 2.4rem 0 .4rem; }
  .section-title { font-size: 1.7rem; margin-bottom: 1.2rem; padding-bottom: .6rem; }
  .lead { font-size: .95rem; margin-bottom: 1.2rem; }

  /* hero */
  .hero { padding-top: 1.2rem; gap: 1rem; }
  .hero-viz canvas { max-width: 210px; }
  .viz-note { font-size: .64rem; }
  .hero-id { gap: .8rem; margin-bottom: 1.1rem; align-items: flex-start; }
  .avatar { width: 84px; }
  .hero-id .roles { flex: 1 1 0; min-width: 0; align-content: flex-start; gap: .35rem; }
  .role {
    display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .5rem; align-items: center;
    width: 100%; padding: .38rem .65rem; border-radius: 12px; font-size: .78rem; white-space: normal;
  }
  .role-dot { grid-row: span 2; }
  .role-name { line-height: 1.25; }
  .role-org { grid-column: 2; padding-left: 0; border-left: 0; font-size: .64rem; line-height: 1.3; }
  .hero h1 { font-size: 2.45rem; }
  .hero-lockup .tagline { text-align: left; font-size: 1rem; }
  .hero-actions { margin: 1.3rem 0; }
  .hero-actions .btn { padding: .6rem .9rem; font-size: .9rem; }
  .stats { gap: .9rem .7rem; }
  .stats li { padding-left: .6rem; }
  .stats strong { font-size: 1.4rem; }
  .stats span { font-size: .72rem; line-height: 1.35; display: block; }

  /* about: first two paragraphs, then "Read more" */
  .prose p { font-size: .95rem; margin-bottom: .9rem; }
  .prose.is-clamped p:nth-of-type(n+3) { display: none; }
  .more-btn {
    display: inline-flex; justify-self: start; width: auto; align-items: center; gap: .35rem; margin: -.2rem 0 1rem; padding: .4rem .85rem;
    font: 500 .75rem var(--mono); color: var(--accent); background: rgba(94, 234, 212, 0.08);
    border: 1px solid rgba(94, 234, 212, 0.35); border-radius: 999px; cursor: pointer;
  }

  /* flagship launches */
  .launches { gap: 1.2rem; }
  .launch { padding: 1.3rem 1.05rem 1.2rem 1.25rem; gap: .9rem; }
  .launch-product { font-size: 1.55rem; margin: .7rem 0 .25rem; }
  .launch-platform { font-size: .8rem; margin-bottom: .7rem; }
  .launch-role { font-size: .86rem; padding-top: .7rem; }
  .launch-summary { font-size: .9rem; margin-bottom: .8rem; }
  .launch-points { gap: .3rem; }
  .launch-points li { padding: .05rem 0 .05rem 1.35rem; background: none; border: 0; font-size: .82rem; }
  .launch-points li::before { left: 0; top: .05rem; }


  /* experience */
  .timeline > li { padding-bottom: 1.6rem; }
  .timeline h3 { font-size: 1.05rem; }
  .timeline .points { font-size: .86rem; }

  /* achievements */
  .impact li { padding: 1rem .9rem; }
  .impact-value { font-size: 1.7rem; }
  .fas { gap: 1rem; }
  .fa { padding: 1.3rem 1.05rem 1.1rem; }
  .fa-title { font-size: 1.4rem; }
  .fa-detail { font-size: .88rem; margin-bottom: 1rem; }
  .fa-points { padding-top: .9rem; gap: .4rem; }
  .subhead-title { font-size: 1.35rem; }
  .subhead-text { font-size: .86rem; }
  .ms-row { padding: .8rem .3rem; }

  /* research */
  .paper-title { font-size: 1.2rem; }

  /* mathematics: equations two per row */
  .quote { font-size: 1.05rem; margin-bottom: 1.2rem; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .equation { padding: .8rem .5rem; }
  .eq { font-size: .92rem; margin: .1rem 0 .35rem; }
  .equation .small { font-size: .62rem; }
  .mag-card, .fig-card { padding: .9rem; }
  .fig-card figcaption, .mag-card figcaption { font-size: .66rem; }
  .fig-head { flex-direction: column; gap: .2rem; }

  /* contact */
  .contact-card { padding: 2rem 1rem; }
  .contact-line { font-size: .92rem; }
}

/* ================= phones: centred "profile card" hero ================= */
@media (max-width: 560px) {
  .hero-text { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .hero-id, .hero-lockup { display: contents; }               /* let photo, name, badges… be ordered freely */

  /* 1 — photo */
  .avatar { order: 1; align-self: center; width: 118px; max-height: none; margin: .3rem auto 1.1rem; }

  /* 2 — name, with a short accent line */
  .hero-lockup h1 { order: 2; margin: 0; font-size: 2.4rem; line-height: 1.1; text-align: center; }
  .hero-lockup h1::after {
    content: ''; display: block; width: 64px; height: 3px; margin: .7rem auto 0; border-radius: 2px;
    background: linear-gradient(90deg, #ef4444, var(--accent-2), var(--accent));
  }

  /* 3 — role badges in a 2×2 grid */
  .hero-id .roles {
    order: 3; width: 100%; margin: 1.1rem 0 1rem;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem;
  }
  .role { text-align: left; padding: .55rem .65rem; border-radius: 12px; font-size: .76rem; align-items: start; align-content: center; row-gap: .15rem; }
  .role-dot { margin-top: .3rem; }
  .role-org { font-size: .62rem; margin-top: .1rem; }

  /* 4 — tagline */
  .hero-lockup .tagline { order: 4; width: 100%; min-width: 0; max-width: 32ch; margin: 0 auto; text-align: center; text-align-last: center; font-size: .98rem; }

  /* 5 — buttons */
  .hero-lockup .hero-actions { order: 5; width: 100%; min-width: 0; margin: 1.2rem 0 1.3rem; justify-content: center; }

  /* 6 — stats */
  .stats { order: 6; width: 100%; text-align: left; }
}

/* ================= phones: Expertise as a swipeable carousel ================= */
@media (max-width: 560px) {
  #expertise .lead { margin-bottom: .9rem; }
  .skills-nav { display: flex; align-items: center; gap: .6rem; margin: 0 0 .8rem; }
  .sn-btn {
    flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    font-size: 1.25rem; line-height: 1; color: var(--accent); background: rgba(94, 234, 212, 0.08);
    border: 1px solid rgba(94, 234, 212, 0.35); cursor: pointer;
  }
  .sn-btn:disabled { opacity: .3; }
  .sn-count { flex: none; font-size: .78rem; color: var(--dim); }
  .sn-count b { color: var(--accent); font-weight: 500; }
  .sn-dots { flex: 1; display: flex; justify-content: center; gap: 5px; }
  .sn-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(148, 163, 184, 0.35); transition: width .3s, background .3s; cursor: pointer; }
  .sn-dots i.on { width: 18px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

  .carousel-track {
    display: flex; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    margin: 0 -16px; padding: .2rem 16px .9rem; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .carousel-track::-webkit-scrollbar { display: none; }
  .carousel-track > .card {
    flex: 0 0 84%; scroll-snap-align: center; opacity: 1; transform: none;
    padding: 1.2rem 1.15rem 1.1rem; border-radius: 16px;
    background: linear-gradient(160deg, rgba(94, 234, 212, 0.07), rgba(255, 255, 255, 0.02) 55%);
    transition: transform .35s, border-color .35s, box-shadow .35s;
  }
  .carousel-track > .card.is-current { border-color: rgba(94, 234, 212, 0.5); box-shadow: 0 14px 34px -18px rgba(94, 234, 212, 0.55); }
  .carousel-track > .card:not(.is-current) { transform: scale(.96); }
  .skill-icon { width: 40px; height: 40px; font-size: 1.2rem; }
  .skill-ring { width: 44px; height: 44px; }
  .skill h3 { font-size: 1.08rem; }
  .skill > p.dim { font-size: .86rem; margin: 0; }
  .skill .meter { margin: .85rem 0; }
  .skill .points { font-size: .84rem; }
}

/* ================= phones: Experience carousel tweaks ================= */
@media (max-width: 560px) {
  .xp-rail { margin: 0 -16px 1rem; padding: 0 16px .2rem; }
  .xp-stop { min-width: 82px; }
  .carousel-track > .xp-card { padding: 1.2rem 1.1rem 1.05rem; border-top: 3px solid rgb(var(--t)); background: linear-gradient(160deg, rgba(var(--t), 0.08), rgba(255, 255, 255, 0.02) 55%); }
  .carousel-track > .xp-card.is-current { border-color: rgba(var(--t), 0.5); border-top-color: rgb(var(--t)); box-shadow: 0 14px 34px -18px rgba(var(--t), 0.6); }
  .xp-logo { width: 40px; height: 40px; font-size: .7rem; }
  .xp-head { gap: .65rem; margin-bottom: .8rem; }
  .xp-card.is-now .xp-head { padding-right: 4.2rem; }
  .xp-badge { position: absolute; top: .85rem; right: .85rem; font-size: .58rem; padding: .16rem .45rem; }
  .xp-num { position: absolute; top: .9rem; right: .95rem; }
  .xp-company { font-size: .86rem; line-height: 1.3; }
  .xp-period { font-size: .66rem; }
  .xp-launch { font-size: .82rem; gap: .35rem; margin-bottom: .8rem; }
  .xp-role { font-size: 1.15rem; }
  .xp-summary { font-size: .86rem; }
  .xp-points li { font-size: .82rem; }
}

/* phones: gold badge uses the same corner rounding as the other badges */
@media (max-width: 560px) {
  .role.is-gold { border-radius: 12px; }
}

/* ================= phones: contact & connect ================= */
@media (max-width: 560px) {
  .ct-headline { font-size: 1.6rem; }
  .ct-row { padding: .8rem .85rem; gap: .7rem; flex-wrap: wrap; }
  .ct-ic { width: 38px; height: 38px; }
  .ct-btns, .ct-row > .ct-btn { margin-left: calc(38px + .7rem); }
  .ct-row > .ct-body { flex-basis: calc(100% - 38px - .7rem); }
  .ct-locations { padding: 1rem; }
  .connect { margin-top: 2.6rem; padding: 3.2rem 16px 3.4rem; }
  .cn-lead { font-size: .95rem; margin-bottom: 1.8rem; }
  .cn-card { padding: 1.5rem 1.3rem 1.3rem; }
  .cn-name { font-size: 1.5rem; }
  .connect { padding-bottom: 2.6rem; }
  .ft-inner { flex-direction: column; text-align: center; gap: .9rem; }
  .ft-links { gap: 1rem; flex-wrap: wrap; justify-content: center; }
}

/* very narrow phones (iPhone SE 1st gen, small Androids): tighter menu profile card */
@media (max-width: 360px) {
  .mmenu-head { gap: .55rem; }
  .mm-profile { gap: .65rem; padding: .6rem .65rem; }
  .mm-photo { width: 44px; }
  .mm-who { font-size: 1.05rem; }
  .mm-role { font-size: .7rem; }
  .mm-org { font-size: .6rem; }
  .mmenu-close { width: 40px; height: 40px; }
}


/* ==========================================================
   Classes for Kids — stamp button that opens a compact booking drawer
   ========================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.teach { position: relative; padding: 1.4rem 0 .4rem; }

/* compact bar */
.tc-bar { display: flex; align-items: center; gap: 1.4rem; }
.tc-bar-text { min-width: 0; }
.tc-kicker { color: var(--accent); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 .25rem; }
.tc-bar-title { margin: 0 0 .6rem; font-size: clamp(.98rem, 1.6vw, 1.12rem); color: var(--dim); max-width: 60ch; }
.tc-bar-title strong { font-family: var(--serif); font-weight: 600; font-size: 1.25em; color: var(--text); }
.tc-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.tc-mini-btn {
  --c: 94, 234, 212;
  display: inline-flex; align-items: center; gap: .4rem; padding: .32rem .75rem; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: .82rem; color: var(--text); background: rgba(var(--c), .08); border: 1px solid rgba(var(--c), .3);
  transition: background .2s, transform .15s, border-color .2s;
}
.tc-mini-btn svg { color: rgb(var(--c)); }
.tc-mini-btn:hover { background: rgba(var(--c), .18); border-color: rgba(var(--c), .7); transform: translateY(-1px); }
.tc-mini-btn:focus-visible { outline: 2px solid rgb(var(--c)); outline-offset: 2px; }

/* ---- the seal: poured red wax, lit as a real 3D surface (see filters in teach.ejs) ---- */
.tc-stamp {
  --sz: 148px; --ink: #d42232;
  position: relative; flex: none; width: var(--sz); height: var(--sz); padding: 0; border: 0; border-radius: 50%;
  cursor: pointer; background: none; -webkit-tap-highlight-color: transparent; margin-bottom: calc(var(--sz) * .06);
  transform: rotate(-6deg); transition: transform .35s cubic-bezier(.2, .8, .2, 1), filter .3s;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)) drop-shadow(0 0 14px rgba(212, 34, 50, .25));
}
.tc-stamp:hover { transform: rotate(-2deg) scale(1.04); filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .55)) drop-shadow(0 0 22px rgba(212, 34, 50, .45)); }
.tc-stamp:focus-visible { outline: 2px solid #ff6b6f; outline-offset: 6px; }
.tc-stamp-glow {
  position: absolute; inset: -12%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(253, 224, 71, .28) 40%, rgba(251, 191, 36, .14) 58%, rgba(251, 191, 36, 0) 70%);
  animation: tc-breathe 3s ease-in-out infinite;
}
/* golden glow: starts as a point at the centre, spreads over the wax and past the edge, then shrinks back */
.tc-aura {
  position: absolute; inset: 0; z-index: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle closest-side,
    rgba(255, 247, 204, .32) 0%, rgba(253, 224, 71, .1) 40%, rgba(253, 224, 71, .06) 60%,
    rgba(253, 224, 71, .7) 80%, rgba(251, 191, 36, .4) 90%, rgba(251, 191, 36, 0) 100%);
  mix-blend-mode: screen;
  filter: blur(2px) drop-shadow(0 0 10px rgba(251, 191, 36, .8));
  transform: scale(.04); opacity: .2;
  animation: tc-aura-grow 3.4s ease-in-out infinite;
}
@keyframes tc-aura-grow {
  0%   { transform: scale(.04); opacity: .25; }
  15%  { opacity: .95; }
  50%  { transform: scale(1.38); opacity: .9; }   /* beyond the edge of the badge */
  85%  { opacity: .95; }
  100% { transform: scale(.04); opacity: .25; }
}
/* sparkles popping on the edge */
.tc-edge-spark {
  position: absolute; left: 50%; top: 50%; z-index: 3; width: var(--s); height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); pointer-events: none;
  background: radial-gradient(circle, #fff 0 25%, #fde68a 45%, #fbbf24 70%);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  filter: drop-shadow(0 0 3px #fde047) drop-shadow(0 0 6px #f59e0b);
  transform: rotate(var(--a)) translateX(calc(var(--sz) * var(--r))) rotate(calc(-1 * var(--a))) scale(0);
  animation: tc-edge-tw 2.6s ease-in-out var(--dl) infinite;
}
@keyframes tc-edge-tw {
  0%, 100% { opacity: 0; transform: rotate(var(--a)) translateX(calc(var(--sz) * var(--r))) rotate(calc(-1 * var(--a))) scale(0) rotate(0); }
  45% { opacity: 1; transform: rotate(var(--a)) translateX(calc(var(--sz) * var(--r))) rotate(calc(-1 * var(--a))) scale(1.25) rotate(45deg); }
  70% { opacity: .6; transform: rotate(var(--a)) translateX(calc(var(--sz) * (var(--r) + .03))) rotate(calc(-1 * var(--a))) scale(.6) rotate(90deg); }
}
@keyframes tc-breathe { 50% { transform: scale(1.08); opacity: .5; } }
.tc-seal { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tc-relief-text { font-family: var(--sans); font-size: 11.5px; font-weight: 700; letter-spacing: .6px; }
.tc-relief-band { font-family: var(--sans); font-size: 10.5px; font-weight: 700; letter-spacing: 2.6px; }
/* the PRESS / CLOSE button inside the seal — darker wax, raised, pulses to invite a tap */
.tc-press {
  position: absolute; left: 50%; top: 57%; z-index: 2; transform: translateX(-50%);
  display: inline-flex; align-items: center; justify-content: center; gap: .25em;
  width: 32%; height: 10%; min-height: 12px; border-radius: 999px;
  font-size: calc(var(--sz) * .058); font-weight: 600; letter-spacing: .12em; color: #ffe1e1; white-space: nowrap;
  background: linear-gradient(180deg, #8a0d19 0%, #5c0610 55%, #4a040c 100%);
  border: 1px solid rgba(255, 150, 150, .45);
  box-shadow: inset 0 1px 0 rgba(255, 200, 200, .45), inset 0 -2px 3px rgba(0, 0, 0, .45), 0 2px 4px rgba(40, 0, 6, .6), 0 0 0 0 rgba(255, 120, 130, .55);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .6);
  transition: transform .12s, box-shadow .2s, background .2s, color .2s;
  animation: tc-press-pulse 2.2s ease-out infinite;
}
.tc-press svg { width: 1.35em; height: 1.35em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@keyframes tc-press-pulse {
  0% { box-shadow: inset 0 1px 0 rgba(255, 200, 200, .45), inset 0 -2px 3px rgba(0, 0, 0, .45), 0 2px 4px rgba(40, 0, 6, .6), 0 0 0 0 rgba(255, 120, 130, .6); }
  70%, 100% { box-shadow: inset 0 1px 0 rgba(255, 200, 200, .45), inset 0 -2px 3px rgba(0, 0, 0, .45), 0 2px 4px rgba(40, 0, 6, .6), 0 0 0 7px rgba(255, 120, 130, 0); }
}
.tc-stamp:hover .tc-press { background: linear-gradient(180deg, #a3121f 0%, #6e0814 55%, #55050e 100%); color: #fff; }
/* pressed: the button sinks into the wax */
.tc-stamp:active .tc-press {
  transform: translateX(-50%) translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .65), inset 0 -1px 0 rgba(255, 180, 180, .25);
  animation: none;
}
.tc-open-txt { display: inline-flex; align-items: center; gap: .3em; }
.tc-close-txt { display: none; }
.teach.is-open .tc-open-txt { display: none; }
.teach.is-open .tc-close-txt { display: inline; }
/* open: the button stays visibly "on" — darker, pushed in, no pulse */
.teach.is-open .tc-press {
  animation: none; color: #fff; background: linear-gradient(180deg, #4a040c, #6e0814);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .6), inset 0 -1px 0 rgba(255, 180, 180, .3), 0 0 0 1px rgba(255, 150, 150, .35);
}
@media (prefers-reduced-motion: reduce) { .tc-press, .tc-aura, .tc-edge-spark { animation: none; } .tc-edge-spark { display: none; } }
.teach.is-open .tc-stamp { transform: rotate(0deg); }

/* press = rubber-stamp thump + ink ripple */
.tc-stamp.is-press { animation: tc-thump .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes tc-thump { 30% { transform: scale(.86, .8) rotate(-8deg); } 60% { transform: scale(1.06, 1.02); } }
.tc-stamp::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  border: 3px solid var(--ink, #e5484d); opacity: 0;
}
.tc-stamp.is-press::after { animation: tc-ink .9s ease-out; }
@keyframes tc-ink { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.9); } }


/* sparkle burst (particles are created by JS) */
.tc-burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 3; }
.tc-spark {
  position: absolute; left: 0; top: 0; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  background: var(--col); border-radius: 50%; box-shadow: 0 0 8px var(--col);
  animation: tc-fly var(--d) cubic-bezier(.15, .7, .3, 1) forwards;
}
.tc-spark.is-star { border-radius: 0; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
@keyframes tc-fly {
  0% { transform: translate(0, 0) scale(.4) rotate(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) scale(1) rotate(var(--r)); opacity: 0; }
}

/* ---- drawer: grows open, content revealed by a circle wiping out from the stamp ---- */
.tc-drawer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .7s cubic-bezier(.2, .8, .2, 1); }
.tc-drawer.is-open { grid-template-rows: 1fr; }
.tc-drawer-clip { min-height: 0; overflow: hidden; container-type: inline-size; padding: 0 2px 2px; }
.tc-drawer-inner {
  margin-top: 1.1rem; padding: 1.1rem; border-radius: 20px; border: 1px solid rgba(251, 191, 36, .28);
  background: linear-gradient(160deg, rgba(251, 191, 36, .06), rgba(94, 234, 212, .03) 50%, transparent), var(--bg-2);
  clip-path: circle(0 at var(--ox, 50%) var(--oy, 0)); opacity: .3;
  transition: clip-path .9s cubic-bezier(.3, .7, .2, 1), opacity .5s;
}
.tc-drawer.is-open .tc-drawer-inner { clip-path: circle(250% at var(--ox, 50%) var(--oy, 0)); opacity: 1; }

/* tabs */
.tc-tabs { display: flex; gap: .45rem; margin-bottom: .9rem; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.tc-tabs::-webkit-scrollbar { display: none; }
.tc-tab {
  --c: 94, 234, 212;
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .55rem .9rem;
  border-radius: 999px; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 500; color: var(--dim); white-space: nowrap;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line); transition: all .2s;
}
.tc-tab-ic { display: grid; place-items: center; color: rgb(var(--c)); transition: transform .3s; }
.tc-tab:hover { color: var(--text); border-color: rgba(var(--c), .6); }
.tc-tab:focus-visible { outline: 2px solid rgb(var(--c)); outline-offset: 2px; }
.tc-tab[aria-selected="true"] { color: var(--bg); background: rgb(var(--c)); border-color: rgb(var(--c)); box-shadow: 0 6px 20px -8px rgba(var(--c), .9); }
.tc-tab[aria-selected="true"] .tc-tab-ic { color: var(--bg); transform: rotate(-12deg) scale(1.1); }

.tc-body { display: grid; grid-template-columns: 1fr 1.05fr; gap: 1rem; align-items: start; }
.tc-panels { min-width: 0; }
.tc-panel {
  --c: 94, 234, 212;
  position: relative; overflow: hidden; padding: 1.2rem; border-radius: 16px;
  background: radial-gradient(ellipse at 100% 0, rgba(var(--c), .16), transparent 60%), rgba(255, 255, 255, .02);
  border: 1px solid rgba(var(--c), .3); animation: tc-in .4s ease;
}
@keyframes tc-in { from { opacity: 0; transform: translateY(6px); } }
.tc-panel-art { position: absolute; right: -16px; top: -16px; color: rgba(var(--c), .13); animation: tc-spin 40s linear infinite; pointer-events: none; }
@keyframes tc-spin { to { transform: rotate(360deg); } }
.tc-panel-tag { position: relative; color: rgb(var(--c)); font-size: .74rem; margin: 0 0 .4rem; }
.tc-panel-title { position: relative; font-family: var(--serif); font-weight: 400; font-size: clamp(1.15rem, 2vw, 1.4rem); margin-bottom: .45rem; max-width: 24ch; }
.tc-panel-text { position: relative; color: var(--dim); font-size: .93rem; margin: 0 0 .9rem; }
.tc-topics { position: relative; list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tc-topics li { font-size: .8rem; padding: .28rem .65rem; border-radius: 999px; background: rgba(var(--c), .08); border: 1px solid rgba(var(--c), .22); }

/* booking form */
.tc-book, .tc-done { padding: 1.1rem; border-radius: 16px; background: rgba(11, 18, 32, .6); border: 1px solid var(--line); }
.tc-book-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .75rem; }
.tc-book-title { font-size: 1.05rem; margin: 0; }
.tc-book-subj { font-size: .72rem; padding: .2rem .6rem; border-radius: 999px; color: var(--accent); border: 1px solid rgba(94, 234, 212, .35); white-space: nowrap; }
.tc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.tc-wide { grid-column: 1 / -1; }
.tc-field { display: grid; gap: .25rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.tc-field > span, .tc-field legend { font-size: .74rem; color: var(--dim); padding: 0; margin-bottom: .25rem; }
.tc-field em { font-style: normal; opacity: .7; }
.tc-field input, .tc-field select {
  width: 100%; min-width: 0; height: 40px; font: inherit; font-size: 16px; font-weight: 400; color: var(--text); color-scheme: dark;
  padding: 0 .7rem; border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s;
}
.tc-field select option { background: var(--bg-2); }
.tc-field input:focus, .tc-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(94, 234, 212, .15); }
.tc-field.is-bad input, .tc-field.is-bad select, .tc-slots.is-bad .tc-slot span { border-color: #f87171; }
.tc-slot-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.tc-slot { position: relative; cursor: pointer; flex: 1 0 auto; }
.tc-slot input { position: absolute; opacity: 0; pointer-events: none; }
.tc-slot span { display: block; text-align: center; font-size: .78rem; padding: .45rem .55rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); transition: all .15s; }
.tc-slot:hover span { border-color: rgba(94, 234, 212, .5); }
.tc-slot input:checked + span { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 500; }
.tc-slot input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tc-slot input:disabled + span { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.tc-slot-hint { font-size: .7rem; color: var(--accent-2); }

.tc-bill { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; margin: .85rem 0 .7rem; padding: .65rem .85rem; border-radius: 12px; border: 1px dashed rgba(251, 191, 36, .45); background: rgba(251, 191, 36, .05); font-size: .88rem; color: var(--dim); }
.tc-bill strong { margin-left: auto; color: var(--text); font-size: 1.05rem; }
.tc-free-tag { font-style: normal; font-size: .66rem; font-weight: 600; padding: .12rem .5rem; border-radius: 999px; background: var(--accent-2); color: var(--bg); }
.tc-bill-note { flex-basis: 100%; font-size: .74rem; }
.tc-error { color: #fca5a5; font-size: .84rem; margin: 0 0 .55rem; }
.tc-error[hidden], .tc-done[hidden], .tc-book[hidden] { display: none; }
.tc-submit { position: relative; width: 100%; cursor: pointer; font-family: inherit; }
.tc-spin { display: none; position: absolute; right: 1rem; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; border: 2px solid rgba(11, 18, 32, .3); border-top-color: var(--bg); animation: tc-spin .7s linear infinite; }
.tc-submit.is-busy { opacity: .8; pointer-events: none; }
.tc-submit.is-busy .tc-spin { display: block; }

/* success */
.tc-done { text-align: center; animation: tc-in .45s ease; }
.tc-done-tick svg { width: 58px; height: 58px; fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tc-done-tick circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: tc-draw .6s ease forwards; }
.tc-done-tick path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: tc-draw .35s .5s ease forwards; }
@keyframes tc-draw { to { stroke-dashoffset: 0; } }
.tc-done-title { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; margin: .4rem 0 .1rem; }
.tc-done-line { color: var(--accent-2); font-size: .8rem; margin: 0 0 .8rem; }
.tc-done-list { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; text-align: left; margin: 0 auto .9rem; max-width: 320px; font-size: .88rem; }
.tc-done-list dt { color: var(--dim); }
.tc-done-list dd { margin: 0; }
.tc-done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: .6rem; }
.tc-again { background: none; border: 0; color: var(--dim); font-size: .78rem; cursor: pointer; text-decoration: underline; }

@media (max-width: 900px) {
  .tc-body { grid-template-columns: 1fr; }
  .tc-panel { height: auto; }
  .tc-panel-text { margin-bottom: .7rem; }
}
@media (max-width: 560px) {
  .teach { padding-top: 1rem; }
  .tc-bar { gap: .9rem; align-items: center; }
  .tc-stamp { --sz: 126px; }
  .tc-kicker { font-size: .66rem; }
  .tc-bar-title { font-size: .9rem; margin-bottom: .5rem; }
  .tc-bar-title strong { display: block; font-size: 1.2rem; }
  .tc-bar-title .tc-dash { display: none; }
  .tc-mini { gap: .35rem; }
  .tc-mini-btn { font-size: .74rem; padding: .25rem .6rem; }
  .tc-drawer-inner { padding: .75rem; margin-top: .9rem; border-radius: 16px; }
  .tc-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-bottom: .75rem; }
  .tc-tab { padding: .5rem .6rem; font-size: .85rem; }
  .tc-slot-list { display: grid; grid-template-columns: repeat(3, 1fr); }
  .tc-panel, .tc-book, .tc-done { padding: .9rem; }
  .tc-fields { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .tc-fields > .tc-field:nth-child(3), .tc-fields > .tc-field:nth-child(4) { grid-column: 1 / -1; }
  .tc-slot span { font-size: .74rem; padding: .45rem .4rem; }
}
@media (max-width: 360px) {
  .tc-stamp { --sz: 104px; }
  .tc-mini-btn svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tc-stamp-glow, .tc-panel-art, .tc-panel, .tc-done { animation: none; }
  .tc-drawer, .tc-drawer-inner { transition: none; }
  .tc-stamp.is-press, .tc-stamp.is-press::after { animation: none; }
}

/* stamp lives in the hero's right column, just above the fig. 1 note */
.hero-viz { min-width: 0; }
.hero-viz .teach { text-align: left; padding: 1.1rem 0 .4rem; container-type: inline-size; }
.hero-viz .tc-bar { justify-content: center; }
.hero-viz .tc-bar-title { font-size: .95rem; }
@container (max-width: 680px) {
  .tc-body { grid-template-columns: 1fr; }
  .tc-panel { height: auto; }
  .tc-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
  .tc-tab { padding: .5rem .6rem; font-size: .85rem; }
  .tc-slot-list { display: grid; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .hero-viz .tc-bar { justify-content: flex-start; }
}

/* the booking drawer is a full-width row of the hero; the stats follow it while open */
.hero { row-gap: 0; align-content: center; }
.hero > .tc-drawer, .hero-stats-slot { grid-column: 1 / -1; min-width: 0; }
.hero > .tc-drawer .tc-drawer-inner { margin-top: 1.2rem; }
.hero-stats-slot .stats { margin-top: 1.8rem; animation: tc-in .6s ease both; }
.hero.tc-open .hero-text { align-self: center; }
@media (max-width: 900px) {
  .hero { row-gap: 0; }
  .hero-viz { margin-top: 1.5rem; }
  .hero > .tc-drawer, .hero-stats-slot { order: 3; }
  .hero-stats-slot { order: 4; }
  .hero-stats-slot .stats { margin-top: 1.4rem; }
  /* phones: while open, shrink the 3D figure so the booking starts higher */
  .hero.tc-open .hero-viz canvas { max-width: 150px; transition: max-width .4s; }
}

/* IMU figure sits a little higher on desktop */
@media (min-width: 901px) {
  .hero-viz canvas { margin-top: -2.5rem; }
}

/* animated divider between the IMU figure and Classes for Kids */
.hv-divider { display: flex; align-items: center; gap: .6rem; margin: 1.1rem auto 0; max-width: 520px; }
.hv-line {
  position: relative; flex: 1; height: 2px; border-radius: 2px; overflow: hidden;
  background: linear-gradient(90deg, transparent, rgba(94, 234, 212, .35));
}
.hv-line-r { background: linear-gradient(90deg, rgba(251, 191, 36, .35), transparent); }
/* a light pulse runs from the centre diamond outwards along both lines */
.hv-line::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 35%;
  animation: hv-run-r 2.8s cubic-bezier(.45, 0, .55, 1) infinite;
  background: linear-gradient(90deg, transparent, #fbbf24, #5eead4, transparent);
}
.hv-line:not(.hv-line-r)::after { animation-name: hv-run-l; }
@keyframes hv-run-r { from { left: -35%; } to { left: 100%; } }
@keyframes hv-run-l { from { right: -35%; } to { right: 100%; } }
.hv-dot {
  flex: none; width: 9px; height: 9px; transform: rotate(45deg); border-radius: 2px;
  background: linear-gradient(135deg, #5eead4, #fbbf24); box-shadow: 0 0 10px rgba(251, 191, 36, .8);
  animation: hv-pulse 2.8s ease-in-out infinite;
}
@keyframes hv-pulse { 0%, 100% { transform: rotate(45deg) scale(.8); opacity: .7; } 10% { transform: rotate(45deg) scale(1.3); opacity: 1; } }
.hero-viz .teach { padding-top: .9rem; }

/* 5 subjects: on 2-column tab grids the last tab spans the full row */
@container (max-width: 680px) { .tc-tab:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 560px) { .tc-tab:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .hv-line::after, .hv-dot { animation: none; } }

/* fig. 1 caption sits right under the IMU readout, above the divider */
.hero-viz .viz-note { margin: .45rem 0 0; }

/* ==========================================================
   Classes for Kids — per-subject fees, booking result card, "Check your booking"
   ========================================================== */
.tc-tab-fee {
  font-size: .68rem; font-weight: 600; padding: .08rem .45rem; border-radius: 999px;
  background: rgba(251, 191, 36, .14); color: var(--accent-2); border: 1px solid rgba(251, 191, 36, .35);
}
.tc-tab-fee.is-free { background: rgba(94, 234, 212, .12); color: var(--accent); border-color: rgba(94, 234, 212, .35); }
.tc-tab[aria-selected="true"] .tc-tab-fee { background: rgba(11, 18, 32, .25); color: var(--bg); border-color: rgba(11, 18, 32, .35); }
.tc-panel-fee {
  margin-left: .55rem; padding: .1rem .5rem; border-radius: 999px; font-weight: 600;
  color: var(--accent-2); background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .35);
}
.tc-panel-fee::before { content: 'Fee '; font-weight: 400; opacity: .8; }
.tc-panel-fee.is-free { color: var(--accent); background: rgba(94, 234, 212, .1); border-color: rgba(94, 234, 212, .35); }
.tc-panel-fee.is-free::before { content: ''; }
.tc-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.tc-track-link {
  margin-top: .55rem; padding: 0; border: 0; background: none; cursor: pointer;
  font-size: .76rem; color: var(--accent); text-decoration: underline; text-underline-offset: 3px;
}
.tc-track-link:hover { color: var(--text); }

/* result container (replaces the old centred success box) */
.tc-done { text-align: left; padding: 0; background: none; border: 0; animation: none; }
.tc-again { display: block; margin: .7rem auto 0; }

/* ---- booking card ---- */
.bk {
  --tone: 94, 234, 212;
  position: relative; padding: 1.1rem; border-radius: 16px; background: rgba(11, 18, 32, .65);
  border: 1px solid rgba(var(--tone), .45); box-shadow: 0 0 0 1px rgba(var(--tone), .08) inset, 0 18px 40px -30px rgba(var(--tone), .8);
  animation: tc-in .45s ease;
}
.bk--ok { --tone: 74, 222, 128; }
.bk--pay { --tone: 251, 191, 36; }
.bk--verify { --tone: 56, 189, 248; }
.bk--done { --tone: 196, 181, 253; }
.bk--cancelled { --tone: 248, 113, 113; }
.bk-head { display: flex; align-items: flex-start; gap: .75rem; }
.bk-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: rgb(var(--tone)); background: rgba(var(--tone), .12); border: 1px solid rgba(var(--tone), .35); }
.bk-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bk--ok .bk-icon svg path { stroke-dasharray: 20; stroke-dashoffset: 20; animation: tc-draw .5s .2s ease forwards; }
.bk--verify .bk-icon svg path { transform-origin: 12px 12px; animation: tc-spin 6s linear infinite; }
.bk-head-txt { flex: 1; min-width: 0; }
.bk-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 .1rem; font-size: .74rem; color: var(--dim); }
.bk-kicker strong { color: var(--text); font-weight: 600; letter-spacing: .04em; }
.bk-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; }
.bk-badge { flex: none; align-self: center; font-size: .72rem; font-weight: 600; padding: .25rem .65rem; border-radius: 999px; color: rgb(var(--tone)); background: rgba(var(--tone), .12); border: 1px solid rgba(var(--tone), .45); white-space: nowrap; }
.bk--pay .bk-badge, .bk--verify .bk-badge { animation: bk-pulse 2s ease-in-out infinite; }
@keyframes bk-pulse { 50% { box-shadow: 0 0 0 4px rgba(var(--tone), .12); } }
.bk-copy { padding: .05rem .45rem; border-radius: 6px; font-size: .68rem; cursor: pointer; color: var(--dim); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.bk-copy:hover { color: var(--text); border-color: var(--accent); }

/* progress: Booked → Payment → Confirmed */
.bk-steps { list-style: none; display: flex; margin: .95rem 0 .2rem; padding: 0; counter-reset: s; }
.bk-steps li { position: relative; flex: 1; display: grid; justify-items: center; gap: .3rem; font-size: .74rem; color: var(--dim); text-align: center; }
.bk-steps li::before { content: ''; position: absolute; top: 8px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 0; }
.bk-steps li:first-child::before { display: none; }
.bk-steps li.is-done::before, .bk-steps li.is-now::before { background: rgb(var(--tone)); }
.bk-dot { position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg-2); }
.bk-steps li.is-done { color: var(--text); }
.bk-steps li.is-done .bk-dot { border-color: rgb(var(--tone)); background: rgb(var(--tone)); box-shadow: inset 0 0 0 3px var(--bg-2); }
.bk-steps li.is-now { color: rgb(var(--tone)); font-weight: 600; }
.bk-steps li.is-now .bk-dot { border-color: rgb(var(--tone)); animation: bk-pulse 1.6s ease-in-out infinite; }

.bk-list { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: .9rem 0 .7rem; font-size: .9rem; }
.bk-list dt { color: var(--dim); }
.bk-list dd { margin: 0; }
.bk-msg { margin: 0 0 .8rem; font-size: .88rem; color: var(--dim); padding: .6rem .75rem; border-radius: 10px; background: rgba(var(--tone), .06); border-left: 3px solid rgba(var(--tone), .7); }
.bk-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.bk-actions .btn { font-size: .85rem; padding: .55rem 1rem; }

/* pay box */
.bk-pay { display: grid; gap: .6rem; margin: 0 0 .8rem; padding: .85rem; border-radius: 12px; background: rgba(251, 191, 36, .05); border: 1px dashed rgba(251, 191, 36, .45); }
.bk-pay-btn { justify-self: start; background: var(--accent-2); border-color: var(--accent-2); }
.bk-upi { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; font-size: .8rem; color: var(--dim); }
.bk-upi strong { color: var(--text); }
.bk-upi-note { font-size: .74rem; }
.bk-utr { display: grid; gap: .55rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.bk-utr-title { margin: 0; font-size: .82rem; font-weight: 600; }
.bk-utr-fields { display: grid; grid-template-columns: 1fr 1.4fr; gap: .5rem; }
.bk-utr-btn { position: relative; justify-self: start; cursor: pointer; font-family: inherit; font-size: .85rem; padding: .55rem 1.1rem; }
.bk-utr-btn.is-busy, .tc-track-btn.is-busy { opacity: .75; pointer-events: none; }
.bk-utr-btn.is-busy .tc-spin, .tc-track-btn.is-busy .tc-spin { display: block; border-color: rgba(148, 163, 184, .3); border-top-color: var(--text); }
.tc-track-btn.is-busy .tc-spin { border-color: rgba(11, 18, 32, .3); border-top-color: var(--bg); }

/* ---- Check your booking ---- */
.tc-track { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 16px; background: rgba(255, 255, 255, .02); border: 1px solid var(--line); }
.tc-track-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.2rem; }
.tc-track-head { display: flex; align-items: center; gap: .7rem; }
.tc-track-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--accent); background: rgba(94, 234, 212, .1); border: 1px solid rgba(94, 234, 212, .3); }
.tc-track-title { margin: 0; font-size: 1rem; }
.tc-track-sub { margin: 0; font-size: .78rem; color: var(--dim); }
.tc-track-form { display: flex; gap: .5rem; flex: 1 1 320px; max-width: 440px; min-width: 0; }
.tc-track-form input {
  flex: 1; min-width: 0; height: 42px; padding: 0 .85rem; border-radius: 10px; font-size: 16px; letter-spacing: .08em;
  color: var(--text); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); text-transform: uppercase;
}
.tc-track-form input::placeholder { letter-spacing: .08em; color: rgba(148, 163, 184, .55); }
.tc-track-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(94, 234, 212, .15); }
.tc-track-btn { position: relative; flex: none; height: 42px; padding: 0 1.1rem; cursor: pointer; font-family: inherit; }
.tc-recent { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .7rem; font-size: .72rem; color: var(--dim); }
.tc-recent[hidden] { display: none; }
.tc-recent-chip { padding: .2rem .6rem; border-radius: 999px; font-size: .72rem; cursor: pointer; color: var(--accent); background: rgba(94, 234, 212, .08); border: 1px solid rgba(94, 234, 212, .3); }
.tc-recent-chip:hover { background: rgba(94, 234, 212, .18); }
.tc-track-error { margin: .7rem 0 0; font-size: .84rem; color: #fca5a5; }
.tc-track-error[hidden], .tc-track-result[hidden] { display: none; }
.tc-track-result { margin-top: .9rem; }

@media (max-width: 560px) {
  .bk { padding: .9rem; }
  .bk-head { flex-wrap: wrap; row-gap: .5rem; }
  .bk-head-txt { flex: 1 1 calc(100% - 54px); }
  .bk-badge { margin-left: calc(42px + .75rem); }
  .bk-title { font-size: 1.15rem; }
  .bk-utr-fields { grid-template-columns: 1fr; }
  .bk-pay-btn, .bk-utr-btn { justify-self: stretch; text-align: center; }
  .tc-track { padding: .85rem; }
  .tc-track-form { flex-basis: 100%; max-width: none; min-width: 0; }
  .tc-track-btn { padding: 0 .9rem; font-size: .88rem; }
  .tc-track-row, .tc-track-head > div { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .bk, .bk-badge, .bk-steps li.is-now .bk-dot, .bk--verify .bk-icon svg path { animation: none; } }

/* discreet admin link next to the site name */
.nav-admin {
  margin: 0 auto 0 -.35rem; padding: .15rem .35rem; border-radius: 6px; line-height: 1;
  font-size: .82rem; color: rgba(148, 163, 184, .22); text-decoration: none; transition: color .2s, background .2s;
}
.nav-admin:hover, .nav-admin:focus-visible { color: var(--accent); background: rgba(94, 234, 212, .08); text-decoration: none; outline: none; }

/* "Check status" view: only the booking-status box is shown */
.tc-drawer.is-track .tc-tabs, .tc-drawer.is-track .tc-body { display: none; }
.tc-drawer.is-track .tc-track { margin-top: 0; padding: 1.2rem 1.3rem; border-color: rgba(94, 234, 212, .3); background: rgba(94, 234, 212, .03); }
.tc-drawer.is-track .tc-drawer-inner { max-width: 760px; margin-left: auto; margin-right: auto; }
.tc-track-book { display: none; margin: .9rem 0 0; font-size: .8rem; color: var(--dim); }
.tc-drawer.is-track .tc-track-book { display: block; }
.tc-track-book .tc-track-link { margin: 0 0 0 .25rem; }

/* live status */
.bk-live { display: flex; align-items: center; gap: .5rem; margin: -.3rem 0 .8rem; font-size: .72rem; color: var(--dim); }
.bk-live-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: rgb(var(--tone)); box-shadow: 0 0 0 0 rgba(var(--tone), .6); animation: bk-live 1.8s ease-out infinite; }
@keyframes bk-live { 70%, 100% { box-shadow: 0 0 0 7px rgba(var(--tone), 0); } }
.bk.is-updated { animation: bk-updated 1.4s ease; }
@keyframes bk-updated { 0% { box-shadow: 0 0 0 0 rgba(var(--tone), .9); transform: scale(.985); } 40% { box-shadow: 0 0 0 10px rgba(var(--tone), .0); transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .bk-live-dot, .bk.is-updated { animation: none; } }

/* full-stack tower: tablet & phone layout (overrides the earlier compact rules) */
@media (max-width: 1100px) and (min-width: 901px) {
  .stack-grid { grid-template-columns: minmax(0, 1fr) 280px minmax(0, 0.9fr); }
  .iso-scene { --scale: .88; }
}
@media (max-width: 900px) {
  .stack-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .iso { height: 350px; }
  .iso-scene { --scale: .9; }
}
@media (max-width: 560px) {
  .stack-grid { grid-template-columns: minmax(0, 1fr); }
  .iso { height: 320px; margin: -.4rem 0 -.2rem; }
  .iso-scene { --scale: .8; top: 70%; }
  .iso-hint { display: block; }
  .iso-label { font-size: .66rem; transform: translateZ(calc(var(--li) * var(--gap) + 16px + var(--t) + 2px)) rotateZ(calc(-1 * var(--rz))) rotateX(calc(-1 * var(--rx))) translate(58px, -50%); }
}
