/* ================================================================
   MITUN SHIL - Personal Site
   Engineer · Founder · Author
   Palette: deep space-emerald · teal signal · royal gold
   ================================================================ */

:root {
  /* base */
  --bg: #050b0a;
  --bg-2: #071310;
  --bg-3: #0a1a16;
  --surface: rgba(255, 255, 255, 0.028);
  --surface-2: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  /* ink */
  --ink: #eef4f1;
  --ink-soft: #b9c6c0;
  --ink-mute: #7d8c85;

  /* accents */
  --teal: #00d4b4;
  --teal-2: #17e6c4;
  --teal-deep: #0b8f7c;
  --gold: #d8b268;
  --gold-2: #f0d59a;
  --gold-deep: #b99556;
  --emerald: #24372d;

  /* effects */
  --glow-teal: 0 0 40px rgba(0, 212, 180, 0.28);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.4);

  --container: 1200px;
  --radius: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* animatable float offset for orbiting hero badges */
@property --fy {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* subtle global aurora backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(
      ellipse 80% 60% at 15% 0%,
      rgba(0, 212, 180, 0.09),
      transparent 55%
    ),
    radial-gradient(
      ellipse 70% 50% at 90% 20%,
      rgba(216, 178, 104, 0.06),
      transparent 55%
    ),
    radial-gradient(
      ellipse 90% 70% at 50% 100%,
      rgba(0, 212, 180, 0.05),
      transparent 60%
    ),
    var(--bg);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgba(0, 212, 180, 0.28);
  color: #fff;
}

.container {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

section {
  padding: clamp(72px, 10vw, 140px) 0;
  position: relative;
}

/* ================= SCROLL PROGRESS ================= */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 1000;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  box-shadow: 0 0 12px rgba(0, 212, 180, 0.6);
  transition: width 0.1s linear;
}

/* ================= CUSTOM CURSOR ================= */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--teal-2);
}
.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(0, 212, 180, 0.5);
  transition: width 0.25s var(--ease), height 0.25s var(--ease),
    border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.cursor-ring.hover {
  width: 56px;
  height: 56px;
  border-color: rgba(216, 178, 104, 0.7);
  background: rgba(216, 178, 104, 0.08);
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* ================= NAVBAR ================= */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease),
    backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
