/* CSS Custom Properties - Light Theme (Default) */
:root {
  /* Colors */
  --primary-color: #64b5f6;
  --secondary-color: #2c3e50;
  --accent-color: #3498db;
  --text-color: #1a202c;
  --text-light: #4a5568;
  --text-muted: #718096;
  --bg-color: #ffffff;
  --bg-secondary: #f7fafc;
  --bg-tertiary: #edf2f7;
  --border-color: #e2e8f0;
  --sidebar-bg: #4a5568;
  --sidebar-text: #f7fafc;
  --gradient-start: #667eea;
  --gradient-end: #764ba2;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 35px rgba(0, 0, 0, 0.12);
  --shadow-focus: 0 0 0 3px rgba(100, 181, 246, 0.2);
  --overlay-bg: rgba(0, 102, 204, 0.9);
  --card-bg: #ffffff;

  /* Typography - Fluid Scaling */
  --font-family-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-family-heading: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Consolas', monospace;

  /* Fluid Typography Scale */
  --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --font-size-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --font-size-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --font-size-lg: clamp(1.125rem, 1rem + 0.625vw, 1.375rem);
  --font-size-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.625rem);
  --font-size-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --font-size-3xl: clamp(1.875rem, 1.6rem + 1.375vw, 2.5rem);
  --font-size-4xl: clamp(2.25rem, 1.9rem + 1.75vw, 3.25rem);
  --font-size-5xl: clamp(3rem, 2.5rem + 2.5vw, 4.5rem);

  /* Line Heights for Readability */
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;

  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

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

  /* Layout */
  --sidebar-width: 386px;
  --content-max-width: 1200px;
  --container-padding: clamp(1rem, 4vw, 2rem);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
}

/* Dark Theme */
[data-theme="dark"] {
  /* Colors - Enhanced for better contrast */
  --primary-color: #7dd3fc;
  --secondary-color: #e2e8f0;
  --accent-color: #60a5fa;
  --text-color: #f8fafc;
  --text-light: #cbd5e1;
  --text-muted: #94a3b8;
  --bg-color: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --border-color: #475569;
  --sidebar-bg: #1e293b;
  --sidebar-text: #f1f5f9;
  --gradient-start: #4338ca;
  --gradient-end: #6366f1;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 12px 35px rgba(0, 0, 0, 0.35);
  --shadow-focus: 0 0 0 3px rgba(125, 211, 252, 0.3);
  --overlay-bg: rgba(30, 41, 59, 0.95);
  --card-bg: #1e293b;
}

/* Dark theme sidebar refinements */
[data-theme="dark"] .sidebar {
  background: linear-gradient(160deg,
    #1e293b 0%,
    #0f172a 50%,
    #1e293b 100%);
  border-right-color: rgba(125, 211, 252, 0.2);
}

[data-theme="dark"] .sidebar::before {
  background: radial-gradient(circle at top center,
    rgba(125, 211, 252, 0.1) 0%,
    transparent 70%);
}

[data-theme="dark"] .sidebar__profile::before {
  background: linear-gradient(135deg,
    #7dd3fc 0%,
    #60a5fa 50%,
    #7dd3fc 100%);
}

[data-theme="dark"] .sidebar__image {
  border-color: rgba(125, 211, 252, 0.4);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6),
              inset 0 2px 4px rgba(125, 211, 252, 0.1);
}

[data-theme="dark"] .sidebar__image:hover {
  box-shadow: 0 16px 48px rgba(125, 211, 252, 0.5),
              inset 0 2px 4px rgba(125, 211, 252, 0.2);
  border-color: rgba(125, 211, 252, 0.6);
}

[data-theme="dark"] .sidebar__title {
  color: rgba(125, 211, 252, 0.95);
}

[data-theme="dark"] .sidebar__name::after {
  background: linear-gradient(90deg,
    transparent 0%,
    #7dd3fc 50%,
    transparent 100%);
}

[data-theme="dark"] .sidebar__link--active {
  background: linear-gradient(135deg,
    rgba(125, 211, 252, 0.25) 0%,
    rgba(125, 211, 252, 0.15) 100%);
}

[data-theme="dark"] .sidebar__link:hover {
  background: rgba(125, 211, 252, 0.12);
}

[data-theme="dark"] .sidebar__social-link:hover {
  background: rgba(125, 211, 252, 0.18);
  border-color: rgba(125, 211, 252, 0.35);
}

[data-theme="dark"] .sidebar__social-link:hover i {
  color: #7dd3fc;
}

[data-theme="dark"] .sidebar__footer::before {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(125, 211, 252, 0.35) 50%,
    transparent 100%);
}

/* Dark theme intro adjustments */
[data-theme="dark"] .intro {
  background: 
    linear-gradient(135deg, #1e293b 0%, #334155 30%, #475569 60%, #1e293b 100%),
    radial-gradient(circle at 25% 25%, rgba(100, 181, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
}

[data-theme="dark"] .intro::before {
  background: 
    radial-gradient(circle at 20% 80%, rgba(100, 181, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
}

[data-theme="dark"] .expertise__card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .expertise__card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .expertise__icon {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .expertise__card:hover .expertise__icon {
  background: rgba(255, 255, 255, 0.2);
}

/* Dark theme gradient orbs */
[data-theme="dark"] .gradient-orb--1 {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
}

[data-theme="dark"] .gradient-orb--2 {
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
}

[data-theme="dark"] .gradient-orb--3 {
  background: radial-gradient(circle, rgba(79, 70, 229, 0.08) 0%, transparent 70%);
}

/* Dark theme floating shapes */
[data-theme="dark"] .floating-shape {
  background: rgba(100, 181, 246, 0.02);
}

/* Font Loading Optimization */
@font-face {
  font-family: system-ui;
  font-display: swap;
}

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

*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "pnum" 1, "tnum" 0, "onum" 1, "lnum" 0, "dlig" 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Enhanced body with smooth transitions inspired by Arlen McCluskey */
body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text-color);
  background-color: var(--bg-color);
  font-weight: var(--font-weight-normal);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  transition: color 0.6s cubic-bezier(0.23, 1, 0.320, 1),
              background-color 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

/* Smooth page entrance animation */
body.js-loaded {
  animation: pageEnter 1.2s cubic-bezier(0.23, 1, 0.320, 1) forwards;
}

@keyframes pageEnter {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Improved Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.025em;
  color: var(--text-color);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.05em;
}

h2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
}

h3 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
}

h4 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
}

h5 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
}

h6 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: var(--text-color);
  margin-bottom: var(--space-md);
}

