:root {
  --bg: #050508;
  --bg2: #0a0a12;
  --card: #111017;

  --text: #f5f2fa;
  --muted: #9691ad;

  --violet: #a06bff;
  --coral: #ff6b8b;
  --gold: #ffcf6b;
  --teal: #5bf0d6;

  --line: rgba(255, 255, 255, 0.08);
}


/* =========================
   RESET
========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;

  overflow-x: hidden;

  /* NORMAL MOUSE POINTER */
  cursor: auto;
}

::selection {
  background: var(--violet);
  color: white;
}

h1,
h2,
h3,
.display {
  font-family: "Sora", sans-serif;
}


/* =========================
   PIXEL INTRO
========================= */

#pixel-veil {
  position: fixed;
  inset: 0;

  z-index: 99999;

  display: grid;

  grid-template-columns: repeat(16, 1fr);
  grid-template-rows: repeat(9, 1fr);

  pointer-events: none;
}

#pixel-veil div {
  background: var(--bg);
}


/* =========================
   FLOWING BACKGROUND
========================= */

.flow-bg {
  position: fixed;
  inset: 0;

  z-index: 0;

  overflow: hidden;

  pointer-events: none;
}

.blob {
  position: absolute;

  border-radius: 50%;

  filter: blur(80px);

  opacity: 0.32;
}

.blob.b1 {
  width: 520px;
  height: 520px;

  background: var(--violet);

  top: -10%;
  left: -10%;

  animation: drift1 22s ease-in-out infinite;
}

.blob.b2 {
  width: 420px;
  height: 420px;

  background: var(--coral);

  right: -5%;
  bottom: -10%;

  animation: drift2 26s ease-in-out infinite;
}

.blob.b3 {
  width: 340px;
  height: 340px;

  background: var(--gold);

  top: 40%;
  left: 60%;

  animation: drift3 30s ease-in-out infinite;
}

@keyframes drift1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(120px, 80px) scale(1.15);
  }
}

@keyframes drift2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-100px, -60px) scale(1.1);
  }
}

@keyframes drift3 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-80px, 100px) scale(0.9);
  }
}


/* =========================
   SECTIONS
========================= */

section {
  position: relative;

  z-index: 1;

  padding: 120px 8vw;
}


/* =========================
   NAVBAR
========================= */

nav {
  position: fixed;

  top: 0;
  left: 0;
  right: 0;

  z-index: 100;

  display: flex;

  justify-content: space-between;
  align-items: center;

  padding: 22px 6vw;

  background: rgba(11, 14, 26, 0.6);

  backdrop-filter: blur(14px);

  border-bottom: 1px solid var(--line);
}

.logo {
  font-size: 1.1rem;

  font-weight: 700;

  letter-spacing: 1px;

  background:
    linear-gradient(
      100deg,
      var(--teal),
      var(--violet)
    );

  -webkit-background-clip: text;
  background-clip: text;

  color: transparent;
}

.logo span {
  color: var(--coral);

  -webkit-text-fill-color: var(--coral);
}

nav ul {
  list-style: none;

  display: flex;

  gap: 34px;
}

