/* ========================================
   AADARSHA BASHYAL — PORTFOLIO
   Premium CSS Stylesheet
   Bashyal Team — 2026
   ======================================== */

/* ============ CSS VARIABLES ============ */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #0d0d15;
  --bg-tertiary: #111122;

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.4);

  --accent-1: #6366f1;
  --accent-2: #a855f7;
  --accent-3: #06b6d4;
  --accent-gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --accent-gradient-2: linear-gradient(135deg, var(--accent-3), var(--accent-1));

  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-bg-hover: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-hover: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --glass-blur: blur(20px);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;

  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --container: 1200px;
  --nav-height: 72px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light theme overrides */
[data-theme="light"] {
  --bg-primary: #f5f5f7;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e8e8ed;

  --text-primary: #1a1a2e;
  --text-secondary: rgba(26, 26, 46, 0.7);
  --text-tertiary: rgba(26, 26, 46, 0.4);

  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-bg-hover: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-border-hover: rgba(255, 255, 255, 0.8);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* ============ RESET & BASE ============ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.5s ease, color 0.5s ease;
}

body.loading {
  overflow: hidden;
}

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

ul { list-style: none; }

img, video {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

input, textarea {
  font-family: inherit;
  font-size: inherit;
}

::selection {
  background: var(--accent-1);
  color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent-1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-2);
}

/* ============ UTILITY CLASSES ============ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass Effect */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: all 0.4s var(--ease-out);
}

.glass:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
}

/* ============ PRELOADER ============ */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  text-align: center;
}

.preloader-logo {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 32px;
}

.preloader-letter {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  display: inline-block;
  animation: preloaderBounce 1.5s ease-in-out infinite;
}

.preloader-letter:nth-child(1) { animation-delay: 0s; }
.preloader-letter:nth-child(2) { animation-delay: 0.05s; }
.preloader-letter:nth-child(3) { animation-delay: 0.1s; }
.preloader-letter:nth-child(4) { animation-delay: 0.15s; }
.preloader-letter:nth-child(5) { animation-delay: 0.2s; }
.preloader-letter:nth-child(6) { animation-delay: 0.25s; }
.preloader-letter:nth-child(7) { animation-delay: 0.3s; }
.preloader-letter:nth-child(8) { animation-delay: 0.35s; }

@keyframes preloaderBounce {
  0%, 100% { transform: translateY(0); color: var(--text-primary); }
  50% { transform: translateY(-12px); color: var(--accent-1); }
}

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

.preloader-progress {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 2px;
  width: 0%;
  animation: preloaderFill 2s var(--ease-out) forwards;
}

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

.preloader-text {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ============ CUSTOM CURSOR ============ */
.cursor {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-1);
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(99, 102, 241, 0.5);
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}

.cursor.hover .cursor-ring {
  width: 56px;
  height: 56px;
  border-color: var(--accent-2);
}

.cursor.hover .cursor-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-2);
}

/* ============ SCROLL PROGRESS ============ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 9000;
  background: transparent;
}

.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ============ PARTICLES ============ */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ============ NAVIGATION ============ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 8000;
  transition: all 0.4s var(--ease-out);
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(245, 245, 247, 0.8);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.nav-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 1rem;
  color: white;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 1px;
  transition: width 0.3s var(--ease-out);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.nav-icon-btn:hover {
  background: var(--glass-bg);
}

.nav-icon-btn .icon-sun { display: none; }
.nav-icon-btn .icon-moon { display: block; }
[data-theme="light"] .nav-icon-btn .icon-sun { display: block; }
[data-theme="light"] .nav-icon-btn .icon-moon { display: none; }

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  height: 20px;
  position: relative;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all 0.3s var(--ease-out);
  position: absolute;
}

.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 9px; }
.nav-toggle span:nth-child(3) { top: 18px; }

.nav-toggle.active span:nth-child(1) {
  top: 9px;
  transform: rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  top: 9px;
  transform: rotate(-45deg);
}

/* ============ SECTIONS ============ */
.section {
  padding: 120px 0;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 16px;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 100px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ============ HERO SECTION ============ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-height) + 40px) 0 80px;
}