p.lead {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--text-light);
  font-weight: var(--font-weight-normal);
}

p.small {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* Enhanced Link Styles */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-color);
}

a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Enhanced Lists */
ul, ol {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

li {
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-sm);
}

/* Text Selection */
::selection {
  background-color: var(--primary-color);
  color: white;
}

::-moz-selection {
  background-color: var(--primary-color);
  color: white;
}

/* Enhanced Micro-Interactions */
/* Scroll Progress Indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.05);
  z-index: 9999;
}

.scroll-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  width: 0%;
  transition: width 0.1s ease;
  box-shadow: 0 0 15px rgba(100, 181, 246, 0.5);
  position: relative;
}

.scroll-progress__bar::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 8px;
  height: 3px;
  background: var(--accent-color);
  box-shadow: 0 0 8px rgba(100, 181, 246, 0.8);
  border-radius: 0 2px 2px 0;
}

/* Enhanced Focus States */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Smooth Scrolling Enhancement */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Enhanced Ripple Effect */
.ripple {
  position: relative;
  overflow: hidden;
}

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

.ripple:active::before {
  width: 300px;
  height: 300px;
}

/* Magnetic Effect for Interactive Elements */
.magnetic {
  transition: transform var(--transition);
}

.magnetic:hover {
  transform: scale(1.02);
}

/* Smooth Transitions for Theme Changes */
* {
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition),
    box-shadow var(--transition);
}

/* Enhanced Hover States */
.hover-lift {
  transition: all var(--transition);
}

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

.hover-glow {
  transition: all var(--transition);
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(100, 181, 246, 0.3);
}

/* Interactive Text Effects */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Layout */
.layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background:
    linear-gradient(165deg,
      rgba(30, 41, 59, 0.97) 0%,
      rgba(15, 23, 42, 1) 50%,
      rgba(30, 41, 59, 0.97) 100%),
    radial-gradient(circle at 20% 30%, rgba(100, 181, 246, 0.03) 0%, transparent 50%);
  color: var(--sidebar-text);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.25);
  border-right: 1px solid rgba(100, 181, 246, 0.2);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

/* Elegant gradient overlay with animation */
.sidebar::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle,
    rgba(100, 181, 246, 0.05) 0%,
    transparent 50%);
  animation: floatGradient 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatGradient {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, 20px); }
}

/* Accent border glow */
.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(100, 181, 246, 0.4) 20%,
    rgba(100, 181, 246, 0.6) 50%,
    rgba(100, 181, 246, 0.4) 80%,
    transparent 100%);
  filter: blur(1px);
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.sidebar__header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
}

.sidebar__profile {
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

/* Beautiful gradient ring around profile */
.sidebar__profile::before {
  content: '';
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border-radius: 50%;
  background: linear-gradient(135deg,
    var(--primary-color) 0%,
    var(--accent-color) 50%,
    var(--primary-color) 100%);
  background-size: 200% 200%;
  animation: gradientRotate 4s ease infinite;
  z-index: -1;
  opacity: 0.8;
}

@keyframes gradientRotate {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.sidebar__image {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid rgba(255, 255, 255, 1);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(100, 181, 246, 0.1),
    inset 0 2px 8px rgba(255, 255, 255, 0.15);
  transition: all 0.5s cubic-bezier(0.23, 1, 0.320, 1);
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.sidebar__image:hover {
  transform: scale(1.1) translateY(-6px);
  box-shadow:
    0 20px 60px rgba(100, 181, 246, 0.5),
    0 0 0 1px rgba(100, 181, 246, 0.3),
    inset 0 2px 8px rgba(255, 255, 255, 0.2);
  border-color: rgba(100, 181, 246, 0.8);
}

.sidebar__name {
  font-size: 1.625rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  color: var(--sidebar-text);
  letter-spacing: -0.025em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  position: relative;
}

/* Elegant underline accent */
.sidebar__name::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--primary-color) 50%,
    transparent 100%);
  opacity: 0.7;
}

.sidebar__title {
  font-size: 0.9rem;
  color: rgba(100, 181, 246, 0.95);
  opacity: 1;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-top: 1rem;
}

/* Sidebar Navigation */
.sidebar__nav {
  flex: 1;
  position: relative;
  z-index: 1;
  margin-top: 1.5rem;
}

.sidebar__menu {
  list-style: none;
  padding: 0;
}

.sidebar__menu li {
  margin-bottom: 0.5rem;
}

/* Enhanced navigation inspired by Arlen McCluskey's smooth interactions */
.sidebar__link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.35s cubic-bezier(0.23, 1, 0.320, 1);
  font-weight: 500;
  font-size: 0.875rem;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Sleek indicator dot */
.sidebar__link::before {
  content: '';
  width: 6px;
  height: 6px;
  background: rgba(100, 181, 246, 0.3);
  border-radius: 50%;
  margin-right: 10px;
  transition: all 0.35s cubic-bezier(0.23, 1, 0.320, 1);
  box-shadow: 0 0 0 rgba(100, 181, 246, 0);
}