#navbar.scrolled {
  background: rgba(5, 11, 10, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-inner {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
}
.logo-mark {
  background: linear-gradient(135deg, var(--ink), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
  margin: 0 1px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nl {
  position: relative;
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 999px;
  transition: color 0.25s;
}
.nl::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1.5px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nl:hover,
.nl.active {
  color: var(--ink);
}
.nl:hover::after,
.nl.active::after {
  transform: scaleX(1);
}
.hire-cta {
  background: linear-gradient(135deg, var(--teal-deep), var(--teal));
  color: #04110e !important;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 212, 180, 0.28);
}
.hire-cta::after {
  display: none;
}
.hire-cta:hover {
  filter: brightness(1.08);
}
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-burger span {
  width: 26px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: 0.3s var(--ease);
}
.nav-burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-burger.open span:nth-child(2) {
  opacity: 0;
}
.nav-burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ================= HERO ================= */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #061513;
  animation: heroDrift 26s ease-in-out infinite alternate;
}
/* poster on its own layer (20KB, paints instantly) — darkened to match video */
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../media/elastic-poster.jpg") center/cover no-repeat;
  filter: saturate(1.12) contrast(1.04) brightness(0.5);
}
.hero-bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  /* the factory table is very bright on some frames — darken enough that even
     the lightest frame keeps text legible, while detail/machine still read */
  filter: saturate(1.14) contrast(1.04) brightness(0.5);
}
.hero-bg video.ready {
  opacity: 1;
}
@keyframes heroDrift {
  from {
    transform: scale(1.05) translate(0, 0);
  }
  to {
    transform: scale(1.11) translate(-1.2%, -1.2%);
  }
}
/* teal duotone so the footage matches the brand palette */
.hero-tint {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(4, 34, 29, 0.32);
  mix-blend-mode: color;
  pointer-events: none;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Even, moderate darkening for text contrast (the video filter already
     lowered brightness). A gentle left wash aids the text without blacking
     out the machine, and the bottom fade blends into the page. */
  background: linear-gradient(
      to top,
      var(--bg) 3%,
      rgba(5, 11, 10, 0.5) 28%,
      rgba(5, 11, 10, 0.18) 62%,
      transparent 100%
    ),
    linear-gradient(
      to right,
      rgba(5, 11, 10, 0.55) 0%,
      rgba(5, 11, 10, 0.3) 34%,
      rgba(5, 11, 10, 0.12) 60%,
      transparent 80%
    );
}
#particleCanvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
}
.hero-content {
  position: relative;
  z-index: 3;
}
.open-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 212, 180, 0.06);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  backdrop-filter: blur(6px);
}
.open-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(0, 212, 180, 0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 212, 180, 0.55);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 212, 180, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 212, 180, 0);
  }
}
.hero-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(3.2rem, 9vw, 6.6rem);
  line-height: 0.94;
  letter-spacing: -0.02em;
  margin: 20px 0 8px;
}
.hero-name .line {
  display: block;
}
.hero-name .accent {
  background: linear-gradient(120deg, var(--teal-2) 0%, var(--gold-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.typewriter-wrap {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.05rem, 2.4vw, 1.6rem);
  font-weight: 500;
  color: var(--ink);
  min-height: 1.6em;
  margin-bottom: 22px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.tw-prefix {
  color: var(--ink-mute);
  font-weight: 400;
}
#typewriter {
  color: var(--teal-2);
}
.cursor {
  color: var(--teal);
  animation: blink 1s steps(1) infinite;
  font-weight: 300;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.hero-sub {
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 1.04rem;
  margin: 0 0 34px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 30px 40px;
  margin-bottom: 38px;
}
.hs {
  display: flex;
  flex-direction: column;
}
.hs-val {
  display: flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
}
.hs-num,
.hs-unit {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
}
.hs-unit {
  color: var(--teal);
}
.hs-lbl {
  font-size: 0.78rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
}
.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* buttons */
.btn-primary,
.btn-ghost,
.btn-gold,
.btn-outline-gold {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    filter 0.3s;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--teal-deep), var(--teal));
  color: #04110e;
  box-shadow: 0 10px 30px rgba(0, 212, 180, 0.32);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 42px rgba(0, 212, 180, 0.45);
}
.btn-primary i {
  transition: transform 0.3s var(--ease);
}
.btn-primary:hover i {
  transform: translateX(4px);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface);
}
.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal-2);
  transform: translateY(-3px);
}
.btn-primary.full {
  width: 100%;
  justify-content: center;
}

/* hero visual */
.hero-visual {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  min-height: 420px;
  /* ┌────────────────────────────────────────────────────────────┐
     │  MOVE THE WHOLE RING + BADGES BLOCK (as one package)        │
     │  --shift-x : left (−) / right (+)                           │
     │  --shift-y : up (−)   / down (+)                            │
     │  Just change these two values. Nothing else needs touching. │
     └────────────────────────────────────────────────────────────┘ */
  --shift-x: 60px;
  --shift-y: -30px;
  transform: translate(var(--shift-x), var(--shift-y));
}
.profile-ring {
  position: relative;
  /* balanced size: big enough that the flanking badges hug it as one cluster.
     ~25% smaller than 300px to keep the whole ring+badges cluster compact. */
  --ring: min(225px, 46vw);
  width: var(--ring);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
/* solid backing disc so the transparent portrait PNG reads cleanly */
.profile-ring::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 30%,
    #12463d 0%,
    #0a2b26 55%,
    #061815 100%
  );
  border: 1px solid rgba(0, 212, 180, 0.28);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.6), 0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(0, 212, 180, 0.18);
  z-index: 1;
}
.halo {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 212, 180, 0.28),
    rgba(0, 212, 180, 0) 68%
  );
  filter: blur(14px);
  z-index: 0;
}
.profile-photo {
  width: 76%;
  height: 76%;
  object-fit: cover;
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
  z-index: 2;
}
@keyframes float {
  50% {
    transform: translateY(-14px);
  }
}
.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 212, 180, 0.18);
}
.ring1 {
  inset: 0;
  border-style: dashed;
  animation: spin 26s linear infinite;
}
.ring2 {
  inset: 9%;
  border-color: rgba(216, 178, 104, 0.16);
  animation: spin 20s linear infinite reverse;
}
.ring3 {
  inset: 18%;
  border-color: rgba(0, 212, 180, 0.12);
  animation: spin 34s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* Badges are stacked in two clean columns flanking the ring — 3 left, 3 right.
   Collision-free by construction: wide pills fit horizontally, never crowd the
   top/bottom of the circle. Reads as a deliberate, professional label layout. */
.floating-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(7, 19, 16, 0.85);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  color: var(--ink);
  z-index: 4;
}
.floating-badge i {
  color: var(--teal);
}
/* connector line + node tying each badge to the ring (diagram-style callout).
   Length matches --gap so the line spans from the pill to the ring edge. */
