/* ================================
   CSS VARIABLES & ROOT STYLES
================================ */
:root {
  /* Light Mode Colors */
  --bg-primary: #f8f9fd;
  --bg-secondary: #ffffff;
  --bg-tertiary: #eef2ff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;

  /* Accent Colors */
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-tertiary: #ec4899;
  --accent-gradient: linear-gradient(
    135deg,
    #6366f1 0%,
    #8b5cf6 50%,
    #ec4899 100%
  );

  /* Semantic Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Effects */
  --shadow-sm: 0 2px 8px rgba(99, 102, 241, 0.08);
  --shadow-md: 0 4px 16px rgba(99, 102, 241, 0.12);
  --shadow-lg: 0 8px 32px rgba(99, 102, 241, 0.16);
  --shadow-xl: 0 16px 48px rgba(99, 102, 241, 0.24);
  --glow: 0 0 20px rgba(99, 102, 241, 0.4);

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  /* Typography */
  --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Orbitron', monospace;
  --font-arabic: 'Tajawal', sans-serif;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Dark Mode Variables */
[data-theme='dark'] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  --glow: 0 0 30px rgba(99, 102, 241, 0.6);
}

/* Arabic RTL Support */
[dir='rtl'] {
  font-family: var(--font-arabic);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  position: relative;
  transition:
    background 0.4s ease,
    color 0.4s ease;
  overflow-x: hidden;
}

/* ================================
   LOADING SCREEN
================================ */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

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

.loading-content {
  text-align: center;
}

.loading-logo {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
}

.logo-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
}

.logo-ring:nth-child(2) {
  border-top-color: var(--accent-secondary);
  animation-delay: 0.2s;
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
}

.logo-ring:nth-child(3) {
  border-top-color: var(--accent-tertiary);
  animation-delay: 0.4s;
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.logo-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: pulse 2s ease-in-out infinite;
}

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

.loading-percentage {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.loading-message {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.loading-bar {
  width: 300px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto;
}

.loading-progress {
  height: 100%;
  background: var(--accent-gradient);
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* ================================
   BACKGROUND EFFECTS
================================ */
.bg-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

#particles-canvas {
  width: 100%;
  height: 100%;
  opacity: 0.4;
}

.geometric-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ================================
   NAVIGATION
================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--transition-base);
}

[data-theme='dark'] .navbar {
  background: rgba(15, 23, 42, 0.8);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.brand-icon {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.8rem;
}

.nav-links-container {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1rem;
  transition: all var(--transition-base);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: width var(--transition-base);
}

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

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

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

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

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

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-secondary);
  border: 2px solid rgba(99, 102, 241, 0.2);
  border-radius: 50px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

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

.toggle-track {
  width: 60px;
  height: 30px;
  position: relative;
}

.toggle-thumb {
  position: absolute;
  width: 26px;
  height: 26px;
  background: var(--accent-gradient);
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform var(--transition-bounce);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

[data-theme='dark'] .toggle-thumb {
  transform: translateX(30px);
}

@media (max-width: 992px) {
  .md-only {
    display: none !important;
  }
}

.sun-icon,
.moon-icon {
  position: absolute;
  font-size: 0.9rem;
  color: white;
  transition: opacity var(--transition-base);
}

.moon-icon {
  opacity: 0;
}
[data-theme='dark'] .sun-icon {
  opacity: 0;
}
[data-theme='dark'] .moon-icon {
  opacity: 1;
}

/* Language Toggle */
.lang-toggle {
  background: var(--bg-secondary);
  border: 2px solid rgba(99, 102, 241, 0.2);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-weight: 600;
  transition: all var(--transition-base);
}

.lang-toggle:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--glow);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  position: relative;
  transition: all var(--transition-base);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--text-primary);
  transition: all var(--transition-base);
}

.hamburger::before {
  top: -8px;
}
.hamburger::after {
  top: 8px;
}

.mobile-menu-toggle.active .hamburger {
  background: transparent;
}
.mobile-menu-toggle.active .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}
.mobile-menu-toggle.active .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 400px;
  height: 100vh;
  background: var(--bg-secondary);
  z-index: 999;
  padding: 6rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  transition: right var(--transition-slow);
  box-shadow: var(--shadow-xl);
}

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

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  transition: color var(--transition-base);
}

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

.mobile-menu-controls {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-control-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}

.theme-toggle-mobile,
.lang-toggle-mobile {
  background: var(--bg-tertiary);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
}

/* ================================
   SECTIONS BASE
================================ */
.section {
  min-height: 100vh;
  padding: 8rem 5% 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  max-width: 800px;
}

.section-number {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

/* ================================
   HERO SECTION
================================ */
.hero-section {
  justify-content: center;
  padding-top: 0;
  margin-top: 100px;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 5rem;
  max-width: 1400px;
  width: 100%;
}

.hero-image {
  flex: 0 0 400px;
}

.image-wrapper {
  position: relative;
  width: 400px;
  height: 400px;
  animation: float 6s ease-in-out infinite;
}

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

.image-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: var(--accent-gradient);
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
  animation: glow-pulse 3s ease-in-out infinite;
}

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