/* Sophisticated shine effect */
.sidebar__link::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 150%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(100, 181, 246, 0.15) 50%,
    transparent 100%);
  transition: left 0.6s cubic-bezier(0.23, 1, 0.320, 1);
  z-index: 0;
}

.sidebar__link:hover::after {
  left: 150%;
}

.sidebar__link:hover {
  color: white;
  transform: translateX(10px);
  background: rgba(100, 181, 246, 0.12);
  border-color: rgba(100, 181, 246, 0.2);
  box-shadow: 0 6px 20px rgba(100, 181, 246, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar__link:hover::before {
  background: var(--primary-color);
  box-shadow: 0 0 12px rgba(100, 181, 246, 0.8);
  transform: scale(1.4);
}

.sidebar__link--active {
  background: linear-gradient(135deg,
    rgba(100, 181, 246, 0.28) 0%,
    rgba(100, 181, 246, 0.18) 100%);
  color: white;
  border-color: rgba(100, 181, 246, 0.4);
  box-shadow: 0 6px 24px rgba(100, 181, 246, 0.35),
              inset 0 2px 0 rgba(255, 255, 255, 0.15),
              inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  font-weight: 600;
  transform: translateX(6px);
}

.sidebar__link--active::before {
  background: var(--primary-color);
  box-shadow: 0 0 16px rgba(100, 181, 246, 1);
  transform: scale(1.5);
}

.sidebar__link--active:hover {
  transform: translateX(12px);
  box-shadow: 0 8px 28px rgba(100, 181, 246, 0.45),
              inset 0 2px 0 rgba(255, 255, 255, 0.2),
              inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* Sidebar Footer */
.sidebar__footer {
  margin-top: auto;
  padding-top: 2rem;
  position: relative;
  z-index: 1;
}

/* Divider line */
.sidebar__footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 1rem;
  right: 1rem;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(100, 181, 246, 0.3) 50%,
    transparent 100%);
}

.sidebar__social {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-bottom: 1.5rem;
  margin-top: 1.5rem;
}

.sidebar__social-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.125rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

/* Shine effect on hover */
.sidebar__social-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%);
  transition: left 0.5s ease;
}

.sidebar__social-link:hover::before {
  left: 100%;
}

.sidebar__social-link:hover {
  background: rgba(100, 181, 246, 0.18);
  border-color: rgba(100, 181, 246, 0.35);
  transform: translateX(6px);
  box-shadow: 0 4px 16px rgba(100, 181, 246, 0.25);
  color: white;
}

.sidebar__social-link i {
  font-size: 1.25rem;
  min-width: 20px;
  transition: transform 0.3s ease;
}

.sidebar__social-link:hover i {
  transform: scale(1.1);
  color: var(--primary-color);
}

.sidebar__social-link span {
  font-size: 0.875rem;
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: white;
  z-index: 1001;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
}

.theme-toggle:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  transform: rotate(180deg) scale(1.05);
  box-shadow: 0 6px 20px rgba(100, 181, 246, 0.4);
}

.theme-toggle__icon {
  font-size: 1.25rem;
  transition: var(--transition);
}

/* Theme toggle variants for different backgrounds */
.theme-toggle--light {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(100, 181, 246, 0.3);
}

.theme-toggle--light:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  box-shadow: 0 6px 20px rgba(100, 181, 246, 0.4);
}

.theme-toggle--dark {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-toggle--dark:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 6px 20px rgba(100, 181, 246, 0.4);
}

/* Main Content */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  overflow-y: auto;
  scroll-behavior: smooth;
  /* Hide scrollbar for Chrome, Safari and Opera */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
}

.main::-webkit-scrollbar {
  display: none;  /* Chrome, Safari and Opera */
}

/* Enhanced Container System */
.container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

.container--narrow {
  max-width: 800px;
}

.container--wide {
  max-width: 1400px;
}

.container--full {
  max-width: none;
  padding: 0;
}

/* Enhanced Spacing Utilities */
.section-spacing {
  padding: var(--space-5xl) 0;
}

.section-spacing--small {
  padding: var(--space-3xl) 0;
}

.section-spacing--large {
  padding: var(--space-5xl) 0 var(--space-5xl) 0;
}

/* Content Spacing */
.content-spacing > * + * {
  margin-top: var(--space-lg);
}

.content-spacing--tight > * + * {
  margin-top: var(--space-md);
}

.content-spacing--loose > * + * {
  margin-top: var(--space-xl);
}

/* Visual Hierarchy Helpers */
.text-hierarchy {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.visual-break {
  margin: var(--space-3xl) 0;
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

/* Intro Section */
.intro {
  min-height: 97.75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: 
    linear-gradient(135deg, #64b5f6 0%, #42a5f5 30%, #2196f3 60%, #64b5f6 100%),
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(100, 181, 246, 0.1) 0%, transparent 50%);
  color: white;
  position: relative;
  overflow: hidden;
  background-size: 200% 200%, 100% 100%, 100% 100%;
  animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%, 0% 0%, 0% 0%; }
  50% { background-position: 100% 50%, 100% 100%, 100% 100%; }
}

/* Floating Background Shapes */
.intro__bg-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(1px);
  animation: float 20s infinite linear;
}