.floating-badge::before {
  content: "";
  position: absolute;
  top: 50%;
  width: var(--gap);
  height: 1px;
  background: linear-gradient(
    var(--cdir, to left),
    rgba(0, 212, 180, 0.75),
    rgba(0, 212, 180, 0.15)
  );
}
.floating-badge::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px rgba(0, 212, 180, 0.8);
}
/* left column: connector exits the RIGHT edge, node lands on the ring */
.badge-1::before,
.badge-3::before,
.badge-5::before {
  left: 100%;
  --cdir: to right;
}
.badge-1::after,
.badge-3::after,
.badge-5::after {
  left: calc(100% + var(--gap) - 2px);
}
/* right column: connector exits the LEFT edge, node lands on the ring */
.badge-2::before,
.badge-4::before,
.badge-6::before {
  right: 100%;
  --cdir: to left;
}
.badge-2::after,
.badge-4::after,
.badge-6::after {
  right: calc(100% + var(--gap) - 2px);
}
/* Badges trace the ring's curve. For each row, the horizontal ring-edge offset
   from centre is computed from circle geometry so the connector always meets
   the ring: middle row = R (widest), top/bottom rows = 0.8·R (rows set at
   0.6·R above/below centre, since sqrt(1 − 0.6²) = 0.8). --gap adds the
   connector length so the pill sits just outside the edge. */
.profile-ring {
  --R: calc(var(--ring) / 2);
  --gap: 20px;
  --edge-mid: var(--R);
  --edge-tb: calc(var(--R) * 0.8);
  --row-tb: calc(var(--R) * 0.6); /* vertical offset of the top/bottom rows */
}
/* LEFT column (badges 1,3,5): sit left of the ring edge */
.badge-1,
.badge-5 {
  right: calc(50% + var(--edge-tb) + var(--gap));
}
.badge-3 {
  right: calc(50% + var(--edge-mid) + var(--gap));
}
/* RIGHT column (badges 2,4,6): sit right of the ring edge */
.badge-2,
.badge-6 {
  left: calc(50% + var(--edge-tb) + var(--gap));
}
.badge-4 {
  left: calc(50% + var(--edge-mid) + var(--gap));
}
/* rows: top pair, middle pair, bottom pair — placed on the circle */
.badge-1,
.badge-2 {
  top: calc(50% - var(--row-tb));
  transform: translateY(-50%);
}
.badge-3,
.badge-4 {
  top: 50%;
  transform: translateY(-50%);
}
.badge-5,
.badge-6 {
  top: calc(50% + var(--row-tb));
  transform: translateY(-50%);
}
/* gold-icon badges */
.badge-4 i,
.badge-6 i {
  color: var(--gold);
}

