/**
 * Modern Portfolio Website - Clean Optimized Styles
 * Author: Eugine Gomez
 * Description: Modern CSS with best practices, performance optimization, and accessibility
 */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Modern Color Palette */
  --primary-50: #fff7ed;
  --primary-100: #ffedd5;
  --primary-200: #fed7aa;
  --primary-300: #fdba74;
  --primary-400: #fb923c;
  --primary-500: #f97316;
  --primary-600: #ea580c;
  --primary-700: #c2410c;
  --primary-800: #9a3412;
  --primary-900: #7c2d12;
  
  --accent-50: #ecfeff;
  --accent-100: #cffafe;
  --accent-200: #a5f3fc;
  --accent-300: #67e8f9;
  --accent-400: #22d3ee;
  --accent-500: #06b6d4;
  --accent-600: #0891b2;
  --accent-700: #0e7490;
  --accent-800: #155e75;
  --accent-900: #164e63;
  
  /* Semantic Colors */
  --primary-color: var(--accent-600);
  --primary-light: var(--primary-400);
  --primary-dark: var(--primary-700);
  --accent-color: var(--accent-400);
  --accent-light: var(--accent-300);
  --accent-dark: var(--accent-600);
  
  /* Background & Text */
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #141414;
  --bg-card: rgba(20, 20, 20, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.05);
  
  --text-primary: #ffffff;
  --text-secondary: #e5e5e5;
  --text-muted: #a3a3a3;
  --text-subtle: #737373;
  
  --border-primary: rgba(255, 255, 255, 0.1);
  --border-secondary: rgba(255, 255, 255, 0.05);
  --border-accent: rgba(34, 211, 238, 0.3);
  
  /* Typography Scale */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-secondary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: 3rem;      /* 48px */
  --text-6xl: 3.75rem;   /* 60px */
  --text-7xl: 4.5rem;    /* 72px */
  
  /* Spacing Scale (8px base) */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */
  --space-32: 8rem;     /* 128px */
  
  /* Border Radius */
  --radius-xs: 0.125rem;  /* 2px */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.375rem;  /* 6px */
  --radius-lg: 0.5rem;    /* 8px */
  --radius-xl: 0.75rem;   /* 12px */
  --radius-2xl: 1rem;     /* 16px */
  --radius-3xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;
  
  /* Layout */
  --container-xs: 475px;
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1536px;
  --container-max: 1200px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-primary: 0 10px 25px -5px rgb(249 115 22 / 0.4);
  --shadow-accent: 0 10px 25px -5px rgb(34 211 238 / 0.4);
  
  /* Z-index Scale */
  --z-hide: -1;
  --z-auto: auto;
  --z-0: 0;
  --z-10: 10;
  --z-20: 20;
  --z-30: 30;
  --z-40: 40;
  --z-50: 50;
  --z-modal: 1000;
  --z-popover: 1010;
  --z-tooltip: 1020;
  --z-toast: 1030;
}

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

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-family: var(--font-primary);
  font-feature-settings: normal;
  font-variation-settings: normal;
  scroll-behavior: smooth;
}

body {
  line-height: inherit;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}
.hide{
  display: none;
}
/* ===== ANIMATED BACKGROUND ELEMENTS ===== */
.bg-elements {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-hide);
  pointer-events: none;
  overflow: hidden;
}

/* Geometric grid pattern */
.bg-grid {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  mask: radial-gradient(ellipse 80% 50% at 50% 0%, black, transparent);
  -webkit-mask: radial-gradient(ellipse 80% 50% at 50% 0%, black, transparent);
}

/* Floating particles */
.bg-particles {
  position: absolute;
  width: 100%;
  height: 100%;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: particleFloat 15s linear infinite;
  opacity: 0.6;
}

.particle:nth-child(odd) {
  background: var(--accent-color);
  animation-duration: 20s;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-delay: 6s; }
.particle:nth-child(5) { left: 50%; animation-delay: 8s; }
.particle:nth-child(6) { left: 60%; animation-delay: 10s; }
.particle:nth-child(7) { left: 70%; animation-delay: 12s; }
.particle:nth-child(8) { left: 80%; animation-delay: 14s; }
.particle:nth-child(9) { left: 90%; animation-delay: 16s; }

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100px) translateX(20px);
    opacity: 0;
  }
}

/* Spacing and Margins */

.mb-3{
  margin-bottom: var(--space-6);
}

