:root {
  --bg: #050505;
  --neon: #00ffff;
  --violet: #8a7cff;
  --glass: rgba(255,255,255,0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: #ffffff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
}

/* CURSOR */
.cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--neon);
  pointer-events: none;
  mix-blend-mode: difference;
  z-index: 999;
  transition: transform 0.1s ease;
}

/* HERO */
.hero {
  height: 100vh;
  padding-left: 10vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(0,255,255,.2), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(138,124,255,.18), transparent 40%);
  filter: blur(90px);
}

.hero-title {
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 800;
  letter-spacing: -3px;
}

.hero-title span {
  color: var(--neon);
}

.hero-sub {
  margin-top: 20px;
  font-size: 1.4rem;
  color: #bdbdbd;
}

/* BUTTON */
.cta {
  margin-top: 50px;
  justify-content: center;
  padding: 16px 44px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,255,255,.4);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .3s, box-shadow .3s;
}

.cta:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(0,255,255,.5);
}

/* SECTIONS */
.section {
  padding: 140px 10vw;
}

.section h2 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 30px;
}

/* REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(80px) scale(.95);
  transition: 1s cubic-bezier(.2,.8,.2,1);
}

.reveal.active {
  opacity: 1;
  transform: none;
}

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
}

.skill-card {
  padding: 40px;
  border-radius: 22px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,255,255,.25);
  transition: transform .4s, box-shadow .4s;
}

.skill-card:hover {
  transform: translateY(-16px);
  box-shadow: 0 0 40px rgba(0,255,255,.45);
}

/* PROJECTS */
.project-track {
  display: flex;
  gap: 40px;
  margin-top: 60px;
}

.project-card {
  min-width: 320px;
  padding: 40px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.15);
  transition: transform .4s, box-shadow .4s;
}

.project-card:hover {
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(255,255,255,.25);
}

/* CONTACT */
.contact {
  text-align: center;
}

.contact-form {
  max-width: 500px;
  margin: 0 auto 50px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form input,
.contact-form textarea {
  padding: 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.2);
  color: white;
  border-radius: 12px;
  font-size: 1rem;
}

/* SOCIAL ICONS */
.socials {
  display: flex;
  justify-content: center;
  gap: 30px;
  font-size: 1.8rem;
}

.socials a {
  color: white;
  text-decoration: none;
  transition: color .3s, transform .3s;
}

.socials a:hover {
  color: var(--neon);
  transform: scale(1.2);
}
.hero-cta {
  margin-top: 60px;
  display: flex;
  justify-content: center;
}
.project-card {
  transform-style: preserve-3d;
  will-change: transform;
}
.hero-bg {
  will-change: transform;
}
.hero {
  transition: border-radius 1s cubic-bezier(.2,.8,.2,1);
}

.hero.morphed {
  border-bottom-left-radius: 80px;
  border-bottom-right-radius: 80px;
}
/* GLOBAL PERFORMANCE HINTS */
.hero-bg,
.project-card,
.skill-card,
.cursor {
  will-change: transform;
}
.hero-title {
  position: relative;
  font-size: clamp(5rem, 11vw, 10rem);
  font-weight: 900;
  letter-spacing: -4px;
  line-height: 0.95;
  overflow: hidden;
}

.hero-title .layer {
  display: inline-block;
  position: relative;
  opacity: 0;
}

.hero-title .l1 {
  transform: translateX(-120px) scale(1.4) skewX(-12deg);
  color: white;
}

.hero-title .l2 {
  transform: translateX(120px) scale(1.4) skewX(12deg);
  color: var(--neon);
}
.section {
  transform-origin: center top;
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1),
              filter 0.4s,
              opacity 0.4s;
}

.section.warp-out {
  transform: scale(0.92) rotateX(6deg);
  opacity: 0.5;
}

.section.warp-in {
  transform: scale(1) rotateX(0deg);
  opacity: 1;
}
/* --- DIMENSIONAL REALITY DISPLACEMENT TITLE ENGINE --- */
.hero-title {
  position: relative;
  font-size: clamp(5rem, 11vw, 10rem);
  font-weight: 900;
  letter-spacing: -6px;
  display: inline-block;
  perspective: 2000px;
  transform-style: preserve-3d;
}

.slice {
  display: inline-block;
  opacity: 0;
  filter: brightness(1.8) contrast(1.3);
  transform:
    translateX(calc(var(--dx, 0) * 1px))
    translateY(calc(var(--dy, 0) * 1px))
    translateZ(calc(var(--dz, 0) * 1px))
    rotateX(calc(var(--rx, 0) * 1deg))
    rotateY(calc(var(--ry, 0) * 1deg))
    rotateZ(calc(var(--rz, 0) * 1deg))
    scale(calc(var(--sc, 1)));
}

