/* ==========================================================================
   Premium academic layer — loaded after style.css.
   Harvard-style palette (crimson + gold on ink / parchment), serif display type,
   3D hero, tilt cards, odometer counters.
   ========================================================================== */

:root {
  --bg: #08080A;
  --bg-secondary: #0E0E12;
  --bg-elevated: #14141A;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.2);

  --accent: #D1405A;          /* crimson (lifted for dark backgrounds) */
  --accent-2: #E7C873;        /* gold */
  --accent-3: #8F1A2C;        /* deep crimson */

  --text: #F6F2EA;
  --muted: #B8B2A7;
  --muted-2: #8C867B;

  --font-display: 'Playfair Display', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;

  --shadow-glow: 0 0 70px rgba(209, 64, 90, 0.22);
  --gradient-border: linear-gradient(135deg, rgba(209, 64, 90, 0.55), rgba(231, 200, 115, 0.4) 50%, rgba(143, 26, 44, 0.55));
  --header-bg: rgba(8, 8, 10, 0.72);
  --alt-bg: rgba(14, 14, 18, 0.72);
  --glass-bg: rgba(20, 20, 26, 0.66);
  --pill-text: #EBCF86;
  --grid-line: rgba(255, 255, 255, 0.045);
}
:root[data-theme="light"] {
  --bg: #FBF8F2;
  --bg-secondary: #F3EEE4;
  --bg-elevated: #FFFFFF;
  --border: rgba(60, 30, 30, 0.12);
  --border-strong: rgba(60, 30, 30, 0.26);

  --accent: #A51C30;          /* Harvard crimson */
  --accent-2: #8A6A12;
  --accent-3: #6E1220;

  --text: #1B1517;
  --muted: #56494B;
  --muted-2: #74686A;

  --shadow-glow: 0 0 60px rgba(165, 28, 48, 0.14);
  --gradient-border: linear-gradient(135deg, rgba(165, 28, 48, 0.5), rgba(184, 145, 31, 0.4) 50%, rgba(110, 18, 32, 0.5));
  --header-bg: rgba(251, 248, 242, 0.82);
  --alt-bg: rgba(243, 238, 228, 0.75);
  --glass-bg: rgba(255, 255, 255, 0.78);
  --pill-text: #6E1220;
  --grid-line: rgba(60, 30, 30, 0.05);
}

/* ---------- Atmosphere ---------- */
body::before {
  background:
    radial-gradient(820px 600px at 8% 4%, rgba(209, 64, 90, calc(0.17 * var(--wash))), transparent 62%),
    radial-gradient(720px 600px at 94% 12%, rgba(231, 200, 115, calc(0.12 * var(--wash))), transparent 60%),
    radial-gradient(760px 640px at 20% 66%, rgba(143, 26, 44, calc(0.12 * var(--wash))), transparent 60%),
    radial-gradient(820px 660px at 88% 90%, rgba(231, 200, 115, calc(0.10 * var(--wash))), transparent 60%),
    var(--bg);
}

/* ---------- Typography (serif display) ---------- */
h1, h2, h3, .brand-name, .stat-value, .num-value { font-family: var(--font-display); }
.section-title { font-weight: 700; letter-spacing: -0.015em; font-size: clamp(30px, 4.2vw, 46px); }
.brand-name { font-weight: 700; letter-spacing: 0.01em; }
.card h3, .pub-card h3, .mentor-card h3, .project-body h3 { font-weight: 700; }

.eyebrow {
  color: var(--accent-2); letter-spacing: 0.16em; font-size: 11.5px;
  background: rgba(231, 200, 115, 0.07); border-color: rgba(231, 200, 115, 0.3); box-shadow: none;
}
.eyebrow::before { background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 10px rgba(209, 64, 90, 0.7); }
.section-head::after {
  content: ''; display: block; width: 72px; height: 2px; margin: 26px auto 0;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
}
.text-gradient { background: linear-gradient(110deg, var(--accent) 0%, var(--accent-2) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }

.btn-primary { background: linear-gradient(120deg, var(--accent), var(--accent-3)); box-shadow: 0 10px 28px rgba(165, 28, 48, 0.4); }
.btn-primary:hover { box-shadow: 0 16px 38px rgba(165, 28, 48, 0.55); }
.btn-outline:hover { border-color: var(--accent-2); color: var(--accent-2); }
.filter-tab.is-active { background: linear-gradient(120deg, var(--accent), var(--accent-3)); box-shadow: 0 8px 22px rgba(165, 28, 48, 0.4); }
.card-icon { background: linear-gradient(135deg, var(--accent), var(--accent-3)); box-shadow: 0 8px 22px rgba(165, 28, 48, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08) inset; color: #fff; }
.badge { background: rgba(231, 200, 115, 0.08); border-color: rgba(231, 200, 115, 0.35); color: var(--accent-2); }
.badge-dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(209, 64, 90, 0.25); }
.pub-quartile { background: linear-gradient(120deg, var(--accent-2), #B8912F); color: #1b1405; }
.site-header { box-shadow: 0 1px 0 rgba(231, 200, 115, 0.14), 0 14px 36px var(--shadow-soft); }
.main-nav a.is-active { color: var(--accent-2); }
.main-nav a { position: relative; }
.main-nav a.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 2px; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 300; transform-origin: 0 50%;
  transform: scaleX(0); background: linear-gradient(90deg, var(--accent-3), var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(209, 64, 90, 0.6); pointer-events: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 110px; perspective: 1400px;
  background:
    radial-gradient(640px 420px at 85% -5%, rgba(209, 64, 90, 0.2), transparent 60%),
    radial-gradient(700px 500px at 0% 10%, rgba(231, 200, 115, 0.13), transparent 60%);
}
/* perspective grid floor */
.hero::after {
  content: ''; position: absolute; left: -10%; right: -10%; bottom: -60px; height: 340px; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px; transform: perspective(520px) rotateX(64deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 20%, transparent 95%); mask-image: linear-gradient(to top, #000 20%, transparent 95%);
}
.hero .container { position: relative; z-index: 1; }
.hero-spot {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(520px 420px at var(--sx, 70%) var(--sy, 30%), rgba(209, 64, 90, 0.14), transparent 65%);
}
.hero-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 4.3vw, 60px); line-height: 1.08; letter-spacing: -0.02em; }
.hero-title .line2 { display: block; }
.hero-affil {
  margin: 18px 0 0; font-size: 15px; font-weight: 600; letter-spacing: 0.02em; color: var(--accent-2);
  padding-left: 14px; border-left: 2px solid var(--accent);
}
.hero-subtext { font-size: 18.5px; }

.hero-visual { height: auto; }
.hero-stage { position: relative; width: min(540px, 100%); aspect-ratio: 1; margin: 0 auto; perspective: 1200px; }
.stage-portrait {
  position: absolute; inset: 29%; border-radius: 50%; overflow: hidden; z-index: 0;
  border: 2px solid var(--accent-2);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.5), 0 0 0 12px rgba(209, 64, 90, 0.08), 0 0 90px rgba(209, 64, 90, 0.3);
  transform: rotateX(var(--prx, 0deg)) rotateY(var(--pry, 0deg)); transition: transform 0.25s ease-out;
  background: var(--bg-elevated);
}
.stage-portrait img { width: 100%; height: 100%; object-fit: cover; }
.stage-monogram { display: grid; place-items: center; width: 100%; height: 100%; font-family: var(--font-display); font-size: 64px; font-weight: 700; color: var(--accent-2); }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.orbit-labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.orbit-label {
  position: absolute; left: 0; top: 0; padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em; color: var(--text);
  background: linear-gradient(var(--label-bg), var(--label-bg)) padding-box, var(--gradient-border) border-box;
  border: 1px solid transparent; backdrop-filter: blur(8px); box-shadow: 0 10px 24px var(--shadow);
  will-change: transform, opacity;
}
.stage-hint { position: absolute; bottom: -4px; left: 0; right: 0; text-align: center; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
@media (max-width: 980px) { .hero { padding-top: 56px; } .hero-stage { width: min(420px, 100%); margin-top: 24px; } }
@media (max-width: 480px) { .orbit-label { font-size: 11px; padding: 5px 10px; } }

/* ---------- By the numbers (odometer counters) ---------- */
.numbers { padding: 0; margin-top: -54px; z-index: 5; perspective: 1400px; }
.numbers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; }
.num-card {
  text-align: center; padding: 30px 14px 24px; border-radius: var(--radius-md); position: relative; overflow: hidden;
  background: linear-gradient(var(--glass-bg-strong), var(--glass-bg-strong)) padding-box, var(--gradient-border) border-box;
  border: 1px solid transparent; box-shadow: 0 24px 50px var(--shadow);
}
.num-card::before {
  content: ''; position: absolute; left: 14%; right: 14%; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
}
.num-value { font-size: clamp(40px, 5vw, 58px); font-weight: 700; color: var(--text); line-height: 1.1; display: flex; justify-content: center; }
.num-label { margin-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--text); letter-spacing: 0.02em; }
.num-src { margin-top: 3px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); }
.num-card.is-done { box-shadow: 0 24px 50px var(--shadow), 0 0 40px rgba(209, 64, 90, 0.18); }

.odo { display: inline-flex; line-height: 1.1; font-variant-numeric: tabular-nums; }
.odo-col { display: inline-block; height: 1.1em; overflow: hidden; }
.odo-strip { display: flex; flex-direction: column; transform: translateY(0); will-change: transform; }
.odo-strip span { display: block; height: 1.1em; line-height: 1.1em; text-align: center; min-width: 0.58em; }
.odo-affix { display: inline-block; height: 1.1em; line-height: 1.1em; color: var(--accent); }

/* ---------- 3D reveal + tilt (single transform composed from variables) ---------- */
.reveal {
  opacity: 0;
  transform: perspective(1100px) translate3d(0, var(--ty, 40px), 0) rotateX(var(--rx, 14deg)) rotateY(var(--ry, 0deg)) scale(var(--sc, 0.97));
  transition: opacity 800ms ease, transform 800ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: 50% 100%;
}
.reveal.is-visible { opacity: 1; --ty: 0px; --rx: 0deg; --sc: 1; }

