/* ===== CSS RESET & BASE STYLES ===== */
:root {
  /* Light Theme Colors */
  --primary-color: #0066cc;
  --primary-dark: #0052a3;
  --primary-light: #4d94ff;
  --secondary-color: #1a365d;
  --secondary-dark: #0f2541;
  --accent-color: #00b894;
  --accent-dark: #00a085;
  --success-color: #38a169;
  --warning-color: #d69e2e;
  --danger-color: #e53e3e;
  --info-color: #3182ce;

  /* Neutrals */
  --text-primary: #1a1a1a;
  --text-secondary: #4a5568;
  --text-light: #718096;
  --bg-primary: #ffffff;
  --bg-secondary: #f7fafc;
  --bg-tertiary: #edf2f7;
  --bg-primary-rgb: 255, 255, 255;
  --border-color: #e2e8f0;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);

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

  /* Typography */
  --font-primary: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-secondary: "Inter", system-ui, sans-serif;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1040;
  --z-popover: 1050;
  --z-tooltip: 1060;
}

[data-theme="dark"] {
  --bg-primary-rgb: 26, 32, 44;
  --primary-color: #4d94ff;
  --primary-dark: #3385ff;
  --primary-light: #80b3ff;
  --secondary-color: #2d3748;
  --secondary-dark: #1a202c;
  --accent-color: #00d8b4;

  --text-primary: #f7fafc;
  --text-secondary: #e2e8f0;
  --text-light: #a0aec0;
  --bg-primary: #1a202c;
  --bg-secondary: #2d3748;
  --bg-tertiary: #4a5568;
  --border-color: #4a5568;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.35);
}

/* Reset & Base */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

body.loading {
  overflow: hidden;
}

/* Accessibility */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: var(--z-popover);
  border-radius: var(--radius-sm);
}

.skip-to-content:focus {
  top: 0;
}

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

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-sm);
  }
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  line-height: 1.7;
}

.highlight {
  color: var(--primary-color);
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  transition: opacity var(--transition-normal);
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

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

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto var(--space-md);
}

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

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(var(--bg-primary-rgb), 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: var(--z-fixed);
  padding: var(--space-sm) 0;
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  padding: var(--space-xs) 0;
  box-shadow: var(--shadow-md);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: translateY(-2px);
}

.logo-icon {
  font-size: 1.8rem;
}

.logo-text {
  display: flex;
  align-items: center;
  gap: 2px;
}

.logo-highlight {
  color: var(--primary-color);
  margin-left: 4px;
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--primary-color);
  background: var(--bg-tertiary);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 100%;
  height: 2px;
  background: var(--primary-color);
  border-radius: var(--radius-full);
  transition: transform var(--transition-normal);
}

.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  z-index: var(--z-fixed);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);
}

.menu-toggle:hover {
  background-color: var(--bg-tertiary);
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  position: relative;
  transition: background var(--transition-fast);
  margin: 0 auto;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  left: 0;
  transition: all var(--transition-fast);
}

.hamburger::before {
  top: -6px;
}

.hamburger::after {
  bottom: -6px;
}

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

.menu-toggle[aria-expanded="true"] .hamburger::before {
  transform: rotate(45deg) translate(4px, 4px);
}

.menu-toggle[aria-expanded="true"] .hamburger::after {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-tertiary);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-primary);
}

.theme-toggle:hover {
  background: var(--border-color);
  transform: rotate(15deg);
}

/* ===== HERO SECTION ===== */
.hero {
  padding: 120px 0 80px;
  background: linear-gradient(
    135deg,
    var(--secondary-color) 0%,
    var(--secondary-dark) 100%
  );
  color: white;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(
      circle at 20% 80%,
      rgba(77, 148, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(0, 184, 148, 0.1) 0%,
      transparent 50%
    );
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: clamp(2rem, 4vw, 4.2rem);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text {
  min-width: 0;
  animation: fadeInUp 1s ease-out;
}

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

.hero-title-line {
  display: block;
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  margin-bottom: var(--space-lg);
  color: rgba(255, 255, 255, 0.9);
  min-height: 2.5em;
}

.typing-text {
  color: var(--primary-light);
  font-weight: 500;
}

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

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.hero-desc {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-xl);
  max-width: 600px;
}

.hero-desc strong {
  color: var(--accent-color);
}

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: var(--space-xl);
  margin: var(--space-xl) 0;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Hero Buttons */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  font-size: 1rem;
  position: relative;
  overflow: hidden;
  min-height: 48px;
}

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

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