.floating-shape--1 {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.floating-shape--2 {
  width: 60px;
  height: 60px;
  top: 60%;
  right: 15%;
  animation-delay: -8s;
  animation-duration: 30s;
  animation-direction: reverse;
}

.floating-shape--3 {
  width: 120px;
  height: 120px;
  top: 40%;
  left: 5%;
  animation-delay: -15s;
  animation-duration: 35s;
}

.floating-shape--4 {
  width: 40px;
  height: 40px;
  top: 10%;
  right: 25%;
  animation-delay: -5s;
  animation-duration: 20s;
  animation-direction: reverse;
}

.floating-shape--5 {
  width: 100px;
  height: 100px;
  bottom: 20%;
  left: 20%;
  animation-delay: -12s;
  animation-duration: 28s;
}

.floating-shape--6 {
  width: 70px;
  height: 70px;
  bottom: 30%;
  right: 10%;
  animation-delay: -18s;
  animation-duration: 32s;
  animation-direction: reverse;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg) scale(1);
    opacity: 0.3;
  }
  33% {
    transform: translateY(-30px) rotate(120deg) scale(1.1);
    opacity: 0.1;
  }
  66% {
    transform: translateY(20px) rotate(240deg) scale(0.9);
    opacity: 0.4;
  }
}

/* Gradient Orbs */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  z-index: 1;
  pointer-events: none;
  animation: orbFloat 15s infinite ease-in-out;
}

.gradient-orb--1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(100, 181, 246, 0.2) 0%, transparent 70%);
  top: -150px;
  right: -150px;
  animation-delay: 0s;
}

.gradient-orb--2 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(33, 150, 243, 0.15) 0%, transparent 70%);
  bottom: -125px;
  left: -125px;
  animation-delay: -7s;
}

.gradient-orb--3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(66, 165, 245, 0.1) 0%, transparent 70%);
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: -12s;
}

@keyframes orbFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.6;
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
    opacity: 0.3;
  }
  66% {
    transform: translate(-20px, 30px) scale(0.9);
    opacity: 0.8;
  }
}

/* Particles Canvas */
.particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.intro__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 880px;
  padding: 1.56rem;
  animation: contentFadeIn 1.2s ease-out forwards;
  opacity: 0;
}

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

/* Accent Line */
.intro__accent-line {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  margin: 0 auto 2rem;
  border-radius: 2px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  animation: lineGlow 2s ease-in-out infinite alternate;
}

@keyframes lineGlow {
  0% { 
    opacity: 0.6;
    transform: scaleX(1);
  }
  100% { 
    opacity: 1;
    transform: scaleX(1.2);
  }
}

/* Enhanced Heading */
.intro__heading {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-2xl);
  line-height: var(--line-height-tight);
  letter-spacing: -0.03em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: relative;
  font-family: var(--font-family-heading);
}

.heading-line {
  display: block;
  opacity: 0;
  transform: translateY(30px);
  animation: lineReveal 1s ease-out forwards;
}

.heading-line--1 {
  animation-delay: 0.3s;
  color: white;
}

.heading-line--2 {
  animation-delay: 0.6s;
  color: white;
}

@keyframes lineReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Statistics Section */
.intro__stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin: 2rem auto 3rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  animation: statsSlideUp 1s ease-out forwards;
  opacity: 0;
  transform: translateY(50px);
  animation-delay: 0.8s;
}

@keyframes statsSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-number {
  display: inline-block;
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffd89b;
  text-shadow: 0 0 20px rgba(255, 216, 155, 0.5);
  line-height: 1;
}

