:root {
  --bg-color: #08080a;
  --surface-color: #121216;
  --surface-light: #1c1c22;
  --text-primary: #f8f8f8;
  --text-secondary: #a0a0a5;
  --accent-1: #00f0ff;
  --accent-2: #8a2be2;
  --gradient-accent: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --font-main: 'Outfit', 'Inter', sans-serif;
}

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

html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-scroll-container] {
  will-change: transform;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

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

a:hover {
  color: var(--accent-1);
}

/* 3D Canvas */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none; /* Let clicks pass through */
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
}

.section-title {
  font-size: 3rem;
  margin-bottom: 2rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  min-height: 100vh;
  padding: 6rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

/* Header/Nav */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 100;
  background: rgba(8, 8, 10, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

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

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

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

/* Hero Section */
.hero {
  align-items: flex-start;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
}

.hero-content {
  flex: 1;
}

.hero-image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--accent-1);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.3), 0 0 60px rgba(138, 43, 226, 0.2);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s ease;
  transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
}

.hero-image:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.05);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.6), 0 0 80px rgba(138, 43, 226, 0.5);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--accent-1);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 5vw;
  margin-bottom: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: var(--gradient-accent);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 240, 255, 0.2);
  color: #fff;
}

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

.btn-outline:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 10px 20px rgba(0, 240, 255, 0.1);
  color: var(--accent-1);
}

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

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

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

.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.skill-tag {
  background: var(--surface-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.skill-tag:hover {
  border-color: var(--accent-1);
  background: rgba(0, 240, 255, 0.05);
  transform: translateY(-2px);
}

/* Education Section */
.education-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.edu-item {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease;
}

.edu-item:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.1);
}

.edu-institution {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.edu-degree {
  color: var(--accent-1);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.edu-duration {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  background: var(--surface-color);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-2);
  box-shadow: 0 10px 30px rgba(138, 43, 226, 0.1);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.folder-icon {
  color: var(--accent-1);
  width: 40px;
  height: 40px;
}

.project-links a {
  color: var(--text-secondary);
  margin-left: 1rem;
}

.project-links a:hover {
  color: var(--accent-1);
}

.project-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--accent-1);
  font-family: monospace;
}

/* Contact Section */
.contact {
  text-align: center;
  align-items: center;
}

.contact-desc {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 3rem auto;
  font-size: 1.1rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--surface-color);
  color: var(--text-primary);
  font-size: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--gradient-accent);
  color: white;
  transform: translateY(-5px);
  border-color: transparent;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Loading overlay */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-color);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transition: opacity 1s ease;
}

/* Spinner */
.loader-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent-1);
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 1rem;
}

/* Lock Animation */
.loader-lock-container {
  display: none;
  margin-bottom: 1rem;
  color: var(--accent-1);
}

.loader-lock-container svg {
  width: 48px;
  height: 48px;
  overflow: visible;
  /* Add subtle glow */
  filter: drop-shadow(0 0 8px var(--accent-1));
}

.loader-lock-container svg path {
  transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: 7px 11px;
}

.loader-lock-container.unlocked svg path {
  transform: translateY(-4px) rotate(-30deg);
}

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

/* Responsive */
@media (max-width: 992px) {
  section {
    padding: 5rem 0;
  }

  .hero-container {
    flex-direction: column;
    text-align: center;
    gap: 3rem;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-image {
    max-width: 280px;
    transform: none;
  }

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

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }

  header {
    padding: 1rem 0;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-desc {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }
  
  .nav-links {
    display: none; /* simple mobile nav */
  }
  
  .section-title {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }
  
  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .edu-item {
    padding: 1.5rem;
  }

  .edu-institution {
    font-size: 1.3rem;
  }
}

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

  section {
    padding: 4rem 0;
  }

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

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .contact-links {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .skill-tag {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .project-card {
    padding: 1.5rem;
  }
  
  .social-link {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
}
