:root {
  /* Brand Colors - Trustworthy + Innovative + Developer-Focused */
  --primary-blue: #1e3a8a; /* Deep blue - trustworthy, professional */
  --primary-blue-light: #3b82f6; /* Lighter blue for interactive elements */
  --primary-blue-dark: #1e293b; /* Dark blue for headers */
  
  --secondary-teal: #06b6d4; /* Vibrant teal - innovative, energetic */
  --secondary-teal-light: #22d3ee;
  --secondary-teal-dark: #0891b2;
  
  --accent-orange: #f97316; /* Warm orange - call to action */
  --accent-purple: #8b5cf6; /* Purple - creative, technical */
  
  /* Neutrals */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Semantic Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #06b6d4;
  
  /* Legacy brand colors for skill icons */
  --html-color: #e34c26;
  --css-color: #264de4;
  --js-color: #f7df1e;
  --react-color: #61dafb;
  --node-color: #6cc24a;
  --python-color: #3776ab;
  
  /* Typography Scale - Modular Scale 1.25 */
  --font-base: 18px;
  --font-sm: 0.875rem;
  --font-md: 1rem;
  --font-lg: 1.125rem;
  --font-xl: 1.25rem;
  --font-2xl: 1.563rem;
  --font-3xl: 1.953rem;
  --font-4xl: 2.441rem;
  --font-5xl: 3.052rem;
  
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
}
html {
  font-size: var(--font-base);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: var(--line-height-normal);
  width: 100%;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-loading body {
  overflow: hidden;
}

.page-loading body > :not(.page-loader) {
  visibility: hidden;
}

.page-loader {
  display: none;
}

.page-loading .page-loader {
  align-items: center;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1.5rem;
  position: fixed;
  z-index: 9999;
}

.page-loader-dialog {
  align-items: center;
  background: var(--bg-primary);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  color: var(--primary-blue-dark);
  display: flex;
  flex-direction: column;
  font-size: var(--font-lg);
  font-weight: var(--font-weight-semibold);
  gap: 1rem;
  max-width: 22rem;
  padding: 2rem;
  text-align: center;
  width: 100%;
}

.page-loader-spinner {
  animation: page-loader-spin 0.8s linear infinite;
  border: 4px solid var(--gray-300);
  border-radius: 50%;
  border-top-color: var(--primary-blue);
  height: 3rem;
  width: 3rem;
}

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

@media (prefers-reduced-motion: reduce) {
  .page-loader-spinner {
    animation: none;
  }
}

main {
  flex: 1;
  padding-bottom: 2rem;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--primary-blue-dark);
  margin-top: 0;
}

h1 {
  font-size: var(--font-5xl);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: var(--font-4xl);
  margin-bottom: 1.25rem;
}

h3 {
  font-size: var(--font-3xl);
  margin-bottom: 1rem;
}

h4 {
  font-size: var(--font-2xl);
  margin-bottom: 0.875rem;
}

h1 {
  color: #333;
}