.profile-img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--bg-primary);
  box-shadow: var(--shadow-xl);
  z-index: 1;
}

.image-border {
  position: absolute;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  border: 3px solid transparent;
  border-radius: 50%;
  background: var(--accent-gradient);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 3px;
  animation: rotate 10s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.hero-text {
  flex: 1;
}

.hero-greeting {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wave {
  display: inline-block;
  animation: wave 2.5s ease-in-out infinite;
  transform-origin: 70% 70%;
}

@keyframes wave {
  0%,
  100% {
    transform: rotate(0deg);
  }
  10%,
  30% {
    transform: rotate(14deg);
  }
  20% {
    transform: rotate(-8deg);
  }
  40% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(10deg);
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

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

.hero-subtitle {
  font-size: 1.8rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  min-height: 2.2rem;
}

.typing-text {
  font-weight: 600;
}
.cursor {
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-tertiary);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}

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

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: var(--shadow-lg);
}

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

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

.btn-secondary:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

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

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1.3rem;
  border: 2px solid rgba(99, 102, 241, 0.2);
  transition: all var(--transition-base);
  text-decoration: none;
}

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

.scroll-indicator {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-tertiary);
  font-size: 0.9rem;
  animation: bounce 2s infinite;
}

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

.mouse {
  width: 26px;
  height: 40px;
  border: 2px solid var(--accent-primary);
  border-radius: 20px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 2s infinite;
}

@keyframes scroll {
  0% {
    opacity: 1;
    top: 8px;
  }
  100% {
    opacity: 0;
    top: 24px;
  }
}

/* ================================
   WHY ME SECTION
================================ */
.why-content {
  display: flex;
  gap: 4rem;
  align-items: center;
  max-width: 1400px;
  width: 100%;
}

.iphone-mockup {
  flex: 0 0 350px;
  perspective: 1000px;
}

.iphone-frame {
  position: relative;
  width: 350px;
  height: 700px;
  background: linear-gradient(145deg, #1e1e1e, #2a2a2a);
  border-radius: 50px;
  padding: 12px;
  box-shadow:
    0 0 0 8px #0a0a0a,
    0 20px 60px rgba(0, 0, 0, 0.5);
  transform: rotateY(-15deg) rotateX(5deg);
  transition: transform var(--transition-slow);
}

.iphone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 30px;
  background: #0a0a0a;
  border-radius: 0 0 20px 20px;
  z-index: 10;
}

.iphone-screen {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 42px;
  overflow: hidden;
  position: relative;
}

.mini-portfolio-content {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  overflow-y: auto;
  padding: 1.5rem 1rem;
}

.mini-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-avatar {
  width: 50px;
  height: 50px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: white;
}

.mini-info h4 {
  color: white;
  font-size: 1rem;
  margin: 0;
}
.mini-info p {
  color: #94a3b8;
  font-size: 0.75rem;
  margin: 0;
}

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

.stat-item {
  background: rgba(99, 102, 241, 0.1);
  padding: 0.75rem;
  border-radius: 10px;
  text-align: center;
}

.stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.65rem;
  color: #94a3b8;
}

.mini-skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.mini-skill-tags span {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 0.4rem 0.75rem;
  border-radius: 15px;
  font-size: 0.7rem;
}

.mini-project-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.mini-project-img {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.mini-project-img img {
  width: 45px;
  height: 45px;
  border-radius: 8px;
}

.mini-project-info h6 {
  color: white;
  margin: 0;
  font-size: 0.8rem;
}
.mini-project-info p {
  color: #94a3b8;
  margin: 0;
  font-size: 0.65rem;
}

.why-features {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.feature-card {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: all var(--transition-base);
}

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

.feature-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-gradient);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  margin-bottom: 1.5rem;
  box-shadow: var(--glow);
}

.feature-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ================================
   ABOUT SECTION
================================ */
.about-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  max-width: 1400px;
  width: 100%;
}

.about-main h3,
.about-experience h3 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

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

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

.skill-item {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 15px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition-base);
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
}

.skill-item::before,
.project-card::before,
.contact-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(45deg, rgba(99, 102, 241, 0.05) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(99, 102, 241, 0.05) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(99, 102, 241, 0.05) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(99, 102, 241, 0.05) 75%);
  background-size: 20px 20px;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  z-index: 0;
}

.skill-item:hover::before,
.project-card:hover::before,
.contact-badge:hover::before {
  opacity: 1;
}

.skill-item:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.skill-item i {
  font-size: 2.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.skill-level {
  height: 4px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.skill-level::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--level);
  background: var(--accent-gradient);
  border-radius: 10px;
}

.experience-timeline {
  position: relative;
  padding-left: 2rem;
}

.experience-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-gradient);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 2rem;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 0;
  width: 16px;
  height: 16px;
  background: var(--accent-primary);
  border: 4px solid var(--bg-primary);
  border-radius: 50%;
  box-shadow: var(--glow);
}

