:root {
  --bg: #071029;
  --panel: #0f1724;
  --accent: #6ee7b7;
  --muted: #94a3b8;
  --glass: rgba(255, 255, 255, 0.04);
  --dash-width: min(1000px, 96vw);
  --hero-scale: 10; /* integer for crisp upscaling */
  --walk-duration: 6s; /* time for the hero to reach center */
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto,
    "Helvetica Neue", Arial;
  background: linear-gradient(180deg, var(--bg) 0%, #04101a 60%);
  color: #e6eef6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vh 0;
  min-height: 100vh;
  cursor: none;
}

/* -----------------------------
     Stage / Parallax Jungle Layers
     ----------------------------- */
.stage {
  width: var(--dash-width);
  height: 70vh;
  max-height: 760px;
  min-height: 320px;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0px 0px 50px rgb(252, 222, 139);
  background: linear-gradient(180deg, rgba(6, 15, 12, 0.12), transparent 30%);
  display: grid;
  grid-template-columns: 1fr;
}

/* layered backgrounds - each moves at different speed via transform */
.layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-origin: center left;
  will-change: transform;
}
/* far background - sky, distant hills */
.layer.bg-far {
  background: radial-gradient(
      ellipse at 10% 20%,
      rgba(110, 231, 183, 0.06),
      transparent 10%
    ),
    linear-gradient(180deg, #052033 0%, #0b1b26 100%);
  z-index: 0;
  filter: blur(6px) saturate(0.9) contrast(1.02);
}
/* midground - darker silhouette trees */
.layer.bg-mid {
  z-index: 2;
  background-image: repeating-linear-gradient(
    -20deg,
    rgba(0, 0, 0, 0.25) 0 2px,
    transparent 2px 60px
  );
  mix-blend-mode: overlay;
  mask-image: linear-gradient(180deg, transparent 8%, black 40%);
}
/* near foreground foliage shapes using CSS shapes and gradients */
.layer.fg {
  z-index: 6;
  display: block;
}
.fg .shrub {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36%;
  background: radial-gradient(
      ellipse at 10% 60%,
      rgba(0, 0, 0, 0.45),
      transparent 30%
    ),
    linear-gradient(180deg, rgba(4, 13, 8, 0.9), rgba(2, 6, 3, 0.98));
  clip-path: polygon(
    0 40%,
    9% 30%,
    18% 38%,
    30% 28%,
    42% 40%,
    52% 30%,
    62% 35%,
    74% 22%,
    86% 36%,
    100% 24%,
    100% 100%,
    0 100%
  );
}

/* subtle mist layer that shifts slowly */
.layer.mist {
  z-index: 3;
  mix-blend-mode: screen;
  opacity: 0.7;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.06) 60%,
    rgba(255, 255, 255, 0.02)
  );
  filter: blur(14px);
}

/* -----------------------------
     Ground and Path (where hero walks)
     ----------------------------- */
.ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8%;
  height: 18%;
  z-index: 8;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding-left: 3%;
  pointer-events: none;
}
.path {
  width: 100%;
  height: 18px;
  background: linear-gradient(90deg, #07221a, #0b3628 60%);
  border-radius: 999px;
  opacity: 0.85;
  box-shadow: inset 0 -6px 6px rgba(0, 0, 0, 0.5);
  transform: translateY(12px);
}

/* -----------------------------
     Pixel Hero Canvas
     ----------------------------- */
.hero-wrap {
  position: absolute;
  left: 3%;
  bottom: calc(8% + 14px);
  z-index: 10;
  width: 96px;
  height: 128px; /* visual box for sprite */
  display: flex;
  align-items: flex-end;
  pointer-events: auto;
  translate: 0 0;
}
canvas#hero {
  width: calc(16px * var(--hero-scale)); /* canvas CSS size */
  height: calc(24px * var(--hero-scale));
  image-rendering: pixelated; /* ensure crisp scaling */
  image-rendering: crisp-edges;
  transform-origin: left bottom;
  will-change: transform; /* we move it with JS */
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.6));
}

/* sprite shadow */
.hero-shadow {
  position: absolute;
  left: 8px;
  bottom: 6px;
  z-index: 9;
  width: 40px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.45),
    rgba(0, 0, 0, 0.12)
  );
  opacity: 0.9;
  transform-origin: center;
  will-change: transform;
}

/* -----------------------------
     Dashboard (revealed after animation)
     ----------------------------- */