.stat-suffix {
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  margin-left: 2px;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.intro__lead {
  font-size: 1rem;
  margin-bottom: 2.35rem;
  opacity: 0.95;
  font-weight: 300;
  line-height: 1.6;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.intro__lead strong {
  color: rgba(255, 255, 255, 1);
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Expertise Cards */
.intro__expertise {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.17rem;
  margin: 2.35rem 0;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.expertise__card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 1.96rem 1.44rem;
  text-align: center;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(24px);
  opacity: 0;
  animation: cardSlideUp 0.8s ease-out forwards;
  position: relative;
  overflow: hidden;
  box-shadow: 
    0 6.4px 25.6px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.expertise__card:nth-child(1) { animation-delay: 1.2s; }
.expertise__card:nth-child(2) { animation-delay: 1.4s; }
.expertise__card:nth-child(3) { animation-delay: 1.6s; }
.expertise__card:nth-child(4) { animation-delay: 1.8s; }

.expertise__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.expertise__card:hover::before {
  opacity: 1;
}

.expertise__card:hover {
  transform: translateY(-12px) scale(1.03);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.2),
    0 0 40px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Card Gradient Overlay */
.card-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(100, 181, 246, 0.1) 0%, rgba(52, 152, 219, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 20px;
  pointer-events: none;
}

.expertise__card:hover .card-gradient {
  opacity: 1;
}

.expertise__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.17rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 3.2px 16px rgba(0, 0, 0, 0.1);
}

.icon-glow {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #64b5f6, #4ecdc4, #45b7d1, #96ceb4);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: rotate 4s linear infinite;
  z-index: -1;
}

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

.expertise__card:hover .icon-glow {
  opacity: 0.6;
}

.expertise__icon i {
  font-size: 1.6rem;
  color: white;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  position: relative;
}

.expertise__card:hover .expertise__icon {
  transform: scale(1.15) rotateY(15deg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.expertise__card:hover .expertise__icon i {
  transform: scale(1.1);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.expertise__card h3 {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.59rem;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.expertise__card p {
  font-size: 0.72rem;
  opacity: 0.9;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

@keyframes cardSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Visual Divider */
.intro__divider {
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  margin: 4rem auto 3rem;
  position: relative;
}

.intro__divider::before,
.intro__divider::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  top: -1.5px;
}

.intro__divider::before {
  left: 20px;
  animation: pulse 2s ease-in-out infinite;
}

.intro__divider::after {
  right: 20px;
  animation: pulse 2s ease-in-out infinite;
  animation-delay: 1s;
}

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

/* Intro Closing */
.intro__closing {
  font-size: 0.92rem;
  margin: 2.35rem auto 2.35rem;
  opacity: 0.9;
  font-weight: 400;
  line-height: 1.7;
  max-width: 520px;
  font-style: italic;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.intro__cta {
  display: flex;
  gap: 1.17rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.56rem;
}

.intro__cta .btn {
  animation: slideUpFade 1s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
}

.intro__cta .btn:nth-child(1) {
  animation-delay: 1s;
}

.intro__cta .btn:nth-child(2) {
  animation-delay: 1.2s;
}

@keyframes slideUpFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced Button System */
.btn {
  /* Size and Layout */
  padding: var(--space-md) var(--space-xl);
  min-height: 44px; /* Touch-friendly minimum */
  min-width: 140px;
  border-radius: var(--radius-xl);

  /* Typography */
  font-family: var(--font-family-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.025em;
  text-decoration: none;
  text-align: center;
  line-height: 1;

  /* Layout */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);

  /* Interaction */
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  /* Enhanced transitions inspired by Arlen McCluskey */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
  transform-origin: center;
}

.btn:focus {
  outline: none;
  box-shadow: var(--shadow-focus);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Button Effects */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

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

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

.btn-icon {
  position: relative;
  z-index: 2;
  transition: transform var(--transition);
}

.btn:hover .btn-icon {
  transform: translateX(2px);
}

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

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

.btn--primary:active {
  transform: translateY(0);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow);
}

/* Ghost Button */
.btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn--ghost:active {
  transform: translateY(0);
  transition: all var(--transition-fast);
}

/* Secondary Button (for regular sections) */
.btn--secondary {
  background: var(--bg-secondary);
  color: var(--text-color);
  border-color: var(--border-color);
  box-shadow: var(--shadow);
}

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

.btn--secondary:active {
  transform: translateY(0);
  transition: all var(--transition-fast);
}

/* Button Sizes */
.btn--small {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--font-size-xs);
  min-height: 36px;
  min-width: 100px;
}

.btn--large {
  padding: var(--space-lg) var(--space-2xl);
  font-size: var(--font-size-base);
  min-height: 52px;
  min-width: 180px;
}

/* Button Groups */
.btn-group {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
}

/* Sections */
section {
  padding: 5rem 0;
}

/* AI Assistant Section */
.ai-assistant {
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.ai-assistant::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(100, 181, 246, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(100, 181, 246, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

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

.ai-assistant__content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

.ai-assistant__intro h3 {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

.ai-assistant__lead {
  font-size: 1.1rem;
  color: var(--text-color);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.ai-assistant__features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 10px;
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.feature__item:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-hover);
}

.feature__item i {
  font-size: 1.5rem;
  color: var(--primary-color);
  min-width: 24px;
}

.feature__item span {
  font-weight: 500;
  color: var(--text-color);
}

/* AI Demo Section */
.ai-assistant__demo {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border-color);
}

.demo__header {
  text-align: center;
  margin-bottom: 2rem;
}

.demo__header h4 {
  font-size: 1.3rem;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

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

.demo__container {
  position: relative;
  background: var(--bg-color);
  border-radius: 15px;
  overflow: hidden;
  border: 2px solid var(--border-color);
  min-height: 600px;
}

/* Loading State */
.demo__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 600px;
  background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
}

.loading__spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

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

/* Iframe Styling */
#ai-iframe {
  border: none;
  border-radius: 12px;
  width: 100%;
  height: 600px;
  display: block;
}

/* Fallback State */
.demo__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 600px;
  background: var(--bg-secondary);
}

.fallback__content {
  text-align: center;
  padding: 2rem;
  max-width: 500px;
}

.fallback__content i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.fallback__content h4 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.fallback__content p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.fallback__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.fallback__actions .btn {
  min-width: 180px;
  padding: 0.75rem 1.5rem;
}

@media (min-width: 480px) {
  .fallback__actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .fallback__actions .btn {
    min-width: 140px;
  }
}

/* Demo Info */
.demo__info {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(100, 181, 246, 0.05);
  border-radius: 10px;
  border-left: 3px solid var(--primary-color);
}

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

.demo__info strong {
  color: var(--text-color);
}

/* Dark Theme Adjustments */
[data-theme="dark"] .ai-assistant {
  background: var(--bg-secondary);
}

[data-theme="dark"] .feature__item {
  background: var(--card-bg);
  border-left-color: var(--primary-color);
}

[data-theme="dark"] .ai-assistant__demo {
  background: var(--card-bg);
  border-color: var(--border-color);
}

[data-theme="dark"] .demo__container {
  background: var(--bg-color);
  border-color: var(--border-color);
}

[data-theme="dark"] .demo__loading {
  background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
}

[data-theme="dark"] .demo__fallback {
  background: var(--bg-secondary);
}

[data-theme="dark"] .demo__info {
  background: rgba(129, 196, 232, 0.1);
  border-left-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .ai-assistant__content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .ai-assistant__intro {
    order: 2;
  }
  
  .ai-assistant__demo {
    order: 1;
    padding: 1.5rem;
  }
  
  .demo__container {
    min-height: 500px;
  }
  
  .demo__loading {
    height: 500px;
  }
  
  .demo__fallback {
    height: 500px;
  }
  
  #ai-iframe {
    height: 500px;
  }
  
  .ai-assistant__features {
    margin-top: 1rem;
  }
  
  .feature__item {
    padding: 0.75rem;
  }
}

.section__title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3xl);
  text-align: center;
  color: var(--text-color);
  position: relative;
  font-family: var(--font-family-heading);
  padding-bottom: 1.5rem;
}

.section__title::after {
  content: '';
  width: clamp(40px, 8vw, 80px);
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: var(--radius);
  transition: width var(--transition);
  box-shadow: 0 2px 8px rgba(100, 181, 246, 0.3);
}

/* About Section */
.about {
  background: var(--bg-color);
}

.about__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about__lead {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.about__text p {
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.about__stats {
  display: flex;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  flex: 1;
  min-width: 120px;
}

.stat__number {
  display: inline-block;
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

.stat__label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.5rem;
}

.about__achievements {
  margin-top: 2rem;
}

.about__achievements h3 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.about__achievements ul {
  list-style: none;
  padding: 0;
}

.about__achievements li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
  color: var(--text-color);
}

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

/* Skills */
.about__skills h3 {
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
  font-size: 1.25rem;
}

.skills__categories {
  display: grid;
  gap: 1.5rem;
}

.skill__category h4 {
  color: var(--secondary-color);
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

/* Enhanced Skills Display */
.skills__grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.skill {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
}

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

.skill:hover::before {
  left: 100%;
}

.skill:hover {
  background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  transform: translateY(-2px) scale(1.05);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Skill Category Enhancements */
.skill__category {
  margin-bottom: var(--space-xl);
}

.skill__category h4 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-color);
  margin-bottom: var(--space-md);
  position: relative;
  padding-left: var(--space-md);
}

.skill__category h4::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: var(--radius);
}

/* Portfolio Section */
.portfolio {
  background: var(--bg-secondary);
}

.portfolio__filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter__btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--border-color);
  background: transparent;
  color: var(--text-color);
  border-radius: 25px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.filter__btn:hover,
.filter__btn--active {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(100, 181, 246, 0.1);
}

/* Inspired by Arlen McCluskey - Visual-first portfolio grid */
.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: 0;
}

.portfolio__item {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
  background: var(--card-bg);
  cursor: pointer;
  position: relative;
  border: 1px solid transparent;
  aspect-ratio: 1.2/1;
  isolation: isolate;
}

.portfolio__item:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.portfolio__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg,
    transparent 0%,
    rgba(100, 181, 246, 0.02) 25%,
    rgba(100, 181, 246, 0.05) 50%,
    transparent 75%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.portfolio__item:hover::before {
  opacity: 1;
}

.portfolio__item:active {
  transform: translateY(-4px);
  transition: all var(--transition-fast);
}

.portfolio__item:focus {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* Enhanced visual-first portfolio images */
.portfolio__image {
  position: relative;
  overflow: hidden;
  height: 100%;
  border-radius: var(--radius-xl);
}

.portfolio__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.8s cubic-bezier(0.23, 1, 0.320, 1);
  filter: brightness(0.9) contrast(1.1) saturate(1.1);
}

.portfolio__item:hover .portfolio__image img {
  transform: scale(1.08);
  filter: brightness(1) contrast(1.2) saturate(1.2);
}

.portfolio__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
    rgba(15, 23, 42, 0.1) 0%,
    rgba(30, 41, 59, 0.3) 30%,
    rgba(30, 41, 59, 0.7) 70%,
    rgba(15, 23, 42, 0.9) 100%);
  color: white;
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
  opacity: 0.95;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.portfolio__item:hover .portfolio__overlay {
  background: linear-gradient(135deg,
    rgba(15, 23, 42, 0.05) 0%,
    rgba(30, 41, 59, 0.2) 30%,
    rgba(30, 41, 59, 0.6) 70%,
    rgba(15, 23, 42, 0.85) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 1;
}

.portfolio__overlay h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
  line-height: var(--line-height-tight);
  color: white;
}

.portfolio__overlay p {
  margin-bottom: var(--space-lg);
  opacity: 0.9;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  color: rgba(255, 255, 255, 0.9);
}

.portfolio__tech {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: flex-start;
}

.portfolio__tech span {
  background: rgba(255, 255, 255, 0.15);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--transition);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.portfolio__tech span:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

/* Enhanced Portfolio Content Structure */
.portfolio__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
}

