
/* ============================================
   RESUME WEBSITE - DESIGN SYSTEM
   ============================================ */

/* CSS Custom Properties - Professional color palette and design tokens */
:root {
  /* Brand Colors - Maximum 3 colors for consistency */
  --primary-indigo: #4f46e5;      /* Main brand color */
  --accent-cyan: #06b6d4;         /* Secondary accent */
  --bg-charcoal: #0f0f0f;         /* Dark background */
  --text-mist: #f1f5f9;           /* Primary text - WCAG AA compliant */
  --subtext-steel: #94a3b8;       /* Secondary text - 4.8:1 contrast ratio */
  --card-slate: #1a1a1a;          /* Card backgrounds */
  
  /* Functional Colors */
  --hover-cyan: #22d3ee;          /* Hover states */
  --border-subtle: #374151;       /* Borders and dividers */
  --shadow-soft: rgba(0, 0, 0, 0.3);
  
  /* Typography - Maximum 2 font families */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  
  /* Typography Scale - Minimum 16px base for accessibility */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px - WCAG minimum */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  
  /* Layout System */
  --container-max: 1200px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --transition-smooth: all 0.2s ease;
  --shadow-elevation: 0 4px 20px var(--shadow-soft);
  
  /* Spacing Scale */
  --space-xs: 0.25rem;    /* 4px */
  --space-sm: 0.5rem;     /* 8px */
  --space-md: 1rem;       /* 16px */
  --space-lg: 1.5rem;     /* 24px */
  --space-xl: 2rem;       /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */
  
  /* Aliases for consistency */
  --accent-indigo: var(--primary-indigo);
}

/* Global reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* HTML base configuration - prevents horizontal scroll, sets minimum font size */
html {
  scroll-behavior: smooth;
  font-size: 16px; /* Minimum 16px base for accessibility */
  overflow-x: hidden;
}

/* Body base styles - typography, layout, overflow prevention */
body {
  font-family: var(--font-primary);
  background-color: var(--bg-charcoal);
  color: var(--text-mist);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 1rem;
  width: 100%;
  max-width: 100vw;
}

/* Prevent horizontal scrolling on all elements */
*, *::before, *::after {
  max-width: 100%;
  box-sizing: border-box;
}

/* Container overflow prevention */
.container, .grid, .project-preview, .preview-card, .navbar, .nav-container, .nav-links {
  max-width: 100%;
  overflow-x: hidden;
}

/* ============================================
   ACCESSIBILITY STYLES
   ============================================ */

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent-indigo);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
  font-weight: 600;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

/* High contrast focus indicators */
*:focus {
  outline: 2px solid var(--accent-indigo);
  outline-offset: 2px;
}

/* Ensure text meets WCAG contrast standards */
.text-high-contrast {
  color: var(--text-mist);
}

/* Screen reader only content */
.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;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   PHASE 4: TYPOGRAPHY SYSTEM
   ============================================ */

/* Phase 4: Clear heading hierarchy with proper contrast */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);  /* Single font family for consistency */
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-mist);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em; /* Subtle improvement for readability */
}

/* Phase 4: Typography scale with minimum 16px base */
h1 {
  font-size: var(--text-4xl);    /* 36px - Hero headings */
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: var(--text-3xl);    /* 30px - Section headings */
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: var(--text-2xl);    /* 24px - Subsection headings */
  margin-bottom: var(--space-md);
}

h4 {
  font-size: var(--text-xl);     /* 20px - Small headings */
  margin-bottom: var(--space-md);
}

h5, h6 {
  font-size: var(--text-lg);     /* 18px - Minor headings */
  margin-bottom: var(--space-sm);
}

p {
  color: var(--subtext-steel);
  font-size: var(--text-base);   /* 16px minimum - WCAG requirement */
  line-height: 1.6;              /* Improved readability */
  margin-bottom: var(--space-md);
  max-width: 65ch;               /* Optimal reading line length */
}

/* Large body text for important content */
.text-large {
  font-size: var(--text-lg);     /* 18px - More comfortable reading */
}

/* Phase 4: Link styles with proper contrast */
a {
  color: var(--primary-indigo);
  text-decoration: none;
  transition: var(--transition-smooth);
  position: relative;
}

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

a:focus {
  outline: 2px solid var(--primary-indigo);
  outline-offset: 2px;
}

/* Phase 4: Code elements use secondary font sparingly */
code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--card-slate);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

/* ============================================
   LAYOUT COMPONENTS
   ============================================ */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 4rem 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.card {
  background: var(--card-slate);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-elevation);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--shadow-soft);
  border-color: var(--accent-indigo);
}

/* ============================================
   NAVIGATION SYSTEM
   ============================================ */

/* Fixed navigation bar - backdrop blur, proper z-index */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-md) 0;
  z-index: 1000;
  transition: var(--transition-smooth);
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Navigation container - flexbox layout, responsive padding */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

/* Logo styling - brand color, hover effects */
.logo {
  font-family: var(--font-primary);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary-indigo);
  text-decoration: none;
}

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

/* Navigation links - horizontal layout, proper spacing */
.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
}

/* Navigation link styling - accessible sizing, hover effects */
.nav-links a {
  color: var(--text-mist);
  font-weight: 500;
  font-size: var(--text-base);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius);
  transition: var(--transition-smooth);
  text-decoration: none;
  position: relative;
}

