:root {
  --bg: #0f1417;
  --surface: #171d21;
  --surface-strong: #20282d;
  --text: #f7f3ed;
  --text-dim: #b9b0a3;
  --muted: #7f8b86;
  --line: rgba(247, 243, 237, 0.14);
  --teal: #56c7b7;
  --coral: #ef8068;
  --gold: #d6b66d;
  --max-width: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(86, 199, 183, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(239, 128, 104, 0.08), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: 'Outfit', 'Segoe UI', sans-serif;
  overflow-x: hidden;
  line-height: 1.55;
}

body.modal-open {
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 100% 44px;
  opacity: 0.35;
}

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

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 28px;
}

.logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: rgba(15, 20, 23, 0.72);
  backdrop-filter: blur(14px);
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(15, 20, 23, 0.72);
  backdrop-filter: blur(14px);
}

.nav-links a {
  padding: 10px 14px;
  color: var(--text-dim);
  font-size: 0.92rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: rgba(15, 20, 23, 0.72);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  align-items: center;
  gap: 54px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 132px 28px 72px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.eyebrow,
.section-tag {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.name-text {
  max-width: 680px;
  font-size: clamp(3.1rem, 7.6vw, 6.8rem);
  font-weight: 800;
  line-height: 0.94;
}

.role-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-dim);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 600;
}

.role-line span:last-child {
  color: var(--coral);
}

.hero-desc {
  max-width: 540px;
  color: var(--text-dim);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.btn,
.contact-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--line);
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.contact-email:hover {
  transform: translateY(-2px);
  border-color: rgba(86, 199, 183, 0.55);
}

.btn.primary {
  background: var(--teal);
  color: #09201d;
  border-color: transparent;
}

.btn.ghost {
  background: rgba(255,255,255,0.04);
}

.hero-robot {
  position: relative;
  overflow: visible;
  min-height: 540px;
  border: 0;
  background:
    radial-gradient(circle at 50% 38%, rgba(86, 199, 183, 0.18), transparent 34%),
    radial-gradient(circle at 78% 22%, rgba(239, 128, 104, 0.16), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
}

.robot-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  perspective: 900px;
}

.robot-stage::before {
  content: '';
  position: absolute;
  inset: 48px -18px 18px;
  border: 1px solid rgba(86, 199, 183, 0.14);
  border-top: 0;
  background-image:
    linear-gradient(rgba(247,243,237,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247,243,237,0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  transform: perspective(520px) rotateX(62deg) translateY(150px);
  transform-origin: center bottom;
  mask-image: linear-gradient(to top, black 0%, rgba(0,0,0,0.75) 45%, transparent 100%);
}

.robot-orbit {
  position: absolute;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(86, 199, 183, 0.25);
  border-radius: 50%;
  transform: rotateX(66deg);
}

.orbit-one {
  animation: orbitSpin 14s linear infinite;
}

.orbit-two {
  width: 450px;
  height: 450px;
  border-color: rgba(239, 128, 104, 0.18);
  animation: orbitSpin 22s linear infinite reverse;
}

.robot-spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 24px rgba(86, 199, 183, 0.9);
  animation: sparkFloat 4.5s ease-in-out infinite;
}

.spark-one { top: 24%; left: 22%; }
.spark-two { top: 66%; right: 18%; animation-delay: -1.5s; background: var(--coral); }
.spark-three { top: 18%; right: 30%; animation-delay: -2.5s; background: var(--gold); }

.robot {
  position: relative;
  width: min(72%, 360px);
  height: 430px;
  display: grid;
  justify-items: center;
  align-content: center;
  animation: robotFloat 4.8s ease-in-out infinite;
}

.video-robot {
  width: min(66vw, 390px);
  height: auto;
  align-content: end;
  filter: drop-shadow(0 30px 54px rgba(0,0,0,0.38));
  transform-origin: center bottom;
}

.video-robot img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  animation: robotLean 5.2s ease-in-out infinite;
}

.robot-3d {
  width: min(68vw, 390px);
  height: 500px;
  align-content: end;
  transform-style: preserve-3d;
  --robotX: 0deg;
  --robotY: 0deg;
}

.robot-3d::before {
  content: '';
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 46%;
  width: 430px;
  height: 150px;
  border: 2px solid rgba(122, 245, 238, 0.72);
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(86,199,183,0.45);
  transform: translate(-50%, -50%) rotate(-9deg);
  animation: haloSweep 4.8s ease-in-out infinite;
}

.robot-3d::after {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 8% -18% 0;
  background: radial-gradient(circle, rgba(86,199,183,0.22), transparent 60%);
  filter: blur(18px);
  animation: auraPulse 3.4s ease-in-out infinite;
}

.robot-rig {
  position: relative;
  z-index: 2;
  width: 270px;
  height: 445px;
  margin: 0 auto;
  transform-style: preserve-3d;
  animation: rigTurn 9s ease-in-out infinite;
  filter: drop-shadow(0 34px 42px rgba(0,0,0,0.35));
}

.robot-head3d {
  position: absolute;
  left: 50%;
  top: 18px;
  width: 158px;
  height: 128px;
  border-radius: 54px 54px 46px 46px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,0.96), transparent 20%),
    linear-gradient(145deg, #ffffff 0%, #d7e2df 48%, #8d9a99 100%);
  border: 1px solid rgba(255,255,255,0.45);
  box-shadow:
    inset 14px 12px 28px rgba(255,255,255,0.5),
    inset -18px -20px 34px rgba(35,47,51,0.24),
    0 18px 40px rgba(0,0,0,0.28);
  transform: translateX(-50%) rotateY(var(--robotY)) rotateX(var(--robotX));
  transform-origin: 50% 80%;
  animation: headLook 5.6s ease-in-out infinite;
}

.head-shine {
  position: absolute;
  left: 44px;
  top: 12px;
  width: 62px;
  height: 18px;
  border-top: 2px solid rgba(140,155,157,0.45);
  border-radius: 50%;
}

.robot-face3d {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 44px;
  height: 56px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 120%, rgba(86,199,183,0.18), transparent 52%),
    #10191c;
  box-shadow:
    inset 0 0 20px rgba(64,218,255,0.14),
    0 8px 14px rgba(0,0,0,0.18);
}

.eye3d {
  position: absolute;
  top: 20px;
  width: 26px;
  height: 18px;
  border-radius: 50%;
  background: #41d9ff;
  box-shadow: 0 0 18px rgba(65,217,255,0.9), 0 0 36px rgba(65,217,255,0.42);
  animation: eyeScan 4.8s ease-in-out infinite;
}

.eye3d-left { left: 22px; }
.eye3d-right { right: 22px; animation-delay: 0.08s; }

.ear3d {
  position: absolute;
  top: 42px;
  width: 28px;
  height: 48px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #f9ffff 0 26%, #96a4a4 28% 48%, #1a2427 50% 58%, #cfdada 60%);
  border: 1px solid rgba(255,255,255,0.38);
}

.ear3d-left { left: -11px; transform: rotateY(-34deg); }
.ear3d-right { right: -11px; transform: rotateY(34deg); }