.portfolio__challenge {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  margin-bottom: var(--space-sm) !important;
  border-left: 2px solid var(--primary-color);
  padding-left: var(--space-sm);
}

.portfolio__solution {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.95);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-lg) !important;
}

/* Portfolio Metrics Display */
.portfolio__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  padding: var(--space-md) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xs);
}

.metric__value {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--primary-color);
  line-height: 1;
  text-shadow: 0 0 10px rgba(100, 181, 246, 0.3);
}

.metric__label {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.8);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

/* Portfolio Item Hover Enhancements */
.portfolio__item:hover .portfolio__metrics {
  transform: translateY(-2px);
  transition: transform var(--transition);
}

.portfolio__item:hover .metric__value {
  color: #7dd3fc;
  text-shadow: 0 0 15px rgba(125, 211, 252, 0.5);
}

/* Responsive Portfolio Metrics */
@media (max-width: 768px) {
  .portfolio__metrics {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
  }

  .metric__value {
    font-size: var(--font-size-base);
  }

  .metric__label {
    font-size: 0.65rem;
  }
}

@media (max-width: 480px) {
  .portfolio__metrics {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .metric {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* Experience Section */
.experience {
  background: var(--bg-color);
}

.experience__timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.experience__timeline::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline__item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  position: relative;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: 29px;
  top: 0;
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 50%;
  transform: translateX(-50%);
}

.timeline__date {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.875rem;
}

.timeline__content h3 {
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
}

.timeline__content h4 {
  color: var(--accent-color);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.timeline__content p {
  margin-bottom: 1rem;
  color: var(--text-color);
}

.timeline__achievements {
  list-style: none;
  padding: 0;
}

.timeline__achievements li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
  color: var(--text-color);
}

.timeline__achievements li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* Education & Certifications */
.experience__education {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 2px solid var(--border-color);
}

.education__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.education__item h3 {
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.education__degree {
  margin-bottom: 1.5rem;
}

.education__degree h4 {
  color: var(--primary-color);
  margin-bottom: 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

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

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

.certification {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  text-align: center;
  font-weight: 500;
  color: var(--text-color);
  transition: var(--transition);
}

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

/* Contact Section */
.contact {
  background: var(--bg-secondary);
}

.contact__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact__info h3 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.contact__info p {
  margin-bottom: 2rem;
  line-height: 1.6;
  color: var(--text-color);
}

.contact__details {
  margin-bottom: 2rem;
}

.contact__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--bg-color);
  border-radius: 8px;
  transition: var(--transition);
}

.contact__item:hover {
  background: var(--primary-color);
  color: white;
  transform: translateX(5px);
}

.contact__item i {
  font-size: 1.25rem;
  color: var(--primary-color);
  transition: var(--transition);
}

.contact__item:hover i {
  color: white;
}

.contact__social {
  display: flex;
  gap: 1rem;
}

.social__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  transition: var(--transition);
  font-weight: 500;
}

.social__link:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
}