/* compact credential chips - phones only (hidden on larger screens) */
.visual-chips {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
  width: 100%;
  max-width: 100%;
  padding-inline: 4px;
}
.visual-chips span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(7, 19, 16, 0.85);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  max-width: 100%;
}
.visual-chips span i {
  color: var(--teal);
}
.visual-chips span:nth-child(1) i,
.visual-chips span:nth-child(6) i {
  color: var(--gold);
}
.scroll-arrow {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.scroll-arrow i {
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob {
  50% {
    transform: translateY(6px);
  }
}

/* ================= MARQUEE ================= */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  background: linear-gradient(
    90deg,
    rgba(0, 212, 180, 0.03),
    rgba(216, 178, 104, 0.03)
  );
  -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;
  align-items: center;
  gap: 26px;
  width: max-content;
  animation: scroll-x 34s linear infinite;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.marquee-track .sep {
  color: var(--teal);
  font-size: 0.7rem;
}
@keyframes scroll-x {
  to {
    transform: translateX(-50%);
  }
}

/* ================= SECTION HEADERS ================= */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(46px, 6vw, 72px);
}
.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  padding: 6px 16px;
  border: 1px solid rgba(0, 212, 180, 0.28);
  border-radius: 999px;
  background: rgba(0, 212, 180, 0.05);
  margin-bottom: 18px;
}
.section-tag.gold {
  color: var(--gold-2);
  border-color: rgba(216, 178, 104, 0.35);
  background: rgba(216, 178, 104, 0.06);
}
.section-header h2 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.section-sub {
  color: var(--ink-soft);
  font-size: 1.06rem;
  margin: 0;
}

/* ================= ABOUT ================= */
.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 54px;
  align-items: start;
}
.about-text p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0 0 20px;
}
.about-text strong {
  color: var(--ink);
  font-weight: 600;
}
.about-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.alink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--surface);
  transition: 0.3s var(--ease);
}
.alink:hover {
  border-color: var(--teal);
  color: var(--teal-2);
  transform: translateY(-2px);
}
.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.ac {
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}
.ac::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(0, 212, 180, 0.1),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s;
}
.ac:hover {
  border-color: rgba(0, 212, 180, 0.35);
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.ac:hover::before {
  opacity: 1;
}
.ac-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(0, 212, 180, 0.16),
    rgba(0, 212, 180, 0.04)
  );
  color: var(--teal);
  font-size: 1.25rem;
  margin-bottom: 16px;
}
.ac h4 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.06rem;
  margin: 0 0 8px;
}
.ac p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0;
}

/* ================= METRICS BAR ================= */
.metrics-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 70px;
}
.mb-item {
  background: var(--bg-2);
  padding: 30px 18px;
  text-align: center;
  transition: background 0.3s;
}
.mb-item:hover {
  background: var(--bg-3);
}
.mb-val {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
  background: linear-gradient(120deg, var(--ink), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.mb-item p {
  font-size: 0.8rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 10px 0 0;
}

/* ================= TIMELINE ================= */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding-left: 34px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--teal),
    rgba(0, 212, 180, 0.15) 70%,
    transparent
  );
}
.tl-item {
  position: relative;
  margin-bottom: 34px;
}
.tl-dot {
  position: absolute;
  left: -34px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 212, 180, 0.12);
}
.tl-period {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.tl-card {
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: 0.4s var(--ease);
}
.tl-card:hover {
  border-color: rgba(0, 212, 180, 0.3);
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
}
.tl-company {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.tl-sub-co {
  font-size: 0.85rem;
  color: var(--ink-mute);
  font-weight: 400;
}
.tl-badge {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(0, 212, 180, 0.1);
  color: var(--teal-2);
  border: 1px solid rgba(0, 212, 180, 0.22);
  letter-spacing: 0.02em;
}
.tl-loc {
  font-size: 0.85rem;
  color: var(--ink-mute);
  margin: 8px 0 16px;
}
.tl-loc i {
  color: var(--teal);
  margin-right: 5px;
}
.tl-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tl-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-size: 0.94rem;
}
.tl-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0.7;
}
.tl-list strong {
  color: var(--ink);
}
.tl-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--teal-2);
  transition: gap 0.3s;
}
.tl-link:hover {
  gap: 12px;
}