/* Animated lines */
.bg-lines {
  position: absolute;
  width: 100%;
  height: 100%;
}

.animated-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  opacity: 0.3;
  animation: lineMove 8s ease-in-out infinite;
}

.animated-line:nth-child(1) {
  top: 20%;
  width: 200px;
  animation-delay: 0s;
}

.animated-line:nth-child(2) {
  top: 40%;
  width: 150px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  animation-delay: 2s;
}

.animated-line:nth-child(3) {
  top: 60%;
  width: 300px;
  animation-delay: 4s;
}

.animated-line:nth-child(4) {
  top: 80%;
  width: 100px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
  animation-delay: 6s;
}

@keyframes lineMove {
  0%, 100% {
    left: -200px;
    opacity: 0;
  }
  50% {
    left: calc(100% + 200px);
    opacity: 0.3;
  }
}

/* Section-specific background effects */
.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse 50% 80% at 50% 20%, rgba(249, 115, 22, 0.1), transparent);
  pointer-events: none;
  z-index: -1;
}

.about {
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(34, 211, 238, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  border-radius: var(--radius-3xl);
}

.about .container {
  position: relative;
  z-index: 1;
}

.services {
  position: relative;
}

.services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(135deg, rgba(249, 115, 22, 0.02) 0%, transparent 50%),
    linear-gradient(-45deg, rgba(34, 211, 238, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.services .container {
  position: relative;
  z-index: 1;
}

.portfolio {
  position: relative;
}

.portfolio::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 60% 40% at 30% 70%, rgba(34, 211, 238, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.portfolio .container {
  position: relative;
  z-index: 1;
}

.experience ,
.case-study{
  position: relative;
}

.experience::before ,
.case-study::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(45deg, rgba(249, 115, 22, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 70% 30%, rgba(34, 211, 238, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.experience .container, 
.case-study .container{
  position: relative;
  z-index: 1;
}

.contact {
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(249, 115, 22, 0.1), transparent);
  pointer-events: none;
  z-index: 0;
}

.contact .container {
  position: relative;
  z-index: 1;
}

/* Noise texture overlay */
.bg-noise {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Card hover glow effects */
.service-card,
.portfolio-item,
.contact-card,
.info-card,
.timeline-content {
  position: relative;
}

.service-card::before,
.portfolio-item::before,
.contact-card::before,
.info-card::before,
.timeline-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(34, 211, 238, 0.1));
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  z-index: -1;
}

.service-card:hover::before,
.portfolio-item:hover::before,
.contact-card:hover::before,
.info-card:hover::before,
.timeline-content:hover::before {
  opacity: 1;
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -40px;
  left: var(--space-6);
  background: var(--primary-color);
  color: white;
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  border-radius: var(--radius-md);
  z-index: var(--z-toast);
  font-weight: 600;
  transition: var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--bg-secondary);
  z-index: var(--z-50);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  width: 0%;
  transition: width var(--transition-fast);
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 640px) {
  .container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-6xl)); }
h2 { font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl), 3vw, var(--text-2xl)); }
h4 { font-size: var(--text-lg); font-weight: 600; }
h5 { font-size: var(--text-base); font-weight: 600; }
h6 { font-size: var(--text-sm); font-weight: 600; }

p {
  line-height: 1.7;
  color: var(--text-secondary);
}

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-color); }
.text-center { text-align: center; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-base);
  min-height: 44px;
  white-space: nowrap;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button variants */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
  color: white;
  border-color: var(--accent-500);
  box-shadow: var(--shadow-sm);
}

.btn-accent:hover {
  background: linear-gradient(135deg, var(--accent-600), var(--accent-700));
  border-color: var(--accent-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}

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

.btn-outline:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Button sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  min-height: 36px;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  min-height: 52px;
}

.btn-full {
  width: 100%;
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-40);
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-secondary);
  transition: var(--transition-base);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
  position: relative;
}

/* Center the navigation */
.nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* Header actions container for resume button and mobile toggle */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Resume download button */
.btn-resume {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
  border: 1px solid transparent;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.2);
}

.btn-resume:hover {
  background: linear-gradient(135deg, var(--accent-600), var(--accent-700));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
  color: white;
}

.btn-resume:active {
  transform: translateY(0);
}

.btn-resume svg {
  flex-shrink: 0;
}

.logo {
  font-family: var(--font-secondary);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-base);
}

