/* ===== CSS RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Light mode colors - Modern professional palette */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --accent-primary: #6366f1;
  --accent-secondary: #4f46e5;
  --accent-hover: #4338ca;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.4);
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --gradient-alt: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
}

body.dark-mode {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --accent-primary: #818cf8;
  --accent-secondary: #6366f1;
  --accent-hover: #4f46e5;
  --border-color: #334155;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(129, 140, 248, 0.5);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

body.loading {
  overflow: hidden;
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 50px;
  height: 50px;
  border: 4px solid var(--bg-tertiary);
  border-top: 4px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.scroll-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--gradient);
  width: 0%;
  transition: width 0.1s ease;
  z-index: 1001;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

body.dark-mode .navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
}

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

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-decoration: none;
  transition: transform 0.3s ease;
}

.nav-logo:hover {
  transform: scale(1.1);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-link:hover {
  color: var(--accent-primary);
}

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

.theme-toggle {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.theme-toggle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--accent-primary);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  z-index: -1;
}

.theme-toggle:hover::before {
  width: 200px;
  height: 200px;
}

.theme-toggle:hover {
  transform: scale(1.05) rotate(15deg);
  border-color: var(--accent-primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.btn-cv {
  background: var(--gradient);
  color: white;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: var(--shadow-md);
}

.btn-cv:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  gap: 0.5rem;
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 6rem;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -30%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(118, 75, 162, 0.1) 0%, transparent 70%);
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-20px, 20px) rotate(5deg); }
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.profile-pic {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid transparent;
  background: var(--gradient);
  padding: 6px;
  box-shadow: var(--shadow-glow), 0 0 0 15px rgba(99, 102, 241, 0.1);
  margin-bottom: 2rem;
  animation: fadeInScale 1s ease-out, float-gentle 6s ease-in-out infinite;
  position: relative;
  transition: all 0.3s ease;
}

.profile-pic:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow), 0 0 0 20px rgba(99, 102, 241, 0.15);
}

.profile-pic::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: var(--gradient);
  z-index: -1;
  opacity: 0.3;
  filter: blur(20px);
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.05); }
}

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease-out 0.2s both;
  line-height: 1.2;
}

.highlight {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  animation: underlineExpand 1s ease-out 1.5s forwards;
}

@keyframes underlineExpand {
  to { transform: scaleX(1); }
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  animation: fadeInUp 1s ease-out 0.4s both;
  min-height: 2rem;
}

.typing-text {
  border-right: 2px solid var(--accent-primary);
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%, 50% { border-color: var(--accent-primary); }
  51%, 100% { border-color: transparent; }
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-tertiary);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.6s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.8s both;
}

.btn {
  padding: 0.875rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

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

.btn-secondary {
  background: transparent;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
  position: relative;
  z-index: 1;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  border-radius: 50px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-secondary:hover::before {
  opacity: 1;
}

.btn-secondary:hover {
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  animation: fadeInUp 1s ease-out 1s both;
}

.social-links a {
  color: var(--text-secondary);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  position: relative;
  overflow: hidden;
}

.social-links a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-links a svg {
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.social-links a:hover::before {
  opacity: 1;
}

.social-links a:hover {
  transform: translateY(-5px) rotate(360deg);
  box-shadow: var(--shadow-glow);
}

.social-links a:hover svg {
  color: white;
}

/* ===== SECTIONS ===== */
.section {
  padding: 6rem 2rem;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
  position: relative;
  background: var(--bg-primary);
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-alt {
  background: var(--bg-secondary);
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
  animation: expand-line 3s ease-in-out infinite;
}

@keyframes expand-line {
  0%, 100% { width: 60px; }
  50% { width: 100px; }
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* ===== ABOUT SECTION ===== */
.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
}

.education-highlight {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border-radius: 12px;
  border-left: 4px solid var(--accent-primary);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.education-highlight::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--gradient);
  transition: height 0.3s ease;
}

.education-highlight:hover::before {
  height: 100%;
}

.education-highlight:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.education-highlight h3 {
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
}

.education-highlight p {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-size: 1rem;
}

.education-highlight .year {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  font-style: italic;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-card {
  background: var(--bg-tertiary);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateX(30px);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.stat-card:hover::before {
  transform: scaleX(1);
}

.stat-card.visible {
  opacity: 1;
  transform: translateX(0);
}

.stat-card:hover {
  transform: translateY(-5px) translateX(0) scale(1.05);
  box-shadow: var(--shadow-glow);
  background: var(--gradient);
}

.stat-card:hover h3,
.stat-card:hover p {
  color: white;
}

.stat-card h3 {
  font-size: 2.5rem;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.stat-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

/* ===== SKILLS SECTION ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
  border: 2px solid transparent;
}

.skill-category.visible {
  opacity: 1;
  transform: translateY(0);
}

.skill-category:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-glow);
  border: 2px solid var(--accent-primary);
}

.skill-category h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category h3::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--gradient);
  border-radius: 2px;
}

.skill-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 8px;
}

.skill-item:hover {
  background: var(--bg-secondary);
  transform: translateX(5px);
}

.skill-name {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.skill-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--gradient);
  border-radius: 10px;
  width: 0;
  transition: width 1.5s ease-out;
  position: relative;
  overflow: hidden;
}

.skill-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes fillBar {
  from { width: 0; }
  to { width: var(--width); }
}

/* ===== PROJECTS SECTION ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-primary);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  opacity: 0;
  transform: translateY(30px);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.05), transparent);
  transition: left 0.5s ease;
}

.project-card:hover::before {
  left: 100%;
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.project-card.featured {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  border: 2px solid var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.project-card.featured:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
}

.project-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gradient);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.project-header {
  margin-bottom: 1rem;
}

.project-header h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.tag:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateY(-2px);
  border-color: var(--accent-primary);
}

.project-description {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.project-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-features span {
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

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

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.project-link:hover {
  color: var(--accent-hover);
  gap: 0.75rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ===== CONTACT SECTION ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.contact-card {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.contact-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-glow);
  border-color: var(--accent-primary);
  background: var(--gradient);
}

.contact-card:hover .contact-icon {
  transform: scale(1.2) rotate(5deg);
}

.contact-card:hover h3,
.contact-card:hover p {
  color: white;
}

.contact-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.contact-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.contact-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: var(--gradient);
  border-radius: 2px;
}

.footer p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.footer-subtitle {
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
}

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

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.back-to-top:active {
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .nav-menu {
    gap: 0.8rem;
    font-size: 0.85rem;
  }

  .nav-link {
    padding: 0.5rem;
  }

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

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

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about-stats {
    flex-direction: row;
    justify-content: space-between;
  }

  .stat-card {
    flex: 1;
  }

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

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

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

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

  .nav-container {
    padding: 1rem;
  }

  .section {
    padding: 4rem 1rem;
  }

  .project-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .profile-pic {
    width: 160px;
    height: 160px;
  }

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

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

  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .nav-link {
    font-size: 0.8rem;
  }

  .btn-cv {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
  }

  .theme-toggle {
    padding: 0.4rem 0.8rem;
    font-size: 1rem;
  }

  .about-stats {
    flex-direction: column;
  }

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

  .hero-description {
    font-size: 1rem;
  }
}