/* Navigation hover effects - subtle movement, color change */
.nav-links a:hover {
  background: var(--primary-indigo);
  color: white;
  transform: translateY(-1px);
}

/* Active page indication - highlighted background */
.nav-links a.active {
  background: var(--primary-indigo);
  color: white;
  font-weight: 600;
}

/* Focus states for accessibility */
.nav-links a:focus {
  outline: 2px solid var(--hover-cyan);
  outline-offset: 2px;
}

/* ============================================
   BUTTONS & INTERACTIVE ELEMENTS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: var(--accent-indigo);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn:hover {
  background: var(--accent-indigo-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 99, 255, 0.3);
  color: white;
}

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

.btn-outline:hover {
  background: var(--accent-indigo);
  color: white;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  text-align: center;
  padding: 8rem 0 4rem;
}

.hero-title {
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-mist), var(--accent-indigo));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

/* View Counter Badge */
.view-counter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #ffffff !important; /* Force solid white, no variables */
    background: var(--card-slate);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    margin-left: 1rem;
    vertical-align: middle;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    mix-blend-mode: normal; /* Prevent blending with background */
    opacity: 1; /* Force full opacity */
}

.view-counter-badge:hover {
    color: var(--accent-indigo);
    border-color: var(--accent-indigo);
    transform: translateY(-1px);
}

.view-counter-badge svg {
    opacity: 1 !important; /* Force full opacity */
    transition: var(--transition-smooth);
    color: #ffffff !important; /* Force solid white for icon */
    mix-blend-mode: normal; /* Prevent blending */
}

.view-counter-badge:hover svg {
    opacity: 1;
    color: var(--accent-indigo);
}

#view-counter {
    font-weight: 600;
    min-width: 1ch;
    text-align: center;
    color: #ffffff !important; /* Force solid white, no variables */
    opacity: 1 !important; /* Force full opacity */
    mix-blend-mode: normal !important; /* Prevent blending */
    background: transparent !important; /* Ensure no background interference */
}

/* Responsive adjustments for view counter */
@media (max-width: 768px) {
    .view-counter-badge {
        margin-left: 0;
        margin-top: 0.5rem;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        color: #ffffff !important; /* Force solid white with !important */
        opacity: 1 !important; /* Force full opacity */
        mix-blend-mode: normal !important; /* Prevent blending */
    }
    
    .hero-title {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}

.hero-tagline {
    font-size: 1.5rem;
    color: var(--accent-indigo);
    font-weight: 600;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--subtext-steel);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ============================================
   GRID LAYOUTS
   ============================================ */

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ============================================
   ANIMATIONS & EFFECTS
   ============================================ */

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

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-indigo), var(--hover-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}



/* ============================================
   RESPONSIVE DESIGN & MOBILE
   ============================================ */

/* Tablet and mobile responsive design - touch-friendly interface */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }
  
  /* Mobile navigation - centered layout, larger touch targets */
  .nav-container {
    padding: 0 var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
  }
  
  .nav-links {
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  /* Hide scrollbar for webkit browsers */
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  
  .nav-links a {
    padding: var(--space-md) var(--space-lg);
    min-height: 44px;  /* iOS recommended minimum touch target */
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Hero section mobile adjustments */
  .hero {
    padding: 6rem 0 3rem;
    text-align: center;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
  }
  
  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
    min-height: 44px;
  }
  
  .section {
    padding: var(--space-2xl) 0;
  }
  
  /* Typography adjustments for mobile readability */
  h1 {
    font-size: var(--text-3xl);
  }
  
  h2 {
    font-size: var(--text-2xl);
  }
  
  h3 {
    font-size: var(--text-xl);
  }
  
  p {
    font-size: var(--text-base);
    line-height: 1.7;
  }
}

/* Small mobile screens - simplified layout */
@media (max-width: 480px) {
  .nav-container {
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-sm);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  
  .nav-links {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  
  .nav-links a {
    font-size: var(--text-sm);
    padding: var(--space-xs) var(--space-sm);
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .logo {
    font-size: var(--text-lg);
    margin-bottom: var(--space-xs);
  }
  
  .hero {
    padding: 4rem 0 2rem;
  }
  
  .container {
    padding: 0 var(--space-sm);
  }
  
  /* Card overflow prevention */
  .card, .preview-card {
    margin: var(--space-md) 0;
    padding: var(--space-md);
  }
}

/* ============================================
   SOCIAL MEDIA ICONS
   ============================================ */

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--card-slate);
  border-radius: 50%;
  color: var(--subtext-steel);
  text-decoration: none;
  transition: var(--transition-smooth);
  border: 2px solid transparent;
}

.social-link:hover {
  color: var(--accent-indigo);
  background: rgba(108, 99, 255, 0.1);
  border-color: var(--accent-indigo);
  transform: translateY(-2px);
}

.social-link:focus {
  outline: 2px solid var(--accent-indigo);
  outline-offset: 2px;
}

.social-link svg {
  transition: var(--transition-smooth);
}

.social-link:hover svg {
  stroke: var(--accent-indigo);
}

/* Responsive adjustments for social icons */
@media (max-width: 768px) {
  .hero-social {
    gap: 1rem !important;
  }
  
  .social-link {
    width: 40px;
    height: 40px;
  }
  
  .social-link svg {
    width: 20px;
    height: 20px;
  }
}