.logo:hover {
  color: var(--primary-color);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: var(--transition-base);
  padding: var(--space-2) 0;
}

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

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

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

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001; /* Higher than modal */
}

.hamburger {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 3px;
  transition: var(--transition-base);
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 3px;
  transition: var(--transition-base);
}

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

.mobile-menu-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

/* ===== SIDE NAVIGATION ===== */
.side-nav {
  position: fixed;
  right: var(--space-6);
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-30);
}

.side-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
}

.side-nav-link {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  border: 2px solid var(--border-primary);
  transition: var(--transition-base);
  position: relative;
}

.side-nav-link.active,
.side-nav-link:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: scale(1.2);
}

.tooltip {
  position: absolute;
  right: calc(100% + var(--space-3));
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-base);
  border: 1px solid var(--border-primary);
}

.side-nav-link:hover .tooltip {
  opacity: 1;
}

/* ===== SECTIONS ===== */
section {
  padding: var(--space-16) 0;
}

.section-header {
  text-align: center;
}

.section-label {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-4);
}

.section-title {
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-description {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.7;
  margin-bottom: var(--space-8);
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: var(--space-16);
  width: 100%;
}

.hero-text {
  flex: 1;
  max-width: 50%;
}

.hero-image {
  flex: 1;
  max-width: 50%;
  display: flex;
  justify-content: center;
}

.hero-greeting {
  display: block;
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.hero-title {
  margin-bottom: var(--space-6);
}

.hero-title .name {
  display: block;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title .role {
  display: block;
  /* background: linear-gradient(135deg, var(--primary-color), var(--accent-color)); */
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 0.4em;
  margin-top: var(--space-2);
  min-height: 1.2em; /* Prevent layout shift */
  line-height: 1.2;
}

.hero-description {
  font-size: var(--text-lg);
  line-height: 1.7;
  margin-bottom: var(--space-8);
  color: var(--text-secondary);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: var(--space-1);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.image-wrapper {
  position: relative;
  border-radius: var(--radius-3xl);
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
}

.image-wrapper img {
  width: 100%;
  max-width: 500px;
  height: auto;
  transition: var(--transition-slow);
}

.image-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.image-wrapper:hover img {
  transform: scale(1.05);
}

/* ===== ABOUT SECTION ===== */
.about {
  border-radius: var(--radius-3xl);
  margin: var(--space-8) 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-6);
  align-items: start;
}

.info-card {
  height: 100%!important;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: var(--space-20);
  
}

.info-header {
  /* display: flex; */
  /* align-items: center; */
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.profile-badge {
  text-align: center;
  position: relative;
}
.profile-details{
  text-align: center;
}
.profile-image {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  object-fit: cover;
  /* border: 3px solid var(--primary-color); */
}

.status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  background: #10b981;
  border: 3px solid var(--bg-secondary);
  border-radius: var(--radius-full);
}

.profile-details h3 {
  color: var(--text-primary);
  /* margin-bottom: var(--space-2); */
}

.profile-role {
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: var(--space-3);
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.skills-preview {
  margin-bottom: var(--space-8);
}

.skills-preview h4 {
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.skill-tag {
  /* background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)); */
  background: var(--accent-900);
  color: white;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
}

.quick-facts {
  display: grid;
  gap: var(--space-4);
}

.fact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-secondary);
}

.fact:last-child {
  border-bottom: none;
}

.fact-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.fact-value {
  font-weight: 600;
  color: var(--primary-color);
}

/* Tab Navigation */
.detail-tabs {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--border-secondary);
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  padding: var(--space-3) 0;
  position: relative;
  transition: var(--transition-base);
}

.tab-btn.active {
  color: var(--primary-color);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-color);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-content h4 {
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.tab-content p {
  margin-bottom: var(--space-4);
}

.feature-list {
  list-style: none;
  margin-top: var(--space-6);
}

.feature-list li {
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
}

/* Skills Grid */
.skills-grid {
  display: grid;
  gap: var(--space-8);
}

.skill-category h5 {
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  font-size: var(--text-base);
}

.skill-items {
  display: grid;
  gap: var(--space-4);
}

.skill-item {
  display: flex;
  align-items: center;
  /* justify-content: space-between; */
  flex-wrap: wrap;
  gap: var(--space-4);
}

.skill-name {


  font-size: var(--text-sm);
  color: var(--text-secondary);
  /* min-width: 100px; */

  background: var(--bg-tertiary);
  color: var(--text-muted);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
}

.skill-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: var(--radius-full);
  transition: width 1s ease-out;
}

/* Certifications */
.cert-list {
  display: grid;
  gap: var(--space-6);
}

.cert-item {
  /* display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-4); */
  padding: var(--space-6);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-primary);
  transition: all var(--transition-base);
  position: relative;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cert-item:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.15);
}