.timeline-content {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 15px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: all var(--transition-base);
}

.timeline-content:hover {
  transform: translateX(10px);
  box-shadow: var(--shadow-lg);
}

.timeline-date {
  display: inline-block;
  font-size: 0.9rem;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.3rem 0.8rem;
  border-radius: 10px;
  margin-bottom: 0.75rem;
}

/* ================================
   PROJECTS SECTION
================================ */
.projects-grid {
  max-width: 1400px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2.5rem;
}

.project-card {
  background: var(--bg-secondary);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: all var(--transition-base);
  transform-style: preserve-3d;
  position: relative;
}

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

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(99, 102, 241, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-base);
}

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

.project-link {
  width: 60px;
  height: 60px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 1.5rem;
  text-decoration: none;
  transition: all var(--transition-base);
}

.project-info {
  padding: 2rem;
}
.project-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.project-info p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.project-tags span {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
}

/* ================================
   CONTACT SECTION
================================ */
.contact-content {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

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

.contact-badge {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 15px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  text-decoration: none;
  transition: all var(--transition-base);
  transform-style: preserve-3d;
}

.contact-badge:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.badge-icon {
  width: 50px;
  height: 50px;
  background: var(--accent-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  transition: 0.3s ease-in-out;
}

.badge-info {
  flex: 1;
  min-width: 0;
}
.badge-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}
.badge-value {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-illustration {
  position: relative;
  width: 100%;
  height: 400px;
}

.floating-element {
  position: absolute;
  width: 80px;
  height: 80px;
  background: var(--accent-gradient);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  box-shadow: var(--shadow-xl);
}

.element-1 {
  top: 0;
  left: 0;
  animation: float-1 5s ease-in-out infinite;
}
.element-2 {
  top: 0;
  right: 0;
  animation: float-2 6s ease-in-out infinite;
}
.element-3 {
  bottom: 0;
  left: 0;
  animation: float-3 7s ease-in-out infinite;
}
.element-4 {
  bottom: 0;
  right: 0;
  animation: float-4 5.5s ease-in-out infinite;
}

@keyframes float-1 {
  0%,
  100% {
    transform: translate(0, 0) rotate(0);
  }
  50% {
    transform: translate(20px, -20px) rotate(180deg);
  }
}
@keyframes float-2 {
  0%,
  100% {
    transform: translate(0, 0) rotate(0);
  }
  50% {
    transform: translate(-20px, 20px) rotate(-180deg);
  }
}
@keyframes float-3 {
  0%,
  100% {
    transform: translate(0, 0) rotate(0);
  }
  50% {
    transform: translate(20px, 20px) rotate(180deg);
  }
}
@keyframes float-4 {
  0%,
  100% {
    transform: translate(0, 0) rotate(0);
  }
  50% {
    transform: translate(-20px, -20px) rotate(-180deg);
  }
}

.footer {
  margin-top: 4rem;
  text-align: center;
  padding: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  width: 100%;
}

/* ================================
   ANIMATIONS
=============================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

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

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 1024px) {
  .hero-content {
    gap: 2rem;
  }
  .hero-image {
    flex: 0 0 300px;
  }
  .image-wrapper {
    width: 300px;
    height: 300px;
  }
  .hero-title {
    font-size: 3.5rem;
  }
  .about-content {
    grid-template-columns: 1fr;
  }
  .hero-section {
    margin-top: 100px;
  }
  .scroll-indicator {
    bottom: -3rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 1rem 5%;
  }
  .nav-links-container {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  .hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta {
    justify-content: center;
  }
  .hero-social {
    justify-content: center;
  }

  .why-content {
    flex-direction: column;
  }
  .why-features {
    grid-template-columns: 1fr;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }
  .contact-illustration {
    display: none;
  }
  .contact-badges {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .section-title {
    font-size: 2rem;
  }
}

/* ================================
   EXTRA RESPONSIVE (320px)
================================ */
@media (max-width: 450px) {
  :root {
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
  }

  .navbar {
    padding: 0.75rem 3%;
  }

  .nav-brand {
    font-size: 1.2rem;
  }

  .section {
    padding: 5rem 3% 2rem;
  }

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

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

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

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

  .hero-cta {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }

  .image-wrapper {
    width: 240px;
    height: 240px;
  }

  .iphone-mockup,
  .iphone-frame {
    width: 280px;
    height: 560px;
  }

  .iphone-notch {
    width: 100px;
  }

  .mini-stats {
    gap: 0.5rem;
  }

  .stat-item {
    padding: 0.5rem;
  }

  .stat-number {
    font-size: 1rem;
  }

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

  .project-card {
    min-width: unset;
  }

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

  .contact-badge {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }

  .badge-icon {
    margin-bottom: 0.5rem;
  }

  .loading-logo {
    width: 80px;
    height: 80px;
  }

  .logo-text {
    font-size: 2rem;
  }

  .loading-bar {
    width: 200px;
  }
}