.dim {
  mix-blend-mode: screen;
  color: var(--neon);
}

/* STARFIELD BACKGROUND */
#starfield {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -10;
  background: black;
  pointer-events: none;
}
.hero-sub {
  opacity: 0;                /* hidden initially */
  transform: translateY(20px) scale(.98);
  filter: blur(6px);
  transition: none !important; /* prevents CSS animation conflicts */
}
/* FALLING STAR + TRAIL */
.falling-star {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 12px rgba(255,255,255,1),
              0 0 24px var(--neon),
              0 0 36px var(--violet);
  z-index: 9999;
  pointer-events: none;
  filter: brightness(2.8);
  opacity: 1;
}

.falling-star.fade-out {
  transition: opacity 1.5s linear;
  opacity: 0;
}

/* TRAIL LINE */
.falling-star::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 3px;
  background: linear-gradient(
    to left,
    rgba(255,255,255,0.9),
    rgba(255,255,255,0.3),
    transparent
  );
  top: 50%;
  left: -190px;  /* key: move the trail behind the star */
  transform-origin: right center;
  border-radius: 3px;
  filter: blur(2px);
  transform: rotate(32deg);
}
/* === SECTION MORPHING === */
.section-block {
  transform-origin: center top;
  transition:
    transform 0.6s cubic-bezier(.2,.8,.2,1),
    opacity 0.6s ease,
    filter 0.6s ease;
}

.section-block.morph-out {
  opacity: 0.4;
  transform: scale(0.94) translateY(40px);
  filter: blur(4px) brightness(0.7);
}

.section-block.morph-in {
  opacity: 1;
  transform: scale(1) translateY(0px);
  filter: blur(0px) brightness(1);
}
/* === DIMENSIONAL TEXT EFFECT === */
.dim-text {
  position: relative;
  display: inline-block;
  transition: transform .35s ease, letter-spacing .35s ease;
  filter: brightness(1.4);
  backface-visibility: hidden;
}

.dim-text::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  color: var(--neon);
  mix-blend-mode: screen;
  opacity: 0;
  transform: translateX(-6px) translateY(4px) scale(1.05);
  filter: blur(4px) brightness(1.8);
  pointer-events: none;
  transition: opacity .5s ease, transform .5s ease;
}

.dim-text:hover {
  letter-spacing: 2px;
  transform: scale(1.03);
}

.dim-text:hover::after {
  opacity: 1;
  transform: translateX(-2px) translateY(1px) scale(1.08);
}
/* Project Visit Button */
.visit-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 22px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid rgba(0,255,255,0.55);
  color: white;
  font-weight: 500;
  text-decoration: none;
  transition: 
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.visit-btn:hover {
  background: rgba(0,255,255,0.15);
  box-shadow: 0 0 18px rgba(0,255,255,0.35);
  transform: translateY(-3px);
}
/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 16px 0;
  backdrop-filter: blur(10px);
  background: rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(0,255,255,0.25);
  z-index: 999;
}

.nav-container {
  width: 88%;
  max-width: 1400px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--neon);
  text-decoration: none;
}

.nav-links a {
  margin-left: 22px;
  font-size: 1rem;
  color: white;
  font-weight: 500;
  text-decoration: none;
  transition: 0.25s ease;
}

.nav-links a:hover {
  color: var(--neon);
  text-shadow: 0 0 12px var(--neon);
}

/* ===== HERO SOCIAL ICONS ===== */
.hero-socials {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-top: 28px;
}
/* Person Position */
.hero-person {
  position: absolute;
  right: 5%;
  top: 40%;
  transform: translateY(-40%);
  width: 200px;
  height: 400px;
  pointer-events: none;
}

/* SVG glow + animation */
.person-svg {
  filter: drop-shadow(0 0 15px rgba(0,255,255,0.35));
  animation: floatPerson 4s ease-in-out infinite;
  opacity: 0;
  animation: floatPerson 4s ease-in-out infinite, fadeInPerson 1.8s ease forwards;
}

/* breathing / floating motion */
@keyframes floatPerson {
  0% { transform: translateY(0px) }
  50% { transform: translateY(-10px) }
  100% { transform: translateY(0px) }
}

/* fade in after page loads */
@keyframes fadeInPerson {
  0% { opacity:0; transform: translateY(20px) }
  100% { opacity:1; transform: translateY(0px) }
}