.neck3d {
  position: absolute;
  left: 50%;
  top: 137px;
  width: 52px;
  height: 46px;
  border-radius: 16px;
  background:
    repeating-linear-gradient(90deg, #253035 0 5px, #9ba8a8 5px 9px),
    #6d7979;
  transform: translateX(-50%);
  box-shadow: inset 0 0 12px rgba(0,0,0,0.35);
}

.torso3d {
  position: absolute;
  left: 50%;
  top: 166px;
  width: 168px;
  height: 150px;
  border-radius: 54px 54px 42px 42px;
  background:
    radial-gradient(circle at 34% 18%, rgba(255,255,255,0.95), transparent 16%),
    linear-gradient(145deg, #f7fbfa 0%, #bdcac8 58%, #7b8888 100%);
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow:
    inset 16px 14px 26px rgba(255,255,255,0.45),
    inset -22px -20px 36px rgba(26,35,38,0.28),
    0 22px 40px rgba(0,0,0,0.25);
  transform: translateX(-50%);
}

.core3d {
  position: absolute;
  left: 50%;
  top: 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #48dfff 0 28%, #132225 30% 48%, #8eece5 50% 58%, #121a1d 60%);
  box-shadow: 0 0 24px rgba(65,217,255,0.55);
  transform: translateX(-50%);
  animation: core3dPulse 2.2s ease-in-out infinite;
}

.joint3d,
.hip3d {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, #ffffff, #96a4a4 45%, #1b2528 48%, #cad6d4 62%);
  box-shadow: inset -6px -6px 12px rgba(0,0,0,0.22);
}

.shoulder-left { left: -24px; top: 38px; }
.shoulder-right { right: -24px; top: 38px; }
.hip-left { left: 38px; bottom: -16px; }
.hip-right { right: 38px; bottom: -16px; }

.arm3d,
.leg3d {
  position: absolute;
  transform-style: preserve-3d;
}

.arm3d {
  top: 66px;
  width: 34px;
  height: 118px;
  border-radius: 999px;
  background: linear-gradient(120deg, #f6fbfa, #9aa7a7 58%, #4b5759);
  box-shadow: inset -8px -12px 14px rgba(0,0,0,0.2);
  transform-origin: 50% 8px;
}

.arm3d-left {
  left: -48px;
  animation: arm3dLeft 4.2s ease-in-out infinite;
}

.arm3d-right {
  right: -48px;
  animation: arm3dRight 4.2s ease-in-out infinite;
}

.forearm3d {
  position: absolute;
  left: 4px;
  bottom: -70px;
  width: 28px;
  height: 78px;
  border-radius: 999px;
  background: linear-gradient(120deg, #f8ffff, #aebbbb 60%, #526063);
  transform-origin: top center;
  animation: forearmMove 4.2s ease-in-out infinite;
}

.hand3d {
  position: absolute;
  left: 1px;
  bottom: -92px;
  width: 32px;
  height: 28px;
  border-radius: 12px 12px 18px 18px;
  background: linear-gradient(135deg, #f5fbfa, #909e9f);
}

.leg3d {
  top: 140px;
  width: 40px;
  height: 104px;
  border-radius: 999px;
  background: linear-gradient(120deg, #f7ffff, #9ba8a8 58%, #394548);
  transform-origin: top center;
}

.leg3d-left {
  left: 44px;
  animation: leg3dLeft 4.4s ease-in-out infinite;
}

.leg3d-right {
  right: 44px;
  animation: leg3dRight 4.4s ease-in-out infinite;
}

.shin3d {
  position: absolute;
  left: 5px;
  bottom: -74px;
  width: 30px;
  height: 78px;
  border-radius: 999px;
  background: linear-gradient(120deg, #f7ffff, #9aa8a8 58%, #3c484b);
}

.foot3d {
  position: absolute;
  left: -8px;
  bottom: -96px;
  width: 62px;
  height: 30px;
  border-radius: 26px 14px 18px 18px;
  background: linear-gradient(140deg, #ffffff, #a8b5b4 62%, #556266);
  box-shadow: 0 12px 18px rgba(0,0,0,0.22);
}

.video-robot::before {
  content: '';
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 38%;
  width: 420px;
  height: 150px;
  border: 2px solid rgba(122, 245, 238, 0.72);
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(86,199,183,0.45);
  transform: translate(-50%, -50%) rotate(-9deg);
  animation: haloSweep 4.8s ease-in-out infinite;
}

.video-robot::after {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 6% -14% 4%;
  background: radial-gradient(circle, rgba(86,199,183,0.2), transparent 58%);
  filter: blur(14px);
  animation: auraPulse 3.4s ease-in-out infinite;
}

.robot-eye-glow {
  position: absolute;
  z-index: 3;
  top: 25.5%;
  width: 28px;
  height: 20px;
  border-radius: 50%;
  background: rgba(64, 218, 255, 0.68);
  box-shadow: 0 0 18px rgba(64,218,255,0.95);
  animation: videoEyeBlink 5s ease-in-out infinite;
}

.glow-left {
  left: 41%;
}

.glow-right {
  left: 54%;
  animation-delay: 0.08s;
}

.robot-antenna {
  position: relative;
  width: 8px;
  height: 54px;
  background: linear-gradient(var(--teal), rgba(86,199,183,0.2));
  border-radius: 999px;
  transform-origin: bottom center;
  animation: antennaWave 2.8s ease-in-out infinite;
}

.robot-antenna span {
  position: absolute;
  top: -15px;
  left: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 26px rgba(86,199,183,0.85);
  transform: translateX(-50%);
  animation: antennaPulse 1.8s ease-in-out infinite;
}

.robot-head {
  position: relative;
  width: 230px;
  height: 165px;
  border: 1px solid rgba(247,243,237,0.18);
  border-radius: 42px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.2), rgba(255,255,255,0.04)),
    #dfe7e3;
  box-shadow:
    inset -18px -18px 40px rgba(15,20,23,0.16),
    0 26px 70px rgba(0,0,0,0.28);
}

.robot-face {
  position: absolute;
  inset: 34px 30px 30px;
  border-radius: 28px;
  background: #10181b;
  box-shadow: inset 0 0 28px rgba(86,199,183,0.16);
}

.eye {
  position: absolute;
  top: 38px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 20px rgba(86,199,183,0.8);
  animation: robotBlink 5s ease-in-out infinite;
}

.eye-left { left: 42px; }
.eye-right { right: 42px; animation-delay: 0.08s; }

.robot-smile {
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 58px;
  height: 22px;
  border-bottom: 4px solid rgba(239,128,104,0.9);
  border-radius: 0 0 999px 999px;
  transform: translateX(-50%);
}

.robot-ear {
  position: absolute;
  top: 56px;
  width: 28px;
  height: 58px;
  border-radius: 16px;
  background: #b9c4c0;
  border: 1px solid rgba(247,243,237,0.14);
}

.robot-ear-left { left: -18px; }
.robot-ear-right { right: -18px; }

.robot-neck {
  width: 70px;
  height: 28px;
  background: linear-gradient(90deg, #808d8a, #dce5e1, #808d8a);
  border-radius: 0 0 18px 18px;
}

.robot-body {
  position: relative;
  width: 250px;
  height: 188px;
  border-radius: 44px 44px 58px 58px;
  border: 1px solid rgba(247,243,237,0.16);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.24), rgba(255,255,255,0.04)),
    #c9d3cf;
  box-shadow: 0 28px 70px rgba(0,0,0,0.3);
}

.robot-core {
  position: absolute;
  top: 42px;
  left: 50%;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 10px solid #10181b;
  background: radial-gradient(circle, var(--coral) 0 28%, var(--teal) 30% 58%, #10181b 60%);
  box-shadow: 0 0 26px rgba(239,128,104,0.45);
  transform: translateX(-50%);
  animation: coreGlow 2.2s ease-in-out infinite;
}

.robot-panel {
  position: absolute;
  bottom: 36px;
  width: 42px;
  height: 8px;
  border-radius: 999px;
  background: rgba(15,20,23,0.35);
}

.panel-one { left: 56px; }
.panel-two { right: 56px; }

.robot-arm {
  position: absolute;
  top: 42px;
  width: 54px;
  height: 128px;
  border-radius: 999px;
  background: linear-gradient(#dfe7e3, #8f9c98);
  transform-origin: top center;
}

.robot-arm span {
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 48px;
  height: 42px;
  border-radius: 18px;
  background: #dfe7e3;
  transform: translateX(-50%);
}

.arm-left {
  left: -40px;
  animation: armLeft 3.4s ease-in-out infinite;
}

.arm-right {
  right: -40px;
  animation: armRight 3.4s ease-in-out infinite;
}

.robot-shadow {
  position: absolute;
  z-index: 0;
  bottom: -8px;
  left: 50%;
  width: 78%;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,0.42), transparent 68%);
  transform: translateX(-50%);
  animation: shadowPulse 4.8s ease-in-out infinite;
}

.robot-caption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: calc(100% - 36px);
  padding: 10px 12px;
  background: rgba(15, 20, 23, 0.72);
  color: var(--text-dim);
  font-size: 0.86rem;
  backdrop-filter: blur(12px);
}

@keyframes robotFloat {
  0%, 100% { transform: translateY(0) rotateZ(-1deg); }
  50% { transform: translateY(-18px) rotateZ(1deg); }
}

@keyframes robotLean {
  0%, 100% { transform: rotate(-1.4deg) translateX(0); }
  50% { transform: rotate(1.2deg) translateX(6px); }
}

@keyframes haloSweep {
  0%, 100% { transform: translate(-50%, -50%) rotate(-11deg) scaleX(0.94); opacity: 0.72; }
  50% { transform: translate(-50%, -55%) rotate(-4deg) scaleX(1.08); opacity: 1; }
}

@keyframes auraPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.94); }
  50% { opacity: 0.9; transform: scale(1.04); }
}

@keyframes videoEyeBlink {
  0%, 88%, 100% { transform: scaleY(1); opacity: 0.85; }
  92%, 94% { transform: scaleY(0.2); opacity: 0.35; }
}

@keyframes rigTurn {
  0%, 100% {
    transform: rotateY(calc(-18deg + var(--robotY))) rotateX(calc(2deg + var(--robotX))) translateY(0);
  }
  28% {
    transform: rotateY(calc(16deg + var(--robotY))) rotateX(calc(-2deg + var(--robotX))) translateY(-12px);
  }
  58% {
    transform: rotateY(calc(-8deg + var(--robotY))) rotateX(calc(1deg + var(--robotX))) translateY(-4px);
  }
  78% {
    transform: rotateY(calc(22deg + var(--robotY))) rotateX(calc(-1deg + var(--robotX))) translateY(-16px);
  }
}

@keyframes headLook {
  0%, 100% { transform: translateX(-50%) rotateY(-16deg) rotateX(2deg); }
  35% { transform: translateX(-50%) rotateY(18deg) rotateX(-4deg); }
  62% { transform: translateX(-50%) rotateY(-5deg) rotateX(3deg); }
  82% { transform: translateX(-50%) rotateY(24deg) rotateX(-2deg); }
}

@keyframes eyeScan {
  0%, 84%, 100% { transform: scaleY(1) translateX(0); opacity: 0.9; }
  28% { transform: scaleY(1) translateX(3px); }
  52% { transform: scaleY(1) translateX(-3px); }
  88%, 90% { transform: scaleY(0.16) translateX(0); opacity: 0.45; }
}

@keyframes core3dPulse {
  0%, 100% { transform: translateX(-50%) scale(1); filter: brightness(1); }
  50% { transform: translateX(-50%) scale(1.08); filter: brightness(1.25); }
}

@keyframes arm3dLeft {
  0%, 100% { transform: rotateZ(14deg) rotateX(2deg); }
  42% { transform: rotateZ(-18deg) rotateX(-8deg); }
  72% { transform: rotateZ(6deg) rotateX(10deg); }
}

@keyframes arm3dRight {
  0%, 100% { transform: rotateZ(-12deg) rotateX(-2deg); }
  42% { transform: rotateZ(18deg) rotateX(8deg); }
  72% { transform: rotateZ(-6deg) rotateX(-10deg); }
}

@keyframes forearmMove {
  0%, 100% { transform: rotateZ(7deg); }
  50% { transform: rotateZ(-9deg); }
}

@keyframes leg3dLeft {
  0%, 100% { transform: rotateZ(5deg) translateY(0); }
  50% { transform: rotateZ(-5deg) translateY(8px); }
}

@keyframes leg3dRight {
  0%, 100% { transform: rotateZ(-5deg) translateY(8px); }
  50% { transform: rotateZ(5deg) translateY(0); }
}

/* Premium android hero: understated scene, humanoid idle motion */
.hero-robot {
  min-height: 600px;
  background:
    radial-gradient(ellipse at 58% 48%, rgba(101, 219, 211, 0.13), transparent 38%),
    linear-gradient(115deg, transparent 0 46%, rgba(255,255,255,0.035) 46% 47%, transparent 47% 100%);
}

.robot-stage {
  align-items: end;
  padding-bottom: 22px;
}

.robot-stage::before {
  inset: auto -80px -58px -20px;
  height: 260px;
  border: 0;
  background-image:
    linear-gradient(rgba(247,243,237,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247,243,237,0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(640px) rotateX(64deg);
  transform-origin: center bottom;
  opacity: 0.62;
  mask-image: linear-gradient(to top, black 0%, rgba(0,0,0,0.72) 46%, transparent 100%);
}

.robot-stage::after {
  content: '';
  position: absolute;
  right: 3%;
  bottom: 0;
  width: min(560px, 74vw);
  height: 68%;
  background:
    linear-gradient(90deg, transparent, rgba(86,199,183,0.12), transparent),
    radial-gradient(ellipse at center, rgba(255,255,255,0.05), transparent 64%);
  clip-path: polygon(38% 0, 100% 0, 72% 100%, 0 100%);
  opacity: 0.55;
}

.robot-3d {
  width: min(60vw, 420px);
  height: 560px;
  --robotX: 0deg;
  --robotY: 0deg;
}

.robot-3d::before {
  display: none;
}

.robot-3d::after {
  inset: 12% -12% 2%;
  background: radial-gradient(ellipse at 50% 64%, rgba(88, 201, 192, 0.16), transparent 62%);
  filter: blur(26px);
  opacity: 0.85;
  animation: androidPresence 5.8s ease-in-out infinite;
}

.robot-rig {
  width: 300px;
  height: 520px;
  transform-origin: 50% 78%;
  animation: androidIdle 8.5s cubic-bezier(.45, 0, .2, 1) infinite;
}

.robot-head3d {
  top: 6px;
  width: 146px;
  height: 112px;
  border-radius: 46px 46px 38px 38px;
  background:
    radial-gradient(circle at 34% 20%, rgba(255,255,255,0.98), transparent 19%),
    linear-gradient(145deg, #f8fbfb 0%, #d7e1df 48%, #879493 100%);
  animation: androidHead 7.4s cubic-bezier(.45, 0, .22, 1) infinite;
}

.robot-face3d {
  left: 25px;
  right: 25px;
  top: 40px;
  height: 46px;
  border-radius: 22px;
}

.eye3d {
  top: 16px;
  width: 23px;
  height: 15px;
  background: #4ce4ff;
  animation: androidEyes 6.6s ease-in-out infinite;
}

.eye3d-left { left: 20px; }
.eye3d-right { right: 20px; }

.ear3d {
  top: 37px;
  width: 25px;
  height: 44px;
}

.neck3d {
  top: 119px;
  height: 58px;
}

.torso3d {
  top: 156px;
  width: 160px;
  height: 178px;
  border-radius: 48px 48px 38px 38px;
  animation: androidBreath 4.6s ease-in-out infinite;
}

.core3d {
  top: 66px;
  width: 42px;
  height: 42px;
  opacity: 0.88;
  animation: androidCore 3.8s ease-in-out infinite;
}

.shoulder-left { left: -26px; top: 44px; }
.shoulder-right { right: -26px; top: 44px; }
.hip-left { left: 36px; bottom: -18px; }
.hip-right { right: 36px; bottom: -18px; }

.arm3d {
  top: 74px;
  width: 30px;
  height: 132px;
}

.arm3d-left {
  left: -48px;
  animation: androidArmLeft 6.2s cubic-bezier(.42, 0, .2, 1) infinite;
}

.arm3d-right {
  right: -48px;
  animation: androidArmRight 6.2s cubic-bezier(.42, 0, .2, 1) infinite;
}

.forearm3d {
  left: 3px;
  bottom: -78px;
  width: 25px;
  height: 86px;
  animation: androidForearm 6.2s cubic-bezier(.42, 0, .2, 1) infinite;
}

.hand3d {
  left: -1px;
  bottom: -102px;
  width: 33px;
  height: 29px;
}

.leg3d {
  top: 168px;
  width: 36px;
  height: 126px;
}

.leg3d-left {
  left: 43px;
  animation: androidLegLeft 7.2s cubic-bezier(.45, 0, .2, 1) infinite;
}

.leg3d-right {
  right: 43px;
  animation: androidLegRight 7.2s cubic-bezier(.45, 0, .2, 1) infinite;
}

.shin3d {
  left: 4px;
  bottom: -88px;
  width: 28px;
  height: 92px;
}

.foot3d {
  left: -10px;
  bottom: -112px;
  width: 66px;
  height: 28px;
}

.robot-shadow {
  bottom: -14px;
  width: 70%;
  height: 28px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.5), transparent 70%);
  animation: androidShadow 8.5s ease-in-out infinite;
}

.robot-caption {
  left: auto;
  right: 18px;
  bottom: 26px;
  border: 1px solid rgba(247,243,237,0.1);
  background: rgba(15, 20, 23, 0.42);
}

@keyframes androidIdle {
  0%, 100% {
    transform: rotateY(calc(-10deg + var(--robotY))) rotateX(calc(1deg + var(--robotX))) translateY(0) translateX(0);
  }
  22% {
    transform: rotateY(calc(12deg + var(--robotY))) rotateX(calc(-1deg + var(--robotX))) translateY(-7px) translateX(3px);
  }
  48% {
    transform: rotateY(calc(4deg + var(--robotY))) rotateX(calc(1.5deg + var(--robotX))) translateY(-2px) translateX(-2px);
  }
  72% {
    transform: rotateY(calc(-14deg + var(--robotY))) rotateX(calc(-0.5deg + var(--robotX))) translateY(-10px) translateX(-4px);
  }
}

@keyframes androidHead {
  0%, 100% { transform: translateX(-50%) rotateY(-8deg) rotateX(1deg) translateY(0); }
  18% { transform: translateX(-50%) rotateY(13deg) rotateX(-3deg) translateY(-2px); }
  44% { transform: translateX(-50%) rotateY(4deg) rotateX(2deg) translateY(0); }
  70% { transform: translateX(-50%) rotateY(-16deg) rotateX(-1deg) translateY(-3px); }
}

@keyframes androidEyes {
  0%, 82%, 100% { transform: scaleY(1) translateX(0); opacity: 0.95; }
  26% { transform: scaleY(1) translateX(4px); }
  58% { transform: scaleY(1) translateX(-4px); }
  86%, 88% { transform: scaleY(0.16) translateX(0); opacity: 0.48; }
}

@keyframes androidBreath {
  0%, 100% { transform: translateX(-50%) scaleY(1) rotateZ(0deg); }
  50% { transform: translateX(-50%) scaleY(1.025) rotateZ(0.7deg); }
}

@keyframes androidCore {
  0%, 100% { transform: translateX(-50%) scale(0.96); filter: brightness(0.95); }
  50% { transform: translateX(-50%) scale(1.08); filter: brightness(1.28); }
}

@keyframes androidArmLeft {
  0%, 100% { transform: rotateZ(8deg) rotateX(2deg); }
  32% { transform: rotateZ(-10deg) rotateX(-9deg); }
  64% { transform: rotateZ(14deg) rotateX(6deg); }
}

@keyframes androidArmRight {
  0%, 100% { transform: rotateZ(-7deg) rotateX(-1deg); }
  32% { transform: rotateZ(12deg) rotateX(7deg); }
  64% { transform: rotateZ(-14deg) rotateX(-8deg); }
}

@keyframes androidForearm {
  0%, 100% { transform: rotateZ(5deg); }
  42% { transform: rotateZ(-7deg); }
  70% { transform: rotateZ(10deg); }
}

@keyframes androidLegLeft {
  0%, 100% { transform: rotateZ(3deg) translateY(0); }
  48% { transform: rotateZ(-3deg) translateY(7px); }
}

@keyframes androidLegRight {
  0%, 100% { transform: rotateZ(-3deg) translateY(7px); }
  48% { transform: rotateZ(3deg) translateY(0); }
}

@keyframes androidPresence {
  0%, 100% { opacity: 0.62; transform: scale(0.97); }
  50% { opacity: 0.9; transform: scale(1.04); }
}

@keyframes androidShadow {
  0%, 100% { transform: translateX(-50%) scaleX(0.96); opacity: 0.34; }
  50% { transform: translateX(-50%) scaleX(0.78); opacity: 0.2; }
}

@keyframes robotBlink {
  0%, 88%, 100% { transform: scaleY(1); }
  92%, 94% { transform: scaleY(0.12); }
}

@keyframes antennaWave {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(6deg); }
}

@keyframes antennaPulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.8; }
  50% { transform: translateX(-50%) scale(1.22); opacity: 1; }
}

