/* =========================================================================
   BASE RESET & VARIABLES
   ========================================================================= */

:root {
  --bg-color: #030305;
  --text-main: #f0f0f0;
  --text-muted: #8892b0;
  --accent-1: #0ea5e9; /* Deep electric blue */
  --accent-2: #06b6d4; /* Cyan */
  --accent-teal: #14b8a6; /* Cool teal */
  --accent-gradient: linear-gradient(135deg, #0ea5e9, #06b6d4);

  --card-bg: rgba(255, 255, 255, 0.02);
  --card-border: rgba(255, 255, 255, 0.06);
  --card-hover: rgba(255, 255, 255, 0.04);

  --font-sans: 'Space Grotesk', sans-serif;
  --font-serif: 'Outfit', sans-serif;

  --cursor-size: 6px;
  --cursor-follower-size: 32px;

  --shadow-glow: 0 0 40px rgba(14, 165, 233, 0.15);
  --shadow-glow-hover: 0 0 60px rgba(6, 182, 212, 0.25);
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-main);
  /* cursor: none; /* Hide default cursor */
  scroll-behavior: auto;
  /* Disabled for Lenis */
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

body.loading {
  overflow: hidden;
}

::selection {
  background: rgba(14, 165, 233, 0.3);
  color: #fff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* =========================================================================
   TYPOGRAPHY
   ========================================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.1;
  color: var(--text-main);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.text-center {
  text-align: center;
}

/* =========================================================================
   CURSOR
   ========================================================================= */

#cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--cursor-size);
  height: var(--cursor-size);
  background: var(--accent-1);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
}

#cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--cursor-follower-size);
  height: var(--cursor-follower-size);
  border: 1px solid var(--accent-2);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  opacity: 0.6;
  transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

#cursor.hover {
  width: 48px;
  height: 48px;
  background: var(--accent-2);
}

#cursor-follower.hover {
  width: 80px;
  height: 80px;
  border-color: var(--accent-1);
  opacity: 0.8;
}

/* Fallback for touch devices */
@media (hover: none) and (pointer: coarse) {

  #cursor,
  #cursor-follower {
    display: none;
  }
}

/* =========================================================================
   3D BACKGROUND
   ========================================================================= */

.hero-model {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: transparent;
  --poster-color: transparent;
  filter: saturate(1.08) contrast(1.08) drop-shadow(0 0 48px rgba(100, 255, 218, 0.2));
  animation: heroGlobePulse 7s ease-in-out infinite;
}

@keyframes heroGlobePulse {
  0%,
  100% {
    filter: saturate(1.05) contrast(1.05) drop-shadow(0 0 32px rgba(14, 165, 233, 0.2));
  }
  50% {
    filter: saturate(1.12) contrast(1.08) drop-shadow(0 0 48px rgba(6, 182, 212, 0.28));
  }
}

/* =========================================================================
   NAVIGATION
   ========================================================================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  mix-blend-mode: difference;
}

.nav-logo .logo-text {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -4px;
  left: 0;
  background: var(--accent-gradient);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-btn {
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(14, 165, 233, 0.4);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  color: var(--accent-1);
}

.nav-btn:hover {
  background: var(--accent-1);
  color: var(--bg-color);
  box-shadow: var(--shadow-glow);
}

/* =========================================================================
   LAYOUT UTILS
   ========================================================================= */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5%;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 4rem;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--font-sans);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.btn i {
  flex-shrink: 0;
  line-height: 1;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-hover);
}

.btn-outline {
  background: transparent;
  color: var(--accent-1);
  border: 2px solid var(--accent-1);
}

.btn-outline:hover {
  background: var(--accent-1);
  color: var(--bg-color);
  transform: translateY(-2px);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px);
}

.btn-secondary {
  border: 1px solid rgba(100, 255, 218, 0.35);
  color: var(--accent-1);
  background: rgba(100, 255, 218, 0.08);
}

.btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(100, 255, 218, 0.2);
  border-color: rgba(100, 255, 218, 0.65);
}

