/* CSS Custom Properties for theming */
:root {
  --primary-color: #6366f1;
  --secondary-color: #8b5cf6;
  --accent-color: #06d6a0;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-dark: #1f2937;
  --bg-darker: #111827;
  --border-color: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, #0891b2 100%);
  --font-primary: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Dark theme */
[data-theme="dark"] {
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-light: #9ca3af;
  --bg-primary: #1f2937;
  --bg-secondary: #111827;
  --bg-dark: #374151;
  --bg-darker: #0f172a;
  --border-color: #374151;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
  transition: all 0.3s ease;
  height: 100vh;
}

/* Custom Cursor */
.cursor,
.cursor-trail {
  position: fixed;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s ease;
}

.cursor-trail {
  width: 40px;
  height: 40px;
  background: rgba(99, 102, 241, 0.2);
  transition: transform 0.3s ease;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  transition: opacity 0.5s ease;
}

.loading-text {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
}

.loading-text span {
  display: inline-block;
  animation: loadingBounce 1.4s infinite ease-in-out both;
}

.loading-text span:nth-child(1) { animation-delay: -0.32s; }
.loading-text span:nth-child(2) { animation-delay: -0.16s; }
.loading-text span:nth-child(3) { animation-delay: 0s; }
.loading-text span:nth-child(4) { animation-delay: 0.16s; }
.loading-text span:nth-child(5) { animation-delay: 0.32s; }
.loading-text span:nth-child(6) { animation-delay: 0.48s; }
.loading-text span:nth-child(7) { animation-delay: 0.64s; }

.loading-bar {
  width: 300px;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
}

.loading-progress {
  width: 0%;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 2px;
  animation: loadingProgress 2s ease-in-out;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

[data-theme="dark"] .navbar {
  background: rgba(31, 41, 55, 0.9);
}

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

.nav-logo .logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--primary-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  cursor: none;
  transition: all 0.3s ease;
  font-family: inherit;
}

.nav-btn:hover,
.nav-btn.active {
  background: var(--gradient-primary);
  color: white;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  cursor: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
  transition: all 0.3s ease;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  opacity: 0;
  transform: scale(0);
}

[data-theme="light"] .theme-toggle .moon-icon {
  opacity: 0;
  transform: scale(0);
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: none;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Main Container */
.main-container {
  height: 100vh;
  position: relative;
}

.section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section.active {
  opacity: 1;
  visibility: visible;
}

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

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.title-underline {
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  margin: 0 auto;
  border-radius: 2px;
}

/* Hero Section */
#home {
  position: relative;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.gradient-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  opacity: 0.1;
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
}

.shape {
  position: absolute;
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.shape-1 {
  width: 80px;
  height: 80px;
  background: rgba(99, 102, 241, 0.1);
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 60px;
  height: 60px;
  background: rgba(139, 92, 246, 0.1);
  top: 60%;
  right: 10%;
  animation-delay: -2s;
}

.shape-3 {
  width: 100px;
  height: 100px;
  background: rgba(6, 214, 160, 0.1);
  top: 80%;
  left: 20%;
  animation-delay: -4s;
}

.shape-4 {
  width: 70px;
  height: 70px;
  background: rgba(239, 68, 68, 0.1);
  top: 10%;
  right: 20%;
  animation-delay: -1s;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  width: 100%;
  padding: 6rem 2rem 2rem;
}

.hero-text {
  text-align: left;
}

.hero-title {
  margin-bottom: 1rem;
}

.greeting {
  display: inline;
  color: var(--text-secondary);
  font-size: 1.2rem;
  margin-right: 0.5rem;
}

.hero-title .name {
  display: inline-block;
  font-size: 4rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-height: 1.2em;
  min-width: 8ch;
}

.hero-subtitle {
  font-size: 2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.cursor-blink {
  animation: blink 1s infinite;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 500px;
}

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

.btn {
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  cursor: none;
  border: 2px solid transparent;
  background: none;
  font-family: inherit;
  font-size: 1rem;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
}

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

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary-color);
  transform: translateY(-3px);
}

/* Code Window */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.code-window {
  background: var(--bg-secondary);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.window-header {
  background: var(--bg-dark);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.window-controls {
  display: flex;
  gap: 0.5rem;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.control.close { background: #ff5f57; }
.control.minimize { background: #ffbd2e; }
.control.maximize { background: #28ca42; }

.window-title {
  color: var(--text-light);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.window-content {
  padding: 1.5rem;
  background: var(--bg-primary);
}

.code-lines {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
}

.line {
  display: block;
  margin-bottom: 0.5rem;
}

.keyword { color: #c792ea; }
.variable { color: #82aaff; }
.property { color: #ffcb6b; }
.string { color: #c3e88d; }

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.about-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  transition: all 0.3s ease;
  cursor: none;
}

.about-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
  color: white;
}

.about-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.about-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 1rem;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  font-family: var(--font-mono);
}

.stat-label {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.skill-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  transition: all 0.3s ease;
  cursor: none;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.skill-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.skill-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.skill-level {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.level-bar {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.level-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
  width: 0%;
  transition: width 2s ease-in-out;
}

.level-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Projects Section */
.projects-showcase {
  max-width: 800px;
  margin: 0 auto;
}

.project-slider {
  position: relative;
  height: 400px;
  margin-bottom: 2rem;
}

.project-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.5s ease;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.project-slide.active {
  opacity: 1;
  transform: translateX(0);
}

.project-preview {
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-mockup {
  width: 280px;
  height: 200px;
  background: var(--bg-secondary);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.mockup-header {
  background: var(--bg-dark);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
}

.mockup-controls {
  display: flex;
  gap: 0.5rem;
}

.mockup-controls span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-light);
}

.mockup-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: calc(100% - 40px);
  gap: 1rem;
}

.project-icon {
  font-size: 3rem;
  color: var(--primary-color);
}

.project-details h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.project-details p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tech-tag {
  padding: 0.25rem 0.75rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

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

.project-link {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 2px solid var(--border-color);
  border-radius: 25px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: none;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-link:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.project-navigation {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.project-nav-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: var(--border-color);
  cursor: none;
  transition: all 0.3s ease;
}

.project-nav-btn.active,
.project-nav-btn:hover {
  background: var(--primary-color);
  transform: scale(1.2);
}

/* Contact Section */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 3rem;
  line-height: 1.8;
}

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

.contact-method {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.method-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.method-info h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.method-info a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.method-info a:hover {
  color: var(--primary-color);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.form-group input,
.form-group textarea {
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-submit {
  justify-self: start;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(31, 41, 55, 0.9);
  backdrop-filter: blur(20px);
  color: var(--text-light);
  padding: 1rem 0;
  z-index: 100;
}

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

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

.social-link {
  width: 35px;
  height: 35px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: none;
}

.social-link:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

/* Glass Card Effect */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes loadingBounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

@keyframes loadingProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.3s ease;
    gap: 2rem;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
    padding: 4rem 1rem 2rem;
  }

  .hero-title .name {
    font-size: 2.5rem;
    min-width: 6ch;
  }

  .greeting {
    font-size: 1rem;
  }

  .hero-subtitle {
    font-size: 1.5rem;
  }

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

  .stats-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .project-slide {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .section-container {
    padding: 4rem 1rem 2rem;
  }

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

  .footer-content {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title .name {
    font-size: 2rem;
    min-width: 5ch;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

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

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .project-slider {
    height: auto;
  }

  .project-slide {
    position: relative;
    transform: none;
    opacity: 1;
  }

  .project-slide:not(.active) {
    display: none;
  }
}