/* ================= PROJECTS ================= */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 70px;
}
.proj-card {
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: 0.4s var(--ease);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.proj-card::after {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.proj-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 212, 180, 0.32);
  box-shadow: var(--shadow-md);
  background: var(--surface-2);
}
.proj-card:hover::after {
  opacity: 1;
}
.proj-card.featured {
  background: linear-gradient(
    160deg,
    rgba(0, 212, 180, 0.07),
    var(--surface) 60%
  );
  border-color: rgba(0, 212, 180, 0.22);
}
.proj-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.proj-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(
    135deg,
    rgba(0, 212, 180, 0.16),
    rgba(0, 212, 180, 0.03)
  );
  color: var(--teal);
  font-size: 1.15rem;
}
.proj-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}
.proj-card h4 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.12rem;
  margin: 0 0 10px;
  line-height: 1.3;
}
.proj-card p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0 0 18px;
  flex-grow: 1;
}
.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--teal-2);
  transition: gap 0.3s;
  align-self: flex-start;
}
.proj-link:hover {
  gap: 12px;
}

/* video feature */
.video-feature {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 44px;
  align-items: center;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(150deg, rgba(0, 212, 180, 0.06), var(--surface));
  margin-bottom: 80px;
}
.vf-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 14px;
}
.vf-label h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 14px;
}
.vf-label > p {
  color: var(--ink-soft);
  margin: 0 0 22px;
}
.vf-specs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.vf-specs li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.vf-specs i {
  color: var(--teal);
  width: 18px;
  text-align: center;
}
.vf-player video {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: #000;
  box-shadow: var(--shadow-lg);
}
.vf-caption {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--ink-mute);
  text-align: center;
}

/* robotics grid */
.rob-heading {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  text-align: center;
  margin: 0 0 36px;
}
.rob-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.rob-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: 0.4s var(--ease);
}
.rob-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 212, 180, 0.3);
  box-shadow: var(--shadow-md);
}
.rob-img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-3);
}
.rob-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.rob-card:hover .rob-img img {
  transform: scale(1.07);
}
.kaizen-img img {
  object-fit: contain;
  background: #0d1512;
}
.rob-info {
  padding: 22px 20px;
}
.rob-info h4 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  margin: 0 0 8px;
}
.rob-info p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0 0 14px;
}
.rob-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.rob-tags span {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 212, 180, 0.08);
  color: var(--teal-2);
  border: 1px solid rgba(0, 212, 180, 0.16);
}

/* ================= BOOK SECTION ================= */
#book {
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg), #0a0f0d 40%, var(--bg));
}
.book-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(
      ellipse 60% 50% at 80% 30%,
      rgba(216, 178, 104, 0.1),
      transparent 60%
    ),
    radial-gradient(
      ellipse 50% 60% at 15% 70%,
      rgba(216, 178, 104, 0.06),
      transparent 60%
    );
}
.section-header.light .section-sub {
  color: #cdbfa4;
}
.book-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}
.book-visual {
  position: relative;
  display: grid;
  place-items: center;
}
.book-glow {
  position: absolute;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(216, 178, 104, 0.28),
    transparent 68%
  );
  filter: blur(30px);
}
.book-cover {
  position: relative;
  width: min(440px, 90%);
  filter: drop-shadow(0 40px 70px rgba(0, 0, 0, 0.7));
  animation: float 7s ease-in-out infinite;
  transition: transform 0.5s var(--ease);
}
.book-cover:hover {
  transform: translateY(-10px) rotate(-1deg) scale(1.02);
}
.book-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold-2);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.book-kicker .crown {
  font-size: 1rem;
}
.book-title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  line-height: 1;
  letter-spacing: 0.01em;
  margin: 0 0 12px;
  background: linear-gradient(120deg, var(--gold-2), var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.book-tag {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.35rem;
  color: #ddceb2;
  margin: 0 0 24px;
  line-height: 1.4;
}
.book-text {
  color: var(--ink-soft);
  font-size: 1.03rem;
  margin: 0 0 22px;
}
.book-text strong {
  color: var(--gold-2);
  font-weight: 600;
}
.book-quote {
  margin: 0 0 22px;
  padding: 18px 24px;
  border-left: 2px solid var(--gold);
  background: rgba(216, 178, 104, 0.05);
  border-radius: 0 14px 14px 0;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.25rem;
  color: #e7dcc3;
  line-height: 1.45;
}
.book-note {
  color: var(--ink-mute);
  font-size: 0.95rem;
  margin: 0 0 30px;
}
.book-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-deep), var(--gold-2));
  color: #241a08;
  box-shadow: 0 12px 34px rgba(216, 178, 104, 0.32);
}
.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 46px rgba(216, 178, 104, 0.45);
}
.btn-gold i {
  transition: transform 0.3s var(--ease);
}
.btn-gold:hover i {
  transform: translateX(4px);
}
.btn-outline-gold {
  border-color: rgba(216, 178, 104, 0.45);
  color: var(--gold-2);
  background: rgba(216, 178, 104, 0.05);
}
.btn-outline-gold:hover {
  border-color: var(--gold);
  background: rgba(216, 178, 104, 0.12);
  transform: translateY(-3px);
}