/* =========================================================================
   HERO SECTION
   ========================================================================= */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 0 5%;
  overflow: hidden;
  z-index: 3;
}

.hero-model-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Only darken the left side where text lives — right stays open for the 3D model */
  background: linear-gradient(90deg, rgba(3, 3, 5, 0.92) 0%, rgba(3, 3, 5, 0.55) 45%, transparent 70%);
}

.space-particles {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}

.hero-model-glow {
  display: none;
}

.hero-container {
  max-width: 1200px;
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* Hero Brand Section */
.hero-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-logo {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--text-main);
  margin: 0;
  line-height: 1;
}

.hero-tagline {
  position: relative;
  top: -55px;
  font-family: var(--font-sans);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 500;
  color: var(--accent-1);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0;
}

/* Hero Main Content */
.hero-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 700px;
}

.hero-statement {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -2px;
  margin: 0;
  background: var(--accent-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  max-width: 600px;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  margin-bottom: 3rem;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 5%;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .hero {
    padding-top: 6rem;
    padding-bottom: 2.5rem;
  }

  .hero-container {
    gap: 2rem;
  }

  .hero-brand {
    gap: 0.75rem;
  }

  .hero-logo {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .hero-tagline {
    font-size: clamp(0.8rem, 3vw, 1rem);
  }

  .hero-statement {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .hero-main {
    gap: 1.5rem;
  }

  .hero-model-stage {
    background: linear-gradient(180deg, rgba(3, 3, 5, 0.85) 0%, rgba(3, 3, 5, 0.4) 50%, transparent 100%);
  }

  .hero-cta {
    flex-wrap: wrap;
  }

  .scroll-indicator {
    display: none;
  }
}

.mouse {
  width: 20px;
  height: 30px;
  border: 1px solid var(--text-muted);
  border-radius: 10px;
  position: relative;
}

.mouse::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 6px;
  background-color: var(--text-muted);
  border-radius: 2px;
  animation: scroll 1.5s infinite;
}

@keyframes scroll {
  0% {
    transform: translate(-50%, 0);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, 15px);
    opacity: 0;
  }
}

/* =========================================================================
   METRICS SECTION
   ========================================================================= */

.metrics-section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--card-border);
  border-top: 1px solid var(--card-border);
  position: relative;
  z-index: 3;
}

.metrics-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5%;
}

.metric-item {
  text-align: center;
}

.metric-number {
  font-size: clamp(3rem, 5vw, 5rem);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1;
}

.metric-number span {
  font-size: 1rem;
  color: var(--accent-1);
  vertical-align: super;
}

.metric-text {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* =========================================================================
   ABOUT SECTION
   ========================================================================= */

.about {
  padding: 10rem 0;
  position: relative;
  z-index: 3;
}

.about::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(100, 255, 218, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.about-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  gap: 3rem;
}

.image-wrapper {
  position: relative;
  border-radius: 24px;
  overflow: visible;
  aspect-ratio: 4/5;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  filter: grayscale(100%);
  transition: filter 0.5s ease, transform 0.5s ease;
  overflow: hidden;
}

.image-wrapper:hover img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg-color) 0%, transparent 100%);
  opacity: 0.5;
  border-radius: 24px;
  pointer-events: none;
}