.hero-bg-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-50px, 30px) scale(1.2); }
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-greeting {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.hero-name {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  font-family: var(--font-mono);
}

.typing-cursor {
  animation: blink 1s step-end infinite;
  color: var(--accent-1);
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-description {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-glass:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
}

/* Ripple */
[data-ripple] {
  position: relative;
  overflow: hidden;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: 16px;
}

.hero-stat {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  text-align: center;
  min-width: 100px;
}

.hero-stat-number {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-3d-container {
  position: relative;
  width: 300px;
  height: 300px;
  perspective: 1000px;
}

.hero-shape {
  position: absolute;
  border-radius: var(--radius-xl);
  animation: heroShapeFloat 6s ease-in-out infinite;
}

.hero-shape-1 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.2));
  top: 20px;
  left: 50px;
  animation-delay: 0s;
}

.hero-shape-2 {
  width: 160px;
  height: 160px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(99, 102, 241, 0.2));
  top: 80px;
  left: 100px;
  animation-delay: -2s;
}

.hero-shape-3 {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(6, 182, 212, 0.2));
  top: 120px;
  left: 140px;
  animation-delay: -4s;
}

@keyframes heroShapeFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(10px, -20px) rotate(5deg); }
  50% { transform: translate(-10px, -10px) rotate(-3deg); }
  75% { transform: translate(15px, 5px) rotate(2deg); }
}

.hero-glass-card {
  position: absolute;
  bottom: 20px;
  left: -20px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: heroCardFloat 4s ease-in-out infinite;
  z-index: 2;
}

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

.hero-card-icon {
  font-size: 1.8rem;
}

.hero-card-title {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
}

.hero-card-sub {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.floating-icon {
  position: absolute;
  font-size: 2rem;
  animation: floatingIcon 5s ease-in-out infinite;
}

.floating-icon-1 { top: 10%; right: 10%; animation-delay: 0s; }
.floating-icon-2 { top: 60%; right: 5%; animation-delay: -1s; }
.floating-icon-3 { top: 30%; left: 5%; animation-delay: -2s; }
.floating-icon-4 { bottom: 10%; left: 15%; animation-delay: -3s; }

@keyframes floatingIcon {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
  50% { transform: translateY(-20px) rotate(10deg); opacity: 1; }
}

/* Scroll Indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  animation: scrollIndicator 2s ease-in-out infinite;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text-tertiary);
  border-radius: 12px;
  position: relative;
}

.scroll-wheel {
  width: 3px;
  height: 8px;
  background: var(--text-tertiary);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

@keyframes scrollIndicator {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ============ ABOUT SECTION ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 64px;
  align-items: center;
}

.about-image-wrapper {
  position: relative;
  padding: 40px;
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  font-weight: 900;
  color: white;
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
}

.about-decor-line-1 {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 80px;
  height: 80px;
  border: 3px solid var(--accent-1);
  border-radius: var(--radius-lg);
  opacity: 0.3;
}

.about-decor-line-2 {
  position: absolute;
  bottom: -10px;
  left: -10px;
  width: 60px;
  height: 60px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  opacity: 0.2;
}

.about-floating-badge {
  position: absolute;
  bottom: -16px;
  right: 20px;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 2;
}

.about-content h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.about-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.8;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 28px 0;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.highlight-item:hover {
  border-color: var(--accent-1);
  background: rgba(99, 102, 241, 0.05);
  transform: translateX(4px);
}

.highlight-icon { font-size: 1.2rem; }

.about-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* ============ SKILLS SECTION ============ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.skill-card {
  padding: 28px 24px;
  border-radius: var(--radius-xl);
  text-align: center;
  cursor: default;
  transition: all 0.4s var(--ease-out);
}

.skill-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-1);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

.skill-icon-wrap {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.1);
  font-size: 1.5rem;
}

.skill-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.skill-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}

.skill-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 2px;
  width: 0%;
  transition: width 1.5s var(--ease-out);
}

.skill-card p {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* ============ PROJECTS SECTION ============ */
.projects-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}

.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 320px;
}

.search-wrapper svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
}