@keyframes coreGlow {
  0%, 100% { filter: brightness(1); transform: translateX(-50%) scale(1); }
  50% { filter: brightness(1.22); transform: translateX(-50%) scale(1.05); }
}

@keyframes armLeft {
  0%, 100% { transform: rotate(9deg); }
  50% { transform: rotate(-11deg); }
}

@keyframes armRight {
  0%, 100% { transform: rotate(-9deg); }
  50% { transform: rotate(11deg); }
}

@keyframes shadowPulse {
  0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 0.35; }
  50% { transform: translateX(-50%) scaleX(0.78); opacity: 0.22; }
}

@keyframes orbitSpin {
  from { transform: rotateX(66deg) rotateZ(0deg); }
  to { transform: rotateX(66deg) rotateZ(360deg); }
}

@keyframes sparkFloat {
  0%, 100% { transform: translate(0, 0); opacity: 0.45; }
  50% { transform: translate(14px, -18px); opacity: 1; }
}

.ticker {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px 42px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.ticker span {
  min-height: 84px;
  display: flex;
  align-items: center;
  padding: 18px;
  background: rgba(255,255,255,0.045);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--text-dim);
  font-weight: 600;
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 110px 28px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section.is-visible,
.ticker.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-head {
  display: grid;
  grid-template-columns: 0.4fr 1fr;
  gap: 40px;
  margin-bottom: 42px;
}

.section-head.compact {
  align-items: end;
}

.section h2 {
  font-size: clamp(2rem, 4.2vw, 4.2rem);
  line-height: 1;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
}

.about-text {
  color: var(--text-dim);
  font-size: 1.16rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat {
  min-height: 144px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.stat strong {
  color: var(--gold);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.stat span {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.project-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(239, 128, 104, 0.5);
  background: var(--surface-strong);
  outline: none;
}

.project-num {
  color: var(--coral);
  font-weight: 800;
  margin-bottom: 36px;
}

.project-card h3 {
  font-size: 1.35rem;
  line-height: 1.2;
  margin-bottom: 12px;
}

.project-card p {
  color: var(--text-dim);
  margin-bottom: 22px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tags span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.78rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.project-links a {
  padding: 8px 10px;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.project-links a:hover {
  background: var(--teal);
  color: #09201d;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  padding: 28px;
}

.project-modal.open {
  display: grid;
  place-items: center;
}

.project-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 9, 11, 0.78);
  backdrop-filter: blur(10px);
}

.project-modal__panel {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  max-height: calc(100vh - 56px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 24px 90px rgba(0,0,0,0.38);
}

.project-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: rgba(15, 20, 23, 0.78);
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

.project-modal__media {
  min-height: 520px;
  background: #0b1012;
}

.project-modal__media img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  display: block;
  object-fit: cover;
}

.project-modal__placeholder {
  min-height: 520px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-right: 1px solid var(--line);
}

.project-modal__content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 56px 42px 42px;
}

.project-modal__content h2 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
}

.project-modal__content p {
  color: var(--text-dim);
  font-size: 1.02rem;
}

.project-modal__docs {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.project-modal__docs:empty {
  display: none;
}

.project-modal__docs h3 {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 0.95rem;
  text-transform: uppercase;
}

.project-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}

.contact {
  display: grid;
  grid-template-columns: 1fr 0.55fr;
  gap: 48px;
  align-items: end;
  border-top: 1px solid var(--line);
}

.contact-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.contact h2 {
  font-size: clamp(2.4rem, 6vw, 6rem);
  line-height: 0.98;
}

.contact h2 span {
  color: var(--teal);
}

.contact-email {
  width: fit-content;
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.socials {
  display: grid;
  gap: 10px;
}

.socials a {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-dim);
  font-weight: 700;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.socials a:hover {
  color: var(--coral);
  padding-left: 8px;
}

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px 36px;
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 960px) {
  .hero,
  .about-grid,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero-robot {
    min-height: 420px;
  }

  .robot {
    transform: scale(0.9);
  }

  .robot-3d {
    width: min(82vw, 430px);
    height: 540px;
    transform: none;
  }

  .robot-rig {
    width: 350px;
    height: 520px;
    transform-origin: 50% 82%;
  }

  .ticker {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .project-grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-modal__panel {
    grid-template-columns: 1fr;
  }

  .project-modal__media,
  .project-modal__media img,
  .project-modal__placeholder {
    min-height: 340px;
  }
}

@media (max-width: 680px) {
  .navbar {
    padding: 18px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    right: 18px;
    flex-direction: column;
    min-width: 190px;
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    padding: 110px 18px 52px;
    gap: 30px;
  }

  .hero-robot {
    min-height: 310px;
  }

  .robot-stage::before {
    inset: 26px;
  }

  .robot {
    width: 310px;
    height: 340px;
    transform: scale(0.76);
  }

  .robot-3d {
    width: min(92vw, 330px);
    height: 440px;
    transform: none;
  }

  .robot-rig {
    width: 300px;
    height: 500px;
    scale: 0.78;
    transform-origin: 50% 82%;
  }

  .robot-stage {
    padding-bottom: 0;
  }

  .robot-stage::after {
    right: -16%;
    width: 110vw;
  }

  .robot-caption {
    font-size: 0.78rem;
  }

  .ticker,
  .section,
  .site-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .ticker,
  .about-stats,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .ticker span {
    min-height: 64px;
  }

  .section {
    padding-top: 78px;
    padding-bottom: 78px;
  }

  .contact h2 {
    font-size: clamp(2.1rem, 12vw, 4rem);
  }

  .project-modal {
    padding: 12px;
  }

  .project-modal__panel {
    max-height: calc(100vh - 24px);
  }

  .project-modal__content {
    padding: 34px 22px 24px;
  }

  .project-modal__media,
  .project-modal__media img,
  .project-modal__placeholder {
    min-height: 240px;
  }
}

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

/* Final hero robot: reference-matched asset with mouse-responsive motion */
.hero-robot {
  min-height: 620px;
  background:
    radial-gradient(ellipse at 66% 42%, rgba(49, 211, 255, 0.14), transparent 30%),
    radial-gradient(ellipse at 67% 82%, rgba(255,255,255,0.07), transparent 34%);
}

.robot-stage {
  padding-bottom: 0;
}

.robot-stage::before {
  inset: auto -110px -74px -24px;
  height: 285px;
  opacity: 0.42;
  background-size: 54px 54px;
  transform: perspective(680px) rotateX(64deg);
  mask-image: linear-gradient(to top, black 0%, rgba(0,0,0,0.62) 44%, transparent 100%);
}

.robot-stage::after {
  right: -2%;
  bottom: 6%;
  width: min(600px, 78vw);
  height: 72%;
  opacity: 0.45;
}

.robot-image {
  position: relative;
  z-index: 2;
  display: block;
  width: min(44vw, 520px);
  height: auto;
  transform-style: preserve-3d;
  --mouse-x: 0;
  --mouse-y: 0;
  animation: robotImageIdle 5.8s ease-in-out infinite;
  transform:
    translateX(calc(var(--mouse-x) * 22px))
    translateY(calc(var(--mouse-y) * 10px))
    rotateY(calc(var(--mouse-x) * 10deg))
    rotateX(calc(var(--mouse-y) * -5deg));
  transition: filter 0.25s ease;
  cursor: pointer;
  outline: none;
}

.robot-image img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  display: block;
  filter:
    drop-shadow(0 38px 54px rgba(0,0,0,0.38))
    drop-shadow(0 0 22px rgba(54,205,255,0.16));
  transform:
    rotateZ(calc(var(--mouse-x) * 2deg))
    translateY(calc(var(--mouse-y) * 5px));
  transition: transform 0.18s ease;
}

.robot-image.is-aware img,
.robot-image:hover img {
  filter:
    drop-shadow(0 42px 62px rgba(0,0,0,0.42))
    drop-shadow(0 0 30px rgba(54,205,255,0.25));
}

.robot-image.is-reacting img {
  animation: robotClickReact 650ms cubic-bezier(.2,.9,.3,1);
}

.robot-glow {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  border-radius: 999px;
  opacity: 0.75;
  mix-blend-mode: screen;
}

.robot-glow-face {
  left: 39%;
  top: 25%;
  width: 34%;
  height: 13%;
  background: radial-gradient(ellipse, rgba(54, 205, 255, 0.24), transparent 68%);
  filter: blur(8px);
  transform: translate(calc(var(--mouse-x) * 6px), calc(var(--mouse-y) * 4px));
  animation: robotGlowPulse 2.6s ease-in-out infinite;
}

.robot-glow-antenna {
  right: 25%;
  top: 3%;
  width: 54px;
  height: 54px;
  background: radial-gradient(circle, rgba(54, 205, 255, 0.75), transparent 64%);
  filter: blur(4px);
  animation: robotGlowPulse 1.8s ease-in-out infinite;
}

.robot-image .robot-shadow {
  z-index: 0;
  bottom: -8px;
  width: 62%;
  height: 38px;
  opacity: 0.34;
  animation: robotImageShadow 5.8s ease-in-out infinite;
}

.robot-image.is-reacting .robot-shadow {
  animation: robotClickShadow 650ms cubic-bezier(.2,.9,.3,1);
}

@keyframes robotImageIdle {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -12px;
  }
}

@keyframes robotGlowPulse {
  0%, 100% { opacity: 0.58; scale: 0.96; }
  50% { opacity: 0.95; scale: 1.08; }
}

@keyframes robotImageShadow {
  0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 0.34; }
  50% { transform: translateX(-50%) scaleX(0.84); opacity: 0.22; }
}