.cert-icon {
  flex-shrink: 0;
  /* width: 200px; */
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cert-thumbnail {
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.cert-details {
  flex: 1;
  min-width: 0;
}

.cert-details h5 {
  color: var(--text-primary);
  margin: 0 0 var(--space-2) 0;
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.cert-details p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0 0 var(--space-2) 0;
}
.cert-details p a,
.cert-details p strong{
  color: var(--primary-color);
}
.cert-details p a:hover{
  color: var(--text-primary);
}
.cert-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.cert-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-base);
  border: 1px solid transparent;
  cursor: pointer;
  background: none;
}

.cert-view-btn {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-color: var(--border-primary);
}

.cert-view-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.cert-link-btn {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.cert-link-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

.cert-btn svg {
  flex-shrink: 0;
}

/* ===== SERVICES SECTION ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  text-align: center;
  transition: var(--transition-base);
  position: relative;
  backdrop-filter: blur(10px);
}

.service-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: var(--shadow-primary);
}

.service-icon {
  margin-bottom: var(--space-6);
  color: var(--primary-color);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-6) auto;
}

.service-icon-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  transition: var(--transition-base);
}

.service-card:hover .service-icon-img {
  transform: scale(1.1);
}

.service-card h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.service-card p {
  margin-bottom: var(--space-6);
}

.service-features {
  list-style: none;
  text-align: left;
}

.service-features li {
  position: relative;
  padding-left: var(--space-6);
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
}

.service-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: 600;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-primary);
  color: var(--text-secondary);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-base);
  font-weight: 500;
}

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

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-16);
}

.portfolio-item {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: var(--transition-base);
  backdrop-filter: blur(10px);
}

.portfolio-item:hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: var(--shadow-primary);
}

.portfolio-item.featured {
  border-color: var(--primary-color);
}

.portfolio-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

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

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-base);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.05);
}

.portfolio-actions {
  display: flex;
  gap: var(--space-3);
}

.portfolio-content {
  padding: var(--space-6);
}

.portfolio-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}

.portfolio-category {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  
}

.portfolio-featured {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
}

.portfolio-content h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.portfolio-content p {
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tag {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
}

.portfolio-cta {
  text-align: center;
  padding: var(--space-12);
}

.portfolio-cta p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

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

/* .timeline::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
} */

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: var(--space-12);
}

.timeline-marker {
  position: absolute;
  left: 22px;
  top: var(--space-2);
  width: 18px;
  height: 18px;
  background: var(--primary-color);
  border: 4px solid var(--bg-primary);
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 4px var(--primary-color);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  backdrop-filter: blur(10px);
}

.timeline-content ul{
  padding-left:  var(--space-6);
  margin-bottom: var(--space-6);
}
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
  gap: var(--space-2);
}

.timeline-header h3 {
  color: var(--text-primary);
  margin: 0;
}

.timeline-period {
  background: var(--primary-color);
  color: white;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
}

.timeline-company {
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: var(--space-4);
}

.timeline-content p {
  margin-bottom: var(--space-4);
}

.timeline-skills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.skill-pill {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
}

/* ===== Company Brand ===== */

.timeline-item.codebility .timeline-content::before{
  background: linear-gradient(135deg, rgb(193, 8, 255), rgb(17, 139, 127));
}
.timeline-item.oceanstudio360 .timeline-content::before{
  background: linear-gradient(135deg, rgb(0, 106, 255), rgb(252, 95, 56));
}
.timeline-item.brandrep .timeline-content::before{
  background: linear-gradient(135deg, rgb(66, 135, 245), rgb(255, 255, 255));
}
.timeline-item.born .timeline-content::before{
  background: linear-gradient(135deg, rgb(15, 20, 26), rgb(237, 187, 59));
}
/* ===== CONTACT SECTION ===== */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-8);
  align-items: start;
}

.contact-info {
  display: grid;
  gap: var(--space-6);
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: var(--transition-base);
  backdrop-filter: blur(10px);
}

.contact-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