.project-search {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: all 0.3s ease;
}

.project-search::placeholder { color: var(--text-tertiary); }
.project-search:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
}

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

.project-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all 0.5s var(--ease-out);
}

.project-card:hover {
  transform: translateY(-10px) scale(1.01);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-1);
}

.project-card.hidden {
  display: none;
}

.project-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.project-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-link {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  background: var(--accent-gradient);
  transition: transform 0.3s ease;
}

.project-link:hover {
  transform: scale(1.05);
}

.project-info {
  padding: 24px;
}

.project-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.project-status.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.project-status.progress {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.project-status.research {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.project-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.project-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tags span {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-1);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

/* ============ TIMELINE SECTION ============ */
.timeline-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--accent-1), var(--accent-2), transparent);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 0 40px 60px;
}

.timeline-item[data-side="left"] {
  left: 0;
  text-align: right;
}

.timeline-item[data-side="right"] {
  left: 50%;
}

.timeline-dot {
  position: absolute;
  top: 5px;
  width: 16px;
  height: 16px;
  background: var(--accent-gradient);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.timeline-item[data-side="left"] .timeline-dot {
  right: -8px;
}

.timeline-item[data-side="right"] .timeline-dot {
  left: -8px;
}

.timeline-card {
  padding: 24px;
  border-radius: var(--radius-xl);
}

.timeline-date {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-1);
  background: rgba(99, 102, 241, 0.1);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.timeline-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.timeline-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============ STATS SECTION ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-card {
  padding: 40px 24px;
  border-radius: var(--radius-xl);
  text-align: center;
  transition: all 0.4s var(--ease-out);
}

.stat-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-1);
}

.stat-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

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

/* ============ CERTIFICATES SECTION ============ */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.cert-card {
  padding: 36px 28px;
  border-radius: var(--radius-xl);
  text-align: center;
  transition: all 0.4s var(--ease-out);
}

.cert-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-1);
}

.cert-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.cert-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.cert-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.7;
}

.cert-status {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-1);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ============ GALLERY SECTION ============ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.gallery-item {
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.5s var(--ease-out);
}

.gallery-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.gallery-placeholder {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  transition: transform 0.5s var(--ease-out);
}

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

.gallery-caption {
  padding: 16px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

/* ============ CONTACT SECTION ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-card {
  padding: 24px;
  border-radius: var(--radius-xl);
  margin-bottom: 16px;
  transition: all 0.4s var(--ease-out);
}

.contact-card:hover {
  transform: translateX(8px);
  border-color: var(--accent-1);
}

.contact-card-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.contact-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.contact-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.contact-link {
  font-size: 0.85rem;
  color: var(--accent-1);
  font-weight: 600;
}

.contact-link:hover {
  color: var(--accent-2);
}

.contact-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

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

/* Contact Form */
.contact-form {
  padding: 36px;
  border-radius: var(--radius-2xl);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s ease;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-tertiary);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-error {
  display: block;
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 6px;
  min-height: 18px;
}

.contact-form .btn {
  width: 100%;
  justify-content: center;
  padding: 16px;
  margin-top: 8px;
}

/* ============ FOOTER ============ */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--glass-border);
  position: relative;
  z-index: 1;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: 700;
}

.footer-brand p {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* ============ BACK TO TOP ============ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 7000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s var(--ease-out);
  color: var(--text-primary);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--accent-1);
  transform: translateY(-4px);
}

/* ============ TOAST ============ */
.toast-container {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9500;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.toast {
  padding: 14px 24px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: toastIn 0.4s var(--ease-out) forwards;
}

.toast.hiding {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(20px) scale(0.95); }
}

/* ============ NETWORK STATUS ============ */
.network-status {
  position: fixed;
  top: calc(var(--nav-height) + 16px);
  right: 24px;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 7500;
  transition: all 0.3s ease;
}

.network-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

.network-status.offline .network-dot {
  background: #ef4444;
}