@keyframes robotClickReact {
  0%, 100% { transform: translateY(0) rotateZ(calc(var(--mouse-x) * 2deg)) scale(1); }
  42% { transform: translateY(-34px) rotateZ(calc(var(--mouse-x) * 3deg + 3deg)) scale(1.035); }
  70% { transform: translateY(4px) rotateZ(calc(var(--mouse-x) * 2deg - 2deg)) scale(0.99); }
}

@keyframes robotClickShadow {
  0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 0.34; }
  42% { transform: translateX(-50%) scaleX(0.68); opacity: 0.18; }
}

@media (max-width: 960px) {
  .robot-image {
    width: min(70vw, 430px);
  }
}

@media (max-width: 680px) {
  .hero-robot {
    min-height: 430px;
  }

  .robot-image {
    width: min(86vw, 330px);
  }
}

/* Light grey-white portfolio direction */
:root {
  --bg: #eef2f4;
  --surface: rgba(255,255,255,0.72);
  --surface-strong: #ffffff;
  --text: #182126;
  --text-dim: #607078;
  --muted: #839097;
  --line: rgba(31, 47, 56, 0.13);
  --teal: #00a9c7;
  --coral: #4e7a85;
  --gold: #6b7d85;
}

body {
  background:
    radial-gradient(circle at 74% 20%, rgba(66, 202, 234, 0.18), transparent 30%),
    linear-gradient(180deg, #f8fafb 0%, #edf2f4 52%, #dfe8ec 100%);
  color: var(--text);
}

body::before {
  background-image:
    linear-gradient(rgba(33,48,56,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(33,48,56,0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  opacity: 0.55;
}

.navbar,
.logo,
.nav-links,
.menu-toggle {
  background: rgba(255,255,255,0.58);
  border-color: rgba(31,47,56,0.12);
  box-shadow: 0 18px 46px rgba(74,92,102,0.08);
}

.nav-links a {
  color: #596870;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(0,169,199,0.08);
}

.hero {
  min-height: 92vh;
  padding-bottom: 42px;
}

.hero-actions,
.ticker,
.about-stats,
.robot-caption {
  display: none !important;
}

.hero-robot {
  min-height: 610px;
  background:
    radial-gradient(circle at 62% 44%, rgba(0, 182, 219, 0.16), transparent 30%),
    radial-gradient(ellipse at 63% 82%, rgba(30, 43, 52, 0.08), transparent 38%);
}

.robot-stage::before {
  background-image:
    linear-gradient(rgba(31,47,56,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,47,56,0.06) 1px, transparent 1px);
  opacity: 0.42;
}

.about-grid {
  grid-template-columns: minmax(0, 720px);
}

.project-card,
.stat,
.project-modal__panel {
  background: rgba(255,255,255,0.72);
  box-shadow: 0 24px 70px rgba(74,92,102,0.08);
}

.project-card:hover,
.project-card:focus-visible {
  background: #fff;
  border-color: rgba(0,169,199,0.35);
}

.project-links a,
.tags span {
  background: rgba(255,255,255,0.62);
}

.contact {
  grid-template-columns: 1fr 0.55fr;
  border-top-color: rgba(31,47,56,0.12);
}

.contact h2 {
  max-width: 760px;
  font-size: clamp(2.2rem, 5vw, 5.2rem);
}

.contact h2 span {
  color: var(--teal);
}

.contact-email {
  border: 0;
  background: #182126;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(24,33,38,0.16);
}

.contact-email:hover {
  background: var(--teal);
  color: #fff;
}

.socials a {
  color: #607078;
  border-bottom-color: rgba(31,47,56,0.12);
}

.site-footer {
  color: #728087;
}

.chat-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: none;
}

.chat-widget.open {
  display: block;
}

.chat-panel {
  width: min(420px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(31,47,56,0.12);
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(18px);
  box-shadow: 0 28px 90px rgba(24,33,38,0.2);
}

.chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.chat-header h2 {
  font-size: 1.25rem;
}

.chat-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 1.3rem;
}

.chat-messages {
  min-height: 180px;
  max-height: 330px;
  overflow-y: auto;
  padding: 18px;
  display: grid;
  gap: 10px;
}

.chat-bubble {
  max-width: 86%;
  padding: 11px 12px;
  background: #eef3f5;
  color: var(--text);
}

.chat-bubble.visitor {
  justify-self: end;
  background: #182126;
  color: #fff;
}

.chat-bubble.admin {
  justify-self: start;
}

.chat-bubble p {
  margin: 0 0 4px;
}

.chat-bubble span,
.chat-note,
.chat-empty {
  color: var(--muted);
  font-size: 0.78rem;
}

.chat-form {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

.chat-identity {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.chat-identity.hidden {
  display: none;
}

.chat-form input,
.chat-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
}

.chat-form button {
  border: 0;
  background: var(--teal);
  color: #fff;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 680px) {
  .hero {
    min-height: auto;
  }

  .hero-robot {
    min-height: 390px;
  }

  .contact {
    grid-template-columns: 1fr;
  }

  .chat-widget {
    right: 12px;
    bottom: 12px;
  }

  .chat-identity {
    grid-template-columns: 1fr;
  }
}

/* Reference-inspired keyboard robot */
.hero-robot {
  min-height: 620px;
  background:
    radial-gradient(circle at 68% 38%, rgba(54, 205, 255, 0.12), transparent 28%),
    radial-gradient(ellipse at 70% 78%, rgba(255,255,255,0.055), transparent 42%);
}

.robot-stage::before {
  opacity: 0.28;
  background-size: 58px 58px;
}

.robot-3d {
  width: min(64vw, 500px);
  height: 590px;
  --robotX: 0deg;
  --robotY: 0deg;
  --keyMoveX: 0px;
  --keyMoveY: 0px;
  --keyTurn: 0deg;
}

.robot-rig {
  width: 390px;
  height: 560px;
  transform-origin: 50% 78%;
  animation: mascotIdle 7.8s cubic-bezier(.45,0,.2,1) infinite;
}

.robot-head3d {
  top: 6px;
  width: 245px;
  height: 178px;
  border-radius: 86px 86px 66px 66px;
  background:
    radial-gradient(circle at 32% 20%, rgba(255,255,255,1), transparent 17%),
    radial-gradient(circle at 70% 12%, rgba(255,255,255,0.8), transparent 20%),
    linear-gradient(145deg, #ffffff 0%, #dfe7e6 48%, #8b989b 100%);
  box-shadow:
    inset 22px 18px 36px rgba(255,255,255,0.62),
    inset -30px -26px 46px rgba(24,36,42,0.25),
    0 28px 70px rgba(0,0,0,0.34);
  animation: mascotHead 6.4s cubic-bezier(.45,0,.22,1) infinite;
}

.robot-head3d::before {
  content: '';
  position: absolute;
  right: 52px;
  top: -68px;
  width: 5px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(#eefaff, #5f737d);
  transform: rotate(12deg);
  transform-origin: bottom center;
  box-shadow: 0 0 10px rgba(54,205,255,0.25);
}

.robot-head3d::after {
  content: '';
  position: absolute;
  right: 39px;
  top: -78px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f7ffff, #3ee5ff 42%, #057ca4 78%);
  box-shadow: 0 0 26px rgba(54,205,255,0.9);
  animation: antennaBeacon 2.4s ease-in-out infinite;
}

.head-shine {
  left: 54px;
  top: 14px;
  width: 120px;
  height: 32px;
  border-top: 2px solid rgba(80,95,104,0.26);
}

.robot-face3d {
  left: 30px;
  right: 30px;
  top: 58px;
  height: 82px;
  border-radius: 38px;
  background:
    radial-gradient(circle at 50% 145%, rgba(54,205,255,0.16), transparent 54%),
    linear-gradient(145deg, #05090d, #111b22 58%, #030609);
  border: 2px solid rgba(54,205,255,0.72);
  box-shadow:
    inset 0 0 28px rgba(54,205,255,0.2),
    0 11px 22px rgba(0,0,0,0.24);
}

.eye3d {
  top: 29px;
  width: 44px;
  height: 28px;
  background: transparent;
  border: 8px solid #38dcff;
  border-bottom: 0;
  border-radius: 44px 44px 0 0;
  box-shadow: 0 -2px 18px rgba(56,220,255,0.78);
  animation: mascotEyes 5.4s ease-in-out infinite;
}

.eye3d-left { left: 36px; }
.eye3d-right { right: 36px; }

.smile3d {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 48px;
  height: 22px;
  border-bottom: 8px solid #38dcff;
  border-radius: 0 0 44px 44px;
  transform: translateX(-50%);
  box-shadow: 0 8px 18px rgba(56,220,255,0.5);
}

.ear3d {
  top: 61px;
  width: 44px;
  height: 62px;
  background:
    radial-gradient(circle, #16242b 0 27%, #28caff 30% 39%, #f5fbfb 42% 58%, #9ba8ad 70%);
  box-shadow: 0 0 18px rgba(54,205,255,0.36);
}

.ear3d-left { left: -18px; }
.ear3d-right { right: -18px; }

.neck3d {
  top: 172px;
  width: 64px;
  height: 48px;
}

.torso3d {
  top: 208px;
  width: 178px;
  height: 156px;
  border-radius: 58px 58px 44px 44px;
}

.core3d {
  top: 36px;
  width: 70px;
  height: 24px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, #111b22, #38dcff 30% 70%, #111b22);
  box-shadow: 0 0 22px rgba(56,220,255,0.75);
}

.shoulder-left { left: -28px; top: 42px; }
.shoulder-right { right: -28px; top: 42px; }
.hip-left { left: 38px; bottom: -16px; }
.hip-right { right: 38px; bottom: -16px; }

.arm3d {
  top: 72px;
  width: 42px;
  height: 112px;
}

.arm3d-left {
  left: -70px;
  transform-origin: 70% 10%;
  animation: mascotWave 3.8s cubic-bezier(.45,0,.22,1) infinite;
}

.arm3d-right {
  right: -58px;
  transform-origin: 30% 10%;
  animation: mascotArmRight 5.8s ease-in-out infinite;
}

.forearm3d {
  left: 5px;
  bottom: -72px;
  width: 32px;
  height: 82px;
}

.arm3d-left .forearm3d {
  transform-origin: top center;
  animation: mascotForearmWave 3.8s ease-in-out infinite;
}

.hand3d {
  left: -7px;
  bottom: -104px;
  width: 54px;
  height: 44px;
  border-radius: 22px 22px 24px 24px;
}

.hand3d i {
  position: absolute;
  top: -24px;
  width: 10px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(#f9ffff, #9aa8ad);
  border: 1px solid rgba(0,0,0,0.12);
}

.hand3d i:nth-child(1) { left: 5px; transform: rotate(-24deg); }
.hand3d i:nth-child(2) { left: 18px; top: -30px; }
.hand3d i:nth-child(3) { left: 31px; top: -28px; transform: rotate(8deg); }
.hand3d i:nth-child(4) { right: -2px; top: -16px; transform: rotate(32deg); }

.leg3d {
  top: 148px;
  width: 54px;
  height: 108px;
}

.leg3d-left { left: 38px; animation: mascotLegLeft 5.8s ease-in-out infinite; }
.leg3d-right { right: 38px; animation: mascotLegRight 5.8s ease-in-out infinite; }

.shin3d {
  left: 7px;
  bottom: -82px;
  width: 40px;
  height: 88px;
}

.foot3d {
  left: -18px;
  bottom: -114px;
  width: 94px;
  height: 40px;
  border-radius: 42px 22px 20px 18px;
}

.robot-shadow {
  bottom: 2px;
  width: 76%;
  height: 34px;
}

.robot-3d.is-jumping .robot-rig {
  animation: robotJump 420ms cubic-bezier(.2,.9,.3,1) both;
}

.robot-3d.is-waving .arm3d-left {
  animation: activeWave 680ms ease-in-out infinite;
}

.robot-3d.is-crouching .robot-rig {
  transform: translateY(28px) scaleY(0.94);
}

.robot-3d.is-keyed .core3d,
.robot-3d.is-keyed .robot-head3d::after {
  filter: brightness(1.45);
}

@keyframes mascotIdle {
  0%, 100% {
    transform: translateX(var(--keyMoveX)) translateY(var(--keyMoveY)) rotateY(calc(-8deg + var(--robotY) + var(--keyTurn))) rotateX(calc(1deg + var(--robotX)));
  }
  34% {
    transform: translateX(calc(var(--keyMoveX) + 4px)) translateY(calc(var(--keyMoveY) - 8px)) rotateY(calc(8deg + var(--robotY) + var(--keyTurn))) rotateX(calc(-1deg + var(--robotX)));
  }
  68% {
    transform: translateX(calc(var(--keyMoveX) - 3px)) translateY(calc(var(--keyMoveY) - 3px)) rotateY(calc(-4deg + var(--robotY) + var(--keyTurn))) rotateX(calc(1.5deg + var(--robotX)));
  }
}

@keyframes mascotHead {
  0%, 100% { transform: translateX(-50%) rotateY(-5deg) rotateX(1deg); }
  36% { transform: translateX(-50%) rotateY(10deg) rotateX(-2deg); }
  72% { transform: translateX(-50%) rotateY(-12deg) rotateX(1deg); }
}

@keyframes mascotEyes {
  0%, 80%, 100% { transform: scaleY(1); }
  84%, 88% { transform: scaleY(0.16); }
}

@keyframes mascotWave {
  0%, 100% { transform: rotateZ(-118deg) rotateX(-8deg); }
  50% { transform: rotateZ(-104deg) rotateX(8deg); }
}

@keyframes mascotForearmWave {
  0%, 100% { transform: rotateZ(-34deg); }
  50% { transform: rotateZ(-72deg); }
}

@keyframes mascotArmRight {
  0%, 100% { transform: rotateZ(-10deg); }
  50% { transform: rotateZ(5deg); }
}

@keyframes mascotLegLeft {
  0%, 100% { transform: rotateZ(2deg) translateY(0); }
  50% { transform: rotateZ(-2deg) translateY(6px); }
}

@keyframes mascotLegRight {
  0%, 100% { transform: rotateZ(-2deg) translateY(6px); }
  50% { transform: rotateZ(2deg) translateY(0); }
}

@keyframes antennaBeacon {
  0%, 100% { transform: scale(1); opacity: 0.82; }
  50% { transform: scale(1.18); opacity: 1; }
}

@keyframes activeWave {
  0%, 100% { transform: rotateZ(-120deg) rotateX(-10deg); }
  50% { transform: rotateZ(-84deg) rotateX(12deg); }
}

@keyframes robotJump {
  0%, 100% { transform: translateX(var(--keyMoveX)) translateY(var(--keyMoveY)) rotateY(calc(var(--robotY) + var(--keyTurn))); }
  45% { transform: translateX(var(--keyMoveX)) translateY(calc(var(--keyMoveY) - 70px)) rotateY(calc(var(--robotY) + var(--keyTurn))); }
}

/* Modern 3D portfolio layer: black-purple glassmorphism direction inspired by the reference quality, not copied. */
:root {
  --bg: #04030a;
  --surface: rgba(18, 11, 32, 0.72);
  --surface-strong: rgba(31, 18, 54, 0.86);
  --text: #f8f4ff;
  --text-dim: #c9b8df;
  --muted: #8e7aa8;
  --line: rgba(218, 190, 255, 0.18);
  --teal: #b86cff;
  --coral: #ff4fd8;
  --gold: #7df9ff;
  --purple: #8b5cf6;
  --violet-deep: #170a2c;
  --max-width: 1180px;
}

html {
  scroll-padding-top: 92px;
}

body {
  background:
    radial-gradient(circle at 18% 12%, rgba(139, 92, 246, 0.24), transparent 32%),
    radial-gradient(circle at 84% 18%, rgba(255, 79, 216, 0.16), transparent 28%),
    linear-gradient(180deg, #05030a 0%, #0a0614 48%, #05030a 100%);
  color: var(--text);
}

body::before {
  background-image:
    linear-gradient(rgba(184,108,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184,108,255,0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.42;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0 44%, rgba(255,255,255,0.035) 50%, transparent 56%);
  opacity: 0.28;
}

.navbar,
.logo,
.nav-links,
.menu-toggle,
.chat-panel,
.project-modal__panel {
  border-color: rgba(218, 190, 255, 0.18);
  background: rgba(10, 6, 20, 0.66);
  box-shadow: 0 18px 60px rgba(4, 3, 10, 0.28), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(18px);
}

.logo {
  color: #ffffff;
  border-radius: 8px;
  text-shadow: 0 0 20px rgba(184,108,255,0.8);
}

.nav-links {
  border-radius: 999px;
}

.nav-links a {
  border-radius: 999px;
  color: var(--text-dim);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: #fff;
  background: rgba(184, 108, 255, 0.16);
  outline: none;
}

.hero {
  position: relative;
  min-height: 100vh;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  padding-bottom: 84px;
}

.hero::after {
  content: '';
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184,108,255,0.42), transparent);
}

.hero-copy {
  position: relative;
  z-index: 2;
  animation: heroCopyIn 720ms ease both;
}

.eyebrow,
.section-tag {
  color: var(--gold);
  letter-spacing: 0.14em;
  text-shadow: 0 0 22px rgba(125,249,255,0.42);
}

.name-text {
  color: #fff;
  text-shadow: 0 0 44px rgba(139, 92, 246, 0.38);
}

.role-line span:last-child,
.contact h2 span {
  color: var(--coral);
  text-shadow: 0 0 26px rgba(255,79,216,0.42);
}

.hero-desc,
.about-text,
.project-card p,
.chat-note,
.chat-empty {
  color: var(--text-dim);
}

/* HeroScene component: layered CSS 3D objects with pointer-driven variables from script.js. */
.hero-scene {
  position: relative;
  min-height: 620px;
  display: grid;
  place-items: center;
  perspective: 1100px;
  isolation: isolate;
}

.scene-shell {
  position: relative;
  width: min(100%, 620px);
  aspect-ratio: 1 / 1;
  transform-style: preserve-3d;
  --scene-x: 0;
  --scene-y: 0;
  transform:
    rotateX(calc(var(--scene-y) * -7deg))
    rotateY(calc(var(--scene-x) * 10deg));
  transition: filter 0.25s ease;
  outline: none;
}

.scene-shell:focus-visible {
  filter: drop-shadow(0 0 28px rgba(125,249,255,0.36));
}

.scene-glow {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(184,108,255,0.28), transparent 58%),
    radial-gradient(circle at 62% 38%, rgba(255,79,216,0.16), transparent 36%);
  filter: blur(16px);
  transform: translateZ(-120px);
  animation: scenePulse 4.8s ease-in-out infinite;
}

.scene-grid {
  position: absolute;
  left: 4%;
  right: 2%;
  bottom: 3%;
  height: 42%;
  background-image:
    linear-gradient(rgba(125,249,255,0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184,108,255,0.2) 1px, transparent 1px);
  background-size: 42px 42px;
  border: 1px solid rgba(184,108,255,0.16);
  transform: rotateX(72deg) translateZ(-80px);
  transform-origin: center bottom;
  mask-image: linear-gradient(to top, black 0%, rgba(0,0,0,0.72) 58%, transparent 100%);
}

.scene-orbit {
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(184,108,255,0.42);
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  box-shadow: 0 0 34px rgba(184,108,255,0.22);
  transform-style: preserve-3d;
}

.scene-orbit-one {
  animation: sceneOrbit 14s linear infinite;
}

.scene-orbit-two {
  inset: 10%;
  border-color: rgba(125,249,255,0.28);
  border-top-color: transparent;
  transform: rotateX(68deg) rotateZ(18deg);
  animation: sceneOrbitReverse 22s linear infinite;
}

.scene-console {
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 310px;
  height: 150px;
  border: 1px solid rgba(218,190,255,0.24);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03)), rgba(14, 8, 28, 0.84);
  box-shadow: 0 34px 80px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.12);
  transform: translateX(-50%) rotateX(58deg) translateZ(18px);
  transform-style: preserve-3d;
}

.console-screen {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 28px;
  height: 58px;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(5, 3, 10, 0.82);
  box-shadow: inset 0 0 24px rgba(184,108,255,0.16);
}

.console-screen span {
  display: block;
  width: 74%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--coral));
  box-shadow: 0 0 16px rgba(125,249,255,0.35);
}

.console-screen span:nth-child(2) { width: 48%; opacity: 0.74; }
.console-screen span:nth-child(3) { width: 62%; opacity: 0.52; }

.console-light {
  position: absolute;
  bottom: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 18px rgba(255,79,216,0.82);
}

.light-one { left: 34px; }
.light-two { left: 58px; background: var(--purple); }
.light-three { left: 82px; background: var(--gold); }

.scene-cube {
  position: absolute;
  left: 50%;
  top: 25%;
  width: 144px;
  height: 144px;
  transform-style: preserve-3d;
  transform: translateX(-50%) rotateX(-18deg) rotateY(34deg) translateZ(126px);
  animation: cubeFloat 6.4s ease-in-out infinite;
}

.cube-face {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(218,190,255,0.26);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(184,108,255,0.24), rgba(255,255,255,0.055));
  box-shadow: inset 0 0 34px rgba(125,249,255,0.08), 0 0 26px rgba(184,108,255,0.18);
  backdrop-filter: blur(10px);
}

.cube-front { transform: translateZ(72px); }
.cube-back { transform: rotateY(180deg) translateZ(72px); }
.cube-right { transform: rotateY(90deg) translateZ(72px); }
.cube-left { transform: rotateY(-90deg) translateZ(72px); }
.cube-top { transform: rotateX(90deg) translateZ(72px); }
.cube-bottom { transform: rotateX(-90deg) translateZ(72px); }

.scene-card {
  position: absolute;
  z-index: 2;
  min-width: 138px;
  padding: 14px 16px;
  border: 1px solid rgba(218,190,255,0.2);
  border-radius: 8px;
  background: rgba(12, 7, 24, 0.58);
  box-shadow: 0 18px 54px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  transform-style: preserve-3d;
}

.scene-card span {
  display: block;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.scene-card strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 1rem;
}

.card-one {
  left: 7%;
  top: 31%;
  transform: translateZ(112px) rotateY(18deg);
  animation: cardDrift 5.8s ease-in-out infinite;
}

.card-two {
  right: 7%;
  top: 54%;
  transform: translateZ(92px) rotateY(-16deg);
  animation: cardDrift 6.6s ease-in-out infinite reverse;
}

.section {
  position: relative;
}

.section,
.hero-scene,
.project-card {
  transition: opacity 520ms ease, transform 520ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.section:not(.is-visible) {
  opacity: 0;
  transform: translateY(28px);
}

.section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-head h2,
.contact h2 {
  color: #fff;
}

.about-grid,
.contact,
.project-card,
.project-modal__content,
.chat-form input,
.chat-form textarea {
  border-color: rgba(218,190,255,0.16);
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(17, 10, 32, 0.62);
  box-shadow: 0 22px 70px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.055);
  backdrop-filter: blur(16px);
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--card-x, 50%) var(--card-y, 50%), rgba(184,108,255,0.22), transparent 34%);
  opacity: 0;
  transition: opacity 220ms ease;
}

