:root {
  --bg-1: #f4efdf;
  --bg-2: #efe7d4;
  --ink: #222222;
  --panel: #fffef8;
  --accent: #d7ff3d;
  --accent-2: #9fd8ff;
  --accent-3: #f7b8e5;
  --accent-4: #bca8ff;
  --line: #1e1e1e;
  --pro-navy: #1d2438;
  --pro-slate: #4a556d;
}

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

body {
  font-family: 'Quicksand', sans-serif;
  background: radial-gradient(circle at 15% 15%, #ffffff 0%, transparent 30%),
    radial-gradient(circle at 88% 10%, #f8c0e8 0%, transparent 28%),
    radial-gradient(circle at 60% 90%, #c7b7ff 0%, transparent 30%),
    linear-gradient(165deg, var(--bg-1), var(--bg-2));
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

@media (min-width: 961px) {
  body,
  a,
  button {
    cursor: none;
  }
}

.ambient-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image: linear-gradient(rgba(20, 20, 20, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 20, 20, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: scan 18s linear infinite;
}

.floating-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.floating-particles span {
  position: absolute;
  width: var(--size, 14px);
  height: var(--size, 14px);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(40, 40, 40, 0.25);
  animation: drift var(--duration, 20s) linear infinite;
  animation-delay: var(--delay, 0s);
}

.map-shell,
.zone-shell {
  width: min(1120px, 92vw);
  margin: 2.5rem auto;
  position: relative;
  z-index: 1;
}

.hero-panel,
.map-panel,
.zone-main,
.zone-topbar,
.zone-footer,
.arcade-hud {
  background: var(--panel);
  border: 3px solid var(--line);
  border-radius: 18px;
  box-shadow: 8px 8px 0 #1a1a1a;
}

.hero-panel {
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: '';
  position: absolute;
  width: 230px;
  height: 230px;
  top: -95px;
  right: -75px;
  border-radius: 50%;
  border: 3px solid var(--line);
  background: linear-gradient(145deg, #ffe88a, #ffd36e);
  opacity: 0.65;
  pointer-events: none;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  align-items: center;
}

.hero-photo-wrap {
  margin: 0;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 18px;
  padding: 0.8rem;
  box-shadow: 8px 8px 0 #1a1a1a;
}

.hero-photo-wrap img {
  display: block;
  width: 100%;
  max-height: 470px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: #f5f5f5;
}

.hero-photo-wrap figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #2f2f2f;
  text-align: center;
}

.proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.proof-pill {
  background: linear-gradient(140deg, var(--accent-2), #c9e8ff);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.72rem;
  font-size: 0.8rem;
  font-weight: 700;
  transform: rotate(-1deg);
}
.cred-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.cred-pill {
  background: #ffffff;
  color: var(--pro-navy);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0.26rem 0.62rem;
  font-size: 0.76rem;
  font-weight: 800;
}
.kicker,
.zone-kicker {
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 0.7rem;
  color: var(--pro-slate);
  margin-bottom: 0.6rem;
  font-weight: 700;
}

#hero-name,
#zone-heading {
  font-family: 'Monoton', cursive;
  font-size: clamp(1.9rem, 5vw, 3.25rem);
  line-height: 1.1;
  color: #272727;
  text-shadow: 2px 2px 0 #ffffff;
}

.hero-role,
.zone-subline {
  margin-top: 0.9rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pro-navy);
}

.hero-tagline,
.hero-summary {
  margin-top: 0.85rem;
  max-width: 75ch;
  font-size: 1rem;
  color: #2d3448;
}

.hero-actions {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.action-btn,
.top-link,
.nav-link {
  text-decoration: none;
  color: #1f1f1f;
  background: linear-gradient(145deg, var(--accent), #c6ef34);
  border: 3px solid var(--line);
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
  box-shadow: 4px 4px 0 #1a1a1a;
}
.action-btn.alt {
  background: linear-gradient(145deg, var(--accent-4), #c9c0ff);
}

.action-btn:hover,
.top-link:hover,
.nav-link:hover {
  transform: translate(-1px, -2px);
  box-shadow: 6px 6px 0 #1a1a1a;
}

.map-panel {
  margin-top: 1.4rem;
  padding: 1.6rem;
  position: relative;
}

.bridge-phrase {
  margin-top: 1rem;
  background: linear-gradient(140deg, #fffef8, #ffe8f5);
  border: 3px dashed var(--line);
  border-radius: 15px;
  padding: 1rem 1.1rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #2d2d2d;
  box-shadow: 6px 6px 0 #1a1a1a;
}

.ribbon-divider {
  width: min(340px, 85%);
  height: 16px;
  margin: 0 auto 0.75rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: repeating-linear-gradient(
    90deg,
    #ff9ecf 0 26px,
    #ffcc73 26px 52px,
    #d8ff46 52px 78px,
    #9fd8ff 78px 104px,
    #c9b8ff 104px 130px
  );
}

.bridge-note {
  margin-top: 0.45rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--pro-slate);
}

.map-panel::before {
  content: 'ARCADE MAP';
  position: absolute;
  top: -12px;
  right: 20px;
  background: linear-gradient(145deg, var(--accent-3), #ff9cda);
  border: 3px solid var(--line);
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.map-title-row h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-family: 'Fredoka', sans-serif;
  color: #1f2438;
}

.map-title-row p {
  margin-top: 0.35rem;
}

.legend-row {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.legend-pill {
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.64rem;
  font-weight: 700;
  font-size: 0.8rem;
}

.zone-grid {
  margin-top: 1.35rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 0.95rem;
}

.zone-tile {
  text-decoration: none;
  color: #1f1f1f;
  min-height: 155px;
  border-radius: 18px;
  padding: 1rem;
  border: 3px solid var(--line);
  position: relative;
  transition: transform 220ms ease;
  overflow: hidden;
  box-shadow: 6px 6px 0 #1a1a1a;
}

.zone-tile::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff6cc;
}

.zone-tile::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  right: -30px;
  bottom: -40px;
  background: rgba(255, 255, 255, 0.33);
  border-radius: 50%;
}

.zone-tile:hover {
  transform: translate(-2px, -5px) rotate(-0.8deg);
}

.zone-tile h3 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.45rem;
  line-height: 1.1;
  margin-left: 22px;
}

.zone-tile p {
  margin-top: 0.38rem;
  font-size: 0.95rem;
  max-width: 26ch;
  margin-left: 22px;
}

.zone-tile.active-portal {
  outline: 3px dashed #ffffff;
  outline-offset: -10px;
}

.zone-a { background: #9fd8ff; }
.zone-b { background: #b9f6cb; }
.zone-c { background: #ffc6ea; }
.zone-d { background: #ffd89a; }
.zone-e { background: #c5bcff; }
.zone-f { background: #ff9fc6; }
.zone-g { background: #9eeff2; }
.zone-h { background: #d7c2ff; }

.zone-topbar,
.zone-footer {
  padding: 0.95rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.top-id {
  font-weight: 700;
}

.zone-main {
  margin-top: 0.95rem;
  margin-bottom: 0.95rem;
  padding: 1.7rem;
}

.zone-body {
  margin-top: 1rem;
  display: grid;
  gap: 0.85rem;
}

.zone-body p,
.zone-body li {
  font-size: 1rem;
}

.text-card,
.list-card,
.image-card,
.contact-card {
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem;
  transition: transform 180ms ease;
  box-shadow: 5px 5px 0 #1a1a1a;
}

.text-card:hover,
.list-card:hover,
.image-card:hover,
.contact-card:hover {
  transform: translateY(-2px);
}

.text-card h3,
.list-card h3,
.image-card h3,
.contact-card h3 {
  font-family: 'Fredoka', sans-serif;
  margin-bottom: 0.35rem;
  font-size: 1.08rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  background: linear-gradient(140deg, var(--accent-2), #ccecff);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  font-size: 0.84rem;
  font-weight: 700;
}

.timeline {
  list-style: none;
  display: grid;
  gap: 0.82rem;
}

.timeline li {
  border-left: 3px solid #2d2d2d;
  padding-left: 0.7rem;
}

.meta {
  color: #444;
  font-size: 0.89rem;
}

.cert-grid,
.gallery-grid,
.artifact-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.gallery-grid {
  grid-auto-rows: auto;
}

.image-card {
  overflow: hidden;
  border-radius: 10px;
  border: 3px solid var(--line);
}

.image-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

.cert-preview-pdf {
  width: 100%;
  min-height: 260px;
  border-radius: 10px;
  border: 3px solid var(--line);
  margin-bottom: 0.65rem;
  background: #fff;
}

.cert-preview-fallback {
  min-height: 260px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 3px solid var(--line);
  color: #1d2438;
  font-weight: 700;
  background: linear-gradient(135deg, #fff9cb, #e9f7ff);
}

.image-card a {
  color: #144e9e;
  font-weight: 700;
  text-decoration: none;
}

.image-card a:hover {
  text-decoration: underline;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 650ms ease forwards;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 9px;
  height: 9px;
  background: #1e1e1e;
}

.cursor-ring {
  width: 30px;
  height: 30px;
  border: 2px solid #1e1e1e;
  transition: width 180ms ease, height 180ms ease;
}

.floating-note {
  margin: 1rem auto 0;
  width: fit-content;
  background: linear-gradient(145deg, var(--accent-3), #ffa8de);
  border: 3px solid var(--line);
  border-radius: 999px;
  padding: 0.52rem 0.9rem;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 5px 5px 0 #1a1a1a;
  animation: bob 2.8s ease-in-out infinite;
}

.map-shell::before,
.map-shell::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border: 3px solid var(--line);
  z-index: 2;
}

.map-shell::before {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffe688;
  top: 18px;
  left: -13px;
}

.map-shell::after {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  transform: rotate(45deg);
  background: #ffc4d9;
  right: -12px;
  top: 210px;
}

.arcade-hud {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  padding: 0.6rem 0.7rem;
  background: #fff;
  border: 3px solid var(--line);
}

.hud-label {
  font-size: 0.65rem;
  letter-spacing: 0.09em;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.hud-track {
  width: 120px;
  height: 7px;
  border: 3px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #f4f4f4;
}

.hud-fill {
  height: 100%;
  width: 10%;
  background: linear-gradient(90deg, #84bbff, #ffc4d9, #f7d98a);
  transition: width 220ms ease;
}

.click-burst {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(circle, #ffffff, #ffb7d8 70%, rgba(255, 183, 216, 0));
  animation: burst 560ms ease-out forwards;
}

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(180, 231, 255, 0.14), rgba(9, 16, 28, 0.92) 65%),
    linear-gradient(180deg, rgba(89, 231, 255, 0.16), rgba(89, 231, 255, 0.03) 30%, rgba(255, 106, 167, 0.08) 65%, rgba(255, 106, 167, 0.14));
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 300ms ease, transform 300ms ease;
  overflow: hidden;
}

.page-transition.is-active {
  opacity: 1;
  transform: scale(1);
}

.robot-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.robot {
  position: absolute;
  bottom: 15%;
  animation: robotRun 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: calc(var(--robot-index) * 0.1s);
}

.robot-wrapper {
  position: relative;
  width: 80px;
  filter: drop-shadow(0 0 12px rgba(69, 244, 255, 0.5));
}

/* Cloud Head */
.robot-head {
  position: relative;
  height: 60px;
  margin-bottom: 8px;
}

.robot-cloud {
  position: absolute;
  width: 70px;
  height: 45px;
  background: linear-gradient(135deg, #45f4ff, #6ff6ff);
  border-radius: 30px 30px 15px 15px;
  border: 2px solid rgba(45, 200, 255, 0.8);
  box-shadow: 0 0 16px rgba(69, 244, 255, 0.6);
  left: 5px;
  animation: bobRobot 0.4s ease-in-out infinite;
}

.robot-cloud::before,
.robot-cloud::after {
  content: '';
  position: absolute;
  background: linear-gradient(135deg, #45f4ff, #6ff6ff);
  border: 2px solid rgba(45, 200, 255, 0.8);
  border-radius: 50%;
  top: -12px;
}

.robot-cloud::before {
  width: 24px;
  height: 24px;
  left: 12px;
}

.robot-cloud::after {
  width: 20px;
  height: 20px;
  right: 8px;
  top: -8px;
}

/* Face */
.robot-face {
  position: absolute;
  top: 8px;
  left: 10px;
  width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.robot-eyes {
  display: flex;
  gap: 14px;
  justify-content: center;
}

.robot-eye {
  width: 8px;
  height: 8px;
  background: #1d2438;
  border-radius: 50%;
  animation: robotBlink 2s ease-in-out infinite;
}

.robot-eye:nth-child(2) {
  animation-delay: 0.1s;
}

.robot-smile {
  width: 20px;
  height: 10px;
  border: 2px solid #1d2438;
  border-top: none;
  border-radius: 0 0 20px 20px;
}

/* Body */
.robot-body-main {
  position: relative;
  width: 60px;
  height: 50px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.robot-torso {
  width: 48px;
  height: 45px;
  background: linear-gradient(135deg, #45f4ff, #ff5fbc);
  border-radius: 12px;
  border: 2px solid rgba(69, 244, 255, 0.8);
  position: relative;
  box-shadow: 0 0 12px rgba(69, 244, 255, 0.4);
}

.robot-button-1,
.robot-button-2 {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #ff6b9d;
  border-radius: 50%;
  border: 1px solid #d63384;
}

.robot-button-1 {
  top: 12px;
  left: 12px;
}

.robot-button-2 {
  bottom: 12px;
  right: 12px;
  background: #ffc107;
  width: 12px;
  height: 12px;
  border: 1px solid #ff9800;
}

/* Arms */
.robot-arm {
  width: 14px;
  height: 30px;
  background: linear-gradient(90deg, #45f4ff, #6ff6ff);
  border: 2px solid rgba(69, 244, 255, 0.8);
  border-radius: 8px;
  position: absolute;
  top: -8px;
}

.robot-arm-left {
  left: -18px;
  animation: robotArmWave 0.5s ease-in-out infinite;
  transform-origin: top right;
}

.robot-arm-right {
  right: -18px;
  animation: robotArmWave 0.5s ease-in-out infinite;
  animation-delay: -0.25s;
  transform-origin: top left;
}

/* Legs */
.robot-legs {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 6px;
}

.robot-leg {
  width: 12px;
  height: 24px;
  background: linear-gradient(90deg, #6b7fa8, #8b9fc9);
  border-radius: 8px;
  border: 2px solid rgba(107, 127, 168, 0.8);
  animation: robotKickWalk 0.3s ease-in-out infinite;
}

.robot-leg:nth-child(2) {
  animation-delay: -0.15s;
}

@keyframes robotRun {
  0% {
    left: -100px;
    opacity: 0;
    transform: scaleX(1);
  }
  10% {
    opacity: 1;
  }
  100% {
    left: 100vw;
    opacity: 0;
    transform: scaleX(-1);
  }
}

@keyframes bobRobot {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes robotBlink {
  0%, 90%, 100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.1);
  }
}

@keyframes robotArmWave {
  0%, 100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-35deg);
  }
}

@keyframes robotKickWalk {
  0%, 100% {
    transform: rotateZ(0deg);
  }
  50% {
    transform: rotateZ(-20deg);
  }
}

body.zone-about { --bg-1: #eceaff; --bg-2: #f5ecff; }
body.zone-education { --bg-1: #eafff2; --bg-2: #effff8; }
body.zone-skills { --bg-1: #ffeef8; --bg-2: #fff4fb; }
body.zone-experience { --bg-1: #fff4e7; --bg-2: #fff9f0; }
body.zone-projects { --bg-1: #edf0ff; --bg-2: #f3f5ff; }
body.zone-certificates { --bg-1: #ffedf4; --bg-2: #fff2f8; }
body.zone-outofbox { --bg-1: #eaffff; --bg-2: #f0ffff; }
body.zone-contact { --bg-1: #f2edff; --bg-2: #f8f4ff; }
body.zone-gallery { --bg-1: #edf7ff; --bg-2: #f4fbff; }

@keyframes drift {
  from {
    transform: translateY(108vh) scale(0.85);
  }
  to {
    transform: translateY(-12vh) scale(1.1);
  }
}

@keyframes scan {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 0 40px, 40px 0;
  }
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes burst {
  to {
    transform: translate(var(--tx), var(--ty)) scale(0.2);
    opacity: 0;
  }
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes roboSweep {
  0% {
    background-position: 0 0, -35% 0;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    background-position: 0 0, 125% 0;
    opacity: 1;
  }
}

@keyframes roboPulse {
  0% {
    transform: scale(1.06);
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

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

  .hero-photo-wrap img {
    max-height: 380px;
  }

  .zone-topbar,
  .zone-footer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .action-btn,
  .top-link,
  .nav-link {
    text-align: center;
  }

  #hero-name,
  #zone-heading {
    font-size: clamp(1.7rem, 8.5vw, 2.6rem);
  }

  .cursor-dot,
  .cursor-ring,
  .arcade-hud {
    display: none;
  }
}