.social__link i {
  font-size: 1.25rem;
}

/* Contact Form */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form__group {
  position: relative;
}

.contact__form input,
.contact__form textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: inherit;
  background: var(--bg-color);
  color: var(--text-color);
  transition: var(--transition);
}

.contact__form input:focus,
.contact__form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(100, 181, 246, 0.1);
}

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

.contact__form .btn {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
}

.contact__form .btn:hover {
  background: var(--accent-color);
}

/* Typing Effect */
.typing-text {
  border-right: 2px solid currentColor;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { border-color: currentColor; }
  51%, 100% { border-color: transparent; }
}

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Fallback: Show content after 3 seconds if JavaScript doesn't trigger animations */
.animate-on-scroll {
  animation: fallbackVisible 0.5s ease 3s forwards;
}

@keyframes fallbackVisible {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ensure section titles are always visible for accessibility */
.section__title.animate-on-scroll {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

/* Re-enable animations when JavaScript has loaded */
.js-loaded .section__title.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  animation: none;
}

.animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s ease forwards;
}

.animate-fade-up:nth-child(1) { animation-delay: 0.2s; }
.animate-fade-up:nth-child(2) { animation-delay: 0.4s; }
.animate-fade-up:nth-child(3) { animation-delay: 0.6s; }
.animate-fade-up:nth-child(4) { animation-delay: 0.8s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Counter Animation */
.counter {
  display: inline-block;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1001;
  background: var(--primary-color);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.mobile-toggle:hover {
  transform: scale(1.1);
}

.mobile-toggle i {
  font-size: 1.5rem;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .intro__expertise {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2.5rem 0;
    max-width: 100%;
  }
  
  .expertise__card {
    padding: 1.75rem 1.25rem;
  }
  
  .intro__heading {
    font-size: 2.5rem;
  }
  
  .intro__lead {
    font-size: 1.125rem;
  }
  
  .intro__closing {
    font-size: 1.05rem;
  }
  
  .about__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .timeline__item {
    grid-template-columns: 100px 1fr;
    gap: 1.5rem;
  }
  
  .education__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .sidebar {
    transform: translateX(-100%);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
  }
  
  .sidebar--open {
    transform: translateX(0);
  }
  
  .main {
    margin-left: 0;
  }
  
  .intro__heading {
    font-size: 2rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
  }
  
  .intro__lead {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .intro__expertise {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
  }
  
  .expertise__card {
    padding: 1.5rem 1rem;
  }
  
  .expertise__card h3 {
    font-size: 1rem;
  }
  
  .expertise__card p {
    font-size: 0.85rem;
  }
  
  .expertise__icon {
    width: 50px;
    height: 50px;
  }
  
  .expertise__icon i {
    font-size: 1.5rem;
  }
  
  .intro__closing {
    font-size: 1rem;
    margin: 2rem auto 1.5rem;
  }
  
  .intro__cta {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
    padding: 1rem 2rem;
    font-size: 0.875rem;
  }
  
  .btn:hover {
    transform: translateY(-2px) scale(1.02);
  }
  
  .sidebar__link {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }
  
  .sidebar__link:hover {
    transform: translateX(5px);
  }
  
  .sidebar__link--active:hover {
    transform: translateX(8px);
  }
  
  .about__stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .skills__grid {
    grid-template-columns: 1fr;
  }
  
  .portfolio__grid {
    grid-template-columns: 1fr;
  }
  
  .timeline__item {
    grid-template-columns: 80px 1fr;
    gap: 1rem;
  }
  
  .experience__timeline::before {
    left: 20px;
  }
  
  .timeline__item::before {
    left: 19px;
  }
  
  .certifications__grid {
    grid-template-columns: 1fr;
  }
  
  .contact__content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .contact__social {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .social__link {
    justify-content: center;
  }
  
  section {
    padding: 3rem 0;
  }
  
  .container {
    padding: 0 1rem;
  }
}

/* Mobile Overlay for sidebar */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.mobile-overlay--visible {
  display: block;
  opacity: 1;
}

/* Touch device optimizations */
@media (pointer: coarse) {
  .btn {
    min-height: 48px;
    touch-action: manipulation;
  }
  
  .sidebar__link {
    min-height: 48px;
    display: flex;
    align-items: center;
    touch-action: manipulation;
  }
  
  .theme-toggle {
    min-width: 48px;
    min-height: 48px;
    touch-action: manipulation;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn--primary {
    border-width: 3px;
  }
  
  .btn--ghost {
    border-width: 3px;
  }
  
  .sidebar__link--active {
    border-left-width: 5px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .sidebar__link,
  .theme-toggle,
  .expertise__card {
    transition: none;
  }
  
  .btn::before,
  .sidebar__link::before {
    display: none;
  }
  
  .intro__cta .btn,
  .expertise__card,
  .intro__content {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  .expertise__icon,
  .expertise__icon i {
    transition: none;
  }
}

/* Focus visible for better accessibility */
.btn:focus-visible,
.sidebar__link:focus-visible,
.theme-toggle:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .sidebar--open ~ .mobile-overlay {
    display: block;
    opacity: 1;
  }
}

/* Enhanced Mobile Experience */
@media (max-width: 1024px) {
  /* Better spacing for tablets */
  .container {
    padding: 0 var(--space-lg);
  }

  .intro__content {
    padding: var(--space-xl);
  }

  .expertise__card {
    padding: var(--space-lg);
  }

  /* Improved touch targets */
  .btn {
    min-height: 48px;
    padding: var(--space-md) var(--space-lg);
  }

  .filter__btn {
    min-height: 44px;
    padding: var(--space-sm) var(--space-md);
  }
}

@media (max-width: 768px) {
  /* Mobile-first optimizations */
  :root {
    --container-padding: var(--space-md);
  }

  /* Enhanced mobile typography */
  .intro__heading {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-lg);
  }

  .section__title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-2xl);
  }

  /* Enhanced mobile navigation with smooth animations */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.320, 1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
  }

  .sidebar--open {
    transform: translateX(0);
  }

  /* Mobile-optimized portfolio animations */
  .portfolio__item {
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  }

  .portfolio__item:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  }

  /* Optimized dot field for mobile performance */
  .animated-dot {
    will-change: transform;
    backface-visibility: hidden;
  }

  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
  }

  .mobile-overlay--visible {
    opacity: 1;
    pointer-events: all;
  }

  .mobile-toggle {
    position: fixed;
    top: var(--space-lg);
    left: var(--space-lg);
    z-index: 1001;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: var(--shadow);
  }

  .mobile-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 8px 20px rgba(100, 181, 246, 0.3);
  }

  .mobile-toggle:active {
    transform: scale(0.95);
    transition: all 0.1s ease;
  }

  /* Portfolio mobile improvements */
  .portfolio__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .portfolio__filters {
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
  }

  .filter__btn {
    flex: 0 0 auto;
    min-width: 80px;
  }

  /* Enhanced portfolio metrics for mobile */
  .portfolio__metrics {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    padding: var(--space-md) 0;
  }

  .metric__value {
    font-size: var(--font-size-base);
  }

  .metric__label {
    font-size: 0.65rem;
    line-height: 1.2;
  }

  /* Skills mobile layout */
  .skills__grid {
    gap: var(--space-xs);
  }

  .skill {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.7rem;
  }

  /* Experience timeline mobile */
  .experience__timeline {
    padding-left: var(--space-md);
  }

  .timeline__item {
    padding-left: var(--space-lg);
  }

  /* Contact form mobile */
  .contact__content {
    flex-direction: column;
    gap: var(--space-xl);
  }

  .contact__form {
    order: 1;
  }

  .contact__info {
    order: 2;
  }

  /* Button groups mobile */
  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  /* Expertise cards mobile - keep 2x2 grid */
  .intro__expertise {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    max-width: 100%;
  }

  .expertise__card {
    padding: var(--space-lg);
    text-align: center;
  }
}