.tilt, .tilt:hover { --glare: 0; }
.tilt.tilt-live {
  transition: opacity 800ms ease, transform 0.12s ease-out, box-shadow 0.3s ease; transform-origin: 50% 50%;
  --ty: -8px; --sc: 1.015;
}
.tilt { position: relative; }
.tilt::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.16), transparent 55%);
}
.tilt.tilt-live::after { opacity: 1; }
.tilt.tilt-live { box-shadow: 0 34px 64px var(--shadow), 0 0 44px rgba(209, 64, 90, 0.2); }
.card:hover, .project-card:hover, .stat-card:hover, .pub-card.is-link:hover, .mentor-card:hover, .edu-card:hover, .service-card:hover { transform: none; }
.reveal.is-visible.card:hover, .reveal.is-visible.project-card:hover { transform: perspective(1100px) translate3d(0, var(--ty, 0px), 0) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--sc, 1)); }
.project-media { overflow: hidden; }
.project-media img { transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.project-card:hover .project-media img { transform: scale(1.07); }

/* Entrance for the hero */
@keyframes rise3d { from { opacity: 0; transform: perspective(900px) translate3d(0, 34px, -40px) rotateX(10deg); } to { opacity: 1; transform: none; } }
.hero .badge, .hero .hero-title, .hero .hero-affil, .hero .hero-subtext, .hero .hero-meta, .hero .hero-actions { animation: rise3d 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hero .hero-title { animation-delay: 0.08s; } .hero .hero-affil { animation-delay: 0.16s; } .hero .hero-subtext { animation-delay: 0.24s; }
.hero .hero-meta { animation-delay: 0.3s; } .hero .hero-actions { animation-delay: 0.38s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .hero .badge, .hero .hero-title, .hero .hero-affil, .hero .hero-subtext, .hero .hero-meta, .hero .hero-actions { animation: none; }
  .scroll-progress { display: none; }
}
@media (hover: none) { .tilt::after { display: none; } }

/* ==========================================================================
   Animated 3D designation + company plaque
   ========================================================================== */
.affil { margin-top: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; perspective: 900px; }
.affil-role { font-family: var(--font-display); font-size: clamp(20px, 2.3vw, 30px); font-weight: 700; color: var(--text); line-height: 1.15; }
.affil-word {
  display: inline-block; transform-origin: 50% 100%; backface-visibility: hidden;
  animation: wordFlip 0.95s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(0.45s + var(--w, 0) * 0.16s);
}
@keyframes wordFlip { from { opacity: 0; transform: rotateX(-100deg) translateY(16px); } to { opacity: 1; transform: none; } }
.affil-org { perspective: 800px; }
.affil-plaque {
  position: relative; display: inline-block; padding: 11px 22px; border-radius: 12px; overflow: hidden;
  font-weight: 800; font-size: 14.5px; letter-spacing: 0.04em; color: #1b1405;
  background: linear-gradient(135deg, #F6E3A6, #DDB85E 55%, #B8912F);
  box-shadow: 1px 1px 0 #9a7a1c, 2px 2px 0 #8a6a12, 3px 3px 0 #7a5c10, 4px 4px 0 #6b500c, 5px 5px 0 #5c440a, 8px 14px 26px rgba(0, 0, 0, 0.38);
  transform: rotateX(8deg) rotateY(-14deg);
  animation: plaqueIn 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.9s both, plaqueFloat 7s ease-in-out 2s infinite;
}
@keyframes plaqueIn { from { opacity: 0; transform: rotateX(70deg) rotateY(-50deg) translateY(30px); } to { opacity: 1; transform: rotateX(8deg) rotateY(-14deg); } }
@keyframes plaqueFloat {
  0%, 100% { transform: rotateX(8deg) rotateY(-14deg) translateY(0); }
  50% { transform: rotateX(-5deg) rotateY(14deg) translateY(-7px); }
}
.affil-shine {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.7) 50%, transparent 65%);
  transform: translateX(-130%); animation: shineSweep 5s ease-in-out 1.8s infinite;
}
@keyframes shineSweep { 0% { transform: translateX(-130%); } 35%, 100% { transform: translateX(130%); } }
.affil-org-name { position: relative; }
@media (prefers-reduced-motion: reduce) {
  .affil-word, .affil-plaque, .affil-shine { animation: none; }
  .affil-plaque { transform: rotateX(8deg) rotateY(-14deg); }
}

/* ==========================================================================
   3D social buttons (extruded, floating, tilt on hover)
   ========================================================================== */
.s3d-row { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; padding: 0; margin: 30px 0 0; perspective: 700px; }
.s3d-row.in-contact { margin: 26px 0 8px; }
.s3d-row.in-footer { margin: 0 0 18px; justify-content: center; }
.s3d {
  display: block; width: 56px; height: 56px; position: relative; transform-style: preserve-3d;
  transform: rotateX(18deg) rotateY(-24deg); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation: s3dFloat 5.5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1.2s);
}
@keyframes s3dFloat {
  0%, 100% { transform: rotateX(18deg) rotateY(-24deg) translateY(0); }
  50% { transform: rotateX(8deg) rotateY(-10deg) translateY(-7px); }
}
.s3d:hover, .s3d:focus-visible { animation-play-state: paused; transform: rotateX(0deg) rotateY(0deg) translateY(-8px) scale(1.14); }
.s3d-body {
  position: relative; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 17px; color: #fff; overflow: hidden;
  background: var(--g);
  box-shadow: 1px 1px 0 var(--d), 2px 2px 0 var(--d), 3px 3px 0 var(--d), 4px 4px 0 var(--d), 5px 5px 0 var(--d), 6px 6px 0 var(--d),
              7px 7px 0 var(--d), 10px 18px 26px rgba(0, 0, 0, 0.42);
}
.s3d-body::before { content: ''; position: absolute; inset: 0; background: linear-gradient(155deg, rgba(255, 255, 255, 0.45), transparent 48%); }
.s3d-body svg { position: relative; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); }
.s3d-whatsapp { --g: linear-gradient(145deg, #4CE88A, #118a49); --d: #0c6a37; }
.s3d-facebook { --g: linear-gradient(145deg, #5A97FF, #1456C9); --d: #0e3f95; }
.s3d-instagram { --g: linear-gradient(45deg, #FEDA75, #FA7E1E 25%, #D62976 52%, #962FBF 76%, #4F5BD5); --d: #6b2090; }
.s3d-linkedin { --g: linear-gradient(145deg, #3A9BE0, #0A66C2); --d: #074a8c; }
.in-footer .s3d { width: 44px; height: 44px; }
.in-footer .s3d svg { width: 21px; height: 21px; }
.footer-social { padding-top: 6px; }
.contact-wa { margin-top: 14px; color: var(--muted); }
.contact-wa a { color: var(--accent-2); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .s3d { animation: none; } }

/* ==========================================================================
   3D coverflow carousel (Updates)
   ========================================================================== */
.coverflow { position: relative; height: 500px; perspective: 1500px; touch-action: pan-y; outline: none; }
.cf-stage { position: absolute; inset: 0; transform-style: preserve-3d; }
.cf-card {
  --cw: min(390px, 78vw);
  position: absolute; left: 50%; top: 10px; width: var(--cw); margin-left: calc(var(--cw) / -2);
  background: linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box, var(--gradient-border) border-box;
  border: 1px solid transparent; border-radius: 22px; overflow: hidden; cursor: pointer;
  box-shadow: 0 30px 60px var(--shadow); transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.8s ease, filter 0.8s ease;
  will-change: transform; backface-visibility: hidden;
}
.cf-card.is-active { cursor: default; box-shadow: 0 40px 80px var(--shadow), 0 0 60px rgba(209, 64, 90, 0.22); }
.cf-media { position: relative; height: 200px; overflow: hidden; background: var(--bg-secondary); }
.cf-media img { width: 100%; height: 100%; object-fit: cover; }
.cf-noimg { display: grid; place-items: center; background: linear-gradient(135deg, var(--accent-3), var(--accent) 60%, var(--accent-2)); }
.cf-noimg.cf-facebook { background: linear-gradient(135deg, #1456C9, #5A97FF); }
.cf-noimg.cf-whatsapp { background: linear-gradient(135deg, #0c6a37, #4CE88A); }
.cf-noimg.cf-instagram { background: linear-gradient(45deg, #FA7E1E, #D62976 55%, #962FBF); }
.cf-mark { font-family: var(--font-display); font-size: 84px; font-weight: 700; color: rgba(255, 255, 255, 0.9); text-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }
.cf-source {
  position: absolute; top: 14px; left: 14px; padding: 5px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px);
}
.cf-body { padding: 20px 22px 22px; }
.cf-date { display: block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 8px; font-weight: 700; }
.cf-body h3 { font-size: 19px; line-height: 1.25; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cf-body p { color: var(--muted); font-size: 14.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cf-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.cf-share { font-size: 13px; font-weight: 700; color: #25D366; }
.cf-share::before { content: '↗ '; }
.cf-nav {
  position: absolute; top: 190px; z-index: 30; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: var(--glass-bg-strong); color: var(--text); font-size: 26px; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 10px 24px var(--shadow); transition: transform 0.25s, border-color 0.25s;
}
.cf-nav:hover { transform: scale(1.1); border-color: var(--accent-2); }
.cf-prev { left: 4px; } .cf-next { right: 4px; }
.cf-dots { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 10px; }
.cf-dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: var(--border-strong); transition: all 0.3s; }
.cf-dots button.is-active { width: 28px; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.cf-follow { text-align: center; margin-top: 26px; color: var(--muted); font-size: 14px; }
.cf-follow a { color: var(--accent-2); font-weight: 700; margin-left: 12px; }
@media (max-width: 640px) { .coverflow { height: 520px; } .cf-prev { left: -4px; } .cf-next { right: -4px; } }
@media (prefers-reduced-motion: reduce) { .cf-card { transition: none; } }

/* ==========================================================================
   MarXus AI Nexus — 3D logo slab + founder chip
   ========================================================================== */
.affil-founder {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 16px; padding: 6px 18px 6px 6px; border-radius: 999px;
  background: linear-gradient(var(--glass-bg-strong), var(--glass-bg-strong)) padding-box, var(--gradient-border) border-box;
  border: 1px solid transparent; font-size: 14px; color: var(--muted); box-shadow: 0 12px 28px var(--shadow);
  animation: rise3d 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 1.1s both; transition: transform 0.3s, box-shadow 0.3s;
}
.affil-founder img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--accent-2); animation: chipSpin 9s ease-in-out infinite; }
.affil-founder strong { color: var(--accent-2); font-weight: 800; }
.affil-founder:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 18px 34px var(--shadow); }
@keyframes chipSpin { 0%, 100% { transform: rotateY(-25deg); } 50% { transform: rotateY(25deg); } }

.mx-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: center; }
@media (max-width: 920px) { .mx-grid { grid-template-columns: 1fr; gap: 36px; } }

.mx3d { position: relative; width: min(430px, 100%); aspect-ratio: 1; margin: 0 auto; perspective: 1100px; }
.mx3d-scene {
  position: absolute; inset: 8%; transform-style: preserve-3d;
  transform: rotateX(var(--mrx, 8deg)) rotateY(var(--mry, -18deg));
  transition: transform 0.18s ease-out;
}
.mx3d.is-idle .mx3d-scene { animation: mxSway 9s ease-in-out infinite; transition: none; }
@keyframes mxSway { 0%, 100% { transform: rotateX(8deg) rotateY(-20deg); } 50% { transform: rotateX(-4deg) rotateY(20deg); } }
.mx3d-glow { position: absolute; inset: -18%; border-radius: 50%; background: radial-gradient(closest-side, rgba(231, 200, 115, 0.38), rgba(209, 64, 90, 0.12) 60%, transparent 72%); transform: translateZ(-70px); filter: blur(8px); }
.mx3d-layer, .mx3d-face { position: absolute; inset: 0; border-radius: 9%; }
.mx3d-layer { background: url('/images/brand/marxus-mx.jpg') center / cover; transform: translateZ(var(--z)); filter: brightness(var(--b)) saturate(0.9); }
.mx3d-face { transform: translateZ(0); overflow: hidden; box-shadow: 0 0 0 1px rgba(231, 200, 115, 0.55), 0 40px 70px rgba(0, 0, 0, 0.45); }
.mx3d-face img { width: 100%; height: 100%; object-fit: cover; }
.mx3d-glare { position: absolute; inset: 0; background: radial-gradient(420px circle at var(--gx, 30%) var(--gy, 20%), rgba(255, 255, 255, 0.28), transparent 55%); mix-blend-mode: screen; pointer-events: none; }
.mx3d-ring {
  position: absolute; left: -12%; right: -12%; top: 50%; height: 0; padding-bottom: 124%; margin-top: -62%; border-radius: 50%;
  border: 2px solid rgba(231, 200, 115, 0.65); box-shadow: 0 0 18px rgba(231, 200, 115, 0.35), inset 0 0 18px rgba(231, 200, 115, 0.2);
  transform-style: preserve-3d; pointer-events: none;
}
.mx3d-ring.r1 { transform: translateZ(30px) rotateX(74deg); animation: ringA 14s linear infinite; }
.mx3d-ring.r2 { transform: translateZ(10px) rotateY(74deg); border-color: rgba(209, 64, 90, 0.6); box-shadow: 0 0 18px rgba(209, 64, 90, 0.3); animation: ringB 18s linear infinite reverse; }
@keyframes ringA { from { transform: translateZ(30px) rotateX(74deg) rotateZ(0); } to { transform: translateZ(30px) rotateX(74deg) rotateZ(360deg); } }
@keyframes ringB { from { transform: translateZ(10px) rotateY(74deg) rotateZ(0); } to { transform: translateZ(10px) rotateY(74deg) rotateZ(360deg); } }
.mx3d-orb { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--accent-2) 55%, #8a6a12); box-shadow: 0 0 14px rgba(231, 200, 115, 0.9); }
.mx3d-orb.o1 { left: -6%; top: 18%; transform: translateZ(90px); animation: orbFloat 6s ease-in-out infinite; }
.mx3d-orb.o2 { right: -8%; top: 62%; transform: translateZ(70px); width: 10px; height: 10px; animation: orbFloat 7.5s ease-in-out -2s infinite; }
.mx3d-orb.o3 { left: 22%; bottom: -8%; transform: translateZ(110px); width: 8px; height: 8px; animation: orbFloat 5.5s ease-in-out -1s infinite; }
@keyframes orbFloat { 0%, 100% { margin-top: 0; } 50% { margin-top: -16px; } }
.mx3d-floor {
  position: absolute; left: 6%; right: 6%; bottom: -14%; height: 18%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.5), transparent); transform: translateZ(-50px) rotateX(90deg) translateZ(-60px); filter: blur(6px);
}

.mx-copy .section-title { font-size: clamp(34px, 4.6vw, 54px); }
.mx-x { color: var(--accent-2); text-shadow: 2px 2px 0 rgba(143, 26, 44, 0.55), 0 0 28px rgba(231, 200, 115, 0.5); display: inline-block; transform: rotate(-4deg); }
.mx-ai { font-size: 0.5em; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); font-family: var(--font-body); font-weight: 700; margin-left: 4px; }
.mx-founded { margin-top: 16px; font-size: 18px; color: var(--muted); }
.mx-founded strong { color: var(--text); font-family: var(--font-display); font-size: 1.15em; }
.mx-tag { margin-top: 10px; font-weight: 700; color: var(--accent-2); letter-spacing: 0.04em; }
.mx-motto { display: flex; align-items: center; gap: 12px; margin-top: 14px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted-2); }
.mx-motto i { width: 5px; height: 5px; background: var(--accent); transform: rotate(45deg); }
.mx-services { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 30px; perspective: 700px; list-style: none; padding: 0; }
.mx-chip {
  padding: 10px 18px; border-radius: 12px; font-size: 14px; font-weight: 700; color: var(--text);
  background: linear-gradient(var(--glass-bg-strong), var(--glass-bg-strong)) padding-box, var(--gradient-border) border-box; border: 1px solid transparent;
  box-shadow: 1px 1px 0 var(--accent-3), 2px 2px 0 var(--accent-3), 3px 3px 0 var(--accent-3), 6px 10px 18px var(--shadow);
  transform: rotateX(10deg) rotateY(-10deg); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mx-chip:nth-child(even) { transform: rotateX(10deg) rotateY(10deg); }
.mx-chip:hover { transform: rotateX(0) rotateY(0) translateY(-5px) scale(1.05); }
.mx-actions { display: flex; flex-wrap: wrap; gap: 14px; }

@media (prefers-reduced-motion: reduce) {
  .mx3d.is-idle .mx3d-scene, .mx3d-ring, .mx3d-orb, .affil-founder img, .affil-founder { animation: none; }
}

/* ==========================================================================
   MarXus live strip: real batch countdown + moving project / service marquee
   ========================================================================== */
.mx-live { margin-top: 64px; }
.mx-batch {
  display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: center; padding: 28px 32px; margin-bottom: 36px; border-radius: var(--radius-lg);
  background: linear-gradient(var(--glass-bg-strong), var(--glass-bg-strong)) padding-box, var(--gradient-border) border-box; border: 1px solid transparent;
  box-shadow: 0 24px 50px var(--shadow);
}
@media (max-width: 760px) { .mx-batch { grid-template-columns: 1fr; padding: 24px 20px; } }
.mx-batch-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); }
.mx-batch h3 { font-size: clamp(22px, 2.6vw, 30px); margin: 10px 0 6px; }
.mx-batch p { color: var(--muted); }
.mx-batch-start { margin-top: 4px; font-weight: 700; color: var(--text) !important; }
.mx-count { display: flex; gap: 12px; perspective: 600px; }
.mx-count-cell {
  min-width: 74px; padding: 12px 8px 10px; text-align: center; border-radius: 14px; background: var(--bg-elevated); border: 1px solid var(--border-strong);
  box-shadow: 0 3px 0 var(--accent-3), 0 12px 22px var(--shadow); transform: rotateX(10deg);
}
.mx-count-num { display: block; font-family: var(--font-display); font-size: 34px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mx-count-num.tick { animation: tickFlip 0.5s ease; }
@keyframes tickFlip { 0% { transform: rotateX(-80deg); opacity: 0.3; } 100% { transform: none; opacity: 1; } }
.mx-count-lab { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
.mx-batch-live { grid-column: 1 / -1; font-weight: 700; color: var(--accent-2) !important; }
.mx-enrolled { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 12px; color: var(--muted); }
.mx-enrolled .odo { font-family: var(--font-display); font-size: 40px; font-weight: 700; color: var(--text); }

.marquee { overflow: hidden; margin-top: 14px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 48s linear infinite; }
.marquee.reverse .marquee-track { animation-direction: reverse; animation-duration: 38s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  white-space: nowrap; padding: 10px 20px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--text);
  background: var(--glass-bg); border: 1px solid var(--border-strong);
}
.marquee-item.alt { color: var(--accent-2); border-color: rgba(231, 200, 115, 0.35); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; flex-wrap: wrap; width: auto; } .mx-count-num.tick { animation: none; } }

/* ---------- MarXus page ---------- */
a.mx3d { display: block; cursor: pointer; }
.page-marxus a.mx3d { cursor: default; }
.mx-page-hero { padding-top: 40px; }
.mx-page-hero .case-back { display: inline-block; margin-bottom: 28px; }
.founder-card {
  display: flex; gap: 32px; align-items: center; max-width: 860px; margin: 0 auto; padding: 32px; border-radius: var(--radius-lg);
  background: linear-gradient(var(--glass-bg-strong), var(--glass-bg-strong)) padding-box, var(--gradient-border) border-box; border: 1px solid transparent; box-shadow: 0 24px 50px var(--shadow);
}
@media (max-width: 640px) { .founder-card { flex-direction: column; text-align: center; padding: 24px; } }
.founder-photo { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 3px solid var(--accent-2); box-shadow: 0 20px 40px var(--shadow), 0 0 40px rgba(209, 64, 90, 0.25); }
.founder-card h3 { font-size: 26px; }
.founder-role { margin: 6px 0 12px; color: var(--accent-2); font-weight: 700; font-size: 14.5px; }
.founder-card p:last-of-type { color: var(--muted); }

/* ---------- 3D course cards ---------- */
.mx-courses { padding-top: 70px; }
.mx-live-wrap { padding: 20px 0 90px; }
.mx-live-wrap .mx-live { margin-top: 0; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; max-width: 920px; margin: 0 auto; perspective: 1300px; }
.course-card {
  position: relative; overflow: hidden; padding: 34px 30px 30px; border-radius: 24px;
  background: linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box, var(--gradient-border) border-box; border: 1px solid transparent;
  box-shadow: 1px 1px 0 var(--accent-3), 2px 2px 0 var(--accent-3), 3px 3px 0 var(--accent-3), 4px 4px 0 var(--accent-3), 5px 5px 0 var(--accent-3), 14px 26px 44px var(--shadow);
}
.course-num {
  position: absolute; right: 18px; top: -4px; font-family: var(--font-display); font-weight: 700; font-size: 110px; line-height: 1; color: transparent;
  -webkit-text-stroke: 1.5px rgba(231, 200, 115, 0.35); pointer-events: none; transform: translateZ(40px);
}
.course-badge {
  display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: #1b1405; background: linear-gradient(120deg, var(--accent-2), #B8912F); margin-bottom: 14px;
}
.course-card h3 { font-size: 25px; line-height: 1.2; max-width: 80%; }
.course-batch { margin-top: 6px; color: var(--accent-2); font-weight: 700; font-size: 14px; letter-spacing: 0.05em; }
.course-tag { margin-top: 12px; color: var(--muted); }
.course-meta { list-style: none; padding: 0; margin: 20px 0 16px; display: grid; gap: 8px; }
.course-meta li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; border-radius: 10px; background: var(--tint-bg); border: 1px solid var(--border); font-size: 14px; }
.course-meta span { color: var(--muted-2); }
.course-meta strong { text-align: right; font-variant-numeric: tabular-nums; }
.course-slots {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 10px 14px; border-radius: 12px; font-weight: 800; color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-3)); box-shadow: 0 10px 24px rgba(165, 28, 48, 0.4); animation: slotPulse 2.4s ease-in-out infinite;
}
.course-slots .badge-dot { background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25); }
@keyframes slotPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@media (prefers-reduced-motion: reduce) { .course-slots { animation: none; } }
.mx-teaser-next {
  display: inline-block; margin-top: 16px; padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text);
  background: var(--glass-bg); border: 1px solid rgba(231, 200, 115, 0.4);
}
.mx-teaser-next strong { color: var(--accent-2); }
.s3d-scholar { --g: linear-gradient(145deg, #7BB0FF, #2F5FC9); --d: #1f428f; }
.s3d-orcid { --g: linear-gradient(145deg, #C6E85F, #7FA31C); --d: #587314; }

/* ==========================================================================
   Current position — premium treatment (hero plaque + experience card)
   ========================================================================== */
a.affil-org { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; perspective: 800px; }
.affil-seal {
  flex-shrink: 0; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; transform-style: preserve-3d;
  background: conic-gradient(from 210deg, #F6E3A6, #B8912F, #F6E3A6, #8a6a12, #F6E3A6);
  box-shadow: 1px 1px 0 #7a5c10, 2px 2px 0 #6b500c, 3px 3px 0 #5c440a, 0 14px 24px rgba(0, 0, 0, 0.4); animation: sealTurn 8s ease-in-out infinite;
}
.affil-seal-in {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 11.5px; letter-spacing: 0.04em;
  color: #2a1f05; background: linear-gradient(145deg, #FBEFC0, #D9B35A); box-shadow: inset 0 0 0 1.5px rgba(122, 92, 16, 0.5), inset 0 3px 6px rgba(255, 255, 255, 0.6);
}
@keyframes sealTurn { 0%, 100% { transform: rotateY(-28deg); } 50% { transform: rotateY(28deg); } }
.affil-plaque { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 11px 24px 12px 20px; }
.affil-live { display: inline-flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(42, 31, 5, 0.78); position: relative; }
.affil-live .badge-dot { width: 6px; height: 6px; background: #8F1A2C; box-shadow: 0 0 0 3px rgba(143, 26, 44, 0.25); }
.affil-org-name { font-size: 15px; font-weight: 800; letter-spacing: 0.02em; }
.affil-dept { position: relative; font-size: 12px; font-weight: 700; color: rgba(42, 31, 5, 0.72); }
.affil-go { font-size: 20px; font-weight: 700; color: var(--accent-2); transition: transform 0.3s; }
a.affil-org:hover .affil-go { transform: translate(4px, -4px); }
a.affil-org:hover .affil-plaque { filter: brightness(1.06); }
a.affil-org:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 6px; border-radius: 14px; }
@media (max-width: 520px) { .affil-seal { width: 44px; height: 44px; } .affil-seal-in { width: 34px; height: 34px; font-size: 10px; } .affil-org-name { font-size: 13.5px; } }
@media (prefers-reduced-motion: reduce) { .affil-seal { animation: none; } }

.timeline-item.is-current { padding-bottom: 48px; }
.timeline-item.is-current .timeline-dot { width: 18px; height: 18px; left: -35px; top: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); animation: dotPulse 2.2s ease-in-out infinite; }
@keyframes dotPulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(209, 64, 90, 0.2), 0 0 16px rgba(231, 200, 115, 0.6); } 50% { box-shadow: 0 0 0 11px rgba(209, 64, 90, 0), 0 0 26px rgba(231, 200, 115, 0.9); } }
.current-card {
  position: relative; padding: 30px 28px 24px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box, var(--gradient-border) border-box; border: 1px solid transparent;
  box-shadow: 1px 1px 0 var(--accent-3), 2px 2px 0 var(--accent-3), 3px 3px 0 var(--accent-3), 4px 4px 0 var(--accent-3), 12px 22px 40px var(--shadow);
}
.current-card::before { content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(closest-side, rgba(231, 200, 115, 0.22), transparent); pointer-events: none; }
.current-ribbon { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 5px 14px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #1b1405; background: linear-gradient(120deg, var(--accent-2), #B8912F); }
.current-ribbon .badge-dot { width: 6px; height: 6px; background: #8F1A2C; box-shadow: 0 0 0 3px rgba(143, 26, 44, 0.3); }
.current-card h3 { font-size: 24px; }
.timeline-org a { color: var(--accent-2); font-size: 16px; text-decoration: none; border-bottom: 1px solid rgba(231, 200, 115, 0.4); transition: color 0.2s, border-color 0.2s; }
.timeline-org a:hover { color: var(--text); border-color: var(--accent); }
.present-pill { display: inline-block; padding: 1px 12px; border-radius: 999px; font-weight: 800; color: #fff; background: linear-gradient(120deg, var(--accent), var(--accent-3)); font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .timeline-item.is-current .timeline-dot { animation: none; } }

/* ==========================================================================
   AI Systems — animated request pipeline
   ========================================================================== */
.pipeline { max-width: 1120px; margin: 0 auto 40px; perspective: 1200px; }
.pipe-track { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); gap: 18px; list-style: none; padding: 18px 0 8px; margin: 0; }
.pipe-node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; outline: none; cursor: pointer; text-align: center; }
/* connector to the next node, with flowing dashes */
.pipe-node:not(:last-of-type)::after {
  content: ''; position: absolute; top: 33px; left: calc(50% + 40px); width: calc(100% - 80px + 18px); height: 3px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, var(--border-strong) 0 8px, transparent 8px 14px); background-size: 28px 3px; animation: pipeFlow 1.2s linear infinite;
}
.pipe-node.is-done:not(:last-of-type)::after { background: repeating-linear-gradient(90deg, var(--accent-2) 0 8px, transparent 8px 14px); background-size: 28px 3px; box-shadow: 0 0 10px rgba(231, 200, 115, 0.5); }
@keyframes pipeFlow { to { background-position: 28px 0; } }
.pipe-face {
  position: relative; z-index: 2; width: 66px; height: 66px; border-radius: 20px; display: grid; place-items: center; color: var(--muted);
  background: linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box, var(--gradient-border) border-box; border: 1px solid transparent;
  box-shadow: 1px 1px 0 var(--border-strong), 2px 2px 0 var(--border-strong), 3px 3px 0 var(--border-strong), 8px 14px 22px var(--shadow);
  transform: rotateX(14deg) rotateY(-12deg); transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.4s, box-shadow 0.4s, background 0.4s;
}
.pipe-name { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; transition: color 0.4s; }
.pipe-node.is-done .pipe-face { color: var(--accent-2); }
.pipe-node.is-active .pipe-face {
  color: #fff; transform: rotateX(0) rotateY(0) translateY(-10px) scale(1.14);
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 1px 1px 0 var(--accent-3), 2px 2px 0 var(--accent-3), 3px 3px 0 var(--accent-3), 4px 4px 0 var(--accent-3), 0 24px 36px rgba(165, 28, 48, 0.5), 0 0 40px rgba(209, 64, 90, 0.5);
}
.pipe-node.is-active .pipe-name { color: var(--text); }
.pipe-node.is-key .pipe-face { box-shadow: 1px 1px 0 var(--accent-2), 2px 2px 0 var(--accent-2), 3px 3px 0 var(--accent-2), 8px 14px 22px var(--shadow); }
.pipe-node:focus-visible .pipe-face { outline: 2px solid var(--accent-2); outline-offset: 4px; }
.pipe-packet {
  position: absolute; left: 0; top: 0; width: 14px; height: 14px; border-radius: 50%; z-index: 3; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent-2) 60%); box-shadow: 0 0 0 5px rgba(231, 200, 115, 0.25), 0 0 22px rgba(231, 200, 115, 0.95);
  transition: transform 0.9s cubic-bezier(0.55, 0, 0.25, 1);
}
.pipe-caption {
  margin: 34px auto 0; max-width: 640px; text-align: center; padding: 22px 26px; border-radius: var(--radius-md);
  background: var(--glass-bg); border: 1px solid var(--border-strong); box-shadow: 0 18px 38px var(--shadow); min-height: 138px;
}
.pipe-step { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-2); }
.pipe-title { display: block; margin: 8px 0 6px; font-family: var(--font-display); font-size: 24px; }
.pipe-desc { color: var(--muted); }

@media (max-width: 980px) {
  .pipe-track { grid-template-columns: 1fr; gap: 6px; padding-left: 8px; }
  .pipe-node { flex-direction: row; justify-content: flex-start; gap: 18px; text-align: left; padding: 6px 0 14px; }
  .pipe-node:not(:last-of-type)::after { top: 76px; left: 32px; width: 3px; height: 16px; background: repeating-linear-gradient(180deg, var(--border-strong) 0 6px, transparent 6px 10px); background-size: 3px 20px; animation-name: pipeFlowV; }
  .pipe-node.is-done:not(:last-of-type)::after { background: repeating-linear-gradient(180deg, var(--accent-2) 0 6px, transparent 6px 10px); background-size: 3px 20px; }
  @keyframes pipeFlowV { to { background-position: 0 20px; } }
  .pipe-face { width: 58px; height: 58px; }
  .pipe-name { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .pipe-node::after { animation: none !important; } .pipe-packet { display: none; } }

.example-chip { transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s; box-shadow: 1px 1px 0 var(--accent-3), 2px 2px 0 var(--accent-3), 3px 3px 0 var(--accent-3), 6px 10px 18px var(--shadow); }
.systems-examples .example-chip { animation: chipBob 5s ease-in-out infinite; }
.systems-examples .example-chip:nth-child(2) { animation-delay: -1s; } .systems-examples .example-chip:nth-child(3) { animation-delay: -2s; }
.systems-examples .example-chip:nth-child(4) { animation-delay: -3s; } .systems-examples .example-chip:nth-child(5) { animation-delay: -4s; }
@keyframes chipBob { 0%, 100% { margin-top: 0; } 50% { margin-top: -7px; } }
@media (prefers-reduced-motion: reduce) { .systems-examples .example-chip { animation: none; } }

/* ---------- First-author badge + author line ---------- */
.pub-first {
  display: inline-block; margin-right: 8px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: 0.03em; color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-3)); box-shadow: 0 6px 14px rgba(165, 28, 48, 0.35);
}
.pub-authors { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.pub-authors strong { color: var(--text); }
.pub-more { color: var(--muted-2); font-size: 12.5px; }

/* ==========================================================================
   Gold medal animation (BS / MS — Gold Medalist)
   ========================================================================== */
.edu-card.has-medal { position: relative; padding-top: 96px; overflow: visible; }
.medal { position: absolute; top: -20px; left: 22px; width: 84px; height: 112px; perspective: 500px; pointer-events: none; transform-origin: 50% 0; }
.edu-card.has-medal.is-visible .medal { animation: medalDrop 1.4s cubic-bezier(0.3, 1.5, 0.5, 1) 0.3s both; }
@keyframes medalDrop { 0% { opacity: 0; transform: translateY(-70px) rotate(-14deg); } 55% { opacity: 1; transform: translateY(8px) rotate(6deg); } 78% { transform: translateY(-3px) rotate(-3deg); } 100% { opacity: 1; transform: none; } }
.medal-ribbon { position: absolute; top: 0; width: 20px; height: 54px; background: linear-gradient(180deg, var(--accent), var(--accent-3)); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35); }
.medal-ribbon.l { left: 22px; transform: skewX(-14deg) rotate(8deg); transform-origin: 50% 0; }
.medal-ribbon.r { left: 42px; transform: skewX(14deg) rotate(-8deg); transform-origin: 50% 0; filter: brightness(0.82); }
.medal-coin {
  position: absolute; left: 12px; top: 40px; width: 60px; height: 60px; border-radius: 50%; transform-style: preserve-3d; overflow: hidden;
  background: conic-gradient(from 200deg, #FBEFC0, #D9B35A, #8a6a12, #F6E3A6, #B8912F, #FBEFC0);
  box-shadow: 1px 1px 0 #7a5c10, 2px 2px 0 #6b500c, 3px 3px 0 #5c440a, 0 12px 20px rgba(0, 0, 0, 0.45), 0 0 26px rgba(231, 200, 115, 0.45);
  animation: coinFlip 5.5s ease-in-out 1.8s infinite;
}
@keyframes coinFlip { 0%, 62%, 100% { transform: rotateY(0); } 78% { transform: rotateY(180deg); } 92% { transform: rotateY(360deg); } }
.medal-face {
  position: absolute; inset: 6px; border-radius: 50%; display: grid; place-items: center; color: #7a5a10;
  background: radial-gradient(circle at 35% 28%, #FFF6CF, #E3BE62 62%, #B8912F); box-shadow: inset 0 0 0 2px rgba(122, 92, 16, 0.55), inset 0 4px 8px rgba(255, 255, 255, 0.55);
}
.medal-shine { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.85) 50%, transparent 62%); transform: translateX(-130%); animation: medalShine 3.2s ease-in-out 2s infinite; }
@keyframes medalShine { 0% { transform: translateX(-130%); } 45%, 100% { transform: translateX(130%); } }
.spark { position: absolute; width: 10px; height: 10px; opacity: 0; background: #FFF3BF; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: twinkle 2.6s ease-in-out infinite; }
.spark.s1 { left: 0; top: 52px; animation-delay: 1.8s; } .spark.s2 { right: 0; top: 46px; width: 13px; height: 13px; animation-delay: 2.4s; }
.spark.s3 { left: 6px; top: 100px; width: 8px; height: 8px; animation-delay: 3s; } .spark.s4 { right: 8px; top: 98px; animation-delay: 3.6s; }
@keyframes twinkle { 0%, 70%, 100% { opacity: 0; transform: scale(0.3) rotate(0); } 82% { opacity: 1; transform: scale(1.15) rotate(45deg); } }
.medal-label {
  position: absolute; left: 96px; top: 62px; white-space: nowrap; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-2);
  padding: 4px 12px; border-radius: 999px; background: var(--tint-bg); border: 1px solid rgba(231, 200, 115, 0.45);
}
.edu-card .achievement { margin-top: 10px; }
@media (max-width: 860px) { .edu-card.has-medal { padding-top: 104px; } }
@media (prefers-reduced-motion: reduce) { .medal, .medal-coin, .medal-shine, .spark { animation: none !important; } .edu-card.has-medal .medal { opacity: 1; } .spark { opacity: 0.8; } }