/* ============ REVEAL ANIMATIONS ============ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal.revealing {
  opacity: 0.5;
  transform: translateY(20px);
}

/* Stagger children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal-stagger.revealed > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.1s; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.2s; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.3s; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.4s; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.5s; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.6s; }
.reveal-stagger.revealed > *:nth-child(7) { transition-delay: 0.7s; }
.reveal-stagger.revealed > *:nth-child(8) { transition-delay: 0.8s; }

/* ============ MAGNETIC BUTTON EFFECT ============ */
.magnetic {
  transition: transform 0.3s var(--ease-out);
}

/* ============ TILT EFFECT ============ */
[data-tilt] {
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* ============ ACCESSIBILITY ============ */
:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 12px 24px;
  background: var(--accent-gradient);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 10001;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 16px;
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  .reveal {
    opacity: 1;
    transform: none;
  }
  
  .cursor { display: none; }
  #particles { display: none; }
}

/* ============ PRINT STYLES ============ */
@media print {
  #preloader, #cursor, #scroll-progress, #particles,
  .navbar, .back-to-top, .toast-container, .network-status,
  .hero-scroll-indicator, .hero-visual { display: none !important; }
  
  body { background: white; color: black; }
  .section { padding: 20px 0; }
  .glass { background: none; border: 1px solid #ddd; backdrop-filter: none; box-shadow: none; }
}

/* ============ RESPONSIVE ============ */

/* Large Desktop */
@media (min-width: 2500px) {
  .container { max-width: 1400px; }
  html { font-size: 18px; }
}

/* Tablet & Small Desktop */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  
  .hero-content { order: 1; }
  .hero-visual { order: 0; height: 350px; }
  
  .hero-description { margin: 0 auto 32px; }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .about-image { order: -1; }
  .about-image-wrapper { max-width: 300px; margin: 0 auto; }
  
  .about-highlights { justify-content: center; }
  .about-actions { justify-content: center; }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .timeline-line { left: 20px; }
  
  .timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 56px;
    padding-right: 0;
    text-align: left !important;
  }
  
  .timeline-dot {
    left: 12px !important;
    right: auto !important;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }
  
  .section { padding: 80px 0; }
  
  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out);
  }
  
  .nav-menu.open {
    opacity: 1;
    visibility: visible;
  }
  
  .nav-link {
    font-size: 1.1rem;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero {
    padding: calc(var(--nav-height) + 24px) 0 60px;
    min-height: auto;
  }
  
  .hero-name {
    font-size: 2.2rem;
  }
  
  .hero-visual {
    height: 280px;
  }
  
  .hero-3d-container {
    width: 220px;
    height: 220px;
  }
  
  .hero-shape-1 { width: 150px; height: 150px; }
  .hero-shape-2 { width: 120px; height: 120px; }
  .hero-shape-3 { width: 90px; height: 90px; }
  
  .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .hero-stat { min-width: 80px; padding: 12px 16px; }
  
  .hero-scroll-indicator { display: none; }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .projects-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-wrapper { max-width: 100%; }
  
  .filter-buttons {
    justify-content: center;
  }
  
  .about-highlights {
    grid-template-columns: 1fr;
  }
  
  .contact-form { padding: 24px; }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .skill-card { padding: 20px 16px; }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
  
  .cursor { display: none; }
}

/* Small Mobile */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  
  .section { padding: 64px 0; }
  
  .hero-name { font-size: 1.8rem; }
  .hero-subtitle { font-size: 1rem; }
  
  .section-title { font-size: 1.7rem; }
  
  .hero-stats { flex-direction: column; align-items: center; }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-number { font-size: 2rem; }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .certificates-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-visual { height: 220px; }
  .floating-icon { font-size: 1.5rem; }
  
  .about-avatar {
    width: 150px;
    height: 150px;
    font-size: 3.5rem;
  }
  
  .about-image-wrapper { padding: 24px; }
  
  .network-status { display: none; }
}

/* Landscape phone */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: calc(var(--nav-height) + 16px) 0 32px;
  }
  
  .hero-visual { display: none; }
  
  .hero-container { grid-template-columns: 1fr; }
  
  .hero-buttons { margin-bottom: 20px; }
  .hero-stats { flex-wrap: wrap; }
  
  .section { padding: 48px 0; }
}