.spinning-badge {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 100px;
  height: 100px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spin-badge 10s linear infinite;
  z-index: 3;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.spinning-badge svg text {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  fill: var(--accent-2);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

@keyframes spin-badge {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.about-content {
  position: relative;
  z-index: 2;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(14, 165, 233, 0.15);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.about-content:hover {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.skills-wrapper {
  margin-top: 3rem;
  text-align: center;
}

.skills-title {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-1);
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.skills-tags span {
  padding: 0.5rem 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 50px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.skills-tags span:hover {
  background: var(--card-hover);
  border-color: var(--accent-1);
  color: var(--accent-1);
  transform: translateY(-2px);
}

/* =========================================================================
   EXPERIENCE SECTION
   ========================================================================= */

.experience {
  padding: 5rem 0 10rem;
  position: relative;
  z-index: 3;
}

.timeline {
  max-width: 800px;
  margin: 4rem auto 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: var(--card-border);
}

.timeline-item {
  position: relative;
  padding-left: 4rem;
  margin-bottom: 4rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  top: 0;
  left: -5px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent-1);
  box-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
}

.timeline-date {
  font-size: 0.9rem;
  color: var(--accent-1);
  margin-bottom: 0.5rem;
  font-family: var(--font-sans);
  letter-spacing: 1px;
}

.timeline-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.timeline-content h4 {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 400;
}

.timeline-content p {
  margin-bottom: 0;
}

/* =========================================================================
   PROJECTS SECTION
   ========================================================================= */

.projects {
  padding: 5rem 0 10rem;
  position: relative;
  z-index: 3;
  overflow: hidden;
  --projects-parallax-x: 0px;
  --projects-parallax-y: 0px;
  --projects-scroll-shift: 0px;
}

.projects::before,
.projects::after {
  content: '';
  position: absolute;
  inset: -6%;
  pointer-events: none;
}

.projects::before {
  z-index: 0;
  background:
    radial-gradient(circle at 22% 30%, rgba(100, 255, 218, 0.2), transparent 22%),
    radial-gradient(circle at 76% 70%, rgba(189, 52, 254, 0.17), transparent 24%);
  transform: translate3d(
    calc(var(--projects-parallax-x) * 0.4),
    calc(var(--projects-parallax-y) * 0.55 + var(--projects-scroll-shift) * 0.35),
    0
  );
}

.projects::after {
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 54px 54px;
  opacity: 0.22;
  mix-blend-mode: screen;
  transform: translate3d(
    calc(var(--projects-parallax-x) * -0.25),
    calc(var(--projects-parallax-y) * -0.2 + var(--projects-scroll-shift) * -0.3),
    0
  );
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 3rem;
  margin-top: 4rem;
  position: relative;
  z-index: 1;
  perspective: 1400px;
}

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
  }
}

.project-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.project-card:hover {
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: var(--shadow-glow-hover);
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), transparent 36%, rgba(6, 182, 212, 0.1) 74%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

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

.project-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  transform: translateZ(22px);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  transform: scale(1.06) translate3d(var(--img-parallax-x, 0px), var(--img-parallax-y, 0px), 0);
}

.project-card:hover .project-image img {
  transform: scale(1.1) translate3d(var(--img-parallax-x, 0px), var(--img-parallax-y, 0px), 0);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.view-btn {
  background: #fff;
  color: #000;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.project-card:hover .view-btn {
  transform: translateY(0);
}

.project-info {
  padding: 2rem;
  transform: translateZ(28px);
}

.project-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.project-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .projects::before,
  .projects::after,
  .project-card,
  .project-image img {
    transform: none !important;
    transition: none !important;
  }
}

/* =========================================================================
   CONTACT SECTION
   ========================================================================= */

.contact {
  padding: 5rem 0 10rem;
  position: relative;
  overflow: hidden;
  z-index: 3;
}

.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 28% 62%, rgba(100, 255, 218, 0.12), transparent 26%),
    radial-gradient(circle at 18% 42%, rgba(189, 52, 254, 0.1), transparent 22%);
}

.contact::after {
  display: none;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 30px;
  padding: 4rem;
  position: relative;
  z-index: 1;
}

.contact-glow {
  position: absolute;
  top: 50%;
  left: 8%;
  width: min(42vw, 560px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18) 0%, rgba(6, 182, 212, 0.12) 38%, rgba(20, 184, 166, 0.06) 56%, transparent 74%);
  filter: blur(28px);
  opacity: 0.95;
  z-index: 0;
  pointer-events: none;
}

.contact-info .section-title {
  margin-bottom: 2rem;
  font-size: clamp(2.5rem, 4vw, 3.5rem);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.social-icon {
  width: 50px;
  height: 50px;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background: var(--text-main);
  color: var(--bg-color);
  transform: translateY(-5px);
}

.contact-direct {
  margin-top: auto;
}

.calendly-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-1);
}