.contact-icon {
  margin-bottom: var(--space-4);
  color: var(--primary-color);
}
.contact-details{
  margin-bottom: var(--space-4);
}

.contact-details h4 {
  color: var(--text-primary);
  /* margin-bottom: var(--space-2); */
}

.contact-details p {
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.contact-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-base);
  margin-bottom: var(--space-3);
}

.contact-link:hover {
  color: var(--primary-light);
}

/* Contact Form */
.contact-form-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  backdrop-filter: blur(10px);
  height: 100%;
}

.contact-form {
  display: grid;
  gap: var(--space-6);
}

.form-group {
  display: grid;
  gap: var(--space-2);
}

.form-group label {
  color: var(--text-primary);
  font-weight: 500;
  font-size: var(--text-sm);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: var(--transition-base);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-secondary);
  margin-top: var(--space-32);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-16);
  align-items: start;
  padding: var(--space-16) 0;
}
.footer-info{
  max-width: 400px;
  /* padding-right: var(--space-24); */
}
.footer-info h3 {
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.footer-info p {
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.social-links {
  display: flex;
  gap: var(--space-4);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-glass);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  transition: var(--transition-base);
}

.social-links a:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.footer-links {
  display: flex;
  gap: var(--space-12);
}

.footer-column h4 {
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  font-size: var(--text-base);
}

.footer-column ul {
  list-style: none;
  display: grid;
  gap: var(--space-2);
}

.footer-column a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-base);
}

.footer-column a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border-secondary);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin: 0;
}

.footer-legal {
  display: flex;
  gap: var(--space-6);
}

.footer-legal a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: var(--transition-base);
}

.footer-legal a:hover {
  color: var(--text-primary);
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  border: none;
  border-radius: var(--radius-full);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition-base);
  z-index: var(--z-30);
}

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

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

/* ===== MODALS ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-4);
  backdrop-filter: blur(10px);
}

.modal.show {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 40px;
  height: 40px;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  z-index: 2;
  transition: var(--transition-base);
}

.modal-close:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.modal-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-xl);
}

.modal-body {
  padding: var(--space-8);
}

.modal-body h2 {
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.modal-body p {
  margin-bottom: var(--space-6);
}

/* Certificate Modal Specific Styles */
.cert-modal-content {
  max-width: 1000px;
  width: 90vw;
}

.cert-modal-body {
  padding: var(--space-6);
  text-align: center;
}

.cert-modal-title {
  color: var(--text-primary);
  margin-bottom: var(--space-6);
  font-size: var(--text-2xl);
  font-weight: 600;
}

.cert-modal-image-wrapper {
  margin-bottom: var(--space-6);
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.cert-modal-image {
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.cert-modal-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
}

.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.comparison-item {
  text-align: center;
}

.comparison-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
}

.comparison-label {
  font-weight: 600;
  color: var(--text-primary);
}

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

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

.animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }
  
  .info-card {
    position: static;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }
  
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: var(--space-12);
  }
  
  .hero-text {
    order: 2;
    max-width: 100%;
  }
  
  .hero-image {
    order: 1;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  /* Reset nav position on mobile */
  .nav {
    position: static;
    transform: none;
  }
  
  /* Hide desktop navigation */
  .nav-list {
    display: none;
  }
  
  /* Show mobile menu toggle */
  .mobile-menu-toggle {
    display: flex;
    z-index: 1001; /* Higher than modal */
  }
  
  /* Resume button mobile styles */
  .btn-resume {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    gap: var(--space-1);
  }
  
  .btn-resume svg {
    width: 14px;
    height: 14px;
  }
  .btn-resume p {
    display: none; 
  }
  
  /* Mobile navigation overlay - FIXED Z-INDEX */
  .nav.active {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000; /* Higher than everything */
    animation: fadeIn 0.3s ease;
  }
  
  .nav.active .nav-list {
    margin-top:400px;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    text-align: center;
    background: black;
    padding: var(--space-12) var(--space-8);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-2xl);
    backdrop-filter: blur(10px);
    width: 90%;
    position: relative;
    z-index: 1001;
  }
  
  .nav.active .nav-link {
    font-size: var(--text-lg);
    color: var(--text-primary);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    border: 1px solid transparent;
    display: block;
    width: 100%;
  }
  
  .nav.active .nav-link:hover,
  .nav.active .nav-link:focus {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
      backdrop-filter: blur(0px);
    }
    to {
      opacity: 1;
      backdrop-filter: blur(20px);
    }
  }

  /* Adjust side navigation for mobile */
  .side-nav {
    right: var(--space-4);
    top: 40%;
  }
  
  .side-nav ul {
    gap: var(--space-2);
  }
  
  .side-nav-link {
    width: 10px;
    height: 10px;
  }
  
  .tooltip {
    font-size: 10px;
    padding: var(--space-1) var(--space-2);
  }
  
  /* Hero section mobile */
  .hero-description {
    font-size: var(--text-base); /* Make description smaller on mobile */
  }
  
  .hero-stats {
    grid-template-columns: repeat(3, 1fr); /* Keep stats horizontal */
    gap: var(--space-3);
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: stretch; /* Make buttons full width */
    gap: var(--space-3);
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%; /* Full width buttons */
  }
}