.dashboard {
  position: absolute;
  right: 4%;
  top: 8%;
  width: 360px;
  max-width: 40%;
  min-width: 220px;
  z-index: 12;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(247, 235, 97, 0.182);
  padding: 18px;
  border-radius: 14px;
  backdrop-filter: blur(6px) saturate(120%);
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: opacity 800ms cubic-bezier(0.2, 0.9, 0.2, 1),
    transform 800ms cubic-bezier(0.2, 0.9, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dashboard.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.profile {
  display: flex;
  gap: 12px;
  align-items: center;
}
.avatar {
  width: 76px;
  height: 76px;
  border-radius: 12px;
  overflow: hidden;
  flex: 0 0 76px;
  border: 2px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(135deg, #0b1b26, #092025);
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.meta {
  display: flex;
  flex-direction: column;
}
.name {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.2px;
}
.role {
  font-size: 0.86rem;
  color: var(--muted);
}

.skills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.skill {
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid rgba(255, 255, 255, 0.03);
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  box-shadow: 0 4px 10px rgba(2, 6, 12, 0.4);
}
.skill .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

/* Social Media Icons inside dashboard */
.dashboard .social-icons {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 18px;
  margin-bottom: 2px;
}
.dashboard .social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(2, 6, 23, 0.1);
  text-decoration: none;
}
.dashboard .social-icons a:hover {
  background: var(--accent);
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(110, 231, 183, 0.18);
}
.dashboard .social-icons svg {
  width: 28px;
  height: 28px;
  display: block;
}
@media (max-width: 640px) {
  .dashboard .social-icons {
    gap: 16px;
    margin-top: 10px;
  }
  .dashboard .social-icons a {
    width: 36px;
    height: 36px;
  }
  .dashboard .social-icons svg {
    width: 22px;
    height: 22px;
  }
}

/* responsive */
@media (max-width: 900px) {
  .dashboard {
    position: absolute;
    right: 2%;
    top: 4%;
    width: 80%;
    min-width: 180px;
    max-width: 96vw;
  }
  .stage {
    min-height: 280px;
    height: 56vh;
  }
}
@media (max-width: 640px) {
  .stage {
    height: 54vh;
    min-height: 180px;
    width: 100vw;
    border-radius: 0;
    box-shadow: none;
  }
  .dashboard {
    position: static;
    width: 96vw;
    max-width: 98vw;
    min-width: 120px;
    margin: 12px auto 0 auto;
    box-shadow: 0 2px 16px rgba(2, 6, 23, 0.18);
    display: flex;
    opacity: 1;
    transform: none;
  }
  .profile {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .avatar {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
  }
  .skills {
    gap: 6px;
  }
  .skill {
    font-size: 0.78rem;
    min-height: 28px;
    padding: 4px 8px;
  }
  .name {
    font-size: 1rem;
  }
  .role {
    font-size: 0.8rem;
  }
  body {
    padding: 0;
  }
}
@media (max-width: 420px) {
  .dashboard {
    padding: 10px;
  }
  .avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }
  .name {
    font-size: 0.92rem;
  }
  .role {
    font-size: 0.72rem;
  }
  .skill {
    font-size: 0.7rem;
    min-height: 22px;
    padding: 2px 6px;
  }
}

/* -----------------------------
     Reduced motion fallback
     ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  :root {
    --walk-duration: 0s;
  }
  canvas#hero {
    transition: none !important;
  }
  .dashboard {
    opacity: 1;
    transform: none;
  }
  .layer {
    transition: none;
    animation: none;
  }
}

/* small helper animations for parallax when allowed */
@media (prefers-reduced-motion: no-preference) {
  @keyframes sway-slow {
    0% {
      transform: translateX(0);
    }
    50% {
      transform: translateX(-6%);
    }
    100% {
      transform: translateX(0);
    }
  }
  @keyframes mist-move {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(-18%);
    }
  }
  .layer.bg-mid {
    animation: sway-slow 14s ease-in-out infinite;
  }
  .layer.mist {
    animation: mist-move 28s linear infinite;
  }
  .layer.fg {
    animation: sway-slow 10s ease-in-out infinite;
  }
}

/* tiny badge styling */
.tag {
  font-size: 0.72rem;
  color: var(--muted);
  background: transparent;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Accessibility focus outlines */
a,
button {
  outline-color: var(--accent);
}

/* Custom cursor styles */
.cursor-dot,
.cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 99999;
  transition: transform 120ms ease-out, opacity 200ms ease-out, background 120ms ease-out, border-color 120ms ease-out;
}
.cursor-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(110,231,183,0.16);
  opacity: 0;
}
.cursor-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(110,231,183,0.18);
  background: transparent;
  opacity: 0;
}
/* Hover / active states (toggled via JS by adding classes on <body>) */
body.cursor-hover .cursor-ring {
  transform: translate(-50%, -50%) scale(1.8);
  border-color: rgba(110,231,183,0.34);
}
body.cursor-hover .cursor-dot {
  transform: translate(-50%, -50%) scale(0.6);
  background: #ffffff;
}
body.cursor-active .cursor-dot {
  transform: translate(-50%, -50%) scale(0.5);
}
/* Respect touch / coarse pointers */
@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .cursor-ring { display: none !important; }
}
/* Keep text inputs usable */
input, textarea, select, [contenteditable] {
  cursor: text;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100000;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: rgba(6, 18, 14, 0.92);
  color: #e6eef6;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(2, 6, 12, 0.6);
  font-weight: 600;
  transform: translateY(10px) scale(0.98);
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms cubic-bezier(.2,.9,.2,1);
  border: 1px solid rgba(110,231,183,0.08);
}
.toast--show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .toast, .toast--show { transition: none !important; }
}