.calendly-link:hover {
  text-decoration: underline;
}

/* Floating Label Form */
.premium-form .form-group {
  position: relative;
  margin-bottom: 2.5rem;
}

.premium-form input,
.premium-form textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1rem 0;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1.1rem;
  transition: border-color 0.3s ease;
}

.premium-form textarea {
  resize: vertical;
}

.premium-form input:focus,
.premium-form textarea:focus {
  outline: none;
  border-bottom-color: var(--accent-1);
}

.premium-form label {
  position: absolute;
  top: 1rem;
  left: 0;
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.premium-form input:focus~label,
.premium-form textarea:focus~label,
.premium-form input:not(:placeholder-shown)~label,
.premium-form textarea:not(:placeholder-shown)~label {
  top: -1.2rem;
  font-size: 0.85rem;
  color: var(--accent-1);
}

.submit-btn {
  background: transparent;
  border: 1px solid var(--text-main);
  color: var(--text-main);
  padding: 1rem 3rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.3s ease;
  font-family: var(--font-sans);
  width: 100%;
}

.submit-btn span {
  position: relative;
  z-index: 2;
}

.submit-btn .btn-bg {
  position: absolute;
  inset: 0;
  background: var(--text-main);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 1;
}

.submit-btn:hover {
  color: var(--bg-color);
}

.submit-btn:hover .btn-bg {
  transform: translateY(0);
}

/* =========================================================================
   FOOTER
   ========================================================================= */

.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--card-border);
  position: relative;
  z-index: 3;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.back-to-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* =========================================================================
   MODALS
   ========================================================================= */

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 2rem;
}

.project-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

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

.project-modal__content {
  position: relative;
  width: 100%;
  max-width: 1040px;
  max-height: 90vh;
  overflow-y: auto;
  background:
    radial-gradient(circle at 88% 12%, rgba(100, 255, 218, 0.14), transparent 28%),
    radial-gradient(circle at 12% 88%, rgba(189, 52, 254, 0.12), transparent 26%),
    #0c0d11;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 3rem;
  z-index: 2;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-modal.is-open .project-modal__content {
  transform: translateY(0);
}

.project-modal__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(3, 3, 5, 0.55);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.project-modal__close:hover {
  color: var(--accent-1);
  border-color: rgba(100, 255, 218, 0.5);
  background: rgba(8, 12, 16, 0.82);
}

.project-modal__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.project-modal__meta h3 {
  font-size: clamp(1.5rem, 2.6vw, 2.4rem);
  margin: 0;
}

.project-modal__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(100, 255, 218, 0.48);
  padding: 0.45rem 0.95rem;
  font-family: var(--font-sans);
  letter-spacing: 0.8px;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--accent-1);
  white-space: nowrap;
}

#projectModalDesc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.4rem;
}

.project-modal__preview {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(160deg, rgba(18, 20, 27, 0.98) 0%, rgba(10, 10, 14, 0.98) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 22px 50px rgba(0, 0, 0, 0.55);
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-modal__preview::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 30%, rgba(0, 0, 0, 0.28) 100%);
}

#projectModalHeroImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.3s ease;
}

.project-modal__preview:hover #projectModalHeroImg {
  transform: scale(1.02);
}

.project-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(3, 3, 5, 0.56);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.project-modal__nav:hover {
  background: rgba(100, 255, 218, 0.25);
  border-color: rgba(100, 255, 218, 0.65);
}

.project-modal__nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.project-modal__nav--prev {
  left: 0.9rem;
}

.project-modal__nav--next {
  right: 0.9rem;
}

.project-modal__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

.project-modal__gallery img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 10px;
  cursor: zoom-in;
  border: 1px solid rgba(255, 255, 255, 0.14);
  opacity: 0.75;
  transform: translateY(0);
  transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.project-modal__gallery img:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.project-modal__gallery img.is-active {
  opacity: 1;
  border-color: rgba(100, 255, 218, 0.65);
  box-shadow: 0 0 0 1px rgba(100, 255, 218, 0.28);
}