/* ================= SKILLS ================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.skill-group {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: 0.4s var(--ease);
}
.skill-group:hover {
  border-color: rgba(0, 212, 180, 0.28);
  transform: translateY(-5px);
}
.skill-group h4 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.skill-group h4 i {
  color: var(--teal);
}
.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sp {
  font-size: 0.82rem;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  transition: 0.3s var(--ease);
}
.sp:hover {
  border-color: var(--teal);
  color: var(--teal-2);
  background: rgba(0, 212, 180, 0.08);
}

/* ================= EDUCATION ================= */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
}
.edu-col-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
}
.edu-col-title.mt {
  margin-top: 40px;
}
.edu-col-title i {
  color: var(--teal);
}
.edu-card {
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  position: relative;
}
.edu-year {
  position: absolute;
  top: 20px;
  right: 24px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--teal);
  font-size: 1.1rem;
}
.edu-card h4 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  margin: 0 0 6px;
  padding-right: 60px;
}
.edu-inst {
  color: var(--teal-2);
  font-weight: 500;
  margin-bottom: 8px;
}
.edu-card p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0;
}
.certs-list {
  display: grid;
  gap: 10px;
}
.cert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.cert-item i {
  color: var(--teal);
}
.awards-list {
  display: grid;
  gap: 14px;
}
.award-item {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  transition: 0.3s var(--ease);
}
.award-item:hover {
  border-color: rgba(216, 178, 104, 0.3);
  transform: translateX(5px);
}
.aw-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(216, 178, 104, 0.18),
    rgba(216, 178, 104, 0.04)
  );
  color: var(--gold-2);
  font-size: 1.1rem;
}
.award-item h5 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  margin: 0 0 4px;
}
.award-item p {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 0;
}
.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.pub-list li {
  position: relative;
  padding: 14px 18px 14px 40px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.pub-list li::before {
  content: "\f02d";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 16px;
  top: 15px;
  color: var(--teal);
  font-size: 0.8rem;
}
.pub-list span {
  color: var(--ink-mute);
  font-weight: 500;
}

/* ================= CONTACT ================= */
#contact {
  background: linear-gradient(180deg, var(--bg), #071310);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.eu-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(0, 212, 180, 0.08);
  border: 1px solid rgba(0, 212, 180, 0.25);
  color: var(--teal-2);
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.contact-items {
  display: grid;
  gap: 12px;
}
.ci {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  transition: 0.3s var(--ease);
}
.ci:hover {
  border-color: rgba(0, 212, 180, 0.32);
  transform: translateX(6px);
  background: var(--surface-2);
}
.ci-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(0, 212, 180, 0.16),
    rgba(0, 212, 180, 0.03)
  );
  color: var(--teal);
  font-size: 1.1rem;
}
.ci span {
  display: block;
  font-size: 0.76rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ci strong {
  font-weight: 500;
  font-size: 0.98rem;
}
.contact-card {
  padding: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: linear-gradient(155deg, rgba(0, 212, 180, 0.08), var(--surface));
  box-shadow: var(--shadow-lg);
}
.cc-top {
  display: flex;
  gap: 18px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.cc-avatar {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--teal);
  box-shadow: var(--glow-teal);
  flex-shrink: 0;
}
.cc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cc-top h4 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
  margin: 0;
}
.cc-top > div > p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 2px 0 8px;
}
.cc-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--teal-2);
}
.dot.green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  animation: pulse 2.4s infinite;
}
.cc-roles {
  padding: 24px 0;
}
.cc-roles > p {
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--ink);
}
.role-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.role-pills span {
  font-size: 0.8rem;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.cc-bottom {
  padding-top: 8px;
}

/* ---- pitch form ---- */
.pitch-form {
  display: grid;
  gap: 12px;
}
.pf-field input,
.pf-field textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
  resize: vertical;
}
.pf-field textarea {
  min-height: 88px;
}
.pf-field input::placeholder,
.pf-field textarea::placeholder {
  color: var(--ink-mute);
}
.pf-field input:focus,
.pf-field textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: rgba(0, 212, 180, 0.05);
}
.pf-field input.invalid,
.pf-field textarea.invalid {
  border-color: #ff6b6b;
}
.pitch-form .btn-primary {
  margin-top: 2px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  position: relative;
}
.pitch-form .btn-primary:disabled {
  cursor: default;
}
/* sending: swap the arrow for a spinner + animated dots on the label */
.pitch-form .btn-primary.sending i {
  animation: spin 0.7s linear infinite;
  /* turn the arrow into a spinner ring */
}
.pitch-form .btn-primary.sending i::before {
  content: "\f110"; /* fa-spinner */
}
.pitch-form .btn-primary.sending span::after {
  content: "";
  animation: sendingDots 1.4s steps(4, end) infinite;
}
@keyframes sendingDots {
  0% {
    content: "";
  }
  25% {
    content: ".";
  }
  50% {
    content: "..";
  }
  75% {
    content: "...";
  }
}
/* done: arrow becomes a check, button pulses once */
.pitch-form .btn-primary.done i::before {
  content: "\f00c"; /* fa-check */
}
.pitch-form .btn-primary.done {
  animation: donevpop 0.4s var(--ease);
}
@keyframes donevpop {
  40% {
    transform: scale(1.04);
  }
}
.pf-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.pf-status {
  margin: 4px 0 0;
  font-size: 0.86rem;
  min-height: 1.1em;
  text-align: center;
}
.pf-status.ok {
  color: var(--teal-2);
}
.pf-status.err {
  color: #ff8080;
}