@media (max-width: 480px) {
  /* Small mobile optimizations */
  :root {
    --container-padding: var(--space-sm);
  }

  /* Typography adjustments for small screens */
  .intro__heading {
    font-size: var(--font-size-2xl);
  }

  .section__title {
    font-size: var(--font-size-xl);
  }

  /* Compact mobile layout */
  .sidebar {
    width: 280px;
  }

  .main {
    margin-left: 0;
  }

  /* Portfolio metrics stack on very small screens */
  .portfolio__metrics {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .metric {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

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

  /* Compact spacing */
  section {
    padding: var(--space-3xl) 0;
  }

  .intro {
    min-height: 100vh;
    padding: var(--space-xl) 0;
  }

  /* Simplified animations for performance */
  .expertise__card {
    animation: none;
    opacity: 1;
    transform: none;
  }

  /* Enhanced touch feedback */
  .btn:active,
  .sidebar__link:active,
  .portfolio__item:active {
    transform: scale(0.95);
    transition: transform var(--transition-fast);
  }
}

/* Touch device specific styles */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .btn:hover,
  .sidebar__link:hover,
  .portfolio__item:hover,
  .skill:hover {
    transform: none;
    box-shadow: var(--shadow);
  }

  /* Enhanced active states for touch */
  .btn:active {
    transform: scale(0.95);
    box-shadow: var(--shadow);
  }

  .portfolio__item:active {
    transform: scale(0.98);
  }

  /* Disable magnetic effects on touch devices */
  .magnetic:hover {
    transform: none;
  }
}

/* Landscape orientation optimizations */
@media (max-width: 768px) and (orientation: landscape) {
  .intro {
    min-height: 100vh;
    padding: var(--space-lg) 0;
  }

  .intro__content {
    padding: var(--space-md);
  }

  .intro__heading {
    font-size: var(--font-size-xl);
  }

  /* Compact expertise cards in landscape */
  .intro__expertise {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .expertise__card {
    padding: var(--space-md);
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ensure crisp borders and shadows */
  .btn,
  .portfolio__item,
  .skill {
    border-width: 0.5px;
  }

  .scroll-progress__bar {
    height: 2px;
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-appearance: none) {
  .main {
    -webkit-overflow-scrolling: touch;
  }

  /* Fix for iOS viewport height issues */
  .intro {
    min-height: 100vh;
    min-height: -webkit-fill-available;
  }
}