.project-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.project-modal__counter {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-sans);
  letter-spacing: 0.8px;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.modal-action {
  text-align: center;
  margin-top: 0;
  display: inline-flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.modal-action .btn {
  min-width: 160px;
}

/* Image Lightbox */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.image-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
}

.image-lightbox img {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 2;
  border-radius: 8px;
}

.image-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 2rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  z-index: 3;
}

/* =========================================================================
   RESPONSIVE DESIGN
   ========================================================================= */

@media (max-width: 1024px) {

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .about-grid {
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .container,
  .metrics-container,
  .panel {
    padding-left: 7%;
    padding-right: 7%;
  }

  .navbar {
    padding: 1.5rem 5%;
  }

  .nav-links {
    display: none;
    /* Hide on mobile for simplicity, could add hamburger */
  }

  .timeline {
    padding-left: 2rem;
  }

  .about-content {
    padding: 2rem;
    margin: 0 1rem;
  }

  .timeline::before {
    left: 2rem;
    top: 0;
    height: 100%;
  }

  .timeline-dot {
    left: calc(2rem - 5px);
  }

  .hero-subtitle,
  .hero-title,
  .hero-desc {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .about,
  .experience,
  .projects,
  .contact {
    padding: 4.5rem 0 6rem;
  }

  .contact-wrapper {
    padding: 2rem 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .story-canvas-container {
    width: 100%;
  }

  .panel-content {
    padding: 2rem 1.25rem;
  }

  .project-modal__content {
    padding: 2.8rem 1.5rem 2rem;
  }

  .project-modal__meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-modal__nav {
    width: 36px;
    height: 36px;
  }

  .project-modal__gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-modal__footer {
    align-items: stretch;
    gap: 0.9rem;
  }

  .modal-action {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .modal-action .btn {
    width: 100%;
    min-width: 0;
    padding: 0.85rem 0.7rem;
    font-size: 0.92rem;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .timeline {
    padding-left: 1rem;
  }

  .timeline::before {
    left: 1rem;
  }

  .timeline-item {
    padding-left: 2.5rem;
  }

  .timeline-dot {
    left: calc(1rem - 5px);
  }

  .project-modal__content {
    padding: 2.8rem 1rem 1.4rem;
  }

  .modal-action {
    grid-template-columns: 1fr;
  }

  .modal-action .btn {
    padding: 0.9rem 1rem;
    font-size: 0.9rem;
  }
}

/* =========================================================================
   3D STORYTELLING SECTION
   ========================================================================= */

.story-section {
  position: relative;
  background-color: var(--bg-color);
  z-index: 2;
  overflow-x: clip;
}

.story-canvas-container {
  position: sticky;
  top: 0;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
}

#story-canvas {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}

.story-content {
  position: relative;
  z-index: 1;
  margin-top: -100vh;
  padding-bottom: 20vh;
  overflow-x: clip;
}

.panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5%;
  overflow-x: clip;
}

.panel-content {
  max-width: min(800px, 100%);
  text-align: center;
  background: rgba(3, 3, 5, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 4rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transform: translateX(0);
}

.panel-content h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 1.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.panel-content p {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--text-main);
  margin-bottom: 1rem;
}

.story-projects {
  margin-top: 2rem;
  color: var(--accent-1);
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 1px;
}

.story-projects span {
  color: #fff;
}


/* =========================================================================
   RIBBON 3D SCROLL CANVAS
   ========================================================================= */

#ribbon-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.5s ease;
}

#ribbon-canvas.hidden {
  opacity: 0;
}

/* Overlay that darkens the 3D canvas after the hero */
#ribbon-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;  /* above canvas, below page sections (z:3+) */
  background: #030305;
  opacity: 0;
}

#smooth-wrapper,
#smooth-content {
  background: transparent;
}

/* ── Unified background for all 3D-model sections ── */
.hero,
.metrics-section,
.about,
.experience,
.projects,
.contact,
.footer {
  background-color: transparent;
}

/* Ensure the page bg is always the dark color */
html, body {
  background-color: #030305;
}