nav a {
  color: var(--muted);

  text-decoration: none;

  font-size: 0.9rem;

  letter-spacing: 0.5px;

  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

nav a:hover {
  color: var(--text);
}


/* MOBILE MENU BUTTON */

.menu-toggle {
  display: none;

  border: 1px solid var(--line);

  background: rgba(255, 255, 255, 0.04);

  color: var(--text);

  border-radius: 10px;

  padding: 7px 11px;

  font-size: 1.25rem;

  cursor: pointer;
}


/* =========================
   HERO
========================= */

.hero {
  min-height: 100vh;

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: flex-start;

  padding-top: 90px;
}

.eyebrow {
  color: var(--coral);

  font-size: 0.85rem;

  letter-spacing: 4px;

  text-transform: uppercase;

  margin-bottom: 18px;
}

.hero h1 {
  max-width: 900px;

  font-size:
    clamp(2.6rem, 7vw, 5.5rem);

  line-height: 1.05;

  font-weight: 800;
}

.hero h1 .hl {
  background:
    linear-gradient(
      90deg,
      var(--violet),
      var(--coral)
    );

  -webkit-background-clip: text;
  background-clip: text;

  color: transparent;
}

.hero p {
  max-width: 520px;

  margin-top: 26px;

  color: var(--muted);

  font-size: 1.05rem;

  line-height: 1.7;
}

.btn-row {
  display: flex;

  gap: 18px;

  margin-top: 40px;
}

.btn {
  display: inline-block;

  padding: 14px 30px;

  border-radius: 40px;

  text-decoration: none;

  font-size: 0.9rem;

  font-weight: 600;

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.btn.primary {
  color: white;

  background:
    linear-gradient(
      90deg,
      var(--violet),
      var(--coral)
    );
}

.btn.primary:hover {
  transform: translateY(-3px);

  box-shadow:
    0 12px 35px rgba(160, 107, 255, 0.35);
}

.btn.ghost {
  color: var(--text);

  border: 1px solid var(--line);
}

.btn.ghost:hover {
  transform: translateY(-3px);

  border-color: var(--violet);
}


/* =========================
   SECTION HEAD
========================= */

.section-head {
  margin-bottom: 60px;
}

.section-head .num {
  color: var(--coral);

  font-size: 0.85rem;

  letter-spacing: 3px;

  font-weight: 600;
}

.section-head h2 {
  margin-top: 10px;

  font-size:
    clamp(1.8rem, 4vw, 2.8rem);

  font-weight: 700;

  background:
    linear-gradient(
      100deg,
      var(--violet) 10%,
      var(--coral) 45%,
      var(--gold) 80%
    );

  -webkit-background-clip: text;
  background-clip: text;

  color: transparent;

  background-size: 200% auto;

  animation: shine 8s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}


/* =========================
   ABOUT
========================= */

.about-grid {
  display: grid;

  grid-template-columns: 1fr 1.3fr;

  gap: 60px;

  align-items: center;
}

.about-photo {
  width: 100%;

  aspect-ratio: 4 / 5;

  position: relative;

  overflow: hidden;

  display: flex;

  justify-content: center;
  align-items: center;

  border-radius: 24px;

  border: 1px solid var(--line);

  background:
    linear-gradient(
      160deg,
      var(--card),
      #0a0a12
    );
}

.about-photo::before {
  content: "";

  position: absolute;

  inset: 0;

  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(160, 107, 255, 0.35),
      transparent 55%
    ),
    radial-gradient(
      circle at 80% 90%,
      rgba(255, 107, 139, 0.25),
      transparent 55%
    );
}

.about-photo span {
  position: relative;

  font-size: 5rem;

  font-weight: 800;

  background:
    linear-gradient(
      135deg,
      var(--violet),
      var(--coral)
    );

  -webkit-background-clip: text;
  background-clip: text;

  color: transparent;

  opacity: 0.4;
}

.about-text p {
  color: var(--muted);

  line-height: 1.85;

  font-size: 1.02rem;

  margin-bottom: 18px;
}

.stat-row {
  display: flex;

  gap: 40px;

  margin-top: 36px;

  flex-wrap: wrap;
}

.stat b {
  display: block;

  font-family: "Sora", sans-serif;

  font-size: 2rem;
}

.stat span {
  color: var(--muted);

  font-size: 0.85rem;
}

.stat:nth-child(1) b {
  color: var(--gold);
}

.stat:nth-child(2) b {
  color: var(--teal);
}

.stat:nth-child(3) b {
  color: var(--coral);
}


/* =========================
   SKILLS
========================= */

.curved-loop-wrap {
  position: relative;

  width: 100%;

  height: 300px;

  overflow: hidden;

  display: flex;

  align-items: center;

  justify-content: center;

  border-radius: 24px;

  background:
    radial-gradient(
      circle at center,
      rgba(160, 107, 255, 0.08),
      transparent 60%
    ),
    #000;

  border: 1px solid var(--line);
}

.curve-svg {
  width: 100%;

  height: 300px;

  display: block;

  overflow: visible;
}

.curve-text {
  font-family: "Sora", sans-serif;

  font-size: 50px;

  font-weight: 700;

  fill: var(--text);

  dominant-baseline: middle;
}

.curve-text tspan.accent {
  fill: var(--coral);
}

.curve-text tspan.accent2 {
  fill: var(--teal);
}

.curve-text tspan.accent3 {
  fill: var(--gold);
}


/* =========================
   DOME GALLERY
========================= */

.dome-wrap {
  position: relative;

  width: 100%;

  height: 570px;

  display: flex;

  justify-content: center;

  align-items: flex-end;

  perspective: 1400px;

  overflow: hidden;
}

.dome {
  position: relative;

  width: min(100%, 1000px);

  height: 100%;

  transform-style: preserve-3d;
}

.dome-item {
  position: absolute;

  left: 50%;
  bottom: 0;

  width: 170px;
  height: 220px;

  overflow: hidden;

  border-radius: 18px;

  border: 1px solid var(--line);

  cursor: pointer;

  background: var(--card);

  box-shadow:
    0 25px 45px rgba(0, 0, 0, 0.5);

  transform-origin: center bottom;

  transition:
    filter 0.3s ease,
    box-shadow 0.3s ease;

  will-change: transform;
}

.dome-item canvas {
  display: block;

  width: 100%;
  height: 100%;
}

.dome-item:hover {
  filter: brightness(1.12);

  box-shadow:
    0 30px 55px rgba(0, 0, 0, 0.65);
}

.dome-caption {
  position: absolute;

  left: 8px;
  right: 8px;
  bottom: 8px;

  padding: 6px 8px;

  border-radius: 8px;

  color: white;

  font-size: 0.7rem;

  text-align: center;

  background: rgba(0, 0, 0, 0.55);

  backdrop-filter: blur(5px);

  opacity: 0;

  transform: translateY(5px);

  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.dome-item:hover .dome-caption {
  opacity: 1;

  transform: translateY(0);
}


/* =========================
   PROJECTS
========================= */

.grid-3 {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(280px, 1fr)
    );

  gap: 28px;
}

.card {
  position: relative;

  overflow: hidden;

  padding: 32px;

  background: var(--card);

  border: 1px solid var(--line);

  border-radius: 20px;

  transition:
    transform 0.4s ease,
    border-color 0.4s ease;
}

.card:hover {
  transform: translateY(-8px);
}

.card .tag {
  font-size: 0.75rem;

  letter-spacing: 2px;

  text-transform: uppercase;

  font-weight: 700;
}

.card:nth-child(1) .tag {
  color: var(--teal);
}

.card:nth-child(2) .tag {
  color: var(--coral);
}

.card:nth-child(3) .tag {
  color: var(--gold);
}

.card:nth-child(1):hover {
  border-color: var(--teal);
}

.card:nth-child(2):hover {
  border-color: var(--coral);
}

.card:nth-child(3):hover {
  border-color: var(--gold);
}

.card h3 {
  margin: 14px 0 10px;

  font-size: 1.25rem;
}

.card p {
  color: var(--muted);

  font-size: 0.92rem;

  line-height: 1.6;
}

.card .stack {
  display: flex;

  gap: 8px;

  flex-wrap: wrap;

  margin-top: 18px;
}

.card .stack span {
  padding: 5px 12px;

  border: 1px solid var(--line);

  border-radius: 20px;

  color: var(--muted);

  font-size: 0.72rem;
}


/* =========================
   CONTACT
========================= */

.contact-box {
  padding: 70px 6vw;

  text-align: center;

  border: 1px solid var(--line);

  border-radius: 28px;

  background:
    linear-gradient(
      135deg,
      var(--card),
      #1c2140
    );
}

.contact-box h2 {
  margin-bottom: 20px;

  font-size:
    clamp(1.8rem, 5vw, 3rem);
}

.contact-box p {
  color: var(--muted);

  margin-bottom: 36px;
}

.contact-links {
  display: flex;

  justify-content: center;

  flex-wrap: wrap;

  gap: 20px;
}


/* =========================
   FOOTER
========================= */

footer {
  position: relative;

  z-index: 1;

  padding: 40px;

  text-align: center;

  color: var(--muted);

  font-size: 0.8rem;
}


/* =========================
   SCROLL REVEAL
========================= */

.reveal {
  opacity: 0;

  transform: translateY(40px);

  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.reveal.in {
  opacity: 1;

  transform: translateY(0);
}


/* =========================
   TABLET
========================= */

@media (max-width: 800px) {

  section {
    padding: 100px 6vw;
  }


  /* NAV */

  .menu-toggle {
    display: block;
  }

  nav ul {
    position: absolute;

    top: 75px;

    left: 6vw;
    right: 6vw;

    display: none;

    flex-direction: column;

    gap: 0;

    padding: 10px;

    background: rgba(10, 10, 18, 0.97);

    border: 1px solid var(--line);

    border-radius: 16px;

    backdrop-filter: blur(15px);
  }

  nav ul.open {
    display: flex;
  }

  nav ul li a {
    display: block;

    padding: 14px;

    border-radius: 10px;
  }

  nav ul li a:hover {
    background: rgba(255, 255, 255, 0.05);
  }


  /* ABOUT */

  .about-grid {
    grid-template-columns: 1fr;

    gap: 40px;
  }


  /* SKILLS */

  .curved-loop-wrap {
    height: 260px;
  }

  .curve-svg {
    height: 260px;
  }

  .curve-text {
    font-size: 38px;
  }


  /* GALLERY */

  .dome-wrap {
    height: 450px;
  }

  .dome-item {
    width: 125px;
    height: 165px;
  }
}


/* =========================
   MOBILE
========================= */

@media (max-width: 500px) {

  section {
    padding: 90px 5vw;
  }


  .hero h1 {
    font-size:
      clamp(2.3rem, 12vw, 3.5rem);
  }

  .hero p {
    font-size: 0.95rem;
  }


  .btn-row {
    width: 100%;

    flex-direction: column;
  }

  .btn {
    text-align: center;
  }


  .stat-row {
    display: grid;

    grid-template-columns:
      repeat(2, 1fr);

    gap: 25px;
  }


  /* SKILLS */

  .curved-loop-wrap {
    height: 230px;

    border-radius: 18px;
  }

  .curve-svg {
    height: 230px;
  }

  .curve-text {
    font-size: 28px;
  }


  /* GALLERY */

  .dome-wrap {
    height: 380px;
  }

  .dome-item {
    width: 88px;
    height: 125px;
  }


  /* CONTACT */

  .contact-box {
    padding: 50px 22px;
  }

  .contact-links {
    flex-direction: column;
  }

  .contact-links .btn {
    width: 100%;
  }


  .footer {
    padding: 30px 20px;
  }
}


/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    scroll-behavior: auto !important;

    transition-duration: 0.01ms !important;
  }
}

/* =========================
   ABOUT PHOTO FIX
   ========================= */

/* Make sure the profile photo is visible even if
   the scroll-reveal JavaScript has not added .in yet. */
.about-photo.reveal {
  opacity: 1;
  transform: none;
  visibility: visible;
}

/* Make the image fill the photo card correctly. */
.about-photo a {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.about-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Keep the decorative overlay behind the actual photo. */
.about-photo::before {
  z-index: 1;
  pointer-events: none;
}
