:root {
  --bg-dark: #0a0a0b;
  --bg-card: #121214;
  --accent: #00f3ff;
  --accent-glow: rgba(0, 243, 255, 0.3);
  --text-main: #e0e0e0;
  --text-dim: #949494;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-heavy: rgba(10, 10, 11, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  --font-main: 'Outfit', sans-serif;
}

body.light-theme {
  --bg-dark: #f0f2f5;
  --bg-card: #ffffff;
  --text-main: #1a1a1c;
  --text-dim: #505c6e;
  --glass: rgba(0, 0, 0, 0.03);
  --glass-heavy: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(0, 0, 0, 0.08);
  --accent: #0088ff; /* Slightly deeper blue for visibility on light */
  --accent-glow: rgba(0, 136, 255, 0.2);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* 3D Background Overlay */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  background: var(--bg-dark);
}

.bg-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle at center, transparent 30%, var(--bg-dark) 90%);
  z-index: -1;
  transition: background 0.5s ease;
}

/* Sections Glassmorphism Fixes */
section {
  position: relative;
  z-index: 1;
  background: transparent;
}

/* Navbar */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition);
}

nav.scrolled {
  padding: 1rem 0;
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -1px;
}

.logo span {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
}

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

.nav-links a {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.nav-extra {
  display: flex;
  align-items: center;
  margin-left: 1.5rem;
}

.theme-btn {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 0.6rem;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.theme-btn .icon {
  font-size: 1.2rem;
}

.theme-btn .sun { display: none; }
body.light-theme .theme-btn .moon { display: none; }
body.light-theme .theme-btn .sun { display: block; }

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-dark);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px var(--accent-glow);
}

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

.btn-outline:hover {
  background: var(--accent);
  color: var(--bg-dark);
  box-shadow: 0 0 20px var(--accent-glow);
}

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

.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(60px);
  z-index: -1;
}

.hero-content {
  max-width: 700px;
}

.hero-content h2 {
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-weight: 400;
}

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

.tagline {
  font-size: 1.5rem;
  color: var(--text-main);
  margin-bottom: 2rem;
  letter-spacing: 1px;
}

.bio-short {
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

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

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.mouse {
  width: 25px;
  height: 45px;
  border: 2px solid var(--text-dim);
  border-radius: 20px;
  position: relative;
}

.mouse::after {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollAnim 2s infinite;
}

@keyframes scrollAnim {
  0% { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, 20px); opacity: 0; }
}

/* Section Title */
.section-title {
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.title-line {
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

/* About Section */
.about {
  padding: 8rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

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

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.stat-item {
  padding: 2rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  text-align: center;
  transition: var(--transition);
}

.stat-item:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
}

.stat-item h3 {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

/* Showcase Section */
.showcase {
  padding: 8rem 0;
  background: radial-gradient(circle at center, rgba(0, 243, 255, 0.05) 0%, transparent 70%);
}

.spline-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 600px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.spline-wrapper {
  width: 100%;
  height: 100%;
}

.glow-effect {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  box-shadow: inset 0 0 50px rgba(0, 243, 255, 0.1);
  border-radius: 24px;
}

/* Projects Section */
.projects {
  padding: 8rem 0;
}

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

.project-card {
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  transition: var(--transition);
  width: 100%;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent);
}

.project-image {
  height: 220px;
  background: #1a1a1c;
}

.placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-weight: 600;
  background: linear-gradient(45deg, #121214, #1a1a1c);
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.project-info p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.project-tags {
  display: flex;
  gap: 0.8rem;
}

.project-tags span {
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  color: var(--text-dim);
}

/* Skills Section */
.skills {
  padding: 8rem 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
}

.skill-category {
  padding: 2.5rem;
  background: var(--bg-card);
  border-radius: 20px;
  border-left: 4px solid var(--accent);
}

.skill-category h3 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--accent);
}

.skill-category ul li {
  margin-bottom: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
}

/* Contact Section */
.contact {
  padding: 8rem 0;
}

.contact-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem;
  border-radius: 30px;
  border: 1px solid var(--glass-border);
}

.glass {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
}

.contact-form {
  display: grid;
  gap: 1.5rem;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 1.2rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text-main);
  font-family: var(--font-main);
  outline: none;
  transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
}

/* Footer */
footer {
  padding: 4rem 0;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.footer-logo span {
  color: var(--accent);
}

.footer-content p {
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

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

.social-links a {
  color: var(--text-dim);
}

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

/* Reveal Animations Class (GSAP) */
.reveal, .scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
}

/* About & Other sections glass tweak */
.about, .projects, .skills, .contact, .gallery {
  background: var(--glass-heavy);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  margin: 0;
  padding: 10rem 0;
}

/* Gallery Section */
.gallery {
  padding: 8rem 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.gallery-item {
  position: relative;
  height: 400px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  transition: var(--transition);
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item .overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
}

.gallery-item:hover {
  transform: scale(1.02);
  border-color: var(--accent);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item:hover .overlay {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item.placeholder .p-placeholder {
  width: 100%; height: 100%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-style: italic;
  font-weight: 300;
  border: 2px dashed var(--glass-border);
}

/* Responsive */
@media (max-width: 992px) {
  .hero-content h1 { font-size: 4rem; }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-content h1 { font-size: 3rem; }
  .tagline { font-size: 1.2rem; }
  .contact-wrapper { padding: 2rem; }
  .spline-container { aspect-ratio: 4/3; }
  .mobile-menu-btn { display: block; }
  
  .gallery-item { height: 300px; }
  .hero { text-align: center; }
  .hero-btns { justify-content: center; }
}
.scroll-reveal {
    opacity: 1;
    transform: none;
}
.project-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}