/* ============================================================
   MAIN.CSS — Design System & Core Styles
   Osho Raj Sheelup Portfolio
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Custom Properties: Dark Mode (Default) ── */
:root {
  /* Background layers */
  --bg-base:          #080a14;
  --bg-surface:       rgba(255, 255, 255, 0.06);
  --bg-surface-hover: rgba(255, 255, 255, 0.11);
  --bg-glass:         rgba(8, 10, 20, 0.55);
  --bg-glass-hover:   rgba(12, 14, 28, 0.68);

  /* Borders */
  --border-glass:     rgba(255, 255, 255, 0.14);
  --border-accent:    rgba(120, 170, 255, 0.40);
  --border-highlight: rgba(255, 255, 255, 0.30);

  /* Accent / Brand */
  --accent:           #7aabff;
  --accent-soft:      rgba(122, 171, 255, 0.14);
  --accent-glow:      rgba(122, 171, 255, 0.35);

  /* Secondary accent */
  --accent2:          #5ee8de;
  --accent2-soft:     rgba(94, 232, 222, 0.12);

  /* Text */
  --text-primary:     #eef0f8;
  --text-secondary:   #8892b0;
  --text-muted:       #4a5070;
  --text-on-accent:   #060810;

  /* Blur — strong iOS-style */
  --blur-glass:       blur(48px) saturate(200%);
  --blur-sm:          blur(16px) saturate(160%);

  /* Shadows */
  --shadow-card:    0 8px 40px rgba(0, 0, 0, 0.55),
                    inset 0 1px 0 rgba(255, 255, 255, 0.18),
                    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  --shadow-glow:    0 0 24px var(--accent-glow);
  --shadow-hover:   0 20px 60px rgba(0, 0, 0, 0.65),
                    inset 0 1px 0 rgba(255, 255, 255, 0.22);

  /* Radii */
  --radius-sm:      8px;
  --radius-md:      16px;
  --radius-lg:      22px;
  --radius-pill:    100px;

  /* Transitions */
  --transition-fast:   150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base:   280ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   450ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Spacing scale */
  --space-xs:   0.25rem;
  --space-sm:   0.5rem;
  --space-md:   1rem;
  --space-lg:   1.5rem;
  --space-xl:   2.5rem;
  --space-2xl:  4rem;

  /* Font sizes */
  --fs-xs:    0.75rem;
  --fs-sm:    0.875rem;
  --fs-base:  1rem;
  --fs-md:    1.125rem;
  --fs-lg:    1.35rem;
  --fs-xl:    1.75rem;
  --fs-2xl:   2.5rem;
  --fs-3xl:   3.5rem;
}

/* ── Light Mode Overrides ── */
[data-theme="light"] {
  --bg-base:          #e8ecf8;
  --bg-surface:       rgba(255, 255, 255, 0.45);
  --bg-surface-hover: rgba(255, 255, 255, 0.72);
  --bg-glass:         rgba(232, 236, 248, 0.55);
  --bg-glass-hover:   rgba(255, 255, 255, 0.75);

  --border-glass:     rgba(0, 0, 0, 0.07);
  --border-accent:    rgba(70, 120, 210, 0.32);
  --border-highlight: rgba(255, 255, 255, 0.80);

  --accent:           #3a7fd5;
  --accent-soft:      rgba(58, 127, 213, 0.12);
  --accent-glow:      rgba(58, 127, 213, 0.22);

  --accent2:          #20b5ab;
  --accent2-soft:     rgba(32, 181, 171, 0.10);

  --text-primary:     #12152a;
  --text-secondary:   #3d4565;
  --text-muted:       #8890b0;
  --text-on-accent:   #ffffff;

  --shadow-card:    0 8px 40px rgba(0, 0, 0, 0.08),
                    inset 0 1px 0 rgba(255, 255, 255, 0.90),
                    inset 0 -1px 0 rgba(0, 0, 0, 0.04);
  --shadow-glow:    0 0 24px var(--accent-glow);
  --shadow-hover:   0 20px 60px rgba(0, 0, 0, 0.13),
                    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-slow), color var(--transition-slow);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Background Mesh ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 15% 5%,  rgba(90, 140, 255, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 85% 90%, rgba(80, 230, 210, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 45% 40% at 55% 45%, rgba(160, 100, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 70% 55% at 15% 5%,  rgba(58, 127, 213, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 85% 90%, rgba(32, 181, 171, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse 45% 40% at 55% 45%, rgba(140, 80, 230, 0.05) 0%, transparent 60%);
}

/* ── Layout ── */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
  position: relative;
  z-index: 1;
}

main {
  padding-bottom: var(--space-2xl);
}

/* ── Typography ── */
h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--text-primary);
}

h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--text-primary);
}

h3 {
  font-family: 'Inter', sans-serif;
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
  font-size: var(--fs-base);
}

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

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

/* ── Mono ── */
.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ── Utility: Visually Hidden ── */
.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;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ── Selection ── */
::selection {
  background: var(--accent-soft);
  color: var(--text-primary);
}

/* ── Focus Ring ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Responsive Grid Helpers ── */
@media (max-width: 768px) {
  :root {
    --fs-3xl: 2.2rem;
    --fs-2xl: 1.8rem;
    --fs-xl:  1.4rem;
  }
  .container {
    padding: 0 var(--space-lg);
  }
  h1 { font-size: var(--fs-2xl); }
}

@media (max-width: 480px) {
  :root {
    --fs-3xl: 1.8rem;
  }
  .container { padding: 0 var(--space-md); }
}