/* ==========================================================================
   MarXus projects showcase — staged 3D entrance, orbiting light border, Ken Burns, shine
   ========================================================================== */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.mxp { padding-top: 70px; }
.mxp-grid { counter-reset: mxp; perspective: 1500px; }
.mxp-card { position: relative; counter-increment: mxp; transition: transform 0.14s ease-out, box-shadow 0.35s ease !important; }
.mxp-card.reveal { opacity: 0; }
.mxp-card.reveal.is-visible { opacity: 1; animation: mxpRise 1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; animation-delay: calc(var(--col, 0) * 160ms); }
@keyframes mxpRise {
  from { opacity: 0; transform: perspective(1100px) translate3d(0, 70px, -80px) rotateX(24deg) rotateY(calc((var(--col, 0) * 2 - 1) * 12deg)) scale(0.92); }
  to { opacity: 1; transform: perspective(1100px) translate3d(0, 0, 0) rotateX(0) rotateY(0) scale(1); }
}
/* light that orbits the card border */
.mxp-glow { position: absolute; inset: -1px; border-radius: inherit; padding: 2px; pointer-events: none; opacity: 0; transition: opacity 0.4s; z-index: 3;
  background: conic-gradient(from var(--ang), transparent 0 62%, var(--accent-2) 80%, var(--accent) 92%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: orbit 5s linear infinite; }
.mxp-card:hover .mxp-glow, .mxp-card.tilt-live .mxp-glow { opacity: 1; }
@keyframes orbit { to { --ang: 360deg; } }
/* slow cinematic zoom + diagonal shine */
.mxp-card .project-media img { animation: kenburns 16s ease-in-out infinite alternate; transform-origin: 50% 40%; }
@keyframes kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.12) translate(-2%, -2%); } }
.mxp-card .project-media::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; transform: translateX(-130%);
  background: linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, 0.35) 50%, transparent 62%);
}
.mxp-card:hover .project-media::before { transform: translateX(130%); transition: transform 0.9s ease; }
.mxp-num {
  position: absolute; right: 14px; bottom: 6px; z-index: 2; font-family: var(--font-display); font-size: 64px; font-weight: 700; line-height: 1; color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.55); text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35); pointer-events: none;
}
.mxp-featured {
  position: absolute; left: 14px; bottom: 14px; z-index: 2; padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: #1b1405; background: linear-gradient(120deg, var(--accent-2), #B8912F); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}
.mxp-card .project-body h3 { transition: color 0.3s; }
.mxp-card:hover .project-body h3 { color: var(--accent-2); }
.mxp-card .tech-pill { transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s; }
.mxp-card:hover .tech-pill { transform: translateY(-3px); border-color: var(--accent-2); }
.mxp-card:hover .tech-pill:nth-child(2) { transition-delay: 0.05s; } .mxp-card:hover .tech-pill:nth-child(3) { transition-delay: 0.1s; }
.mxp-card:hover .tech-pill:nth-child(4) { transition-delay: 0.15s; } .mxp-card:hover .tech-pill:nth-child(5) { transition-delay: 0.2s; }
@media (prefers-reduced-motion: reduce) {
  .mxp-card.reveal { opacity: 1; } .mxp-card.reveal.is-visible { animation: none; }
  .mxp-card .project-media img, .mxp-glow { animation: none; }
}

/* ==========================================================================
   Homepage projects: compact 3D icon tiles (full detail lives on /marxus.php)
   ========================================================================== */
.proj-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 20px; list-style: none; padding: 0; margin: 0 auto; max-width: 1080px; perspective: 1200px; }
.proj-tile {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; height: 100%; padding: 26px 14px 20px; border-radius: 20px;
  background: linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box, var(--gradient-border) border-box; border: 1px solid transparent;
  box-shadow: 1px 1px 0 var(--border-strong), 2px 2px 0 var(--border-strong), 3px 3px 0 var(--border-strong), 10px 18px 28px var(--shadow);
}
.proj-ic {
  width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; color: #fff; margin-bottom: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 1px 1px 0 var(--accent-3), 2px 2px 0 var(--accent-3), 3px 3px 0 var(--accent-3), 4px 4px 0 var(--accent-3), 0 14px 22px rgba(165, 28, 48, 0.4);
  transform: rotateX(12deg) rotateY(-14deg); transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.proj-tile:hover .proj-ic { transform: rotateX(0) rotateY(0) translateY(-6px) scale(1.1); }
.proj-name { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.proj-cat { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-2); }
.proj-tile:hover .proj-name { color: var(--accent-2); }
.proj-more { text-align: center; margin-top: 40px; }
/* landing on a card from a tile: brief highlight */
.mxp-card:target { animation: targetPulse 1.8s ease 2; scroll-margin-top: 100px; }
@keyframes targetPulse { 0%, 100% { box-shadow: 0 30px 60px var(--shadow); } 50% { box-shadow: 0 0 0 3px var(--accent-2), 0 0 50px rgba(231, 200, 115, 0.55); } }
@media (prefers-reduced-motion: reduce) { .proj-ic { transform: none; } .mxp-card:target { animation: none; outline: 2px solid var(--accent-2); } }

/* ==========================================================================
   Technologies — category cards with brand icons
   ========================================================================== */
.sk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; perspective: 1400px; }
@media (max-width: 980px) { .sk-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .sk-grid { grid-template-columns: 1fr; } }
.sk-card {
  padding: 26px 24px 24px; border-radius: 22px;
  background: linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box, var(--gradient-border) border-box; border: 1px solid transparent;
  box-shadow: 1px 1px 0 var(--border-strong), 2px 2px 0 var(--border-strong), 3px 3px 0 var(--border-strong), 12px 22px 36px var(--shadow);
}
.sk-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.sk-head h3 { font-size: 20px; }
.sk-count { font-size: 12px; color: var(--muted-2); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.sk-cat-ic {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 1px 1px 0 var(--accent-3), 2px 2px 0 var(--accent-3), 3px 3px 0 var(--accent-3), 0 12px 20px rgba(165, 28, 48, 0.4); transform: rotateX(12deg) rotateY(-14deg);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sk-card:hover .sk-cat-ic { transform: rotateX(0) rotateY(0) translateY(-4px) scale(1.08); }
.sk-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.sk {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px 8px 10px; border-radius: 12px; font-size: 14px; font-weight: 700; color: var(--text);
  background: var(--tint-bg); border: 1px solid var(--border); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s, box-shadow 0.3s;
}
.sk:hover { transform: translateY(-3px); border-color: var(--accent-2); box-shadow: 0 10px 20px var(--shadow); }
.sk.p1 { border-color: rgba(231, 200, 115, 0.5); background: linear-gradient(135deg, rgba(231, 200, 115, 0.14), transparent); font-size: 14.5px; }
.sk.p3 { color: var(--muted); font-weight: 600; }
.sk-ic { width: 24px; height: 24px; flex-shrink: 0; display: grid; place-items: center; border-radius: 7px; background: var(--bg); border: 1px solid var(--border); color: var(--accent-2); }
.sk-brand::before {
  content: ''; width: 14px; height: 14px; background: var(--accent-2);
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; transition: background 0.3s;
}
.sk:hover .sk-brand::before { background: var(--accent); }
.sk-generic svg { width: 14px; height: 14px; }
.skills-groups { display: none; }

/* ==========================================================================
   Polish pass — hero balance, orbit labels, global refinements
   ========================================================================== */
@media (min-width: 981px) {
  .hero-grid { grid-template-columns: 1.25fr 0.95fr; gap: 40px; }
  .hero-title { font-size: clamp(32px, 3.75vw, 54px); line-height: 1.07; }
}
.hero-title .line2 { background-size: 200% 100%; animation: titleSheen 7s ease-in-out 1.5s infinite alternate; }
@keyframes titleSheen { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
.orbit-label { transform-origin: 50% 100%; }
.orbit-label::after { content: ''; position: absolute; left: 50%; top: 100%; width: 1px; height: 12px; background: linear-gradient(var(--accent-2), transparent); }
.hero-stage::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: -2%; height: 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.28), transparent); filter: blur(10px); z-index: -1; }
::selection { background: rgba(209, 64, 90, 0.35); color: inherit; }
html { scrollbar-width: thin; scrollbar-color: var(--accent-3) var(--bg); }
::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--accent), var(--accent-3)); border-radius: 10px; border: 2px solid var(--bg); }
body { text-rendering: optimizeLegibility; font-feature-settings: 'kern', 'liga'; }
.section-title { text-wrap: balance; } .section-subtitle { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .hero-title .line2 { animation: none; } }

/* ==========================================================================
   Impact & Recognition — colourful category cards
   ========================================================================== */
#impact { background:
  radial-gradient(520px 300px at 8% 0%, rgba(16, 185, 129, 0.12), transparent 70%),
  radial-gradient(520px 320px at 95% 20%, rgba(139, 92, 246, 0.12), transparent 70%),
  radial-gradient(560px 320px at 50% 100%, rgba(245, 158, 11, 0.12), transparent 70%); }