.project-card > * {
  position: relative;
  z-index: 1;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-8px);
  border-color: rgba(184,108,255,0.5);
  background: rgba(25, 14, 48, 0.78);
  box-shadow: 0 28px 90px rgba(139,92,246,0.18), 0 0 32px rgba(184,108,255,0.12);
  outline: none;
}

.project-card:hover::before,
.project-card:focus-visible::before {
  opacity: 1;
}

.project-num,
.tags span,
.project-links a {
  border-color: rgba(218,190,255,0.16);
  background: rgba(255,255,255,0.055);
}

.tags span {
  color: var(--gold);
}

.project-links a:hover,
.socials a:hover {
  color: #fff;
  text-shadow: 0 0 18px rgba(255,79,216,0.5);
}

.contact-email,
.chat-form button,
.btn.primary {
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--purple), var(--coral));
  color: #fff;
  box-shadow: 0 18px 44px rgba(139,92,246,0.26);
}

.contact-email:hover,
.chat-form button:hover,
.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 58px rgba(255,79,216,0.24);
}

.btn.ghost {
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
}

.chat-widget.open .chat-panel,
.project-modal.open .project-modal__panel {
  animation: panelIn 260ms ease both;
}

.chat-bubble {
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
}

.chat-bubble.visitor {
  background: linear-gradient(135deg, var(--purple), var(--coral));
}

