/* ============================================================
   DESIGN SYSTEM — index.css
   Premium Portfolio | Prathamesh Bhosale
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Manrope:wght@300;400;500;600;700;800&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Colors */
  --primary: #6ee7b7;
  --primary-light: #a7f3d0;
  --primary-dark: #059669;
  --secondary: #60adf6;
  --secondary-light: #93c5fd;
  --secondary-dark: #2563eb;
  --bg-white: #0b1220;
  --bg-light: #071022;
  --bg-dark: #030712;
  --bg-dark-card: #0f1724;
  --text-dark: #e6eef6;
  --text-body: #9aa3b2;
  --text-muted: #64748b;
  --text-light: #ffffff;
  --border-color: rgba(255, 255, 255, 0.04);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6ee7b7 0%, #60adf6 100%);
  --gradient-primary-hover: linear-gradient(135deg, #60adf6 0%, #6ee7b7 100%);
  --gradient-dark: linear-gradient(135deg, #071022 0%, #0b1220 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.01) 100%);

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter', sans-serif;

  /* Font Sizes — Fluid */
  --fs-hero: clamp(2.2rem, 4.5vw, 3.2rem);
  --fs-h1: clamp(1.8rem, 3.2vw, 2.8rem);
  --fs-h2: clamp(1.6rem, 2.8vw, 2.4rem);
  --fs-h3: clamp(1.15rem, 1.8vw, 1.5rem);
  --fs-h4: clamp(1.05rem, 1.3vw, 1.2rem);
  --fs-body: clamp(0.9rem, 1.1vw, 1rem);
  --fs-small: clamp(0.78rem, 0.9vw, 0.85rem);
  --fs-xs: 0.72rem;

  /* Font Weights */
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;
  --fw-black: 900;

  /* Spacing */
  --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;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 50%;
  --radius-pill: 100px;

  /* Shadows — Premium multi-layer */
  --shadow-sm: 0 2px 8px rgba(2, 6, 23, 0.4), 0 1px 3px rgba(2, 6, 23, 0.2);
  --shadow-md: 0 4px 16px rgba(2, 6, 23, 0.5), 0 2px 6px rgba(2, 6, 23, 0.3);
  --shadow-lg: 0 8px 32px rgba(2, 6, 23, 0.6), 0 4px 12px rgba(2, 6, 23, 0.4);
  --shadow-xl: 0 16px 48px rgba(2, 6, 23, 0.7), 0 8px 24px rgba(2, 6, 23, 0.5);
  --shadow-glow-primary: 0 0 30px rgba(110, 231, 183, 0.15), 0 0 60px rgba(110, 231, 183, 0.05);
  --shadow-glow-gold: 0 0 30px rgba(96, 173, 246, 0.15), 0 0 60px rgba(96, 173, 246, 0.05);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Glass */
  --glass-bg: rgba(15, 23, 36, 0.6);
  --glass-border: rgba(255, 255, 255, 0.04);
  --glass-blur: 20px;

  /* Z-index scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-cursor: 500;
  --z-loader: 600;

  /* Layout */
  --container-max: 1100px;
  --container-wide: 1100px;
  --nav-height: 80px;
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
  --bg-white: #030712;
  --bg-light: #070b18;
  --bg-dark: #01030a;
  --bg-dark-card: #090e1a;
  --text-dark: #ffffff;
  --text-body: #94a3b8;
  --text-muted: #475569;
  --border-color: rgba(255, 255, 255, 0.03);
  --glass-bg: rgba(3, 7, 18, 0.7);
  --glass-border: rgba(255, 255, 255, 0.03);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: 1.7;
  color: var(--text-body);
  background-color: var(--bg-white);
  background-image: 
    radial-gradient(1200px 600px at 10% 10%, rgba(96, 173, 246, 0.05), rgba(0, 0, 0, 0)),
    radial-gradient(900px 400px at 90% 90%, rgba(110, 231, 183, 0.04), rgba(0, 0, 0, 0)),
    linear-gradient(180deg, var(--bg-light) 0%, var(--bg-white) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

body.loading {
  overflow: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: var(--radius-pill);
}

/* ---------- Base Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-dark);
  line-height: 1.2;
  font-weight: var(--fw-bold);
  transition: color var(--transition-slow);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p {
  line-height: 1.8;
  color: var(--text-body);
  transition: color var(--transition-slow);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

/* ---------- Utility Classes ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section {
  padding: var(--space-5xl) 0;
  position: relative;
}

.section-dark {
  background-color: rgba(3, 7, 18, 0.4);
  color: var(--text-light);
}

.section-light {
  background-color: rgba(7, 16, 34, 0.2);
}

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

.section-label {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 3px;
  text-transform: uppercase;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-md);
}

.section-title {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 60px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.section-header .section-title::after {
  left: 50%;
  transform: translateX(-50%);
}

.section-subtitle {
  max-width: 600px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: var(--fs-body);
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* ---------- Glassmorphism ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
}

/* ---------- Gradient Border ---------- */
.gradient-border {
  position: relative;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1.5px;
  background: var(--gradient-primary);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Selection ---------- */
::selection {
  background: rgba(110, 231, 183, 0.15);
  color: var(--primary);
}

/* ---------- Focus Styles (Accessibility) ---------- */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Screen Reader Only ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
