/* ============================================
   LEET PORTFOLIO - Modern Dark Theme
   velton.net
   ============================================ */

:root {
  /* Colors - Cyber/Neon aesthetic */
  --bg-primary: #06060a;
  --bg-secondary: #0c0c12;
  --bg-card: rgba(18, 18, 28, 0.6);
  --bg-card-hover: rgba(28, 28, 42, 0.8);
  
  --accent: #00f5d4;
  --accent-dim: #00c4a7;
  --accent-glow: rgba(0, 245, 212, 0.4);
  --accent-secondary: #7b2cbf;
  --accent-tertiary: #f72585;
  
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b0;
  --text-muted: #6b6b7b;
  
  --border: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(0, 245, 212, 0.2);
  
  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Spacing */
  --nav-height: 72px;
  --section-padding: 120px;
  --container-max: 1200px;
  
  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

body.light-mode {
  --bg-primary: #f5f5f8;
  --bg-secondary: #e8e8ed;
  --bg-card: rgba(255, 255, 255, 0.7);
  --text-primary: #1a1a22;
  --text-secondary: #4a4a5a;
  --text-muted: #7a7a8a;
  --border: rgba(0, 0, 0, 0.08);
  --border-accent: rgba(0, 245, 212, 0.4);
}

/* Page loader */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s, visibility 0.6s;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: loaderSpin 0.8s linear infinite;
}

@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

.loader-text {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 2px;
}

/* Custom cursor - desktop only */
.cursor-dot, .cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.1s, opacity 0.2s;
}

.cursor-ring {
  width: 40px;
  height: 40px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, border-color 0.2s, opacity 0.2s;
}

body.hover-active .cursor-dot {
  transform: translate(-50%, -50%) scale(1.5);
  opacity: 0.7;
}

body.hover-active .cursor-ring {
  width: 56px;
  height: 56px;
  border-color: rgba(0, 245, 212, 0.5);
}

@media (hover: none) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* Theme toggle */
.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s var(--ease-out-expo);
}

.theme-toggle:hover {
  border-color: var(--border-accent);
  background: rgba(0, 245, 212, 0.08);
}

.theme-icon-light { display: none; }
body.light-mode .theme-icon-dark { display: none; }
body.light-mode .theme-icon-light { display: block; }

@media (max-width: 968px) { 
  .theme-toggle { display: none; }
  .nav-right { gap: 0; }
}

/* Noise overlay */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Gradient orbs - parallax ambient background */
.gradient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 25s ease-in-out infinite;
  will-change: transform;
}

.gradient-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.gradient-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
  bottom: -150px;
  left: -100px;
  animation-delay: -7s;
}

.gradient-orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-tertiary) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.15;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
  25% { transform: translate(40px, -25px) scale(1.08) rotate(2deg); }
  50% { transform: translate(-30px, 30px) scale(0.92) rotate(-1deg); }
  75% { transform: translate(20px, 15px) scale(1.03) rotate(1deg); }
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(6, 6, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: all 0.4s var(--ease-out-expo);
}

.nav.scrolled {
  background: rgba(6, 6, 10, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s var(--ease-out-expo);
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 40px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out-expo);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 968px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6, 6, 10, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out-expo);
  }

  .nav-links.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }
}

/* Main content */
main {
  position: relative;
  z-index: 1;
  padding-top: var(--nav-height);
}

/* Hero Section */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  padding: 80px 40px 120px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.hero-content {
  animation: heroReveal 1s var(--ease-out-expo) both;
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-greeting {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -2px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-cursor {
  -webkit-text-fill-color: var(--accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  min-height: 1.5em;
}

.subtitle-cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

.hero-cta {
  display: flex;
  gap: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s var(--ease-out-expo);
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  border: 2px solid var(--accent);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Code window - Hero visual */
.hero-visual {
  animation: heroReveal 1s var(--ease-out-expo) 0.2s both;
}

.code-window {
  background: rgba(18, 18, 28, 0.5);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.03);
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s;
}

.code-window:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 60px var(--accent-glow), 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border);
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dot:nth-child(1) { background: #ff5f57; }
.code-dot:nth-child(2) { background: #febc2e; }
.code-dot:nth-child(3) { background: #28c840; }

.code-title {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.code-content {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.8;
}

.code-keyword { color: var(--accent-tertiary); }
.code-prop { color: var(--accent); }
.code-string { color: var(--accent-dim); }

/* Section common */
section {
  padding: var(--section-padding) 40px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 60px;
}

.section-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 12px;
  opacity: 0.8;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -1px;
}

/* About */
.about-content {
  max-width: 720px;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin-bottom: 24px;
}

.about-intro {
  font-size: 1.3rem !important;
  color: var(--text-primary) !important;
}

.about-intro strong {
  color: var(--accent);
}

.about-stats {
  display: flex;
  gap: 60px;
  margin-top: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.skill-card {
  background: rgba(18, 18, 28, 0.5);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  transition: all 0.45s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.02);
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out-expo);
}

.skill-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-accent);
  box-shadow: 0 20px 40px -20px var(--accent-glow);
}

.skill-card:hover::before {
  transform: scaleX(1);
}

.skill-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  color: var(--accent);
}

.skill-icon svg {
  width: 100%;
  height: 100%;
}

.skill-card h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.skill-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.skill-level {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.skill-level span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dim));
  border-radius: 3px;
  transition: width 1s var(--ease-out-expo);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.project-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  overflow: hidden;
  transition: all 0.5s var(--ease-out-expo);
  cursor: default;
}

.project-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.5s;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--border-accent);
  box-shadow: 0 30px 60px -20px rgba(0, 245, 212, 0.2);
}

.project-card:hover .project-glow {
  opacity: 0.15;
}

.project-content {
  position: relative;
}

.project-number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  opacity: 0.7;
  margin-bottom: 16px;
}

.project-card h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.project-card p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  font-size: 0.8rem;
  padding: 6px 12px;
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 500;
}

/* Contact / Discord */
.contact-content {
  text-align: center;
  padding: 60px 24px;
}

.contact-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.discord-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  background: rgba(18, 18, 28, 0.5);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.4s var(--ease-out-expo);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255,255,255,0.03);
}

.discord-badge:hover {
  border-color: var(--border-accent);
  box-shadow: 0 8px 32px rgba(0, 245, 212, 0.08);
  transform: translateY(-2px);
}

.discord-handle {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
  letter-spacing: 0.5px;
  transition: color 0.3s;
}

.discord-badge:hover .discord-handle {
  color: var(--accent);
}

/* Footer */
.footer {
  padding: 60px 40px;
  border-top: 1px solid var(--border);
  background: rgba(6, 6, 10, 0.5);
}

.footer-content {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-logo:hover {
  color: var(--text-primary);
}

.footer-copy {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Button ripple */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 70%);
  transform: scale(0);
  border-radius: 50%;
  opacity: 0;
  transition: transform 0.5s, opacity 0.3s;
}

.btn-ripple:active::after {
  transform: scale(2);
  opacity: 1;
  transition: 0s;
}

/* Responsive */
@media (max-width: 968px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 60px 24px 80px;
  }

  .hero-visual {
    order: -1;
    max-width: 100%;
  }

  .hero-cta {
    justify-content: center;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-stats {
    justify-content: center;
  }

  .section-number {
    text-align: center;
  }
}

@media (max-width: 640px) {
  section {
    padding: 80px 24px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

}

/* Scroll animations - Intersection Observer handles visibility */
[data-aos="fade-up"] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

[data-aos="fade-up"].aos-visible {
  opacity: 1;
  transform: translateY(0);
}