/* ================= FOOTER ================= */
footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
}
.footer-tag {
  color: var(--ink-soft);
  margin: 0;
}
.footer-links {
  display: flex;
  gap: 14px;
}
.footer-links a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  transition: 0.3s var(--ease);
}
.footer-links a:hover {
  border-color: var(--teal);
  color: var(--teal-2);
  transform: translateY(-3px);
  box-shadow: var(--glow-teal);
}
.footer-copy {
  color: var(--ink-mute);
  font-size: 0.84rem;
  margin: 6px 0 0;
}

/* ================= SCROLL REVEAL ================= */
/* Only hide when JS is active (js class added by main.js). Without JS,
   content stays fully visible - never a blank page. */
.js .fade-up {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}
.js .fade-up.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .fade-up {
    opacity: 1;
    transform: none;
  }
}

/* ================= RESPONSIVE ================= */

/* Large tablets & small laptops */
@media (max-width: 1080px) {
  .proj-grid,
  .rob-grid,
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

/* Tablet / stacked hero (≤980px) */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 52px;
    text-align: center;
  }
  .hero-content {
    order: 2;
  }
  .hero-visual {
    order: 1;
    min-height: auto;
    /* reset the desktop down-shift so the stacked cluster isn't pushed off */
    transform: none;
  }
  .hero-sub {
    margin-inline: auto;
  }
  .hero-stats {
    justify-content: center;
    grid-template-columns: repeat(4, auto);
    gap: 22px 28px;
  }
  .hero-btns {
    justify-content: center;
  }
  .profile-ring {
    --ring: min(300px, 62vw);
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-text {
    text-align: left;
  }
  .about-links {
    justify-content: flex-start;
  }
  .video-feature {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px;
  }
  .book-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .book-copy {
    max-width: 640px;
    margin-inline: auto;
  }
  .book-kicker,
  .book-btns {
    justify-content: center;
  }
  .book-quote {
    text-align: left;
  }
  .edu-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .contact-info,
  .contact-card {
    max-width: 640px;
    margin-inline: auto;
    width: 100%;
  }
}