.container-fluid {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.color-primary {
  color: var(--primary-blue);
}
.color-secondary {
  color: var(--text-secondary);
}

.profile-image {
  border: 3px solid black;
  height: 600px;
  width: 600px;
}

.social-icon {
  width: 32px;
  height: 32px;
}

.page-title {
  font-size: var(--font-4xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: 1.5rem;
}

.page-content {
  font-size: var(--font-lg);
  line-height: var(--line-height-relaxed);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.expertise-card {
  background: var(--bg-primary);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
}

.expertise-card-wide {
  grid-column: 1 / -1;
}

.expertise-card h3 {
  align-items: center;
  border-bottom: 2px solid var(--secondary-teal);
  display: flex;
  font-size: var(--font-xl);
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
}

.expertise-card h3 i {
  color: var(--accent-purple);
  flex: 0 0 1.5rem;
  text-align: center;
}

.expertise-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.expertise-list li {
  background: var(--bg-tertiary);
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  color: var(--primary-blue);
  font-size: var(--font-sm);
  font-weight: var(--font-weight-medium);
  padding: 0.4rem 0.75rem;
}

/* Buttons and CTAs */
.btn-primary-custom {
  background-color: var(--primary-blue);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary-custom:hover {
  background-color: var(--primary-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
  color: white;
}

.btn-secondary-custom {
  background-color: var(--secondary-teal);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-secondary-custom:hover {
  background-color: var(--secondary-teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
  color: white;
}

.btn-outline-custom {
  background-color: transparent;
  color: var(--primary-blue);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
  border: 2px solid var(--primary-blue);
  cursor: pointer;
}

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

/* Links */
a {
  color: var(--secondary-teal);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--secondary-teal-dark);
  text-decoration: underline;
}

/* Hero Section Styles */
.hero-section {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--gray-100) 100%);
  padding: 3rem 0;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.hero-headline {
  font-size: var(--font-5xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: 1rem;
}

.hero-subheadline {
  font-size: var(--font-3xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  margin-bottom: 1.5rem;
}

.hero-metrics {
  display: flex;
  gap: 2rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.hero-metric {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--font-lg);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
}

.hero-metric i {
  color: var(--secondary-teal);
}

.cta-group {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Skills Section */
.skills-section {
  width: 100%;
  max-width: 1200px;
}

.skills-category-title {
  font-size: var(--font-2xl);
  font-weight: var(--font-weight-semibold);
  color: var(--primary-blue-dark);
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--secondary-teal);
}

/* About Page Sections */
.about-summary {
  align-items: center;
  background: var(--bg-tertiary);
  border-left: 4px solid var(--secondary-teal);
  border-radius: 12px;
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 2rem;
}

.about-profile-image {
  border: 4px solid var(--bg-primary);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
  flex: 0 0 160px;
  height: 160px;
  object-fit: cover;
  width: 160px;
}

.about-summary-content {
  flex: 1;
}

.about-summary h2 {
  font-size: var(--font-2xl);
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.about-summary .page-content {
  margin-bottom: 0;
}

.section-heading {
  font-size: var(--font-2xl);
  font-weight: var(--font-weight-semibold);
  color: var(--primary-blue-dark);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gray-300);
}

/* Portfolio Cards */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.portfolio-card {
  background: var(--bg-primary);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.portfolio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--secondary-teal);
}

.portfolio-card-header {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
  color: white;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.portfolio-icon {
  align-items: center;
  font-size: 2rem;
  color: var(--secondary-teal-light);
  display: inline-flex;
  flex: 0 0 2rem;
  height: 2rem;
  justify-content: center;
  line-height: 1;
  width: 2rem;
}

.portfolio-card-title,
.portfolio-card-header h2,
.portfolio-card-header h3 {
  align-items: center;
  display: flex;
  line-height: 1.2;
  margin: 0;
  font-size: var(--font-xl);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.blog-card-header {
  background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--accent-purple) 100%);
}

.portfolio-card-body {
  padding: 1.5rem;
  flex: 1;
}

.portfolio-card-body p {
  font-size: var(--font-md);
  line-height: var(--line-height-normal);
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.portfolio-card-body ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.portfolio-card-body li {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tech-tag {
  background: var(--bg-tertiary);
  color: var(--primary-blue);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: var(--font-sm);
  font-weight: var(--font-weight-medium);
  border: 1px solid var(--gray-300);
}

.portfolio-card-footer {
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--gray-200);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: var(--font-sm);
}

.content-status {
  background: var(--bg-primary);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  color: var(--text-secondary);
  margin-top: 2rem;
  padding: 2rem;
  text-align: center;
}

.content-status-error {
  border-left: 4px solid var(--error);
}

.content-status-empty {
  border-left: 4px solid var(--info);
}

.content-status-title {
  color: var(--primary-blue-dark);
  font-size: var(--font-2xl);
  margin-bottom: 1rem;
}

.content-status p {
  margin-bottom: 1.5rem;
}

.project-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: var(--font-weight-semibold);
  margin-bottom: 1.5rem;
}

.project-detail {
  background: var(--bg-primary);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 2rem;
}

.project-summary {
  color: var(--text-secondary);
  font-size: var(--font-xl);
  line-height: var(--line-height-relaxed);
  margin-bottom: 1.5rem;
}

.project-section {
  margin-top: 2rem;
}

.project-section .page-content:last-child {
  margin-bottom: 0;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.project-highlights {
  color: var(--text-secondary);
  font-size: var(--font-lg);
  line-height: var(--line-height-relaxed);
  margin-bottom: 0;
  padding-left: 1.5rem;
}

.project-highlights li {
  margin-bottom: 0.75rem;
}

.project-tech-tags {
  margin-bottom: 0;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-image {
  background: var(--bg-secondary);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  margin: 0;
  overflow: hidden;
}

.project-image img {
  display: block;
  height: auto;
  width: 100%;
}

.project-image figcaption {
  color: var(--text-muted);
  font-size: var(--font-sm);
  padding: 0.75rem 1rem;
}

.blog-metadata,
.blog-post-metadata {
  color: var(--text-muted);
  font-size: var(--font-sm);
  font-weight: var(--font-weight-medium);
}

.portfolio-card-body .blog-metadata {
  color: var(--text-muted);
  font-size: var(--font-sm);
  margin-bottom: 0.75rem;
}

.blog-post-metadata {
  margin-bottom: 1rem;
}

.blog-post-tags {
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
}

.blog-post-section {
  max-width: 850px;
}

.resume-viewer {
  background: var(--bg-primary);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.resume-actions {
  align-items: center;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
}

.resume-pages {
  align-items: center;
  background: var(--gray-300);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.resume-page {
  background: white;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
  display: block;
  height: auto !important;
  max-width: 100%;
}

.btn-primary-custom:focus-visible,
.btn-secondary-custom:focus-visible,
.btn-outline-custom:focus-visible,
.project-back-link:focus-visible,
.nav-link-custom:focus-visible {
  outline: 3px solid var(--primary-blue);
  outline-offset: 3px;
}

/* Header and Navigation */
header {
  background: var(--bg-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-name {
  font-weight: var(--font-weight-bold);
  color: var(--primary-blue-dark);
}

.nav-link-custom {
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  transition: all 0.2s ease;
  border-radius: 8px;
  padding: 0.5rem 1rem;
}

.nav-link-custom:hover {
  color: var(--primary-blue);
  background-color: var(--bg-secondary);
}

.nav-link-custom.active {
  color: white;
  background-color: var(--primary-blue);
}

.nav-link-custom.active:hover {
  background-color: var(--primary-blue-dark);
}

/* Footer */
footer {
  background: var(--bg-primary);
  border-top: 2px solid var(--gray-200);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-headline {
    font-size: var(--font-4xl);
  }
  
  .hero-subheadline {
    font-size: var(--font-2xl);
  }
  
  .hero-metrics {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .cta-group {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-primary-custom,
  .btn-secondary-custom,
  .btn-outline-custom {
    width: 100%;
    text-align: center;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .expertise-grid {
    grid-template-columns: 1fr;
  }

  .expertise-card-wide {
    grid-column: auto;
  }

  .about-summary {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }

  .about-profile-image {
    flex-basis: 140px;
    height: 140px;
    width: 140px;
  }

  .project-detail {
    padding: 1.25rem;
  }

  .project-actions {
    flex-direction: column;
  }

  .project-actions .btn-primary-custom,
  .project-actions .btn-secondary-custom {
    text-align: center;
    width: 100%;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }

  .resume-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .resume-pages {
    padding: 0.5rem;
  }
}