@media (max-width: 640px) {
  :root {
    --space-4: 0.75rem;
    --space-6: 1rem;
    --space-8: 1.25rem;
    --space-12: 1.5rem;
    --space-16: 2rem;
    --space-20: 2.5rem;
  }
  
  /* Container mobile */
  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
  
  /* Sections mobile */
 
  
  /* Typography mobile */
  .section-title {
    font-size: var(--text-2xl);
  }
  
  .section-description {
    font-size: var(--text-base);
    margin-bottom: var(--space-8);
  }
  
  /* Portfolio grid mobile */
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .portfolio-filters {
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  
  .filter-btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
  }
  
  /* About section mobile */
  .detail-tabs {
    flex-wrap: wrap;
    gap: var(--space-2);
  }
  
  .tab-btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
  }
  
  /* Contact cards mobile */
  .contact-info {
    gap: var(--space-4);
  }
  
  .contact-card {
    padding: var(--space-12);
  }
  
  /* Hide side navigation on very small screens */
  .side-nav {
    display: none;
  }
  
  /* Back to top mobile */
  .back-to-top {
    width: 40px;
    height: 40px;
    bottom: var(--space-4);
    right: var(--space-4);
  }
  
  /* Image wrapper mobile */
  .image-wrapper img {
   width: 300px;
    height: 300px;
  }
  
  /* Form mobile */
  .contact-form-wrapper {
    padding: var(--space-6);
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: var(--space-3);
  }
  
  /* Timeline mobile adjustments */
  .timeline-content {
    padding: var(--space-6);
  }
  
  .timeline-header {
    flex-direction: column;
    align-items: start;
    gap: var(--space-2);
  }
  
  .timeline-period {
    align-self: flex-start;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .hero-description {
    font-size: var(--text-sm);
    line-height: 1.6;
  }
  
  .hero-stats {
    grid-template-columns: repeat(3, 1fr); /* Still horizontal on extra small screens */
    gap: var(--space-1);
  }

  .image-wrapper img {
    width: 300px;
    height: 300px;
  }
  
  .modal-content {
    margin: var(--space-2);
    max-width: calc(100% - var(--space-4));
  }
  
  .portfolio-tags {
    gap: var(--space-1);
  }
  
  .tag {
    padding: 2px var(--space-2);
    font-size: 10px;
  }
}

/* Fix for body overflow when mobile menu is open */
body.nav-open {
  overflow: hidden;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .gradient-orb,
  .particle,
  .animated-line {
    animation: none;
  }
  
  .bg-gradient-orbs,
  .bg-particles,
  .bg-lines {
    display: none;
  }
}

@media (prefers-contrast: high) {
  :root {
    --border-primary: rgba(255, 255, 255, 0.3);
    --border-secondary: rgba(255, 255, 255, 0.2);
  }
}

/* Focus styles for better accessibility */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  .header,
  .side-nav,
  .back-to-top,
  .modal {
    display: none !important;
  }
  
  section {
    break-inside: avoid;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gradient-orb,
  .particle,
  .animated-line {
    animation: none;
  }
  
  .bg-gradient-orbs,
  .bg-particles,
  .bg-lines {
    display: none;
  }
}

@media (prefers-contrast: high) {
  :root {
    --border-primary: rgba(255, 255, 255, 0.3);
    --border-secondary: rgba(255, 255, 255, 0.2);
  }
}

/* Focus styles for better accessibility */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  .header,
  .side-nav,
  .back-to-top,
  .modal {
    display: none !important;
  }
  
  section {
    break-inside: avoid;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
  }
}