.btn-primary {
  background: var(--primary-color);
  color: white;
}

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

.btn-secondary {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
  background: white;
  color: var(--secondary-color);
  transform: translateY(-2px);
}

.btn-text {
  position: relative;
  z-index: 1;
}

.btn-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.btn.loading .btn-text {
  opacity: 0;
}

.btn.loading .btn-loader {
  display: block;
}

.email-copy-btn {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.email-copy-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

/* Hero Image */
.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-container {
  position: relative;
  animation: float 6s ease-in-out infinite;
}

.image-youssef {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid rgba(77, 148, 255, 0.3);
  box-shadow: var(--shadow-xl);
  transition: transform var(--transition-normal);
}

.image-youssef:hover {
  transform: scale(1.02);
}

.profile-placeholder {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
}

.profile-placeholder::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    transparent,
    rgba(77, 148, 255, 0.1),
    transparent 30%
  );
  animation: rotate 4s linear infinite;
}

.security-badge {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: var(--success-color);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.875rem;
  font-weight: 500;
  animation: pulse 2s infinite;
  box-shadow: var(--shadow-md);
}

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

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

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

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-down {
  color: white;
  font-size: 1.5rem;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.scroll-down:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

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

/* ===== SECTION COMMON STYLES ===== */
section {
  padding: var(--space-2xl) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-subtitle {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.875rem;
  margin-bottom: var(--space-sm);
  position: relative;
}

.section-subtitle::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--primary-color);
  border-radius: var(--radius-full);
}

.section-title {
  color: var(--text-primary);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--primary-color);
  border-radius: var(--radius-full);
}

/* ===== ABOUT SECTION ===== */
.about {
  background: var(--bg-secondary);
}

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

.about-text p {
  font-size: 1.125rem;
  margin-bottom: var(--space-lg);
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.feature {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-md);
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-fast);
}

.feature:hover {
  transform: translateX(5px);
}

.feature i {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-top: 4px;
}

.feature h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.feature p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin: 0;
}

/* Timeline */
.about-timeline {
  background: var(--bg-primary);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.about-timeline h3 {
  margin-bottom: var(--space-lg);
  color: var(--primary-color);
}

.timeline {
  position: relative;
  padding-left: var(--space-lg);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary-color);
  opacity: 0.3;
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-lg);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-lg) - 6px);
  top: 0;
  width: 14px;
  height: 14px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
}

.timeline-date {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.timeline-content h4 {
  font-size: 1.125rem;
  margin-bottom: 4px;
}

.timeline-content p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin: 0;
}

/* ===== DESCRIPTION SECTION ===== */
.description {
  background: var(--bg-primary);
  position: relative;
}

.description::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

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

.description-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.description-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.description-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.description-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
}

.description-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: var(--space-md);
  display: inline-block;
  background: rgba(77, 148, 255, 0.1);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.description-text h3 {
  font-size: 1.75rem;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.description-lead {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: var(--space-xl);
  color: var(--text-secondary);
}

.description-highlights {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.highlight-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-md);
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: transform var(--transition-fast);
}

.highlight-item:hover {
  transform: translateX(5px);
  border-color: var(--primary-color);
}

.highlight-item i {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-top: 4px;
  flex-shrink: 0;
}

.highlight-item h4 {
  font-size: 1.125rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.highlight-item p {
  color: var(--text-light);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.description-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  position: sticky;
  top: 100px;
}

.detail-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.detail-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.detail-card h4 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.detail-card h4 i {
  color: var(--primary-color);
}

.experience-item {
  margin-bottom: var(--space-md);
}

.experience-item h5 {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.experience-company {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
}

.experience-list {
  list-style: none;
  padding-left: 0;
}

.experience-list li {
  position: relative;
  padding-left: var(--space-md);
  margin-bottom: 8px;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
}

.experience-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-size: 0.9rem;
}

.languages-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.language-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.language-name {
  font-weight: 500;
  color: var(--text-primary);
}

.language-level {
  font-size: 0.875rem;
  color: var(--text-light);
}

.language-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 4px;
}

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

.goals-list {
  list-style: none;
  padding-left: 0;
}