#impact .section-head::after { background: linear-gradient(90deg, #10B981, #3B82F6, #8B5CF6, #D1405A, #F59E0B); height: 3px; width: 120px; border-radius: 3px; }
.impact-grid.no-statement { grid-template-columns: 1fr; }
.impact-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 20px; list-style: none; padding: 0; margin: 0; perspective: 1200px; }
.impact-list li::before { content: none; }
.impact-item {
  --c1: #D1405A; --c2: #8F1A2C;
  position: relative; display: flex; gap: 18px; align-items: flex-start; padding: 24px 24px 24px 26px; border-radius: 20px; overflow: hidden;
  background: linear-gradient(color-mix(in srgb, var(--c1) 10%, var(--bg-elevated)), color-mix(in srgb, var(--c1) 4%, var(--bg-elevated))) padding-box,
              linear-gradient(135deg, var(--c1), transparent 55%, var(--c2)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 18px 36px color-mix(in srgb, var(--c1) 22%, transparent), 0 4px 0 color-mix(in srgb, var(--c2) 70%, transparent);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s;
}
.impact-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(var(--c1), var(--c2)); }
.impact-item::after { content: ''; position: absolute; right: -50px; top: -50px; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c1) 30%, transparent), transparent); pointer-events: none; }
.impact-item:hover { transform: translateY(-7px) rotateX(3deg); box-shadow: 0 28px 50px color-mix(in srgb, var(--c1) 34%, transparent), 0 4px 0 var(--c2); }
.impact-ic {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 17px; display: grid; place-items: center; color: #fff; position: relative; z-index: 1;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 1px 1px 0 var(--c2), 2px 2px 0 var(--c2), 3px 3px 0 var(--c2), 0 14px 22px color-mix(in srgb, var(--c1) 45%, transparent);
  transform: rotateX(12deg) rotateY(-14deg); transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.impact-item:hover .impact-ic { transform: rotateX(0) rotateY(0) translateY(-4px) scale(1.1) rotate(-4deg); }
.impact-txt { position: relative; z-index: 1; }
.impact-txt h3 { font-size: 17.5px; line-height: 1.3; margin-bottom: 8px; }
.impact-txt p { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.k-review { --c1: #10B981; --c2: #047857; }
.k-expert { --c1: #D1405A; --c2: #8F1A2C; }
.k-first  { --c1: #3B82F6; --c2: #1D4ED8; }
.k-gold   { --c1: #F59E0B; --c2: #B45309; }
.k-collab { --c1: #8B5CF6; --c2: #6D28D9; }
.k-other  { --c1: #14B8A6; --c2: #0F766E; }
:root[data-theme="light"] .k-gold { --c1: #E08A00; }
@media (prefers-reduced-motion: reduce) { .impact-ic { transform: none; } .impact-item:hover { transform: none; } }

/* ---------- Collapsible earlier experience ---------- */
.timeline-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.timeline-more.is-open { grid-template-rows: 1fr; }
.timeline-more-inner { overflow: hidden; min-height: 0; opacity: 0; transform: translateY(-12px); transition: opacity 0.6s ease 0.1s, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.timeline-more.is-open .timeline-more-inner { opacity: 1; transform: none; overflow: visible; }
.timeline-more:not(.is-open) .timeline-more-inner * { visibility: hidden; }   /* keep hidden items out of tab order / screen readers */
.timeline-more .timeline-item:first-child { padding-top: 6px; }
.exp-toggle-wrap { text-align: center; margin-top: 34px; }
.exp-toggle { gap: 10px; padding-right: 22px; }
.exp-chev { font-size: 22px; line-height: 0.6; transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); display: inline-block; padding-bottom: 6px; }
.exp-toggle.is-open .exp-chev { transform: rotate(180deg); padding-bottom: 0; padding-top: 6px; }
.exp-toggle:hover { border-color: var(--accent-2); color: var(--accent-2); }
@media (prefers-reduced-motion: reduce) { .timeline-more, .timeline-more-inner, .exp-chev { transition: none; } }

/* ==========================================================================
   PhD — flagship doctoral card (full width, 3D cap, animated CGPA gauge)
   ========================================================================== */
.education-grid { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .education-grid { grid-template-columns: 1fr; } }
.edu-phd {
  grid-column: 1 / -1; position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 38px; padding: 40px 44px; border-radius: 28px;
  color: #F6F2EA;
  background: linear-gradient(135deg, #2c0b14 0%, #160a0e 52%, #261b08 100%) padding-box, linear-gradient(135deg, #E7C873, #D1405A 45%, #E7C873) border-box;
  border: 1.5px solid transparent;
  box-shadow: 1px 1px 0 #6b500c, 2px 2px 0 #5c440a, 3px 3px 0 #4d3808, 4px 4px 0 #3e2d06, 18px 32px 56px rgba(80, 10, 25, 0.45), 0 0 80px rgba(231, 200, 115, 0.12);
}
@media (max-width: 860px) { .edu-phd { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 22px; padding: 32px 22px; } }
.phd-aurora { position: absolute; inset: -40%; pointer-events: none; background: conic-gradient(from 0deg, transparent, rgba(231, 200, 115, 0.16), transparent 30%, rgba(209, 64, 90, 0.2), transparent 60%); animation: aurora 18s linear infinite; }
@keyframes aurora { to { transform: rotate(360deg); } }
.phd-shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 40%, rgba(255, 243, 191, 0.14) 50%, transparent 60%); transform: translateX(-120%); animation: shineSweep 7s ease-in-out 2s infinite; }
.edu-phd > * { position: relative; z-index: 1; }
.edu-phd > .phd-aurora, .edu-phd > .phd-shine { position: absolute; z-index: 0; }

.phd-cap { position: relative; width: 170px; height: 150px; display: grid; place-items: center; perspective: 700px; }
.phd-cap svg { overflow: visible; filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.5)); animation: capSpin 9s ease-in-out infinite; transform-style: preserve-3d; }
@keyframes capSpin { 0%, 100% { transform: rotateY(-24deg) rotateX(8deg) translateY(0); } 50% { transform: rotateY(24deg) rotateX(-2deg) translateY(-9px); } }
.phd-cap .tassel { transform-origin: 104px 41px; animation: tasselSwing 3.4s ease-in-out infinite; }
@keyframes tasselSwing { 0%, 100% { transform: rotate(7deg); } 50% { transform: rotate(-9deg); } }
.phd-spark { position: absolute; width: 12px; height: 12px; background: #FFF3BF; opacity: 0; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: twinkle 3s ease-in-out infinite; }
.phd-spark.p1 { left: 4px; top: 22px; animation-delay: 0.4s; } .phd-spark.p2 { right: 2px; top: 6px; width: 16px; height: 16px; animation-delay: 1.4s; } .phd-spark.p3 { right: 18px; bottom: 6px; width: 9px; height: 9px; animation-delay: 2.2s; }

.phd-kicker { display: inline-flex; align-items: center; gap: 9px; font-size: 11.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #E7C873; padding: 6px 14px; border-radius: 999px; background: rgba(231, 200, 115, 0.1); border: 1px solid rgba(231, 200, 115, 0.4); }
.phd-kicker .badge-dot { background: #D1405A; box-shadow: 0 0 0 3px rgba(209, 64, 90, 0.3); }
.edu-phd h4 { font-family: var(--font-display); font-size: clamp(26px, 3.2vw, 38px); line-height: 1.1; margin: 14px 0 8px; color: #fff; }
.edu-phd .inst { color: #D8CFC0; font-size: 15.5px; margin-bottom: 16px; }
.phd-thesis { margin: 0; padding: 14px 18px; border-left: 3px solid #D1405A; border-radius: 0 14px 14px 0; background: rgba(255, 255, 255, 0.05); font-family: var(--font-display); font-style: italic; font-size: 17px; line-height: 1.45; color: #F6F2EA; }
.phd-thesis span { display: block; font-family: var(--font-body); font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: #E7C873; margin-bottom: 4px; }
@media (max-width: 860px) { .phd-thesis { text-align: left; } }

.phd-gauge { position: relative; width: 150px; height: 150px; flex-shrink: 0; }
.phd-gauge svg { display: block; filter: drop-shadow(0 0 16px rgba(231, 200, 115, 0.35)); }
.gauge-track { fill: none; stroke: rgba(255, 255, 255, 0.12); stroke-width: 9; }
.gauge-fill { fill: none; stroke: #E7C873; stroke-width: 9; stroke-linecap: round; stroke-dasharray: var(--circ); stroke-dashoffset: var(--circ); transition: stroke-dashoffset 2.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s; }
.edu-phd.is-visible .gauge-fill { stroke-dashoffset: var(--off); }
.gauge-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge-text .odo { font-family: var(--font-display); font-size: 40px; font-weight: 700; color: #fff; }
.gauge-text small { margin-top: 2px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #E7C873; }
@media (prefers-reduced-motion: reduce) { .phd-aurora, .phd-shine, .phd-cap svg, .phd-cap .tassel, .phd-spark { animation: none; } .gauge-fill { transition: none; } .phd-spark { opacity: 0.8; } }

/* ==========================================================================
   Molecular dynamics panel (live simulation)
   ========================================================================== */
.md-panel {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; margin-top: 48px; border-radius: 26px; overflow: hidden;
  background: linear-gradient(135deg, #14090f, #0b0b10 60%, #1b1407) padding-box, linear-gradient(135deg, #E7C873, #D1405A 50%, #E7C873) border-box; border: 1.5px solid transparent;
  box-shadow: 1px 1px 0 #5c440a, 2px 2px 0 #4d3808, 3px 3px 0 #3e2d06, 16px 28px 48px rgba(0, 0, 0, 0.4); color: #F6F2EA;
}
@media (max-width: 900px) { .md-panel { grid-template-columns: 1fr; } }
.md-sim { position: relative; min-height: 340px; background: radial-gradient(circle at 50% 45%, #2a0f1c, #0a0a0e 75%); }
#md-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.md-readout { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 10px; }
.md-readout div { padding: 7px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(231, 200, 115, 0.3); backdrop-filter: blur(6px); }
.md-readout span { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #E7C873; }
.md-readout strong { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 15px; font-variant-numeric: tabular-nums; color: #fff; }
.md-live { position: absolute; right: 14px; top: 14px; display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #E7C873; padding: 5px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(231, 200, 115, 0.35); }
.md-live .badge-dot { background: #4ADE80; box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.25); }
.md-copy { padding: 38px 36px; display: flex; flex-direction: column; justify-content: center; }
.md-copy .eyebrow { align-self: flex-start; }
.md-copy h3 { font-size: clamp(24px, 2.6vw, 32px); margin: 6px 0 14px; color: #fff; }
.md-copy p { color: #D8CFC0; line-height: 1.6; }
.md-copy strong { color: #E7C873; }
.md-tags { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; padding: 0; margin: 20px 0; }
.md-tags li { padding: 7px 14px; border-radius: 10px; font-size: 13px; font-weight: 700; color: #fff; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(231, 200, 115, 0.3); box-shadow: 1px 1px 0 rgba(143, 26, 44, 0.8), 2px 2px 0 rgba(143, 26, 44, 0.6); }
.md-note { font-size: 12.5px; color: #A59C8D !important; border-left: 2px solid #D1405A; padding-left: 12px; }

/* Live strip now sits right under the MarXus hero (before courses and projects) */
.mx-live-wrap { padding: 0 0 20px; }
.mx-live-wrap .mx-live { margin-top: 0; }
.mx-page-hero { padding-bottom: 36px; }
.mx-live-wrap .mx-batch { margin-bottom: 26px; }

/* ---------- Skills: masonry layout + category watermark ---------- */
.sk-grid.is-masonry { grid-auto-rows: 4px; row-gap: 0; align-items: start; }
.sk-card { position: relative; overflow: hidden; }
.sk-card > *:not(.sk-watermark) { position: relative; z-index: 1; }
.sk-watermark { position: absolute; right: -26px; bottom: -30px; width: 190px; height: 190px; color: var(--accent); opacity: 0.075; pointer-events: none; transform: rotate(-10deg); transition: opacity 0.5s, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sk-watermark svg { width: 100%; height: 100%; stroke-width: 1.1; }
.sk-card:hover .sk-watermark { opacity: 0.14; transform: rotate(0deg) scale(1.08); }
.sk-card::before { content: ''; position: absolute; left: 24px; right: 24px; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent); opacity: 0.8; }
@media (max-width: 640px) { .sk-watermark { width: 150px; height: 150px; } }

/* ==========================================================================
   Students' work — 3D platform cards with lazy inline players
   ========================================================================== */
.sw { padding-top: 70px; }
.sw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 26px; max-width: 1100px; margin: 0 auto; perspective: 1400px; }
.sw-card {
  --p1: #D1405A; --p2: #8F1A2C;
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box, linear-gradient(135deg, var(--p1), transparent 55%, var(--p2)) border-box; border: 1px solid transparent;
  box-shadow: 1px 1px 0 var(--p2), 2px 2px 0 var(--p2), 3px 3px 0 var(--p2), 12px 22px 36px var(--shadow);
}
.sw-tiktok { --p1: #25F4EE; --p2: #FE2C55; } .sw-youtube { --p1: #FF3B3B; --p2: #A30000; } .sw-facebook { --p1: #4C8BFF; --p2: #1456C9; }
.sw-instagram { --p1: #FA7E1E; --p2: #962FBF; }
.sw-media { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, #0b0b10, #1c1220); }
.sw-tiktok .sw-media { background: linear-gradient(135deg, #010101, #1a0d14 60%, #0a2d2f); }
.sw-youtube .sw-media { background: linear-gradient(135deg, #1a0606, #5a0a0a); }
.sw-facebook .sw-media { background: linear-gradient(135deg, #0c2150, #1456C9); }
.sw-instagram .sw-media { background: linear-gradient(135deg, #5b1f7a, #D62976 55%, #FA7E1E); }
.sw-media.has-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sw-media.has-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.55)); }
.sw-logo { width: 74px; height: 74px; background: #fff; opacity: 0.92; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5)); }
.sw-tiktok .sw-logo { background: linear-gradient(135deg, #25F4EE, #fff 45%, #FE2C55); }
.sw-media.has-thumb .sw-logo { position: absolute; right: 14px; bottom: 12px; width: 34px; height: 34px; z-index: 2; }
.sw-badge { position: absolute; left: 14px; top: 14px; z-index: 2; padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, 0.2); }
.sw-play {
  position: absolute; z-index: 3; left: 50%; top: 50%; width: 70px; height: 70px; margin: -35px 0 0 -35px; border: 0; border-radius: 50%; cursor: pointer; color: #fff; font-size: 24px; padding-left: 5px;
  background: linear-gradient(135deg, var(--p2), var(--p1)); box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.14), 0 16px 30px rgba(0, 0, 0, 0.5); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation: playPulse 2.4s ease-in-out infinite;
}
.sw-play:hover { transform: scale(1.14); }
@keyframes playPulse { 0%, 100% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.14), 0 16px 30px rgba(0, 0, 0, 0.5); } 50% { box-shadow: 0 0 0 16px rgba(255, 255, 255, 0), 0 16px 30px rgba(0, 0, 0, 0.5); } }
.sw-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 4; background: #000; }
.sw-card.is-playing .sw-media { aspect-ratio: 16 / 10; }
.sw-card.is-playing.sw-tiktok .sw-media { aspect-ratio: 9 / 14; max-height: 560px; }
.sw-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sw-body h3 { font-size: 19px; line-height: 1.25; }
.sw-by { font-size: 13.5px; color: var(--muted-2); } .sw-by strong { color: var(--accent-2); }
.sw-note { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.sw-body .btn { align-self: flex-start; margin-top: auto; }
@media (prefers-reduced-motion: reduce) { .sw-play { animation: none; } }

/* ---------- Students' own video (vertical, muted preview, tap for sound) ---------- */
.sw-card { max-width: 410px; width: 100%; justify-self: center; }
.sw-media.sw-vertical { aspect-ratio: 9 / 16; max-height: 580px; background: #000; cursor: pointer; }
.sw-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; background: #000; }
.sw-media.sw-vertical .sw-logo { z-index: 3; }
.sw-media.sw-vertical .sw-badge { z-index: 3; }
.sw-sound {
  position: absolute; z-index: 3; left: 50%; bottom: 18px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 9px 18px; border-radius: 999px; font-size: 13px; font-weight: 800; color: #fff; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45); animation: playPulse 2.4s ease-in-out infinite; pointer-events: none;
}
.sw-media.sw-vertical::after { display: none; }

/* AI-project cards without a platform logo: monogram on a crimson-gold gradient */
.sw-card.sw-other { --p1: #E7C873; --p2: #8F1A2C; }
.sw-other .sw-media { background: radial-gradient(circle at 30% 25%, #6b1527, #1c0a10 70%); }
.sw-other .sw-media::before { content: ''; position: absolute; inset: 0; background: conic-gradient(from 0deg at 50% 50%, transparent, rgba(231, 200, 115, 0.18), transparent 35%, rgba(209, 64, 90, 0.2), transparent 70%); animation: aurora 14s linear infinite; }
.sw-mark { position: relative; z-index: 1; font-family: var(--font-display); font-size: 84px; font-weight: 700; letter-spacing: 0.02em; color: transparent; background: linear-gradient(135deg, #FBEFC0, #E7C873 55%, #D1405A); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5)); }
@media (prefers-reduced-motion: reduce) { .sw-other .sw-media::before { animation: none; } }

/* ==========================================================================
   Students' work — 3D coverflow carousel
   ========================================================================== */
.sw-carousel { position: relative; perspective: 1700px; touch-action: pan-y; outline: none; max-width: 1100px; margin: 0 auto; }
.sw-stage { position: relative; height: 640px; transform-style: preserve-3d; }
.sw-carousel .sw-card {
  --cw: min(330px, 74vw);
  position: absolute; left: 50%; top: 8px; width: var(--cw); max-width: none; margin-left: calc(var(--cw) / -2); justify-self: auto;
  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.9s ease, filter 0.9s ease, box-shadow 0.6s; will-change: transform; backface-visibility: hidden;
}
.sw-carousel .sw-card.is-active { box-shadow: 1px 1px 0 var(--p2), 2px 2px 0 var(--p2), 3px 3px 0 var(--p2), 0 36px 70px var(--shadow), 0 0 70px color-mix(in srgb, var(--p2) 45%, transparent); }
.sw-carousel .sw-card:not(.is-active) { cursor: pointer; }
.sw-carousel .sw-media, .sw-carousel .sw-media.sw-vertical, .sw-carousel .sw-card.is-playing.sw-tiktok .sw-media, .sw-carousel .sw-card.is-playing .sw-media { aspect-ratio: 9 / 13; max-height: none; }
.sw-carousel .sw-body { min-height: 200px; }
.sw-carousel .sw-note { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sw-carousel .sw-card:not(.is-active) .sw-sound, .sw-carousel .sw-card:not(.is-active) .sw-play { opacity: 0.0; }
.sw-nav {
  position: absolute; top: 250px; z-index: 40; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--border-strong); cursor: pointer;
  background: var(--glass-bg-strong); color: var(--text); font-size: 28px; line-height: 1; display: grid; place-items: center; backdrop-filter: blur(8px);
  box-shadow: 0 12px 28px var(--shadow); transition: transform 0.25s, border-color 0.25s;
}
.sw-nav:hover { transform: scale(1.12); border-color: var(--accent-2); }
.sw-prev { left: 0; } .sw-next { right: 0; }
@media (max-width: 760px) { .sw-prev { left: -6px; } .sw-next { right: -6px; } .sw-nav { width: 44px; height: 44px; } }
.sw-dots { display: flex; justify-content: center; gap: 10px; margin-top: 2px; }
.sw-dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; cursor: pointer; background: var(--border-strong); transition: all 0.3s; }
.sw-dots button.is-active { width: 30px; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.sw-progress { width: min(240px, 60%); height: 3px; margin: 14px auto 0; border-radius: 3px; background: var(--border); overflow: hidden; }
.sw-progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
@keyframes swFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.sw-hint { text-align: center; margin-top: 14px; font-size: 12.5px; letter-spacing: 0.06em; color: var(--muted-2); }
@media (prefers-reduced-motion: reduce) { .sw-carousel .sw-card { transition: none; } .sw-progress { display: none; } }

/* ---------- Player loading state + fallback (never a bare black box) ---------- */
.sw-media iframe { background: transparent; transition: opacity 0.5s ease; }
.sw-media iframe.is-loading { opacity: 0; }
.sw-loading { position: absolute; z-index: 3; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.25); border-top-color: var(--p1, #E7C873); animation: swSpin 0.9s linear infinite; }
@keyframes swSpin { to { transform: rotate(360deg); } }
.sw-fallback { position: absolute; z-index: 6; left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap; padding: 8px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 800; color: #fff; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.35); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45); transition: transform 0.25s, background 0.25s; }
.sw-fallback:hover { transform: translateX(-50%) translateY(-2px); background: rgba(0, 0, 0, 0.88); }

/* ==========================================================================
   MarXus AI Agent — featured demo (phone frame + copy)
   ========================================================================== */
.mx-demo { padding: 50px 0 40px; }
.mx-demo-grid { display: grid; grid-template-columns: auto 1fr; gap: 64px; align-items: center; max-width: 1000px; margin: 0 auto; }
@media (max-width: 820px) { .mx-demo-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 32px; } }
.mx-demo-lead { margin-top: 14px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.mx-demo-tags { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 22px 0; }
.mx-demo-tags li { padding: 7px 15px; border-radius: 10px; font-size: 13.5px; font-weight: 700; color: var(--text); background: var(--tint-bg); border: 1px solid rgba(231, 200, 115, 0.4); box-shadow: 1px 1px 0 var(--accent-3), 2px 2px 0 var(--accent-3); }
@media (max-width: 820px) { .mx-demo-tags, .mx-demo .mx-actions { justify-content: center; } }

/* ---------- Free demo class ---------- */
.btn-demo {
  gap: 10px; color: #1b1405; background: linear-gradient(120deg, #F6E3A6, #E7C873 50%, #C9A02F); border-color: transparent;
  box-shadow: 0 10px 28px rgba(201, 160, 47, 0.45), 0 0 0 0 rgba(231, 200, 115, 0.5); animation: demoGlow 2.8s ease-in-out infinite; font-weight: 800;
}
.btn-demo:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(201, 160, 47, 0.6); }
@keyframes demoGlow { 0%, 100% { box-shadow: 0 10px 28px rgba(201, 160, 47, 0.45), 0 0 0 0 rgba(231, 200, 115, 0.5); } 50% { box-shadow: 0 10px 28px rgba(201, 160, 47, 0.45), 0 0 0 12px rgba(231, 200, 115, 0); } }
.demo-free { padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; color: #fff; background: linear-gradient(120deg, var(--accent), var(--accent-3)); }
.demo-when, .demo-when-inline { color: var(--muted); font-size: 14px; font-weight: 600; }
.demo-when { margin-top: 14px; }
.demo-when-inline { margin-left: 10px; }
.course-demo { display: block; margin-top: 12px; text-align: center; font-size: 14px; font-weight: 700; color: var(--accent-2); }
.course-demo:hover { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .btn-demo { animation: none; } }

/* ==========================================================================
   Foldable iPhone (burgundy) — 3D device for the MarXus AI Agent demo
   ========================================================================== */
.mx-demo-media.sw-card { background: none; border: 0; box-shadow: none; overflow: visible; padding: 0; width: auto; max-width: none; display: block; position: relative; perspective: 1700px; }
.fold { --fw: min(560px, 86vw); --fh: calc(var(--fw) * 0.78); --r: calc(var(--fw) * 0.062); position: relative; width: var(--fw); height: var(--fh); margin: 24px 56px; }
.fd-scene { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--frx, 9deg)) rotateY(var(--fry, -17deg)); transition: transform 0.2s ease-out; }
.fold.is-idle .fd-scene { animation: foldSway 12s ease-in-out infinite; transition: none; }
@keyframes foldSway { 0%, 100% { transform: rotateX(9deg) rotateY(-19deg) translateY(0); } 50% { transform: rotateX(-2deg) rotateY(17deg) translateY(-10px); } }
.fd-half { position: absolute; top: 0; bottom: 0; width: calc(50% - 1px); transform-style: preserve-3d; }
.fd-l { left: 0; transform-origin: 100% 50%; transform: rotateY(8deg); }
.fd-r { right: 0; transform-origin: 0 50%; transform: rotateY(-8deg); }
.mx-demo-media.is-visible .fd-l { animation: foldOpenL 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s backwards; }
.mx-demo-media.is-visible .fd-r { animation: foldOpenR 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s backwards; }
@keyframes foldOpenL { from { transform: rotateY(86deg); } to { transform: rotateY(8deg); } }
@keyframes foldOpenR { from { transform: rotateY(-86deg); } to { transform: rotateY(-8deg); } }
.fd-layer, .fd-face { position: absolute; inset: 0; }
.fd-l .fd-layer, .fd-l .fd-face { border-radius: var(--r) 3px 3px var(--r); }
.fd-r .fd-layer, .fd-r .fd-face { border-radius: 3px var(--r) var(--r) 3px; }
.fd-layer { background: linear-gradient(135deg, #b9475f, #6a1426 55%, #9c3047); transform: translateZ(var(--z)); filter: brightness(var(--b)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3); }
.fd-face { transform: translateZ(2px); background: linear-gradient(145deg, #d9768b, #8b2238 36%, #c25068 68%, #6a1426); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45), inset 0 0 0 3px rgba(0, 0, 0, 0.2); }
.fd-bezel { position: absolute; inset: 5px; background: #000; }
.fd-l .fd-bezel { border-radius: calc(var(--r) - 5px) 1px 1px calc(var(--r) - 5px); }
.fd-r .fd-bezel { border-radius: 1px calc(var(--r) - 5px) calc(var(--r) - 5px) 1px; }
.fd-screen { position: absolute; inset: 5px; overflow: hidden; background: #000; }
.fd-l .fd-screen { border-radius: calc(var(--r) - 10px) 0 0 calc(var(--r) - 10px); }
.fd-r .fd-screen { border-radius: 0 calc(var(--r) - 10px) calc(var(--r) - 10px) 0; }
.fd-screen .sw-media { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; max-height: none; }
.fd-screen .sw-media iframe { z-index: 4; }
.fd-screen .sw-badge { top: 34px; left: 12px; }
.fd-screen .sw-fallback { bottom: 16px; }
.fd-status { position: absolute; z-index: 8; top: 9px; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 16px; color: #fff; font-size: 11px; pointer-events: none; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.fd-status b { font-weight: 800; } .fd-status i { display: inline-flex; gap: 5px; align-items: center; font-style: normal; font-weight: 700; }
.fd-punch { position: absolute; z-index: 9; top: 9px; left: 50%; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #2a3350, #05070d 70%); box-shadow: 0 0 0 2px #000; }
.fd-crease { position: absolute; z-index: 6; top: 0; bottom: 0; right: 0; width: 22%; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.5)); }
.fd-crease-r { right: auto; left: 0; background: linear-gradient(270deg, transparent, rgba(0, 0, 0, 0.5)); }
.fd-glare { position: absolute; inset: 0; z-index: 7; pointer-events: none; mix-blend-mode: screen; background: linear-gradient(115deg, transparent calc(var(--gp, 30%) - 14%), rgba(255, 255, 255, 0.2) var(--gp, 30%), transparent calc(var(--gp, 30%) + 14%)); }
.fd-hinge { position: absolute; z-index: 3; top: 3%; bottom: 3%; left: 50%; width: 7px; margin-left: -3.5px; border-radius: 4px; transform: translateZ(-4px); background: linear-gradient(90deg, #3d0a15, #c25068 50%, #3d0a15); box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); }
.fd-btn { position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #6a1426, #d9768b); transform: translateZ(-8px); }
.fd-volup { left: -3px; top: 20%; height: 9%; } .fd-voldn { left: -3px; top: 32%; height: 9%; }
.fd-power { right: -3px; top: 26%; height: 13%; background: linear-gradient(270deg, #6a1426, #d9768b); }
.fd-floor { position: absolute; left: 4%; right: 4%; bottom: -34px; height: 44px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.55), transparent); filter: blur(11px); transform: translateZ(-70px) rotateX(90deg); }

/* right screen: Excel-automation illustration */
.xl-screen { background: radial-gradient(circle at 70% 10%, #153b2a, #07140e 70%); color: #e9fff3; }
.xl { position: absolute; inset: 30px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.xl-top b { display: block; font-family: var(--font-display); font-size: 15px; color: #fff; } .xl-top span { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #6ee7a8; font-weight: 800; }
.xl-grid { position: relative; display: grid; grid-template-columns: 16px repeat(4, 1fr); gap: 2px; flex: 1; align-content: start; }
.xl-h, .xl-n { display: grid; place-items: center; font-size: 8.5px; font-weight: 800; color: #8fe3b4; background: rgba(110, 231, 168, 0.12); border-radius: 2px; min-height: 18px; }
.xl-c { position: relative; min-height: 18px; border-radius: 2px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.xl-c i { position: absolute; left: 3px; top: 50%; height: 6px; width: calc(100% - 6px); margin-top: -3px; border-radius: 3px; background: linear-gradient(90deg, #34d399, #a7f3d0); transform-origin: 0 50%; transform: scaleX(0) ; max-width: var(--w); animation: xlFill 9s ease-in-out infinite; animation-delay: var(--d); }
@keyframes xlFill { 0%, 4% { transform: scaleX(0); opacity: 0.4; } 14%, 78% { transform: scaleX(1); opacity: 1; } 92%, 100% { transform: scaleX(1); opacity: 0.25; } }
.xl-cursor { position: absolute; left: 18px; right: 0; top: 20px; height: 20px; border: 1.5px solid #6ee7a8; border-radius: 3px; box-shadow: 0 0 14px rgba(110, 231, 168, 0.55); animation: xlCursor 4.4s steps(8) infinite; }
@keyframes xlCursor { 0% { transform: translateY(0); } 100% { transform: translateY(160px); } }
.xl-foot { display: flex; flex-direction: column; gap: 5px; } .xl-foot em { font-size: 10.5px; color: #b7f5d3; font-style: normal; font-weight: 700; } .xl-foot small { font-size: 8.5px; color: #6f9983; letter-spacing: 0.1em; text-transform: uppercase; }
.xl-prog { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); overflow: hidden; } .xl-prog i { display: block; height: 100%; width: 100%; border-radius: 3px; background: linear-gradient(90deg, #34d399, #fde68a); transform-origin: 0 50%; animation: xlProg 5s ease-in-out infinite; }
@keyframes xlProg { 0% { transform: scaleX(0.05); } 85%, 100% { transform: scaleX(1); } }

.ip-chip {
  position: absolute; z-index: 5; padding: 8px 14px; border-radius: 12px; font-size: 13px; font-weight: 800; white-space: nowrap; color: var(--text);
  background: var(--glass-bg-strong); border: 1px solid rgba(231, 200, 115, 0.45); backdrop-filter: blur(10px); box-shadow: 0 14px 28px var(--shadow), 1px 1px 0 var(--accent-3), 2px 2px 0 var(--accent-3);
  transform: translateZ(80px); animation: chipFloat 6s ease-in-out infinite;
}
.ip-chip-1 { left: -30px; top: 6%; } .ip-chip-2 { right: -24px; bottom: 8%; animation-delay: -3s; }
@keyframes chipFloat { 0%, 100% { margin-top: 0; } 50% { margin-top: -12px; } }
@media (max-width: 820px) { .fold { margin: 24px auto; } .ip-chip-1 { left: -6px; } .ip-chip-2 { right: -6px; } }
@media (prefers-reduced-motion: reduce) { .fold.is-idle .fd-scene, .ip-chip, .xl-c i, .xl-cursor, .xl-prog i { animation: none; } .xl-c i { transform: scaleX(1); } .mx-demo-media.is-visible .fd-l, .mx-demo-media.is-visible .fd-r { animation: none; } }

/* ==========================================================================
   Hero polish + "Explore everything" dock
   ========================================================================== */
/* keep the portrait clear: the 3D network sits BEHIND her, labels still float in front */
#hero-canvas { z-index: 0; }
.stage-portrait { z-index: 1; }
/* tighter, more confident left column so the buttons stay above the fold */
.hero { padding-top: 56px; padding-bottom: 36px; }
.hero-title { margin-top: -4px; }
.affil { margin-top: 14px; gap: 8px; }
.affil-role { font-size: clamp(17px, 1.7vw, 24px); }
.affil-founder { margin-top: 12px; }
.hero-subtext { font-size: 17px; margin-top: 16px; max-width: 600px; }
.hero-meta { margin-top: 12px; }
.hero-actions { margin-top: 24px; }
.s3d-row { margin-top: 22px; }

.hero-dock-wrap { position: relative; z-index: 3; margin-top: 34px; padding-bottom: 8px; }
.dock-label { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 18px; font-size: 12px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-2); }
.dock-label span { flex: 0 1 90px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-2)); } .dock-label span:last-child { background: linear-gradient(270deg, transparent, var(--accent-2)); }
.hero-dock { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; list-style: none; padding: 0; margin: 0; perspective: 1000px; }
@media (max-width: 1100px) { .hero-dock { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .hero-dock { grid-template-columns: 1fr 1fr; gap: 10px; } }
.hero-dock li { animation: dockRise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(0.9s + var(--i) * 0.09s); }
@keyframes dockRise { from { opacity: 0; transform: translateY(34px) rotateX(24deg); } to { opacity: 1; transform: none; } }
.dock-tile {
  position: relative; display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 16px 16px 14px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(var(--glass-bg-strong), var(--glass-bg-strong)) padding-box, var(--gradient-border) border-box; border: 1px solid transparent;
  box-shadow: 1px 1px 0 var(--border-strong), 2px 2px 0 var(--border-strong), 10px 18px 28px var(--shadow);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s;
}
.dock-tile::before { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 38%, rgba(231, 200, 115, 0.28) 50%, transparent 62%); transform: translateX(-130%); animation: dockSweep 7s ease-in-out infinite; animation-delay: calc(2.5s + var(--i) * 0.7s); pointer-events: none; }
@keyframes dockSweep { 0%, 55% { transform: translateX(-130%); } 80%, 100% { transform: translateX(130%); } }
.dock-tile:hover { transform: translateY(-9px) rotateX(5deg) scale(1.03); box-shadow: 1px 1px 0 var(--accent-3), 2px 2px 0 var(--accent-3), 0 30px 46px var(--shadow), 0 0 36px rgba(209, 64, 90, 0.28); }
.dock-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-3)); box-shadow: 1px 1px 0 var(--accent-3), 2px 2px 0 var(--accent-3), 0 10px 18px rgba(165, 28, 48, 0.4); transform: rotateX(10deg) rotateY(-12deg); transition: transform 0.4s; }
.dock-tile:hover .dock-ic { transform: rotateX(0) rotateY(0) translateY(-3px) scale(1.08); }
.dock-txt strong { display: block; font-family: var(--font-display); font-size: 16px; line-height: 1.2; }
.dock-txt small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.dock-go { position: absolute; right: 14px; top: 16px; font-size: 18px; font-weight: 700; color: var(--accent-2); opacity: 0; transform: translateX(-6px); transition: all 0.3s; }
.dock-tile:hover .dock-go { opacity: 1; transform: none; }
.dock-badge { position: absolute; right: 12px; top: 12px; padding: 3px 9px; border-radius: 999px; font-size: 9.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; background: linear-gradient(120deg, var(--accent), var(--accent-3)); animation: playPulse 2.4s ease-in-out infinite; }
.dock-badge.dock-live { background: linear-gradient(120deg, #16a34a, #15803d); }
.dock-tile:hover .dock-badge { opacity: 0; }
.scroll-cue { display: block; width: 26px; height: 42px; margin: 22px auto 0; border: 2px solid var(--border-strong); border-radius: 16px; position: relative; opacity: 0.9; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent-2); animation: cueDrop 1.8s ease-in-out infinite; }
@keyframes cueDrop { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-dock li { animation: none; } .dock-tile::before, .scroll-cue span, .dock-badge { animation: none; } }

/* ==========================================================================
   Hero stage v5 — MX monogram as the crown over her, circuit frame, hologram platform
   (taller stage: letters on top, portrait below)
   ========================================================================== */
.hero-stage { width: min(610px, 100%); aspect-ratio: 1 / 1.2; --px: 0; --py: 0; }
.stage-portrait { inset: 36.5% 16% 8.5%; border-radius: 50%; }
.stage-portrait img { animation: portraitDrift 14s ease-in-out infinite alternate; transform-origin: 50% 40%; }
@keyframes portraitDrift { from { transform: scale(1.02); } to { transform: scale(1.08) translateY(-1%); } }
.stage-portrait::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; mix-blend-mode: soft-light; background: radial-gradient(circle at var(--lx, 50%) var(--ly, 24%), rgba(255, 255, 255, 0.5), transparent 58%); }
.stage-halo { position: absolute; inset: calc(36.5% - 10px) calc(16% - 10px) calc(8.5% - 10px); border-radius: 50%; z-index: 0; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 55%, var(--accent-2) 74%, var(--accent) 90%, transparent 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  filter: drop-shadow(0 0 10px rgba(231, 200, 115, 0.65)); animation: orbit 8s linear infinite; }
.stage-pool { display: none; }

/* the MX monogram (a link to the MarXus page) */
.mx-emblem { position: absolute; z-index: 3; left: 1%; right: 1%; top: 0; display: block; aspect-ratio: 420 / 215; perspective: 1000px;
  transform: translate3d(calc(var(--px) * -10px), calc(var(--py) * -8px), 0) rotateY(calc(var(--px) * 12deg)) rotateX(calc(var(--py) * -7deg)); transition: transform 0.25s ease-out; }
.mx-svg { width: 100%; height: 100%; overflow: visible; animation: mxFloat 8s ease-in-out infinite; filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.5)); }
@keyframes mxFloat { 0%, 100% { transform: translateY(0) rotate(-0.5deg); } 50% { transform: translateY(-7px) rotate(0.5deg); } }
.mx-emblem:hover .mx-svg { animation-play-state: paused; filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.5)) brightness(1.08); }
.mx-frame { stroke-dasharray: 1; stroke-dashoffset: 1; animation: frameDraw 2.6s cubic-bezier(0.3, 0.8, 0.3, 1) 0.3s forwards; }
.mx-frame-run { stroke-dasharray: 0.05 0.95; stroke-dashoffset: 0; opacity: 0.95; animation: frameRun 4.5s linear 3s infinite; }
@keyframes frameDraw { to { stroke-dashoffset: 0; } }
@keyframes frameRun { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.mxl-m { animation: mIn 1.4s cubic-bezier(0.2, 0.9, 0.3, 1) 0.2s backwards; }
.mxl-x { animation: xIn2 1.5s cubic-bezier(0.2, 1.2, 0.3, 1) 0.7s backwards; }
@keyframes mIn { from { opacity: 0; transform: translate(52px, 70px) scale(0.5) translate(-95px, -105px); } to { opacity: 1; transform: translate(52px, 44px) scale(0.74) translate(-95px, -105px); } }
@keyframes xIn2 { from { opacity: 0; transform: translate(300px, 118px) rotate(-90deg) scale(0.2); } to { opacity: 1; transform: translate(300px, 118px) rotate(0) scale(0.74); } }
.mx-circuit path { stroke-dasharray: 4 9; animation: circuitFlow 2.2s linear infinite; filter: drop-shadow(0 0 4px rgba(231, 200, 115, 0.9)); }
@keyframes circuitFlow { to { stroke-dashoffset: -26; } }
.mx-orbits ellipse { transform-box: fill-box; transform-origin: center; }
.mx-orbits ellipse:first-child { animation: orbitA 9s linear infinite; } .mx-orbits ellipse:last-child { animation: orbitB 12s linear infinite; }
@keyframes orbitA { from { transform: rotate(-24deg); } to { transform: rotate(336deg); } }
@keyframes orbitB { from { transform: rotate(28deg); } to { transform: rotate(-332deg); } }
.mx-orb { animation: orbPulse 2.4s ease-in-out infinite; }
@keyframes orbPulse { 0%, 100% { r: 10; } 50% { r: 13; } }
/* hologram platform under her, from the logo */
.stage-platform { position: absolute; left: 14%; right: 14%; bottom: -1%; height: 10%; z-index: 0; pointer-events: none; }
.stage-platform i { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 2px solid rgba(231, 200, 115, 0.8); transform: translate(-50%, -50%); box-shadow: 0 0 18px rgba(231, 200, 115, 0.55), inset 0 0 14px rgba(231, 200, 115, 0.3); }
.stage-platform i:nth-child(1) { width: 100%; height: 100%; } .stage-platform i:nth-child(2) { width: 68%; height: 66%; border-color: rgba(255, 255, 255, 0.7); }
.stage-platform i:nth-child(3) { width: 100%; height: 100%; border-color: rgba(209, 64, 90, 0.7); animation: platformPing 3.2s ease-out infinite; }
@keyframes platformPing { 0% { opacity: 0.9; width: 60%; height: 60%; } 100% { opacity: 0; width: 122%; height: 130%; } }
.orbit-labels { z-index: 4; }
@media (max-width: 980px) { .hero-stage { width: min(470px, 100%); } }
@media (prefers-reduced-motion: reduce) { .mx-svg, .mx-frame, .mx-frame-run, .mxl-m, .mxl-x, .mx-circuit path, .mx-orbits ellipse, .mx-orb, .stage-platform i, .stage-halo, .stage-portrait img { animation: none; } .mx-frame { stroke-dashoffset: 0; } .mx-frame-run { display: none; } }

/* ==========================================================================
   MarXus ecosystem — MX hub with everything orbiting it
   ========================================================================== */
.eco-sec { padding-top: 60px; padding-bottom: 40px; }
.eco { --S: min(660px, 94vw); position: relative; width: var(--S); height: var(--S); margin: 8px auto 0; }
.eco-ring { position: absolute; border-radius: 50%; border: 1.5px dashed rgba(231, 200, 115, 0.4); pointer-events: none; }
.eco-ring.r1 { inset: 19%; } .eco-ring.r2 { inset: 4%; border-color: rgba(209, 64, 90, 0.35); } .eco-ring.r3 { inset: -4%; border: 1px solid rgba(231, 200, 115, 0.12); }
.eco-pulse { position: absolute; left: 50%; top: 50%; width: 26%; aspect-ratio: 1; margin: -13% 0 0 -13%; border-radius: 50%; border: 2px solid rgba(231, 200, 115, 0.6); animation: ecoPing 3.6s ease-out infinite; pointer-events: none; }
@keyframes ecoPing { 0% { transform: scale(0.8); opacity: 0.9; } 100% { transform: scale(3.4); opacity: 0; } }
.eco-hub { position: absolute; left: 50%; top: 50%; width: 24%; aspect-ratio: 1; margin: -12% 0 0 -12%; z-index: 6; display: grid; place-items: center; }
.eco-coin { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; border: 4px solid #E7C873; box-shadow: 0 0 0 5px rgba(143, 26, 44, 0.55), 0 20px 38px rgba(0, 0, 0, 0.5), 0 0 60px rgba(231, 200, 115, 0.55); animation: ecoCoin 9s ease-in-out infinite; transition: transform 0.4s; }
.eco-coin img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); }
@keyframes ecoCoin { 0%, 100% { transform: rotateY(-18deg); } 50% { transform: rotateY(18deg); } }
.eco-hub:hover .eco-coin { animation-play-state: paused; transform: scale(1.08); }
.eco-hub-label { position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%); text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 17px; white-space: nowrap; color: var(--text); }
.eco-hub-label small { display: block; font-family: var(--font-body); font-size: 10.5px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-2); }

.eco-orbit { position: absolute; inset: 0; animation: ecoSpin 80s linear infinite; }
.eco-orbit.ring-2 { animation-duration: 110s; animation-direction: reverse; }
@keyframes ecoSpin { to { transform: rotate(360deg); } }
.eco-arm { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotate(var(--a)); }
.ring-1 .eco-arm { --k: 0.31; } .ring-2 .eco-arm { --k: 0.46; }
.eco-spoke { position: absolute; left: 0; top: -1px; height: 2px; width: calc(var(--S) * var(--k)); background: linear-gradient(90deg, rgba(231, 200, 115, 0), rgba(231, 200, 115, 0.55)); transform-origin: 0 50%; }
.eco-node {
  position: absolute; left: calc(var(--S) * var(--k)); top: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 132px; text-align: center; z-index: 4;
  transform: translate(-50%, -50%) rotate(calc(var(--a) * -1)); animation: ecoUnspin 80s linear infinite; transition: filter 0.3s;
}
.ring-2 .eco-node { animation-name: ecoUnspinRev; animation-duration: 110s; }
@keyframes ecoUnspin { from { transform: translate(-50%, -50%) rotate(calc(var(--a) * -1)); } to { transform: translate(-50%, -50%) rotate(calc(var(--a) * -1 - 360deg)); } }
@keyframes ecoUnspinRev { from { transform: translate(-50%, -50%) rotate(calc(var(--a) * -1)); } to { transform: translate(-50%, -50%) rotate(calc(var(--a) * -1 + 360deg)); } }
.eco-ic {
  width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 1px 1px 0 var(--accent-3), 2px 2px 0 var(--accent-3), 3px 3px 0 var(--accent-3), 0 14px 24px rgba(165, 28, 48, 0.45); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.eco-ic svg { width: 26px; height: 26px; }
.eco-txt b { display: block; font-family: var(--font-display); font-size: 14.5px; line-height: 1.2; color: var(--text); }
.eco-txt small { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.eco-node:hover .eco-ic, .eco-node:focus-visible .eco-ic { transform: scale(1.18) translateY(-4px); }
.eco:hover .eco-orbit, .eco:hover .eco-node { animation-play-state: paused; }
.eco-node:hover .eco-txt b { color: var(--accent-2); }
.eco-list { display: none; list-style: none; padding: 0; margin: 28px 0 0; gap: 12px; grid-template-columns: 1fr 1fr; }
.eco-list a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--glass-bg-strong); border: 1px solid var(--border-strong); box-shadow: 0 10px 22px var(--shadow); }
.eco-list .eco-ic { width: 44px; height: 44px; border-radius: 14px; } .eco-list .eco-ic svg { width: 20px; height: 20px; }
.eco-list b { display: block; font-size: 14px; } .eco-list small { display: block; font-size: 11.5px; color: var(--muted); }
@media (max-width: 760px) { .eco { display: none; } .eco-list { display: grid; } }
@media (prefers-reduced-motion: reduce) { .eco-orbit, .eco-node, .eco-pulse, .eco-coin { animation: none; } .eco-node { transform: translate(-50%, -50%) rotate(calc(var(--a) * -1)); } }

/* Hero MX = the real logo artwork (exact colours, no recolouring) */
.mx-emblem { left: 50%; right: auto; width: 56%; margin-left: -28%; aspect-ratio: 630 / 640; }
.mx-logo { width: 100%; height: 100%; display: block; border-radius: 22px; border: 2px solid rgba(231, 200, 115, 0.85); object-fit: cover;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.38), 0 0 40px rgba(231, 200, 115, 0.35); animation: mxFloat 8s ease-in-out infinite; }
.mx-emblem:hover .mx-logo { animation-play-state: paused; filter: brightness(1.06); }
/* v6: logo sits fully above the portrait (never covers the face) */
.hero-stage { aspect-ratio: 1 / 1.38; }
.stage-portrait { inset: 36.5% 16% 14.5%; }
.stage-halo { inset: calc(36.5% - 10px) calc(16% - 10px) calc(14.5% - 10px); }
.mx-emblem { width: 44%; margin-left: -22%; z-index: 5; }
.mx-logo { border-radius: 18px; }

/* ==========================================================================
   VIP buttons — Free Demo (gold), WhatsApp (green), Download CV (burgundy)
   ========================================================================== */
.btn-demo, .btn-cv, .wa-float { position: relative; overflow: hidden; isolation: isolate; letter-spacing: 0.01em; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s; }
.btn-demo::after, .btn-cv::after, .wa-float::after {
  content: ''; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 38%; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.65), transparent); transform: skewX(-20deg); animation: vipSweep 3.6s ease-in-out infinite;
}
@keyframes vipSweep { 0%, 55% { left: -60%; } 100% { left: 140%; } }

.btn-demo {
  border: 1px solid rgba(255, 244, 200, 0.9); background: linear-gradient(135deg, #FFF1B8 0%, #E7C873 38%, #C9A02F 70%, #F4DC8A 100%); background-size: 200% 200%;
  box-shadow: 0 1px 0 #9a7418, 0 2px 0 #9a7418, 0 3px 0 #8a6612, 0 4px 0 #7a5a10, 0 14px 28px rgba(201, 160, 47, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  animation: vipGold 5s ease-in-out infinite, demoGlow 2.8s ease-in-out infinite; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}
@keyframes vipGold { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.btn-demo:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 1px 0 #9a7418, 0 2px 0 #9a7418, 0 3px 0 #8a6612, 0 4px 0 #7a5a10, 0 20px 38px rgba(201, 160, 47, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.8); }
.btn-demo:active { transform: translateY(2px); box-shadow: 0 1px 0 #7a5a10, 0 6px 14px rgba(201, 160, 47, 0.4); }
.btn-demo .demo-free { box-shadow: 0 2px 6px rgba(143, 26, 44, 0.5); animation: freePop 2.4s ease-in-out infinite; }
@keyframes freePop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
a.course-demo.btn-demo { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 14px; padding: 12px 16px; border-radius: 999px; color: #1b1405; font-size: 14px; font-weight: 800; }
a.course-demo.btn-demo:hover { color: #1b1405; }

.btn-cv {
  color: var(--text); border: 1.5px solid transparent;
  background: linear-gradient(var(--bg-elevated, #fff), var(--bg-elevated, #fff)) padding-box, linear-gradient(var(--ang, 0deg), #E7C873, #A51C30, #E7C873, #8F1A2C, #E7C873) border-box;
  animation: cvBorder 5s linear infinite; box-shadow: 0 2px 0 var(--accent-3), 0 10px 22px rgba(165, 28, 48, 0.28);
}
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes cvBorder { to { --ang: 360deg; } }
.btn-cv svg:first-child { animation: cvArrow 1.8s ease-in-out infinite; }
@keyframes cvArrow { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(2.5px); } }
.btn-cv:hover { transform: translateY(-3px); color: var(--accent-2); box-shadow: 0 2px 0 var(--accent-3), 0 16px 30px rgba(165, 28, 48, 0.4); }

.wa-float {
  background: linear-gradient(135deg, #5CF08C, #25D366 45%, #0E9F4A); border: 1px solid rgba(255, 255, 255, 0.55); color: #fff; font-weight: 800;
  box-shadow: 0 1px 0 #0b7a39, 0 2px 0 #0b7a39, 0 3px 0 #096a31, 0 14px 28px rgba(18, 140, 70, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.wa-float::before { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; animation: waRing 2.4s ease-out infinite; }
@keyframes waRing { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.65); } 100% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); } }
.wa-float svg { animation: waWiggle 4s ease-in-out infinite; transform-origin: 50% 70%; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); }
@keyframes waWiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-14deg); } 90% { transform: rotate(12deg); } 95% { transform: rotate(-8deg); } }
.wa-float:hover { transform: translateY(-4px) scale(1.05); }
@media (prefers-reduced-motion: reduce) { .btn-demo, .btn-cv, .wa-float, .btn-demo::after, .btn-cv::after, .wa-float::after, .wa-float::before, .btn-cv svg, .wa-float svg, .btn-demo .demo-free { animation: none; } }

/* compact countdown inside the MarXus hero */
.mx-batch--mini { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 26px; margin: 26px auto 0; padding: 16px 22px; max-width: 760px; border-radius: 22px; background: var(--glass-bg-strong); border: 1px solid var(--border-strong); box-shadow: 0 16px 34px var(--shadow); }
.mx-batch--mini .mx-batch-info { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; }
.mx-batch--mini .mx-batch-info b { font-family: var(--font-display); font-size: 17px; color: var(--text); }
.mx-batch--mini .mx-batch-info small { color: var(--muted); font-size: 13px; }
.mx-batch--mini .mx-count-num { font-size: 26px; }
@media (max-width: 560px) { .mx-batch--mini { justify-content: center; } .mx-batch--mini .mx-batch-info { align-items: center; text-align: center; } }
.btn-wa { position: relative; overflow: hidden; isolation: isolate; color: #fff; font-weight: 800; border: 1px solid rgba(255, 255, 255, 0.55); background: linear-gradient(135deg, #5CF08C, #25D366 45%, #0E9F4A);
  box-shadow: 0 1px 0 #0b7a39, 0 2px 0 #0b7a39, 0 3px 0 #096a31, 0 14px 28px rgba(18, 140, 70, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.btn-wa::after { content: ''; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 38%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.65), transparent); transform: skewX(-20deg); animation: vipSweep 3.6s ease-in-out infinite; pointer-events: none; }
.btn-wa:hover { transform: translateY(-3px) scale(1.03); color: #fff; }
@media (prefers-reduced-motion: reduce) { .btn-wa::after { animation: none; } }

/* ==========================================================================
   Course categories — premium topic cards (little text, big icon)
   ========================================================================== */
.topic-head { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 22px; text-align: center; }
.topic-head b { font-family: var(--font-display); font-size: 20px; }
.topic-head small { color: var(--muted); font-size: 14px; }
.topic-inf { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #1b1405; background: linear-gradient(135deg, #FFF1B8, #E7C873 50%, #C9A02F);
  box-shadow: 1px 1px 0 #9a7418, 2px 2px 0 #9a7418, 3px 3px 0 #7a5a10, 0 10px 20px rgba(201, 160, 47, 0.45); animation: infFloat 4s ease-in-out infinite; }
@keyframes infFloat { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-4px) rotate(4deg); } }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; margin-bottom: 34px; }
.topic-card {
  --c1: #D1405A; --c2: #8F1A2C; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 26px 24px 22px; border-radius: 26px; overflow: hidden; isolation: isolate;
  background: var(--glass-bg-strong); border: 1px solid var(--border-strong); box-shadow: 0 18px 38px var(--shadow); transition: box-shadow 0.35s, border-color 0.35s;
}
.topic-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--c1) 28%, transparent), transparent 62%); transition: opacity 0.35s; }
.topic-card::after { content: ''; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 32%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent); transform: skewX(-20deg); opacity: 0; pointer-events: none; }
.topic-card:hover { border-color: var(--c1); box-shadow: 0 26px 50px color-mix(in srgb, var(--c1) 35%, transparent); }
.topic-card:hover::after { opacity: 1; animation: vipSweep 1.2s ease-out 1; }
.topic-card.k-1 { --c1: #E7C873; --c2: #9a7418; } .topic-card.k-2 { --c1: #3BA7E0; --c2: #1C5C9C; } .topic-card.k-3 { --c1: #2FB67C; --c2: #12724B; }
.topic-card.k-4 { --c1: #A06BE0; --c2: #5B2E9C; } .topic-card.k-5 { --c1: #F0845A; --c2: #B2431B; }
.topic-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 1px 1px 0 var(--c2), 2px 2px 0 var(--c2), 3px 3px 0 var(--c2), 4px 4px 0 var(--c2), 0 16px 26px color-mix(in srgb, var(--c2) 55%, transparent); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.topic-ic svg { width: 30px; height: 30px; }
.topic-card:hover .topic-ic { transform: translateY(-5px) rotate(-6deg) scale(1.08); }
.topic-card h3 { font-size: 20px; line-height: 1.2; margin: 6px 0 0; }
.topic-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.topic-lang { margin-top: 4px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; color: var(--text); background: var(--tint-bg); border: 1px solid color-mix(in srgb, var(--c1) 55%, transparent); }
.topic-go { position: absolute; right: 18px; bottom: 16px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); transition: transform 0.3s; }
.topic-card:hover .topic-go { transform: translateX(4px) scale(1.1); }
.topic-sub { display: flex; align-items: center; gap: 14px; margin: 8px 0 22px; color: var(--muted-2); font-size: 12px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; }
.topic-sub::before, .topic-sub::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--border-strong), transparent); }
@media (prefers-reduced-motion: reduce) { .topic-inf { animation: none; } }

/* ---- VIP countdown cards (hero + batch strip) ---- */
.mx-batch, .mx-batch.mx-batch--mini {
  position: relative; isolation: isolate; overflow: hidden; color: #fff0d6; border: 1.5px solid transparent;
  background: linear-gradient(135deg, #2b0a12 0%, #5c1322 52%, #2b0a12 100%) padding-box, linear-gradient(var(--ang, 0deg), #E7C873, #A51C30, #E7C873, #8F1A2C, #E7C873) border-box;
  animation: cvBorder 6s linear infinite; box-shadow: 0 24px 50px rgba(92, 19, 34, 0.45), 0 0 0 1px rgba(231, 200, 115, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.mx-batch::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 12% 0%, rgba(231, 200, 115, 0.22), transparent 45%), radial-gradient(circle at 100% 100%, rgba(209, 64, 90, 0.3), transparent 50%); }
.mx-batch::after { content: ''; position: absolute; top: -30%; bottom: -30%; left: -40%; width: 22%; z-index: -1; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.14), transparent); transform: skewX(-20deg); animation: vipSweep 6s ease-in-out infinite; pointer-events: none; }
.mx-batch h3, .mx-batch .mx-batch-info b { color: #fff; }
.mx-batch p, .mx-batch .mx-batch-info small, .mx-enrolled { color: rgba(255, 240, 214, 0.78); }
.mx-batch .mx-batch-start { color: #F4DC8A !important; }
.mx-batch .mx-batch-badge { color: #F4DC8A; padding: 5px 12px; border-radius: 999px; background: rgba(231, 200, 115, 0.14); border: 1px solid rgba(231, 200, 115, 0.45); align-self: flex-start; }
.mx-batch .mx-enrolled .odo { color: #F4DC8A; }
.mx-batch .mx-count { gap: 10px; }
.mx-batch .mx-count-cell {
  min-width: 70px; padding: 10px 8px 8px; border-radius: 16px; text-align: center; border: 1px solid rgba(255, 244, 200, 0.7);
  background: linear-gradient(160deg, #FFF1B8, #E7C873 55%, #C9A02F); box-shadow: 0 3px 0 #8a6612, 0 4px 0 #6d500e, 0 14px 22px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.mx-batch .mx-count-num { color: #2b0a12; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); }
.mx-batch .mx-count-lab { color: #6b1a28; }
.mx-batch .mx-count-cell:last-child .mx-count-num { animation: secPulse 1s ease-in-out infinite; }
@keyframes secPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.mx-batch.mx-batch--mini { max-width: 780px; padding: 18px 24px; justify-content: space-between; }
.mx-batch--mini .mx-batch-info { align-items: flex-start; flex: 1 1 220px; min-width: 0; }
.mx-batch--mini .mx-batch-info b { font-size: 18px; }
.mx-batch--mini .mx-count-cell { min-width: 62px; padding: 8px 6px 6px; }
.mx-batch--mini .mx-count-num { font-size: 24px; }
@media (max-width: 560px) { .mx-batch.mx-batch--mini { justify-content: center; } .mx-batch--mini .mx-batch-info { align-items: center; text-align: center; flex-basis: 100%; } .mx-batch .mx-batch-badge { align-self: center; } }
@media (prefers-reduced-motion: reduce) { .mx-batch, .mx-batch::after, .mx-batch .mx-count-cell:last-child .mx-count-num { animation: none; } }

/* readable button text */
.btn-demo, .btn-demo:hover { color: #1b1405 !important; text-shadow: none !important; }
.btn-wa, .wa-float { background: linear-gradient(135deg, #34D977, #1FB85A 50%, #0B8A3E); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }

/* ---- Course hub: stats + filter chips ---- */
.hub { margin: 0 0 26px; display: grid; gap: 18px; justify-items: center; }
.hub-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hub-stats span { padding: 9px 18px; border-radius: 14px; font-size: 13px; color: var(--muted); background: var(--glass-bg-strong); border: 1px solid var(--border-strong); box-shadow: 0 8px 18px var(--shadow); }
.hub-stats b { font-family: var(--font-display); font-size: 17px; color: var(--accent-2); margin-right: 4px; }
.hub-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.hub-chip { cursor: pointer; padding: 10px 20px; border-radius: 999px; font: 700 14px/1 var(--font-body); color: var(--text); background: var(--glass-bg-strong); border: 1px solid var(--border-strong); transition: transform 0.25s, box-shadow 0.25s, background 0.25s; }
.hub-chip i { font-style: normal; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--tint-bg); }
.hub-chip:hover { transform: translateY(-2px); }
.hub-chip.is-on { color: #1b1405; border-color: rgba(255, 244, 200, 0.9); background: linear-gradient(135deg, #FFF1B8, #E7C873 55%, #C9A02F); box-shadow: 0 2px 0 #8a6612, 0 10px 20px rgba(201, 160, 47, 0.45); }
.hub-chip.is-on i { background: rgba(255, 255, 255, 0.5); }
.topic-card[hidden] { display: none; }
.topic-card.pop-in { animation: topicPop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes topicPop { from { opacity: 0; transform: translateY(18px) scale(0.94); } to { opacity: 1; transform: none; } }

/* icon-only action buttons (MarXus hero) */
.mx-actions--icons { display: flex; gap: 18px; align-items: center; }
.btn-ico { position: relative; overflow: hidden; isolation: isolate; width: 66px; height: 66px; border-radius: 22px; display: grid; place-items: center; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s; }
.btn-ico::after { content: ''; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 38%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.65), transparent); transform: skewX(-20deg); animation: vipSweep 3.6s ease-in-out infinite; pointer-events: none; }
.btn-ico svg { filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); transition: transform 0.3s; }
.btn-ico:hover { transform: translateY(-5px) scale(1.07) rotate(-3deg); }
.btn-ico:hover svg { transform: scale(1.1); }
.btn-ico-demo { color: #1b1405; border: 1px solid rgba(255, 244, 200, 0.9); background: linear-gradient(135deg, #FFF1B8, #E7C873 45%, #C9A02F);
  box-shadow: 0 1px 0 #9a7418, 0 2px 0 #9a7418, 0 3px 0 #8a6612, 0 4px 0 #7a5a10, 0 14px 26px rgba(201, 160, 47, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.8); animation: demoGlow 2.8s ease-in-out infinite; }
.btn-ico-demo svg { filter: none; }
.btn-ico-wa { color: #fff; border: 1px solid rgba(255, 255, 255, 0.55); background: linear-gradient(135deg, #34D977, #1FB85A 50%, #0B8A3E);
  box-shadow: 0 1px 0 #0b7a39, 0 2px 0 #0b7a39, 0 3px 0 #096a31, 0 14px 26px rgba(18, 140, 70, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.btn-ico-wa::before { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; animation: waRing 2.4s ease-out infinite; }
@media (max-width: 820px) { .mx-actions--icons { justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .btn-ico::after, .btn-ico-demo, .btn-ico-wa::before { animation: none; } }

/* ---- Instructors team ---- */
.team-sec { padding-top: 40px; padding-bottom: 50px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.team-card { --c1: #E7C873; --c2: #9a7418; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 28px 22px 24px; border-radius: 26px; overflow: hidden; isolation: isolate;
  background: var(--glass-bg-strong); border: 1px solid var(--border-strong); box-shadow: 0 18px 38px var(--shadow); transition: box-shadow 0.35s, border-color 0.35s; color: var(--text); }
.team-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--c1) 26%, transparent), transparent 62%); }
.team-card:hover { border-color: var(--c1); box-shadow: 0 26px 50px color-mix(in srgb, var(--c1) 35%, transparent); }
.team-card.k-1 { --c1: #D1405A; --c2: #8F1A2C; } .team-card.k-2 { --c1: #3BA7E0; --c2: #1C5C9C; } .team-card.k-3 { --c1: #2FB67C; --c2: #12724B; } .team-card.k-4 { --c1: #A06BE0; --c2: #5B2E9C; }
.team-av { position: relative; width: 104px; height: 104px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font: 700 34px var(--font-display); color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2));
  border: 3px solid var(--c1); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c1) 25%, transparent), 0 16px 26px color-mix(in srgb, var(--c2) 50%, transparent); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.team-av img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.team-card:hover .team-av { transform: scale(1.08) rotate(-3deg); }
.team-card h3 { margin: 8px 0 0; font-size: 19px; line-height: 1.2; }
.team-card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.team-tag { margin-top: 4px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--tint-bg); border: 1px solid color-mix(in srgb, var(--c1) 55%, transparent); }
.team-lead { border-color: rgba(231, 200, 115, 0.7); }
.team-ribbon { position: absolute; top: 14px; right: -34px; transform: rotate(35deg); padding: 4px 38px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #1b1405; background: linear-gradient(120deg, #F6E3A6, #E7C873, #C9A02F); }
.team-more { border-style: dashed; }
.team-plus { font-size: 46px; font-weight: 300; }
.team-join { margin-top: 8px; font-weight: 800; font-size: 14px; color: var(--accent-2); }
.mx-batch .demo-when-inline, .mx-batch .demo-when { color: rgba(255, 240, 214, 0.85); }

/* ==========================================================================
   Hero stage v7 — portrait and MX logo side by side ("in parallel")
   ========================================================================== */
.hero-stage { width: min(660px, 100%); aspect-ratio: 1 / 0.78; }
.stage-portrait { inset: auto; left: 1%; top: 6%; width: 58%; aspect-ratio: 1; height: auto; }
.stage-halo { inset: auto; left: calc(1% - 10px); top: calc(6% - 10px); width: calc(58% + 20px); aspect-ratio: 1; height: auto; }
.mx-emblem { left: 63%; right: auto; margin-left: 0; width: 36%; top: 8%; z-index: 5; }
.mx-logo { border-radius: 20px; }
.stage-platform { left: 2%; right: auto; width: 56%; bottom: 7%; }
.stage-link { position: absolute; z-index: 5; left: 56%; top: 36%; width: 9%; height: 2px; pointer-events: none;
  background: repeating-linear-gradient(90deg, #E7C873 0 6px, transparent 6px 12px); background-size: 12px 2px; animation: linkFlow 0.9s linear infinite; filter: drop-shadow(0 0 6px rgba(231, 200, 115, 0.9)); }
.stage-link i { position: absolute; right: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #E7C873; box-shadow: 0 0 12px 3px rgba(231, 200, 115, 0.9); animation: platformPing 2.4s ease-out infinite; }
@keyframes linkFlow { to { background-position: 12px 0; } }
.stage-cap { position: absolute; z-index: 5; bottom: 3%; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text); white-space: nowrap; }
.stage-cap small { display: block; font-family: var(--font-body); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-2); margin-top: 3px; }
.cap-me { left: 1%; width: 58%; } .cap-mx { left: 63%; width: 36%; }
.orbit-labels { z-index: 6; }
@media (max-width: 560px) { .stage-cap { font-size: 12.5px; } .stage-cap small { letter-spacing: 0.12em; font-size: 9px; } }
@media (prefers-reduced-motion: reduce) { .stage-link, .stage-link i { animation: none; } }
.mx-emblem { top: 19.5%; }
.stage-link { top: 43%; }
.stage-platform { bottom: 13%; height: 9%; }
.stage-cap { bottom: 0; }

/* v8 — bigger portrait */
.hero-stage { aspect-ratio: 1 / 0.86; }
.stage-portrait { left: 0; top: 3%; width: 65%; }
.stage-halo { left: calc(0% - 10px); top: calc(3% - 10px); width: calc(65% + 20px); }
.mx-emblem { left: 68%; width: 31.5%; top: 21.5%; }
.stage-link { left: 63%; width: 6%; top: 40.8%; }
.stage-platform { left: 1%; width: 63%; bottom: 14%; height: 9%; }
.cap-me { left: 0; width: 65%; } .cap-mx { left: 68%; width: 31.5%; }

/* MarXus "Work with MarXus" call-to-action card */
.mx-cta-card, .opportunities { position: relative; overflow: hidden; isolation: isolate; }
#founder + section .opportunities {
  color: #fff0d6; border: 1.5px solid transparent;
  background: linear-gradient(135deg, #2b0a12 0%, #5c1322 55%, #2b0a12 100%) padding-box, linear-gradient(var(--ang, 0deg), #E7C873, #A51C30, #E7C873, #8F1A2C, #E7C873) border-box;
  animation: cvBorder 7s linear infinite; box-shadow: 0 28px 60px rgba(92, 19, 34, 0.45);
}
#founder + section .opportunities::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 15% 0%, rgba(231, 200, 115, 0.25), transparent 45%), radial-gradient(circle at 100% 100%, rgba(209, 64, 90, 0.3), transparent 50%); }
#founder + section .opportunities h2 { color: #fff; }
#founder + section .opportunities p { color: rgba(255, 240, 214, 0.82); }
.opportunities .s3d-row.in-contact { justify-content: center; }
#founder + section .opportunities .btn-cv { color: #fff; background: linear-gradient(rgba(43, 10, 18, 0.9), rgba(43, 10, 18, 0.9)) padding-box, linear-gradient(var(--ang, 0deg), #E7C873, #A51C30, #E7C873, #8F1A2C, #E7C873) border-box; }
@media (prefers-reduced-motion: reduce) { #founder + section .opportunities { animation: none; } }

/* Contact channels — premium tiles */
.contact-info .s3d-row.in-contact { margin: 26px 0 26px; }
.contact-channels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cc-wide { grid-column: 1 / -1; }
.cc-tile { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; background: var(--glass-bg-strong); border: 1px solid var(--border-strong); box-shadow: 0 10px 22px var(--shadow); color: var(--text);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s, border-color 0.3s; min-width: 0; }
.cc-tile:hover { transform: translateY(-4px); border-color: var(--accent-2); box-shadow: 0 18px 34px rgba(165, 28, 48, 0.28); }
.cc-ic { width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-3));
  box-shadow: 1px 1px 0 var(--accent-3), 2px 2px 0 var(--accent-3), 3px 3px 0 var(--accent-3), 0 10px 18px rgba(165, 28, 48, 0.4); }
.cc-txt { display: flex; flex-direction: column; min-width: 0; }
.cc-txt small { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); }
.cc-txt b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-channels .btn-wa { justify-content: center; gap: 10px; padding: 16px 22px; font-size: 16px; }
.cc-cv .btn-cv, .cc-cv .cv-menu, .cc-cv .cv-menu summary { width: 100%; justify-content: center; }
@media (max-width: 480px) { .contact-channels { grid-template-columns: 1fr; } }

/* ---- Services: premium icon cards ---- */
.service-card { --c1: #D1405A; --c2: #8F1A2C; position: relative; overflow: hidden; isolation: isolate; padding: 24px 22px 22px; border-radius: 24px; transition: box-shadow 0.35s, border-color 0.35s; }
.service-card.sv-b { --c1: #3BA7E0; --c2: #1C5C9C; } .service-card.sv-g { --c1: #2FB67C; --c2: #12724B; } .service-card.sv-p { --c1: #A06BE0; --c2: #5B2E9C; } .service-card.sv-y { --c1: #E7C873; --c2: #9a7418; }
.service-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--c1) 24%, transparent), transparent 60%); }
.service-card:hover { border-color: var(--c1); box-shadow: 0 22px 44px color-mix(in srgb, var(--c1) 32%, transparent); }
.sv-num { position: absolute; top: 12px; right: 18px; font: 800 38px/1 var(--font-display); color: color-mix(in srgb, var(--c1) 22%, transparent); }
.sv-ic { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; color: #fff; margin-bottom: 14px; background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 1px 1px 0 var(--c2), 2px 2px 0 var(--c2), 3px 3px 0 var(--c2), 0 12px 20px color-mix(in srgb, var(--c2) 50%, transparent); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sv-ic svg { width: 26px; height: 26px; }
.service-card:hover .sv-ic { transform: translateY(-4px) rotate(-6deg) scale(1.08); }
.service-card h4 { font-size: 17px; }

/* ---- TikTok channel stats ---- */
.ch-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin: 0 auto 34px; max-width: 880px; }
.ch-card { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 22px 24px; border-radius: 24px; overflow: hidden; isolation: isolate; color: #fff0d6; border: 1.5px solid transparent;
  background: linear-gradient(135deg, #12090c, #3a0f1a 60%, #12090c) padding-box, linear-gradient(var(--ang, 0deg), #25F4EE, #FE2C55, #25F4EE, #FE2C55) border-box; animation: cvBorder 7s linear infinite;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.35); transition: transform 0.3s; }
.ch-card:hover { transform: translateY(-4px); }
.ch-head { display: flex; align-items: center; gap: 12px; }
.ch-head b { display: block; font-family: var(--font-display); font-size: 18px; color: #fff; } .ch-head small { color: rgba(255, 240, 214, 0.7); font-size: 13px; }
.ch-logo { width: 42px; height: 42px; border-radius: 13px; background: #000 var(--ic) center / 22px no-repeat; box-shadow: 2px 2px 0 #25F4EE, -2px -2px 0 #FE2C55; flex-shrink: 0; }
.ch-nums { display: flex; gap: 12px; flex-wrap: wrap; }
.ch-num { flex: 1 1 80px; padding: 10px 12px; border-radius: 14px; text-align: center; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); }
.ch-num b { display: block; font: 700 26px/1.1 var(--font-display); color: #fff; font-variant-numeric: tabular-nums; }
.ch-num small { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: #F4DC8A; font-weight: 700; }
.ch-asof { font-size: 12px; color: rgba(255, 240, 214, 0.6); }
@media (prefers-reduced-motion: reduce) { .ch-card { animation: none; } }

/* ---- Technologies: colour-coded, bigger, richer ---- */
.sk-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
.sk-stats span { padding: 9px 18px; border-radius: 14px; font-size: 13px; color: var(--muted); background: var(--glass-bg-strong); border: 1px solid var(--border-strong); box-shadow: 0 8px 18px var(--shadow); }
.sk-stats b { font-family: var(--font-display); font-size: 17px; color: var(--accent-2); margin-right: 4px; }
.sk-grid { gap: 26px; }
.sk-card { --c1: #D1405A; --c2: #8F1A2C; padding: 26px 24px 24px; border-radius: 26px; transition: box-shadow 0.35s, border-color 0.35s; }
.sk-card::before { background: linear-gradient(90deg, transparent, var(--c1), transparent); height: 3px; }
.sk-card.sk-c-development, .sk-card.sk-c-databases { --c1: #3BA7E0; --c2: #1C5C9C; }
.sk-card.sk-c-scientific { --c1: #A06BE0; --c2: #5B2E9C; }
.sk-card.sk-c-mobile, .sk-card.sk-c-platforms { --c1: #2FB67C; --c2: #12724B; }
.sk-card.sk-c-itdigital, .sk-card.sk-c-tools { --c1: #E7C873; --c2: #9a7418; }
.sk-card:hover { border-color: var(--c1); box-shadow: 0 24px 48px color-mix(in srgb, var(--c1) 32%, transparent); }
.sk-card .sk-cat-ic { background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 1px 1px 0 var(--c2), 2px 2px 0 var(--c2), 3px 3px 0 var(--c2), 0 12px 20px color-mix(in srgb, var(--c2) 50%, transparent); }
.sk-card .sk-watermark { color: var(--c1); }
.sk-head h3 { font-size: 22px; } .sk-count { color: var(--c1); }
.sk-list { gap: 11px; }
.sk-list .sk { font-size: 14.5px; padding: 8px 14px 8px 10px; border-color: color-mix(in srgb, var(--c1) 45%, transparent); transition: transform 0.25s, box-shadow 0.25s, background 0.25s; }
.sk-list .sk:hover { transform: translateY(-3px); box-shadow: 0 10px 18px color-mix(in srgb, var(--c1) 30%, transparent); }
.sk-ic { width: 28px; height: 28px; border-radius: 9px; }
.sk-card .sk-ic { color: var(--c2); } .sk-card .sk-brand::before { background: var(--c2); }
.ch-asof { display: flex; align-items: center; gap: 8px; min-height: 16px; }
.ch-live { font-style: normal; font-weight: 800; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #25F4EE; animation: livePulse 1.6s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---- MarXus sticky section menu ---- */
html { scroll-behavior: smooth; }
.mx-subnav { position: sticky; top: 76px; z-index: 90; padding: 10px 0; background: var(--header-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); box-shadow: 0 10px 26px var(--shadow-soft); }
.mx-subnav-in { display: flex; align-items: center; gap: 14px; }
.mx-sn-home { flex-shrink: 0; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font: 800 15px var(--font-display); color: #1b1405; background: linear-gradient(135deg, #FFF1B8, #E7C873 55%, #C9A02F); box-shadow: 0 2px 0 #8a6612, 0 8px 16px rgba(201, 160, 47, 0.4); }
.mx-subnav ul { display: flex; gap: 10px; list-style: none; margin: 0; padding: 4px 2px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.mx-subnav ul::-webkit-scrollbar { display: none; }
.mx-subnav li[hidden] { display: none; }
.mx-subnav ul a { display: block; white-space: nowrap; padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--text); background: var(--glass-bg-strong); border: 1px solid var(--border-strong); transition: transform 0.25s, box-shadow 0.25s, background 0.25s; }
.mx-subnav ul a:hover { transform: translateY(-2px); border-color: var(--accent-2); }
.mx-subnav ul a.is-on { color: #fff; border-color: transparent; background: linear-gradient(120deg, var(--accent), var(--accent-3)); box-shadow: 0 8px 18px rgba(165, 28, 48, 0.4); }
#courses, #team, #work, #students, #agent, #founder, #mx-contact, #ecosystem { scroll-margin-top: 150px; }
@media (max-width: 920px) { .mx-subnav ul a { padding: 8px 14px; font-size: 13px; } }
/* menu v2: icons, centred, gold hairline */
.mx-subnav { background: linear-gradient(var(--header-bg), var(--header-bg)); border-bottom: 0; box-shadow: 0 12px 28px var(--shadow-soft), 0 1px 0 rgba(231, 200, 115, 0.55); }
.mx-subnav-in { justify-content: center; }
.mx-subnav ul { flex: 0 1 auto; max-width: 100%; }
.mx-subnav ul a { display: inline-flex; align-items: center; gap: 8px; }
.mx-subnav ul a svg { color: var(--accent-2); transition: transform 0.3s; }
.mx-subnav ul a:hover svg { transform: scale(1.2) rotate(-6deg); }
.mx-subnav ul a.is-on svg { color: #fff; }
@media (max-width: 760px) { .mx-subnav-in { justify-content: flex-start; } .mx-subnav ul { flex: 1; } }

/* ==========================================================================
   Hero stage v9 — big 3D portrait (MX plaque removed): tilt, float, 3D orbit rings, sheen
   ========================================================================== */
.hero-stage { width: min(680px, 100%); aspect-ratio: 1 / 1.04; perspective: 1400px; }
.mx-emblem, .stage-link, .cap-mx { display: none; }
.stage-portrait { inset: auto; left: 14%; top: 8%; width: 72%; aspect-ratio: 1; height: auto; z-index: 2; transform-style: preserve-3d;
  border: 4px solid #E7C873;
  box-shadow: 0 0 0 7px rgba(143, 26, 44, 0.55), 0 0 0 9px rgba(231, 200, 115, 0.5), 10px 14px 0 rgba(143, 26, 44, 0.5), 18px 26px 0 rgba(60, 10, 20, 0.35), 0 60px 80px rgba(0, 0, 0, 0.5), 0 0 110px rgba(209, 64, 90, 0.4);
  transform: rotateX(var(--prx, 0deg)) rotateY(var(--pry, 0deg)); animation: portraitFloat 7s ease-in-out infinite; transition: transform 0.18s ease-out; }
@keyframes portraitFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.stage-portrait::before { content: ''; position: absolute; inset: 0; z-index: 3; border-radius: 50%; pointer-events: none; mix-blend-mode: overlay;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.55) 50%, transparent 62%); background-size: 260% 100%; background-position: 160% 0; animation: portraitSheen 5.5s ease-in-out infinite; }
@keyframes portraitSheen { 0%, 40% { background-position: 160% 0; } 100% { background-position: -60% 0; } }
.stage-halo { inset: auto; left: calc(14% - 14px); top: calc(8% - 14px); width: calc(72% + 28px); aspect-ratio: 1; height: auto; z-index: 2; }
.stage-platform { left: 12%; right: auto; width: 76%; bottom: 8%; height: 11%; }
.stage-cap { bottom: 0; } .cap-me { left: 0; width: 100%; font-size: 17px; }

/* 3D orbit rings (back half behind the portrait, front half passing in front of it) */
.orb3d { position: absolute; left: 4%; top: -2%; width: 92%; aspect-ratio: 1; pointer-events: none; transform-style: preserve-3d; }
.orb3d.back { z-index: 1; } .orb3d.front { z-index: 4; -webkit-mask-image: linear-gradient(to bottom, transparent 50%, #000 50%); mask-image: linear-gradient(to bottom, transparent 50%, #000 50%); }
.orb3d i { position: absolute; inset: 0; border-radius: 50%; -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  background: conic-gradient(from var(--ang), rgba(231, 200, 115, 0.15) 0, rgba(231, 200, 115, 0.15) 45%, #FFF1B8 62%, #E7C873 72%, rgba(231, 200, 115, 0.15) 90%); animation: orbit 7s linear infinite; filter: drop-shadow(0 0 8px rgba(231, 200, 115, 0.8)); }
.orb3d.o1 { transform: rotateX(74deg) rotateZ(-14deg); }
.orb3d.o2 { transform: rotateX(74deg) rotateZ(40deg) scale(1.1); }
.orb3d.o2 i { animation-duration: 11s; animation-direction: reverse; background: conic-gradient(from var(--ang), rgba(209, 64, 90, 0.15) 0, rgba(209, 64, 90, 0.15) 45%, #FF9DB0 62%, #D1405A 72%, rgba(209, 64, 90, 0.15) 90%); filter: drop-shadow(0 0 8px rgba(209, 64, 90, 0.8)); }
.orbit-labels { z-index: 6; }
@media (prefers-reduced-motion: reduce) { .stage-portrait, .stage-portrait::before, .orb3d i { animation: none; } }

/* ---- About: highlighted copy + icon pillars ---- */
.about-copy { position: relative; padding-left: 26px; }
.about-copy::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; border-radius: 4px; background: linear-gradient(180deg, #E7C873, var(--accent), transparent); }
.about-copy p:first-child { font-size: 18.5px; color: var(--text); }
.about-copy strong { color: var(--accent-2); font-weight: 700; background: linear-gradient(transparent 62%, rgba(231, 200, 115, 0.3) 62%); }
.pillar { --c1: #D1405A; --c2: #8F1A2C; display: flex; align-items: center; gap: 14px; position: relative; overflow: hidden; isolation: isolate; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s, border-color 0.3s; }
.pillar.pl-b { --c1: #3BA7E0; --c2: #1C5C9C; } .pillar.pl-g { --c1: #2FB67C; --c2: #12724B; } .pillar.pl-p { --c1: #A06BE0; --c2: #5B2E9C; } .pillar.pl-y { --c1: #E7C873; --c2: #9a7418; }
.pillar::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 0% 50%, color-mix(in srgb, var(--c1) 22%, transparent), transparent 60%); }
.pl-ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 1px 1px 0 var(--c2), 2px 2px 0 var(--c2), 3px 3px 0 var(--c2), 0 8px 14px color-mix(in srgb, var(--c2) 45%, transparent); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.pl-ic svg { width: 20px; height: 20px; }
.pillar:hover { transform: translateY(-4px); border-color: var(--c1); box-shadow: 0 16px 30px color-mix(in srgb, var(--c1) 30%, transparent); }
.pillar:hover .pl-ic { transform: rotate(-8deg) scale(1.12); }

/* ---- Education: clearer hierarchy (PhD flagship, then MS / BS) ---- */
.education-grid { row-gap: 70px; }
.edu-card.has-medal:not(.edu-phd) {
  color: var(--text); border: 1.5px solid transparent; overflow: visible;
  background: linear-gradient(var(--glass-bg-strong), var(--glass-bg-strong)) padding-box, linear-gradient(135deg, #E7C873, rgba(165, 28, 48, 0.55), #E7C873) border-box;
  box-shadow: 0 20px 44px var(--shadow), 0 0 0 1px rgba(231, 200, 115, 0.12); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s;
}
.edu-card.has-medal:not(.edu-phd)::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at 100% 0%, rgba(231, 200, 115, 0.2), transparent 55%); }
.edu-card.has-medal:not(.edu-phd):hover { transform: translateY(-6px); box-shadow: 0 30px 56px rgba(165, 28, 48, 0.28), 0 0 0 1px rgba(231, 200, 115, 0.35); }
.edu-card.has-medal:not(.edu-phd) h3 { font-size: 20px; }
.edu-card.has-medal:not(.edu-phd) .achievement { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--tint-bg); border: 1px solid rgba(231, 200, 115, 0.5); font-weight: 700; }

/* ---- Expertise: colour-coded cards with chips ---- */
.ex-card { --c1: #D1405A; --c2: #8F1A2C; position: relative; overflow: hidden; isolation: isolate; padding: 26px 24px 24px; border-radius: 26px; transition: box-shadow 0.35s, border-color 0.35s; }
.ex-card.ex-b { --c1: #3BA7E0; --c2: #1C5C9C; } .ex-card.ex-g { --c1: #2FB67C; --c2: #12724B; } .ex-card.ex-p { --c1: #A06BE0; --c2: #5B2E9C; } .ex-card.ex-y { --c1: #E7C873; --c2: #9a7418; }
.ex-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--c1) 24%, transparent), transparent 60%); }
.ex-card:hover { border-color: var(--c1); box-shadow: 0 24px 48px color-mix(in srgb, var(--c1) 32%, transparent); }
.ex-num { position: absolute; top: 14px; right: 20px; font: 800 40px/1 var(--font-display); color: color-mix(in srgb, var(--c1) 22%, transparent); }
.ex-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: #fff; margin-bottom: 16px; background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 1px 1px 0 var(--c2), 2px 2px 0 var(--c2), 3px 3px 0 var(--c2), 4px 4px 0 var(--c2), 0 14px 22px color-mix(in srgb, var(--c2) 50%, transparent); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.ex-ic svg { width: 27px; height: 27px; }
.ex-card:hover .ex-ic { transform: translateY(-4px) rotate(-6deg) scale(1.08); }
.ex-card h3 { font-size: 19px; margin-bottom: 14px; }
ul.ex-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
ul.ex-chips li { padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text); background: var(--tint-bg); border: 1px solid color-mix(in srgb, var(--c1) 40%, transparent); transition: transform 0.25s, background 0.25s; }
ul.ex-chips li::before { display: none; }
ul.ex-chips li:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--c1) 16%, transparent); }
.expertise-grid .ex-card:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }

/* ---- Research: flagship first-author cards, premium paper + profile buttons ---- */
.pub-card { position: relative; overflow: hidden; isolation: isolate; transition: box-shadow 0.35s, border-color 0.35s; }
.pub-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 100% 0%, rgba(231, 200, 115, 0.18), transparent 55%); }
.pub-card.pub-fa { border: 1.5px solid transparent;
  background: linear-gradient(var(--glass-bg-strong), var(--glass-bg-strong)) padding-box, linear-gradient(135deg, #E7C873, rgba(165, 28, 48, 0.7), #E7C873) border-box; box-shadow: 0 22px 46px rgba(165, 28, 48, 0.22); }
.pub-card.pub-fa::after { content: '★'; position: absolute; top: 14px; right: 18px; font-size: 20px; color: #E7C873; text-shadow: 0 2px 8px rgba(201, 160, 47, 0.7); }
.pub-card:hover { box-shadow: 0 28px 54px rgba(165, 28, 48, 0.3); }
.pub-quartile { background: linear-gradient(120deg, #F6E3A6, #E7C873 55%, #C9A02F) !important; color: #1b1405 !important; box-shadow: 0 2px 0 #8a6612, 0 6px 12px rgba(201, 160, 47, 0.4); font-weight: 800; }
.pub-quartile.pq-q2 { background: linear-gradient(120deg, #E8EEF9, #B9C6E2 55%, #8FA0C6) !important; box-shadow: 0 2px 0 #5d6d94, 0 6px 12px rgba(90, 110, 160, 0.4); }
.pub-grid .pub-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.btn-pub { position: relative; overflow: hidden; color: #fff; border: 0; background: linear-gradient(120deg, var(--accent), var(--accent-3)); box-shadow: 0 2px 0 #5c1322, 0 10px 18px rgba(165, 28, 48, 0.35); transition: transform 0.3s, box-shadow 0.3s; }
.btn-pub::after { content: ''; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 38%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent); transform: skewX(-20deg); animation: vipSweep 4.2s ease-in-out infinite; pointer-events: none; }
.btn-pub:hover { transform: translateY(-3px); box-shadow: 0 2px 0 #5c1322, 0 16px 26px rgba(165, 28, 48, 0.5); color: #fff; }
.btn-pub span { display: inline-block; transition: transform 0.3s; } .btn-pub:hover span { transform: translate(3px, -3px); }
.research-cta { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.btn-scholar, .btn-orcid { gap: 10px; color: #fff; border: 1px solid rgba(255, 255, 255, 0.5); transition: transform 0.3s, box-shadow 0.3s; }
.btn-scholar { background: linear-gradient(135deg, #6DA6FF, #4285F4 50%, #2457B8); box-shadow: 0 2px 0 #1b3f86, 0 3px 0 #16346d, 0 14px 24px rgba(66, 133, 244, 0.45); }
.btn-orcid { background: linear-gradient(135deg, #C3E56A, #A6CE39 50%, #6E9A1A); box-shadow: 0 2px 0 #55790f, 0 3px 0 #466510, 0 14px 24px rgba(166, 206, 57, 0.45); color: #1b2a05; }
.btn-scholar:hover, .btn-orcid:hover { transform: translateY(-4px) scale(1.03); }
.btn-scholar:hover { color: #fff; } .btn-orcid:hover { color: #1b2a05; }
@media (prefers-reduced-motion: reduce) { .btn-pub::after { animation: none; } }

/* ---------- Performance & small-screen responsiveness ---------- */
/* Skip layout/paint of off-screen sections until they approach the viewport. */
#experience, #education, #expertise, #projects, #ai-systems, #research, #impact,
#updates, #mentoring, #skills, #how-i-work, #services, #opportunities, #contact {
  content-visibility: auto; contain-intrinsic-size: auto 800px;
}
html { -webkit-text-size-adjust: 100%; }
img, video { max-width: 100%; height: auto; }
/* Blur filters are the costliest paint on phones: swap for a solid tint. */
@media (max-width: 820px), (pointer: coarse) {
  * { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  :root, :root[data-theme="dark"] { --header-bg: rgba(10, 9, 8, 0.96); }
  :root[data-theme="light"] { --header-bg: rgba(250, 247, 240, 0.97); }
  section { padding: 72px 0; }
  .section-head { margin-bottom: 36px; }
}
@media (max-width: 480px) {
  section { padding: 56px 0; }
}
/* Touch devices: no sticky hover states, no 300ms tap delay. */
a, button, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

/* ---------- Android apps ---------- */
.mxa { padding-top: 70px; }
.apk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.apk-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--radius-lg);
  background: var(--glass-bg); border: 1px solid var(--border); box-shadow: 0 14px 34px var(--shadow-soft, rgba(0,0,0,.18));
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.apk-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-glow); }
.apk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.apk-ic {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font: 800 24px var(--font-display, inherit);
  color: #1a1712; background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: 0 8px 18px rgba(212, 175, 55, .28);
}
.apk-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: var(--muted); border: 1px solid var(--border-strong); }
.apk-pill i { width: 7px; height: 7px; border-radius: 50%; background: #3ecf8e; }
.apk-pill.is-soon i { background: var(--accent); }
.apk-card h3 { font-size: 19px; }
.apk-card p { color: var(--muted); font-size: 14.5px; line-height: 1.55; flex: 1; }
.apk-go { margin-top: 6px; align-self: flex-start; font-weight: 700; font-size: 14px; color: var(--accent); }
.apk-go:not(.is-off):hover { color: var(--accent-2); }
.apk-go.is-off { color: var(--muted-2); font-weight: 600; }
@media (max-width: 560px) { .apk-grid { grid-template-columns: 1fr; gap: 14px; } .apk-card { padding: 18px; } }

/* ---------- Android showcase: 3D phone, orbiting apps, living cards ---------- */
.apk-stage { position: relative; height: 520px; margin: 0 auto 34px; display: grid; place-items: center; perspective: 1400px; --r: 215px; }
.apk-glow { position: absolute; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(212,175,55,.34), rgba(209,64,90,.16) 45%, transparent 70%); animation: apkBreath 5s ease-in-out infinite; }
.apk-ring { position: absolute; border-radius: 50%; border: 1px solid var(--border-strong); }
.apk-ring.r1 { width: 330px; height: 330px; border-style: dashed; animation: apkSpin 40s linear infinite; }
.apk-ring.r2 { width: 430px; height: 430px; opacity: .55; animation: apkSpin 60s linear infinite reverse; }
.apk-ring.r3 { width: 250px; height: 250px; border-color: var(--accent); opacity: .35; animation: apkPulse 3.6s ease-out infinite; }
.apk-orbit { position: absolute; width: 0; height: 0; animation: apkSpin 34s linear infinite; transform-style: preserve-3d; }
.apk-chip { position: absolute; left: 0; top: 0; transform: rotate(var(--a)) translateX(var(--r)); }
.apk-chip-in {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; white-space: nowrap;
  background: var(--glass-bg-strong); border: 1px solid var(--border-strong); box-shadow: 0 10px 24px var(--shadow, rgba(0,0,0,.25));
  transform: translate(-50%, -50%) rotate(calc(var(--a) * -1)); animation: apkUnspin 34s linear infinite;
}
.apk-chip-in b { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font: 800 14px var(--font-display, inherit); color: #1a1712; background: linear-gradient(135deg, var(--accent-2), var(--accent)); }
.apk-chip-in em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--text); }
.apk-phone {
  position: relative; width: 224px; height: 450px; padding: 10px; border-radius: 40px; transform-style: preserve-3d;
  background: linear-gradient(145deg, #3a352c, #14120e 55%, #2a261e); border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 40px 70px -18px rgba(0,0,0,.6), 0 0 0 2px rgba(0,0,0,.4), 0 0 60px rgba(212,175,55,.22), inset 0 0 0 1px rgba(255,255,255,.06);
  animation: apkFloat 7s ease-in-out infinite;
}
.apk-btn { position: absolute; right: -3px; top: 110px; width: 3px; height: 54px; border-radius: 3px; background: #4a443a; }
.apk-notch { position: absolute; left: 50%; top: 16px; width: 70px; height: 20px; border-radius: 20px; transform: translateX(-50%); background: #05040a; z-index: 3; }
.apk-screen { position: relative; width: 100%; height: 100%; border-radius: 31px; overflow: hidden; background: radial-gradient(120% 80% at 50% 0%, #2b2417, #0c0b09 70%); }
.apk-slide { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; opacity: 0; transform: translateY(26px) scale(.94); transition: opacity .7s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.apk-slide.is-on { opacity: 1; transform: none; }
.apk-s-ic { width: 92px; height: 92px; border-radius: 28px; display: grid; place-items: center; font: 800 44px var(--font-display, inherit); color: #1a1712; background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: 0 16px 34px rgba(212,175,55,.4); animation: apkIcon 3.2s ease-in-out infinite; }
.apk-slide strong { font: 800 20px var(--font-display, inherit); color: #FAF6EC; }
.apk-slide small { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-2); }
.apk-s-bars { display: flex; flex-direction: column; gap: 7px; width: 100%; margin-top: 14px; }
.apk-s-bars i { height: 9px; border-radius: 9px; background: linear-gradient(90deg, rgba(255,255,255,.16), rgba(255,255,255,.05)); }
.apk-s-bars i:nth-child(2) { width: 78%; } .apk-s-bars i:nth-child(3) { width: 54%; }
.apk-dots { position: absolute; left: 0; right: 0; bottom: 20px; display: flex; justify-content: center; gap: 6px; }
.apk-dots i { width: 6px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.3); transition: width .35s, background .35s; }
.apk-dots i.is-on { width: 20px; background: var(--accent); }
.apk-shine { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; overflow: hidden; }
.apk-shine::after { content: ""; position: absolute; top: -20%; bottom: -20%; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.22), transparent); transform: skewX(-18deg); animation: apkShine 6s ease-in-out infinite; }
.apk-stage.is-paused * { animation-play-state: paused !important; }

@keyframes apkSpin { to { transform: rotate(360deg); } }
@keyframes apkUnspin { from { transform: translate(-50%, -50%) rotate(calc(var(--a) * -1)); } to { transform: translate(-50%, -50%) rotate(calc(var(--a) * -1 - 360deg)); } }
@keyframes apkFloat { 0%, 100% { transform: translateY(0) rotateY(-14deg) rotateX(4deg); } 50% { transform: translateY(-16px) rotateY(14deg) rotateX(-2deg); } }
@keyframes apkBreath { 0%, 100% { transform: scale(.92); opacity: .75; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes apkPulse { 0% { transform: scale(.8); opacity: .6; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes apkIcon { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes apkShine { 0%, 55% { left: -60%; } 100% { left: 140%; } }

/* cards: staggered entrance, cursor spotlight, rotating gradient edge, icon shine */
.apk-card.reveal { transition-delay: calc(var(--i, 0) * 80ms); }
.apk-card { overflow: hidden; isolation: isolate; will-change: transform; }
.apk-card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(212,175,55,.2), transparent 70%); }
.apk-card::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1.5px; opacity: 0; transition: opacity .35s; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 55%, var(--accent-2), var(--accent), transparent 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: apkEdge 3.5s linear infinite; }
.apk-card:hover::before, .apk-card:hover::after { opacity: 1; }
@keyframes apkEdge { to { --ang: 360deg; } }
.apk-ic { position: relative; overflow: hidden; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.apk-ic::after { content: ""; position: absolute; inset: -30% auto -30% -70%; width: 50%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); transition: left .7s ease; }
.apk-card:hover .apk-ic { transform: translateY(-3px) rotate(-6deg) scale(1.06); }
.apk-card:hover .apk-ic::after { left: 130%; }
.apk-pill i { animation: apkDot 2s ease-in-out infinite; }
@keyframes apkDot { 0%, 100% { box-shadow: 0 0 0 0 rgba(62,207,142,.55); } 50% { box-shadow: 0 0 0 6px rgba(62,207,142,0); } }
.apk-go span { display: inline-block; transition: transform .25s; }
.apk-card:hover .apk-go span { transform: translateX(5px); }

@media (max-width: 820px) { .apk-stage { height: 430px; --r: 150px; transform: scale(.9); } .apk-ring.r2 { width: 330px; height: 330px; } .apk-glow { width: 280px; height: 280px; } .apk-chip-in em { display: none; } .apk-chip-in { padding: 6px; } }
@media (max-width: 420px) { .apk-stage { height: 380px; --r: 128px; transform: scale(.82); margin-bottom: 8px; } }
@media (prefers-reduced-motion: reduce) {
  .apk-stage * { animation: none !important; } .apk-card::after { animation: none; } .apk-phone { transform: rotateY(-10deg); }
  .apk-chip-in { transform: translate(-50%, -50%) rotate(calc(var(--a) * -1)); }
}

/* ---------- Android hero illustration (original SVG: phone, watch, earbuds) ---------- */
.apk-hero { position: relative; max-width: 640px; margin: 0 auto 30px; }
.apk-hero svg { display: block; width: 100%; height: auto; overflow: visible; }
.apk-hero svg text { font-family: var(--font-body, inherit); }
.apk-hero .ao-phone, .apk-hero .ao-back, .apk-hero .ao-watch, .apk-hero .ao-bud, .apk-hero .ao-star, .apk-hero .ao-glow, .apk-hero .ao-orbit, .apk-hero .ao-tile { transform-box: fill-box; transform-origin: center; }
.apk-hero .ao-phone { animation: aoFloat 7s ease-in-out infinite; }
.apk-hero .ao-back { animation: aoFloat 8s ease-in-out -2s infinite; }
.apk-hero .ao-watch { animation: aoFloat 6s ease-in-out -1s infinite; }
.apk-hero .ao-bud.b1 { animation: aoBob 5s ease-in-out infinite; }
.apk-hero .ao-bud.b2 { animation: aoBob 6s ease-in-out -2.5s infinite; }
.apk-hero .ao-glow { animation: apkBreath 5s ease-in-out infinite; }
.apk-hero .ao-orbit { animation: apkSpin 70s linear infinite; }
.apk-hero .ao-ring { animation: aoRing 5s ease-in-out infinite; }
.apk-hero .ao-bar { transform-box: fill-box; transform-origin: left center; animation: aoBar 4s ease-in-out infinite; }
.apk-hero .ao-tile { animation: aoTile 4.5s ease-in-out infinite; }
.apk-hero .ao-tile:nth-child(2) { animation-delay: .25s; } .apk-hero .ao-tile:nth-child(3) { animation-delay: .5s; }
.apk-hero .ao-tile:nth-child(4) { animation-delay: .75s; } .apk-hero .ao-tile:nth-child(5) { animation-delay: 1s; } .apk-hero .ao-tile:nth-child(6) { animation-delay: 1.25s; }
.apk-hero .ao-screen-sheen { animation: aoSheen 6s ease-in-out infinite; }
.apk-hero .ao-star { animation: aoTwinkle 3s ease-in-out infinite; }
.apk-hero .ao-star.s2 { animation-delay: .8s; } .apk-hero .ao-star.s3 { animation-delay: 1.6s; } .apk-hero .ao-star.s4 { animation-delay: 2.2s; }
.apk-hero.is-paused * { animation-play-state: paused !important; }
.apk-more { text-align: center; margin-top: 4px; }
@keyframes aoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes aoBob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(6deg); } }
@keyframes aoRing { 0% { stroke-dashoffset: 258; } 55%, 85% { stroke-dashoffset: 52; } 100% { stroke-dashoffset: 258; } }
@keyframes aoBar { 0% { transform: scaleX(.1); } 60%, 85% { transform: scaleX(1); } 100% { transform: scaleX(.1); } }
@keyframes aoTile { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-2.5px) scale(1.06); } }
@keyframes aoSheen { 0%, 50% { transform: translateX(-160px) skewX(-14deg); } 100% { transform: translateX(260px) skewX(-14deg); } }
@keyframes aoTwinkle { 0%, 100% { opacity: .15; transform: scale(.5) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(45deg); } }
@media (max-width: 560px) { .apk-hero { margin-bottom: 18px; } }
@media (prefers-reduced-motion: reduce) { .apk-hero * { animation: none !important; } .apk-hero .ao-ring { stroke-dashoffset: 70; } .apk-hero .ao-star { opacity: .8; } }

/* illustration polish: lighter floor shadow, theme-aware */
.apk-hero .ao-shadow { opacity: .32; }
:root[data-theme="light"] .apk-hero .ao-shadow { opacity: .14; }
:root[data-theme="light"] .apk-hero .ao-glow { opacity: .8; }
