/* ==========================================================================
   Design Tokens & Core Styles - Mayank Kumar Portfolio
   Aesthetic: Warm Creamy Off-White + Deep Charcoal (Faded Black)
   Warm luxury minimalism, editorial typography, subtle tactile borders
   ========================================================================== */

:root {
  /* Warm Creamy White + Charcoal Palette */
  --bg-primary: #F9F8F6;          /* Slightly creamy warm white background */
  --bg-surface: #FFFFFF;          /* Pure card surface */
  --bg-surface-warm: #FAF7F2;     /* Warm tinted surface */
  --bg-subtle: #F2EFE9;           /* Warm subtle container background */
  --bg-subtle-hover: #EAE5DC;     /* Hover state for subtle surfaces */
  
  --text-primary: #18181B;        /* Deep charcoal (faded black), high contrast */
  --text-secondary: #4A4A4F;      /* Refined dark charcoal body */
  --text-muted: #71717A;          /* Warm stone/charcoal muted text */
  --text-light: #A1A1AA;          /* Light stone text */
  
  --accent: #18181B;              /* Primary accent: Bold charcoal */
  --accent-hover: #27272A;        /* Slightly lighter charcoal hover */
  --accent-light: #EFECE6;        /* Warm creamy stone accent */
  --accent-subtle: #F4F1EA;       /* Very soft warm tint */
  --accent-contrast: #FFFFFF;     /* Contrast text on dark buttons */
  
  --border-light: #E6E1D8;        /* Subtle warm stone border */
  --border-subtle: #EFECE6;       /* Very light card separator */
  --border-hover: #CFC9BC;        /* Active/hover border state */

  --status-live: #27272A;
  --status-live-bg: #EFECE6;
  --status-live-border: #DDD8CE;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Minimal Editorial Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(24, 24, 27, 0.03);
  --shadow-sm: 0 1px 3px 0 rgba(24, 24, 27, 0.05), 0 1px 2px -1px rgba(24, 24, 27, 0.04);
  --shadow-md: 0 4px 8px -1px rgba(24, 24, 27, 0.06), 0 2px 4px -2px rgba(24, 24, 27, 0.04);
  --shadow-lg: 0 12px 20px -3px rgba(24, 24, 27, 0.06), 0 4px 6px -4px rgba(24, 24, 27, 0.03);
  --shadow-xl: 0 20px 30px -5px rgba(24, 24, 27, 0.07), 0 8px 10px -6px rgba(24, 24, 27, 0.03);
  
  /* Radii */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Layout & Spacing */
  --container-max: 1160px;
  --navbar-height: 4.5rem;
}

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

html {
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 1rem;
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.section {
  padding-top: 3.25rem;
  padding-bottom: 3.25rem;
}

@media (min-width: 768px) {
  .section {
    padding-top: 4.25rem;
    padding-bottom: 4.25rem;
  }
}

/* Section Header Styles */
.section-header {
  text-align: center;
  max-width: 44rem;
  margin: 0 auto 2rem;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.25rem;
  }
}

.section-subtitle {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.875rem 1.625rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  line-height: 1;
}

/* Primary Button: Solid Deep Charcoal with White Text */
.btn-primary {
  background-color: var(--text-primary);
  color: #FFFFFF;
  border: 1px solid var(--text-primary);
  box-shadow: 0 4px 12px rgba(24, 24, 27, 0.15);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(24, 24, 27, 0.22);
}

/* Secondary Button: Clean warm creamy surface with subtle border */
.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
}

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

.btn-sm {
  padding: 0.5625rem 1rem;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
}

/* Pills and Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background-color: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
}

.badge-accent {
  background-color: var(--accent-subtle);
  color: var(--text-primary);
  border-color: var(--border-light);
  font-weight: 600;
}

.badge-featured {
  background-color: var(--text-primary);
  color: #FFFFFF;
  border-color: var(--text-primary);
}

/* Scroll Animation Classes */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Accessibility: prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .fade-in-section {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .btn, .project-card, .portrait-card {
    transition: none !important;
    transform: none !important;
  }
}