/* Mobile nav + phones (≤760px) */
@media (max-width: 760px) {
  .nav-inner {
    height: 64px;
  }
  .nav-burger {
    display: flex;
  }
  .nav-links {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px 22px 26px;
    background: rgba(5, 11, 10, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%);
    transition: transform 0.4s var(--ease);
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
  }
  .nav-links.open {
    transform: translateY(0);
  }
  .nl {
    padding: 15px 8px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 1rem;
  }
  .nl::after {
    display: none;
  }
  .hire-cta {
    margin-top: 12px;
    text-align: center;
    border-radius: 999px;
  }
  #hero {
    padding-top: 96px;
  }
  .metrics-bar {
    grid-template-columns: 1fr 1fr;
  }
  .metrics-bar .mb-item:last-child {
    grid-column: span 2;
  }
  .about-cards {
    grid-template-columns: 1fr 1fr;
  }
  .proj-grid,
  .rob-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
    max-width: 380px;
    margin-inline: auto;
  }
  .btn-primary,
  .btn-ghost,
  .btn-gold,
  .btn-outline-gold {
    padding: 13px 22px;
    font-size: 0.9rem;
  }
  /* on phones, drop orbiting badges (they hit screen edges) and show a
     clean centered chip row under the ring instead */
  .profile-ring {
    --ring: min(300px, 72vw);
  }
  .floating-badge {
    display: none;
  }
  .visual-chips {
    display: flex;
  }
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
  .cc-top {
    flex-direction: row;
  }
}

/* Small phones (≤480px) */
@media (max-width: 480px) {
  .container {
    width: calc(100% - 32px);
  }
  section {
    padding: 60px 0;
  }
  .hero-name {
    font-size: clamp(2.6rem, 15vw, 4rem);
  }
  .about-cards {
    grid-template-columns: 1fr;
  }
  .metrics-bar {
    grid-template-columns: 1fr;
  }
  .metrics-bar .mb-item:last-child {
    grid-column: span 1;
  }
  .hero-stats {
    gap: 18px;
  }
  .hs-num,
  .hs-unit {
    font-size: 1.7rem;
  }
  .video-feature,
  .contact-card {
    padding: 22px;
  }
  .tl-card,
  .proj-card,
  .skill-group {
    padding: 22px 20px;
  }
  .timeline {
    padding-left: 26px;
  }
  .tl-dot {
    left: -26px;
  }
  .book-title {
    font-size: clamp(2.4rem, 12vw, 3.2rem);
  }
  .book-btns {
    flex-direction: column;
  }
  .book-btns a {
    width: 100%;
    justify-content: center;
  }
  .hero-btns {
    width: 100%;
  }
  .hero-btns a {
    flex: 1;
    justify-content: center;
    min-width: 140px;
  }
  .profile-ring {
    --ring: min(260px, 74vw);
  }
  .visual-chips span {
    font-size: 0.7rem;
    padding: 6px 11px;
  }
}

/* Very small phones (≤360px, e.g. iPhone SE / Galaxy Fold cover) */
@media (max-width: 360px) {
  .nav-logo {
    font-size: 1.25rem;
  }
  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }
  .open-badge {
    font-size: 0.72rem;
    padding: 6px 12px;
  }
  .section-header h2 {
    font-size: 1.8rem;
  }
}

/* Landscape phones - reduce vertical padding so hero fits */
@media (max-height: 560px) and (orientation: landscape) and (max-width: 980px) {
  #hero {
    min-height: auto;
    padding-top: 88px;
    padding-bottom: 48px;
  }
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    text-align: left;
    gap: 30px;
  }
  .hero-content {
    order: 1;
  }
  .hero-visual {
    order: 2;
  }
  .profile-ring {
    --ring: min(240px, 40vw);
  }
  .floating-badge {
    display: none;
  }
  .visual-chips {
    display: flex;
    margin-top: 16px;
  }
  .scroll-arrow {
    display: none;
  }
}

/* motion-safe */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