.chat-form input,
.chat-form textarea {
  border-radius: 8px;
  background: rgba(8, 5, 16, 0.78);
  color: var(--text);
}

@keyframes heroCopyIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scenePulse {
  0%, 100% { opacity: 0.7; transform: translateZ(-120px) scale(0.96); }
  50% { opacity: 1; transform: translateZ(-120px) scale(1.04); }
}

@keyframes sceneOrbit {
  from { transform: rotateX(68deg) rotateZ(0deg); }
  to { transform: rotateX(68deg) rotateZ(360deg); }
}

@keyframes sceneOrbitReverse {
  from { transform: rotateX(62deg) rotateZ(360deg); }
  to { transform: rotateX(62deg) rotateZ(0deg); }
}

@keyframes cubeFloat {
  0%, 100% { transform: translateX(-50%) translateY(0) rotateX(-18deg) rotateY(34deg) translateZ(126px); }
  50% { transform: translateX(-50%) translateY(-18px) rotateX(-8deg) rotateY(58deg) translateZ(146px); }
}

@keyframes cardDrift {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-scene {
    min-height: 520px;
  }

  .scene-shell {
    width: min(88vw, 560px);
  }

  .contact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .nav-links {
    border-radius: 8px;
  }

  .hero {
    padding-top: 112px;
  }

  .hero-scene {
    min-height: 390px;
  }

  .scene-console {
    width: 230px;
    height: 118px;
  }

  .scene-cube {
    width: 104px;
    height: 104px;
  }

  .cube-front { transform: translateZ(52px); }
  .cube-back { transform: rotateY(180deg) translateZ(52px); }
  .cube-right { transform: rotateY(90deg) translateZ(52px); }
  .cube-left { transform: rotateY(-90deg) translateZ(52px); }
  .cube-top { transform: rotateX(90deg) translateZ(52px); }
  .cube-bottom { transform: rotateX(-90deg) translateZ(52px); }

  .scene-card {
    min-width: 112px;
    padding: 10px 12px;
  }

  .card-one { left: 2%; }
  .card-two { right: 2%; }
}