.goals-list li {
  position: relative;
  padding-left: var(--space-md);
  margin-bottom: var(--space-sm);
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
}

.goals-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: bold;
}

/* Learning Tags */
.learning-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.learning-tag {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-block;
  transition: transform var(--transition-fast);
}

.learning-tag:hover {
  transform: translateY(-2px);
}

/* Achievements List */
.achievements-list {
  list-style: none;
  padding-left: 0;
}

.achievements-list li {
  position: relative;
  padding-left: var(--space-md);
  margin-bottom: var(--space-sm);
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
}

.achievements-list li::before {
  content: "🏆";
  position: absolute;
  left: 0;
  color: var(--warning-color);
}

/* ===== SKILLS SECTION ===== */
.skills-filter {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.filter-btn {
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-tertiary);
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.95rem;
}

.filter-btn:hover {
  background: var(--border-color);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-md);
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.skill-card {
  background: var(--bg-primary);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-color);
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

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

.skill-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.skill-header i {
  font-size: 2rem;
  color: var(--primary-color);
}

.skill-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

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

.skill-tag {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.skill-tag:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-1px);
}

/* Progress Bars */
.skills-progress {
  background: var(--bg-primary);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.skills-progress h3 {
  margin-bottom: var(--space-lg);
  color: var(--primary-color);
}

.progress-bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.progress-item {
  width: 100%;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
  font-weight: 500;
}

.progress-value {
  color: var(--primary-color);
}

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

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

/* ===== PROJECTS SECTION ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.project-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  border: 1px solid var(--border-color);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.project-img {
  height: 200px;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--primary-dark)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3.5rem;
  position: relative;
  overflow: hidden;
}

.project-img::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  animation: shimmer 3s infinite;
}

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

.project-content {
  padding: var(--space-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-content h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.project-content p {
  color: var(--text-secondary);
  flex-grow: 1;
  margin-bottom: var(--space-md);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.tech-tag {
  background: var(--bg-tertiary);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  margin-top: auto;
  transition: gap var(--transition-fast);
}

.project-link:hover {
  gap: var(--space-md);
}

.projects-cta {
  text-align: center;
  padding: var(--space-xl);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.projects-cta p {
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
}

/* ===== CERTIFICATIONS SECTION ===== */
.certifications {
  background: var(--bg-secondary);
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.cert-card {
  background: var(--bg-primary);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

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

.cert-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

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

.cert-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: var(--space-md);
}

.cert-card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

.cert-card p {
  color: var(--text-light);
  margin: 0;
}

.cert-verification {
  text-align: center;
  padding: var(--space-md);
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.cert-verification i {
  color: var(--success-color);
  margin-right: var(--space-xs);
}

/* ===== CONTACT SECTION ===== */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

/* Contact Info */
.contact-info {
  display: grid;
  gap: var(--space-md);
}

.contact-card {
  background: var(--bg-primary);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.contact-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.contact-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.contact-header i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.contact-header h3 {
  margin: 0;
  font-size: 1.125rem;
}

.contact-link {
  display: block;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: var(--space-xs);
  transition: color var(--transition-fast);
}

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

.contact-note {
  color: var(--text-light);
  font-size: 0.875rem;
  margin: 0;
}

/* Social Security */
.social-security {
  grid-column: 1 / -1;
  background: var(--bg-tertiary);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.social-security h3 {
  margin-bottom: var(--space-md);
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  font-weight: 500;
  min-height: 44px;
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.social-link.linkedin {
  color: #0077b5;
  border-color: rgba(0, 119, 181, 0.3);
}

.social-link.linkedin:hover {
  background: #0077b5;
  color: white;
  border-color: #0077b5;
}

.social-link.github {
  color: #333;
  border-color: rgba(51, 51, 51, 0.3);
}

.social-link.github:hover {
  background: #333;
  color: white;
  border-color: #333;
}

.social-link.whatsapp {
  color: #25D366;
  border-color: rgba(37, 211, 102, 0.3);
}

.social-link.whatsapp:hover {
  background: #25D366;
  color: white;
  border-color: #25D366;
}

/* Contact Form */
.contact-form {
  background: var(--bg-primary);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.form-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.form-header i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.form-header h3 {
  margin: 0;
  font-size: 1.5rem;
}

.form-group {
  position: relative;
  margin-bottom: var(--space-lg);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--space-md) var(--space-sm) var(--space-xs);
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-primary);
  transition: all var(--transition-fast);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group label {
  position: absolute;
  top: var(--space-md);
  left: var(--space-sm);
  color: var(--text-light);
  pointer-events: none;
  transition: all var(--transition-fast);
  transform-origin: left top;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-bottom-color: var(--primary-color);
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
  transform: translateY(-20px) scale(0.8);
  color: var(--primary-color);
}

.error-message {
  display: block;
  color: var(--danger-color);
  font-size: 0.875rem;
  margin-top: 4px;
  min-height: 20px;
}

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.security-notice {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--text-light);
  font-size: 0.875rem;
}

.security-notice i {
  color: var(--success-color);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--secondary-dark);
  color: white;
  padding: var(--space-xl) 0;
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.5rem;
  transition: opacity var(--transition-fast);
}

.footer-logo:hover {
  opacity: 0.9;
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.footer-column h4 {
  color: white;
  margin-bottom: var(--space-md);
  font-size: 1.125rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--transition-fast);
  display: block;
  margin-bottom: var(--space-xs);
  padding: 4px 0;
}

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

.footer-newsletter {
  display: flex;
  flex-direction: column;
}

.footer-newsletter h4 {
  color: white;
  margin-bottom: var(--space-sm);
}

.footer-newsletter p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-md);
}

.newsletter-form {
  display: flex;
  gap: var(--space-xs);
}

.newsletter-form input {
  flex-grow: 1;
  padding: var(--space-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  min-height: 44px;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.newsletter-form button {
  padding: var(--space-sm) var(--space-md);
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.newsletter-form button:hover {
  background: var(--primary-dark);
}

.footer-bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.footer-security {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.footer-security i {
  color: var(--accent-color);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-normal);
  z-index: var(--z-sticky);
  box-shadow: var(--shadow-md);
}

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

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .description-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .description-details {
    position: static;
  }
}

@media (max-width: 1024px) {
  .hero-content,
  .about-content,
  .contact-content,
  .footer-content {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    justify-content: center;
  }

  .form-footer {
    flex-direction: column;
    gap: var(--space-md);
    align-items: stretch;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-sm);
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  section {
    padding: var(--space-xl) 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 300px;
    height: 100vh;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: stretch;
    padding: 80px var(--space-lg) var(--space-lg);
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-normal);
    z-index: var(--z-modal);
  }

  .nav-links.active {
    right: 0;
  }

  .nav-link {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: 1.125rem;
  }

  .theme-toggle-container {
    margin-top: var(--space-md);
  }

  .hero {
    padding: 100px 0 60px;
  }

  .hero-content {
    gap: var(--space-lg);
  }

  .profile-placeholder {
    width: 280px;
    height: 280px;
  }

  .image-youssef {
    width: 280px;
    height: 280px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

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

  .description-card {
    padding: var(--space-lg);
  }
  
  .description-icon {
    width: 60px;
    height: 60px;
    font-size: 2.5rem;
  }
  
  .highlight-item {
    padding: var(--space-sm);
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 0 var(--space-sm);
  }

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

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

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

  .profile-placeholder {
    width: 220px;
    height: 220px;
  }

  .image-youssef {
    width: 220px;
    height: 220px;
  }

  .skills-filter {
    flex-wrap: wrap;
    justify-content: center;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 0.875rem;
  }
  
  .description-card {
    padding: var(--space-md);
  }
  
  .description-icon {
    width: 50px;
    height: 50px;
    font-size: 2rem;
  }
  
  .detail-card {
    padding: var(--space-md);
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn:hover,
  .skill-card:hover,
  .project-card:hover,
  .cert-card:hover,
  .social-link:hover,
  .nav-link:hover {
    transform: none;
  }
  
  .btn:active,
  .skill-card:active,
  .project-card:active {
    transform: scale(0.98);
  }
}

/* Print Styles */
@media print {
  .navbar,
  .menu-toggle,
  .hero-buttons,
  .contact-form,
  .footer-newsletter,
  .back-to-top,
  .social-links,
  .scroll-indicator {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: black;
    background: white;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  section {
    padding: 20pt 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .btn {
    border: 1pt solid black;
    color: black;
  }
  
  .description-card,
  .detail-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .spinner,
  .cursor,
  .profile-placeholder::before,
  .project-img::before,
  .security-badge,
  .scroll-indicator {
    animation: none;
  }

  .hero,
  .profile-container {
    animation: none;
  }

  .btn:hover,
  .skill-card:hover,
  .project-card:hover,
  .cert-card:hover,
  .back-to-top:hover,
  .social-link:hover,
  .nav-link:hover,
  .feature:hover,
  .highlight-item:hover {
    transform: none;
  }
  
  .progress-fill,
  .language-progress {
    transition: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0000ff;
    --accent-color: #ff0000;
    --text-primary: #000000;
    --bg-primary: #ffffff;
    --border-color: #000000;
  }

  .btn {
    border: 2px solid currentColor;
  }
  
  .skill-card,
  .project-card,
  .cert-card,
  .contact-card,
  .detail-card {
    border: 2px solid var(--border-color);
  }
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Keyboard Navigation Indicator */
body.keyboard-navigation *:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* Install Button */
.install-btn {
  animation: slideInUp 0.5s ease-out;
  box-shadow: var(--shadow-xl);
}

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

/* Skip to Content Link */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 10px;
  background: var(--primary-color);
  color: white;
  padding: 10px 15px;
  border-radius: var(--radius-md);
  text-decoration: none;
  z-index: var(--z-popover);
  transition: top 0.3s ease;
}

.skip-to-content:focus {
  top: 10px;
  outline: 3px solid var(--accent-color);
}

/* Performance Optimizations */
img {
  max-width: 100%;
  height: auto;
}

/* Lazy loading */
.lazy {
  opacity: 0;
  transition: opacity 0.3s;
}

.lazy-loaded {
  opacity: 1;
}


.hero-subtitle {
  min-height: 1.4em;
}

.typing-text {
  display: inline-block;
}

.cursor {
  display: none;
}

.hero-desc {
  max-width: 680px;
}

.hero-desc p {
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 0.9rem;
  line-height: 1.9;
}

.hero-desc p:last-child {
  margin-bottom: 0;
}

.about-text {
  max-width: 760px;
}

.about-text p {
  line-height: 1.9;
  max-width: 68ch;
}

.security-badge {
  left: 50%;
  right: auto;
  bottom: -18px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--success-color), var(--accent-color));
  min-width: 220px;
  justify-content: center;
}

.profile-container {
  padding-bottom: 42px;
}

.cert-card {
  text-decoration: none;
  color: inherit;
}

.cert-card-link {
  cursor: pointer;
}

.cert-card-link:hover .cert-verified {
  color: var(--primary-color);
}

.cert-details {
  margin-top: 0.25rem !important;
  margin-bottom: 0.75rem !important;
  color: var(--text-secondary) !important;
  font-weight: 500;
}

.cert-verified,
.cert-pending {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600;
  margin-top: 0.35rem;
}

.cert-verified {
  color: var(--success-color);
}

.cert-pending {
  color: var(--text-light);
}


/* === Final polish overrides === */
.hero-subtitle {
  min-height: auto;
  margin-bottom: 1.25rem;
}

.typing-text {
  display: inline-block;
  color: #5fa2ff;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-desc {
  max-width: 760px;
}

.hero-desc-balanced {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-desc-balanced p {
  margin: 0;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

.hero-line {
  display: block;
  text-wrap: balance;
  white-space: nowrap;
}

.hero-desc strong {
  color: #ffffff;
}

.hero-content {
  align-items: center;
}

.security-badge {
  left: 50%;
  right: auto;
  bottom: -18px;
  transform: translateX(-50%);
  min-width: 260px;
  justify-content: center;
  padding: 0.9rem 1.4rem;
  background: linear-gradient(90deg, #1ab37d, #22c55e);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.profile-container {
  padding-bottom: 46px;
}

.about-text p {
  max-width: 60ch;
  text-wrap: pretty;
}

.cert-card {
  text-decoration: none;
  color: inherit;
}

.cert-card h3 {
  line-height: 1.3;
  margin-bottom: 0.7rem;
  text-wrap: balance;
}

.cert-card .cert-issuer {
  margin-bottom: 0.85rem;
  min-height: 3.2em;
}

.cert-card .cert-details {
  display: none;
}

.cert-verified,
.cert-pending {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-weight: 600;
}

.cert-verified {
  color: var(--text-primary);
}

.cert-card-link:hover .cert-verified {
  color: var(--primary-color);
}

@media (max-width: 900px) {
  .hero-line {
    white-space: normal;
  }

  .security-badge {
    min-width: 230px;
  }
}


/* Final polish */
.hero-subtitle {
  min-height: 1.4em;
}

.hero-desc {
  max-width: 680px;
}

.hero-desc-balanced {
  gap: 1.1rem;
}

.hero-desc-balanced p {
  max-width: 31em;
  margin: 0;
  line-height: 1.75;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.92);
  text-wrap: pretty;
}

.hero-line {
  display: inline;
  white-space: normal;
}

.security-badge {
  bottom: -14px;
  min-width: 240px;
  border-radius: 999px;
  padding: 0.82rem 1.3rem;
  background: linear-gradient(135deg, #18b07a, #1fbf8f);
}

.security-badge span {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.description .section-title {
  max-width: 14ch;
  margin-inline: auto;
}

.description-lead,
.about-text p {
  max-width: 60ch;
  text-wrap: pretty;
}

@media (max-width: 900px) {
  .hero-desc-balanced p {
    max-width: 100%;
    font-size: 1rem;
  }
}

/* === Hero refinement override === */
.hero-title {
  margin-bottom: 0.85rem;
}

.hero-subtitle-typed {
  min-height: 1.25em;
  width: 100%;
  max-width: 100%;
  margin-bottom: 1.25rem;
  white-space: nowrap;
  overflow: hidden;
}

.typing-text {
  display: inline-block;
  max-width: 100%;
  color: #5fa2ff;
  font-size: clamp(1.45rem, 2.2vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.typing-cursor {
  display: inline-block;
  margin-inline-start: 0.12em;
  color: #19c48b;
  font-size: clamp(1.45rem, 2.2vw, 2.05rem);
  font-weight: 600;
  animation: blink 0.9s steps(1) infinite;
}

.hero-desc {
  max-width: 760px;
}

.hero-desc-balanced {
  gap: 1.15rem;
}

.hero-desc-balanced p {
  margin: 0;
  max-width: 34em;
  line-height: 1.72;
  font-size: 1.07rem;
  color: rgba(255, 255, 255, 0.93);
}

.hero-line {
  display: block;
  white-space: nowrap;
}

.hero-desc strong {
  color: #ffffff;
  font-weight: 700;
}

.hero-desc .accent-green {
  color: #14d2a2;
}

.profile-container {
  padding-bottom: 0;
}

.security-badge {
  left: auto;
  right: 1.1rem;
  bottom: 1rem;
  transform: none;
  min-width: unset;
  padding: 0.82rem 1.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #25b46b, #37c178);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.security-badge i {
  color: #eafff5;
}

.security-badge span {
  font-weight: 700;
  letter-spacing: -0.01em;
}

@media (max-width: 1280px) {
  .typing-text,
  .typing-cursor {
    font-size: clamp(1.32rem, 2vw, 1.82rem);
  }
}

@media (max-width: 1100px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .typing-text,
  .typing-cursor {
    font-size: clamp(1.55rem, 3.3vw, 2.2rem);
  }

  .hero-desc-balanced p {
    max-width: 100%;
  }

  .hero-line {
    white-space: normal;
  }
}

@media (max-width: 900px) {
  .hero-subtitle-typed {
    white-space: normal;
  }

  .security-badge {
    right: 50%;
    bottom: -14px;
    transform: translateX(50%);
  }
}


/* Certificate card alignment fix */
.certs-grid {
  align-items: stretch;
}

.cert-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 380px;
}

.cert-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  width: 100%;
}

.cert-info h3 {
  min-height: 4.8em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cert-issuer {
  min-height: 2.8em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cert-verified,
.cert-pending {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  min-height: 2.2em;
}

@media (max-width: 768px) {
  .cert-card {
    min-height: 340px;
  }

  .cert-info h3 {
    min-height: auto;
  }
}


/* Google Drive certificate links polish */
.cert-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100%;
}

.cert-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.cert-card .cert-issuer {
  min-height: 3.2em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-open-badge {
  margin-top: auto;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(21, 107, 214, 0.10);
  color: var(--primary-color);
  transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.cert-card-link:hover .cert-open-badge {
  transform: translateY(-2px);
  background: var(--primary-color);
  color: #fff;
}

.cert-verified {
  display: none;
}
