/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --purple-600: #9333ea;
  --yellow-400: #facc15;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(to bottom, var(--slate-950), #000000);
  color: white;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Utility Classes */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes scrollIndicator {

  0%,
  100% {
    transform: translateY(5px);
  }

  50% {
    transform: translateY(25px);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-background-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 1.0;
}

/* Loading Indicator */
.loading-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  text-align: center;
  transition: opacity 0.3s ease;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  color: white;
  font-size: 1rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.loading-bar {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}

.loading-progress {
  height: 100%;
  background: linear-gradient(to right, var(--blue-500), var(--purple-600));
  transition: width 0.3s ease;
  border-radius: 2px;
}


.hero-content {
  position: relative;
  z-index: 20;
  text-align: center;
  padding: 1rem;
  transition: opacity 0.8s ease;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 9rem);
  font-weight: 900;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease 0.5s both;
}

.hero-subtitle {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--slate-200);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease 0.7s both;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--slate-400);
  max-width: 48rem;
  margin: 0 auto 4rem;
  animation: fadeIn 1s ease 1s both;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  animation: fadeIn 1s ease 1.5s both;
}

.scroll-indicator-text {
  color: white;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.scroll-mouse {
  width: 1.5rem;
  height: 2.5rem;
  border: 2px solid white;
  border-radius: 1.25rem;
  margin: 0 auto;
  position: relative;
}

.scroll-wheel {
  width: 0.375rem;
  height: 0.375rem;
  background: white;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollIndicator 1.5s infinite;
}

/* Photo360 Section */
/* Photo360 Section */
.photo360-section {
  min-height: 100vh;
  /* Restore to full screen for snapping */
  display: flex;
  align-items: center;
  padding: 0 1rem;
  background: #000000;
  position: relative;
  overflow: hidden;
  /* Fix bleed into other sections */
}

.photo360-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  /* Center items vertically by default */
  position: relative;
}

@media (min-width: 1024px) {
  .photo360-grid {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
    /* Reset to start for sticky behavior on desktop */
  }

  /* Center the text column vertically even when grid aligns to start */
  .photo360-grid>div:first-child {
    align-self: center;
    /* Ensure it has some margin if needed, or flex centering */
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 400px;
    /* Give it some height weight */
    padding-top: 10vh;
    /* Visual optical adjustment to align with model center */
  }

  /* Make the right column (3D model) sticky */
  .photo360-grid>div:last-child {
    position: sticky;
    top: 10vh;
    height: auto;
    aspect-ratio: 1 / 1;
    /* Make it square-ish as requested */
    max-height: 80vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}


.photo360-text h2 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(to right, var(--slate-200), white);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.photo360-text p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--slate-300);
  line-height: 1.8;
  margin-bottom: 1rem;
  text-align: justify;
  /* Make text edges straight */
}

/* 3D Model Container */
/* 3D Model styles */
spline-viewer {
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  background: #000000;
  pointer-events: none;
  /* Disable all mouse interaction */
  user-select: none;
  /* Disable text selection */
  touch-action: none;
  /* Disable touch interaction */
}

/* Hide Spline watermark/logo */
spline-viewer::part(logo) {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Additional method to hide watermark using shadow DOM */
spline-viewer {
  --spline-watermark-display: none;
  width: 100%;
  height: 100%;
  transform: scale(1.3) translateX(10%);
  /* Zoom in and shift right */
  transform-origin: center center;
}

/* Hide any iframe watermarks */
iframe {
  background: #000000 !important;
}

/* Target and hide the "Built with Spline" text */
spline-viewer>div,
spline-viewer>a {
  display: none !important;
}

/* About Section */
.about-section {
  min-height: 60vh;
  /* Reduced from 100vh */
  padding: 3rem 1rem;
  /* Reduced from 5rem */
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  /* Strict snapping as requested */
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--slate-950);
  color: white;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Scroll Snap for Sections */
.hero-section,
.photo360-section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.section-title {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.section-description {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: var(--slate-300);
  max-width: 48rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 4rem;
}

@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.skill-card {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid var(--slate-800);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-5px) scale(1.05);
  border-color: rgba(37, 99, 235, 0.5);
}

.skill-icon {
  width: 3rem;
  height: 3rem;
  color: var(--blue-400);
  margin-bottom: 1rem;
}

.skill-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.skill-card p {
  color: var(--slate-400);
}

/* Tech Stack */
.tech-stack {
  margin-top: 5rem;
}

.tech-stack h3 {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.tech-badge {
  background: linear-gradient(to right, var(--blue-600), var(--purple-600));
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 500;
  transition: transform 0.3s ease;
}

.tech-badge:hover {
  transform: scale(1.1);
}

/* Projects Section */
.projects-section {
  min-height: 100vh;
  padding: 5rem 1rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 4rem;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid var(--slate-800);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: rgba(37, 99, 235, 0.5);
}

.project-image {
  position: relative;
  height: 12rem;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--slate-900), transparent);
  opacity: 0.6;
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.project-content p {
  color: var(--slate-400);
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tag {
  font-size: 0.75rem;
  background: rgba(37, 99, 235, 0.2);
  color: var(--blue-400);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--blue-400);
  text-decoration: none;
  transition: color 0.3s ease;
}

.project-link:hover {
  color: var(--blue-300);
}

.project-link svg {
  width: 1rem;
  height: 1rem;
}

/* Contact Section */
.contact-section {
  min-height: 100vh;
  padding: 5rem 1rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 4rem;
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 3rem;
  height: 3rem;
  background: rgba(37, 99, 235, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--blue-400);
}

.contact-item h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.contact-item p {
  color: var(--slate-400);
}

.social-links {
  margin-top: 3rem;
}

.social-links h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.social-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-btn {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--slate-800);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-btn:hover {
  transform: translateY(-3px) scale(1.1);
  border-color: rgba(37, 99, 235, 0.5);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  color: white;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--slate-800);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: white;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue-500);
}

.form-group textarea {
  min-height: 150px;
  resize: none;
}

.submit-btn {
  background: linear-gradient(to right, var(--blue-600), var(--purple-600));
  color: white;
  padding: 1rem;
  border: none;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.5);
}

.submit-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Footer */
.footer {
  margin-top: 5rem;
  text-align: center;
  color: var(--slate-500);
  border-top: 1px solid var(--slate-800);
  padding-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }

  .section-title {
    font-size: 2.5rem;
  }
}