@media (prefers-reduced-motion: reduce) {
  .scene-orbit,
  .scene-cube,
  .scene-card,
  .scene-glow,
  .hero-copy,
  .chat-widget.open .chat-panel,
  .project-modal.open .project-modal__panel {
    animation: none !important;
  }

  .section:not(.is-visible) {
    opacity: 1;
    transform: none;
  }
}

/* InteractiveRobotViewer: Three.js canvas, loading state and neon platform shell for the hero only. */
.robot-viewer-section {
  min-height: 620px;
  display: grid;
  place-items: center;
  perspective: none;
}

.robot-viewer {
  position: relative;
  width: min(100%, 640px);
  height: clamp(430px, 54vw, 640px);
  overflow: hidden;
  border: 1px solid rgba(218, 190, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 35%, rgba(184,108,255,0.22), transparent 34%),
    radial-gradient(circle at 78% 24%, rgba(255,79,216,0.14), transparent 26%),
    linear-gradient(180deg, rgba(16, 8, 31, 0.72), rgba(5, 3, 10, 0.42));
  box-shadow:
    0 30px 90px rgba(0,0,0,0.34),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 0 42px rgba(139,92,246,0.14);
  touch-action: none;
  isolation: isolate;
}

.robot-viewer::before {
  content: '';
  position: absolute;
  inset: 9% 10% auto;
  height: 38%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(184,108,255,0.18), transparent 66%);
  filter: blur(18px);
  pointer-events: none;
}

