/* ============================================
   RESUME WEBSITE - MAIN STYLESHEET
   Design inspired by S-tier SaaS dashboards
   Color palette from nomad4444.com
   ============================================ */

/* ============================================
   CSS VARIABLES (Design Tokens)
   ============================================ */
:root {
  /* Colors - Gray accent theme */
  --color-primary-gray: #4a5568;
  --color-primary-blue: #1e3a5f;
  --color-accent-gray: #2d3748;
  --color-accent-light: #718096;
  
  /* Neutral Scale */
  --color-text-primary: #2c2c2c;
  --color-text-secondary: #6c6c6c;
  --color-text-tertiary: #9c9c9c;
  --color-border: #e8e8e8;
  --color-bg-light: #f5f5f5;
  --color-bg-white: #ffffff;
  
  /* Semantic Colors */
  --color-success: #2b8a3e;
  --color-error: #c92a2a;
  --color-warning: #f59f00;
  --color-info: #1e3a5f;
  
  /* Typography */
  --font-family-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  --font-size-h1: 2.5rem;        /* 40px */
  --font-size-h2: 2rem;          /* 32px */
  --font-size-h3: 1.5rem;        /* 24px */
  --font-size-h4: 1.25rem;       /* 20px */
  --font-size-body: 1rem;        /* 16px */
  --font-size-small: 0.875rem;   /* 14px */
  --font-size-tiny: 0.75rem;     /* 12px */
  
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;
  
  /* Spacing (8px base unit) */
  --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 */
  
  /* Border Radius */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
  
  /* Container */
  --container-max-width: 1200px;
  --container-padding: var(--space-lg);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-light);
  overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

h1 { 
  font-size: var(--font-size-h1);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: var(--font-size-h2);
  line-height: 1.3;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

h3 { 
  font-size: var(--font-size-h3);
  line-height: 1.4;
  margin-bottom: var(--space-md);
}

h4 { 
  font-size: var(--font-size-h4);
  line-height: 1.4;
  margin-bottom: var(--space-md);
}

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

li {
  line-height: 1.6;
}

a {
  color: var(--color-primary-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-gray);
}

strong, b {
  font-weight: var(--font-weight-semibold);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

/* Add padding to account for sticky header */
main.container {
  padding-top: 0;
  padding-bottom: 0;
}

.section {
  padding: 0;
}

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

.section-title {
  font-size: var(--font-size-h2);
  color: var(--color-primary-blue);
  margin-bottom: var(--space-sm);
}

.section-description {
  font-size: var(--font-size-body);
  color: var(--color-text-secondary);
  max-width: 900px;
  margin: 0 auto;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background-color: var(--color-bg-white);
  border-bottom: 2px solid var(--color-border);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: all 500ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.site-header.scrolled {
  padding: 0.75rem 0;
  box-shadow: var(--shadow-md);
}

.header-content {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  transition: all 500ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-shrink: 0;
  transition: all 500ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.site-header.scrolled .header-left {
  gap: var(--space-md);
}

.profile-image-container {
  flex-shrink: 0;
  transition: all 500ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.profile-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 3px solid var(--color-primary-blue);
  box-shadow: var(--shadow-md);
  transition: all 500ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.site-header.scrolled .profile-image {
  width: 45px;
  height: 45px;
  border-width: 2px;
}

.header-text {
  flex: 1;
  min-width: 0;
  transition: all 500ms cubic-bezier(0.4, 0.0, 0.2, 1);
  overflow: hidden;
}

.site-header.scrolled .header-text {
  max-width: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}

.site-title {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-blue);
  margin: 0;
  line-height: var(--line-height-tight);
  transition: all 500ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.site-header.scrolled .site-title {
  font-size: 0;
}

.site-subtitle {
  font-size: var(--font-size-body);
  color: var(--color-text-secondary);
  margin: var(--space-xs) 0 0;
  font-weight: var(--font-weight-regular);
  transition: all 500ms cubic-bezier(0.4, 0.0, 0.2, 1);
}

.site-header.scrolled .site-subtitle {
  font-size: 0;
  margin: 0;
}

/* ============================================
   TAB NAVIGATION (Now in header)
   ============================================ */
.tab-navigation {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  flex-shrink: 0;
}

.tab-button {
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: all var(--transition-fast);
  border-radius: var(--radius-sm);
}

.tab-button::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 1.5rem;
  right: 1.5rem;
  height: 2px;
  background: var(--color-primary-gray);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-fast);
}

.tab-button:hover::after {
  transform: scaleX(1);
}

.tab-button.active::after {
  background: var(--color-primary-blue);
  transform: scaleX(1);
}

.tab-button + .tab-button {
  margin-left: 0.5rem;
}

.tab-button:hover {
  color: var(--color-primary-gray);
  background-color: rgba(74, 85, 104, 0.05);
  transform: translateY(-1px);
}

.tab-button.active {
  color: var(--color-primary-gray);
  background-color: rgba(74, 85, 104, 0.1);
  font-weight: var(--font-weight-semibold);
}

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

/* ============================================
   TAB CONTENT
   ============================================ */
.tab-content {
  display: none;
  animation: fadeIn var(--transition-base);
}

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

/* Ensure first element has proper top spacing */
.tab-content > *:first-child,
.tab-content > div:first-child > *:first-child {
  margin-top: 0 !important;
  padding-top: var(--space-sm);
}

/* Remove excessive top margin from first h2 in sections */
.tab-content h2:first-child,
.tab-content > div > h2:first-child {
  margin-top: 0 !important;
  padding-top: var(--space-xs);
}

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

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  :root {
    --font-size-h1: 2rem;
    --font-size-h2: 1.75rem;
    --font-size-h3: 1.25rem;
    --container-padding: var(--space-md);
  }
  
  .header-content {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  
  .header-left {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
  }

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

  .profile-image {
    margin-bottom: var(--space-sm);
  }

  .tab-navigation {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
  }
  
  .tab-navigation::-webkit-scrollbar {
    height: 4px;
  }
  
  .tab-navigation::-webkit-scrollbar-thumb {
    background-color: var(--color-border);
    border-radius: var(--radius-sm);
  }
  
  .tab-button {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-small);
  }

  main.container {
    padding-top: 0;
    padding-bottom: 0;
  }

  .section {
    padding: 0;
  }

  .deep-dive-tiles {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --font-size-h1: 1.75rem;
    --font-size-h2: 1.5rem;
    --container-padding: var(--space-sm);
  }
  
  .tab-button {
    padding: var(--space-md);
    font-size: var(--font-size-small);
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.hidden { display: none !important; }
.visible { display: block !important; }

.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;
}

/* Skip link - visible on focus for accessibility */
.skip-link:focus {
  position: fixed;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 10000;
  width: auto;
  height: auto;
  padding: var(--space-md) var(--space-lg);
  background-color: var(--color-primary-blue);
  color: var(--color-bg-white);
  text-decoration: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-weight: var(--font-weight-semibold);
  clip: auto;
  overflow: visible;
}