.robot-viewer::after {
  content: '';
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: 7%;
  height: 30%;
  background-image:
    linear-gradient(rgba(125,249,255,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184,108,255,0.13) 1px, transparent 1px);
  background-size: 38px 38px;
  transform: perspective(520px) rotateX(66deg);
  transform-origin: center bottom;
  mask-image: linear-gradient(to top, black, transparent 78%);
  opacity: 0.44;
  pointer-events: none;
}

.robot-viewer canvas {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.robot-viewer.is-user-controlled canvas {
  cursor: grabbing;
}

.robot-viewer__loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--text);
  background: rgba(5, 3, 10, 0.62);
  backdrop-filter: blur(16px);
  transition: opacity 260ms ease, visibility 260ms ease;
}

.robot-viewer__loading.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.robot-viewer__loading.has-error {
  color: #ffb5e9;
}

.robot-viewer__spinner {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(218,190,255,0.18);
  border-top-color: var(--coral);
  border-right-color: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(184,108,255,0.28);
  animation: robotViewerSpin 860ms linear infinite;
}

.robot-viewer__progress {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@keyframes robotViewerSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 960px) {
  .robot-viewer-section {
    min-height: 520px;
  }

  .robot-viewer {
    width: min(92vw, 600px);
    height: clamp(390px, 72vw, 560px);
  }
}

@media (max-width: 680px) {
  .robot-viewer-section {
    min-height: 430px;
  }

  .robot-viewer {
    width: min(100%, 390px);
    height: 390px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .robot-viewer__spinner {
    animation: none !important;
  }
}

/* IntegratedRobotStage: removes the framed viewer and blends the 3D robot into the hero. */
.robot-viewer-section {
  min-height: 640px;
  margin: -28px -26px -10px 0;
  pointer-events: auto;
}

.robot-viewer {
  width: min(54vw, 680px);
  height: clamp(500px, 62vw, 700px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  touch-action: none;
}

.robot-viewer::before {
  inset: 4% -8% auto;
  height: 62%;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(184,108,255,0.26), transparent 58%),
    radial-gradient(ellipse at 64% 32%, rgba(125,249,255,0.12), transparent 34%);
  filter: blur(26px);
  opacity: 0.92;
}

.robot-viewer::after {
  left: -8%;
  right: -18%;
  bottom: 4%;
  height: 34%;
  opacity: 0.36;
  border: 0;
  transform: perspective(620px) rotateX(68deg);
}

.robot-viewer canvas {
  filter:
    drop-shadow(0 36px 60px rgba(0,0,0,0.42))
    drop-shadow(0 0 24px rgba(184,108,255,0.22));
}

.robot-viewer__loading {
  inset: 18% 12% auto;
  min-height: 180px;
  border: 1px solid rgba(218,190,255,0.12);
  border-radius: 8px;
  background: rgba(8, 4, 18, 0.34);
  box-shadow: 0 24px 80px rgba(0,0,0,0.16);
}

@media (max-width: 960px) {
  .robot-viewer-section {
    min-height: 540px;
    margin: 0;
  }

  .robot-viewer {
    width: min(92vw, 620px);
    height: clamp(430px, 76vw, 600px);
  }
}

@media (max-width: 680px) {
  .robot-viewer-section {
    min-height: 430px;
  }

  .robot-viewer {
    width: min(100vw, 420px);
    height: 420px;
  }

  .robot-viewer__loading {
    inset: 18% 8% auto;
  }
}


/* Final content polish: centered about copy and compact project demo media. */
.about .section-head {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  grid-template-columns: 1fr;
  gap: 14px;
  text-align: center;
}

.about .section-head h2 {
  font-size: clamp(2.1rem, 4vw, 3.8rem);
}

.about-grid {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  grid-template-columns: 1fr;
  text-align: center;
}

.about-text {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.18rem;
}

.project-card__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: -4px 0 18px;
  overflow: hidden;
  border: 1px solid rgba(218, 190, 255, 0.14);
  border-radius: 8px;
  background: rgba(5, 3, 10, 0.58);
}

.project-card__media video,
.project-card__media img,
.project-modal__media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.project-card__media video {
  pointer-events: none;
}

.project-modal__media video {
  min-height: 520px;
  background: #05030a;
}

@media (max-width: 680px) {
  .about .section-head,
  .about-grid {
    text-align: left;
  }

  .about-text {
    margin: 0;
  }

  .project-card__media {
    margin-top: 0;
  }

  .project-modal__media video {
    min-height: 260px;
  }
}


/* Brand logo image in the navbar. */
.logo {
  position: relative;
  overflow: visible;
  width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.logo::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(125,249,255,0.18), transparent 58%),
    radial-gradient(circle at 62% 42%, rgba(184,108,255,0.16), transparent 54%);
  filter: blur(10px);
  opacity: 0.86;
  pointer-events: none;
}

.logo::after {
  content: none;
}

.logo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter:
    drop-shadow(0 8px 18px rgba(0,0,0,0.34))
    drop-shadow(0 0 14px rgba(125,249,255,0.28));
}

@media (max-width: 680px) {
  .logo {
    width: 52px;
    height: 52px;
  }
}
