/**
 * Suravi Sehgal — Portfolio Core Design System
 * Deep-dark, high-contrast, precision-engineered aesthetic
 */

:root {
  /* Color Palette */
  --bg: #040711;
  --bg-elev: #080d1e;
  --bg-card: rgba(10, 16, 35, 0.72);
  --bg-card-hover: rgba(14, 22, 48, 0.88);
  
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.065);
  --surface-3: rgba(255, 255, 255, 0.1);

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-glow: rgba(103, 232, 249, 0.35);

  --text-main: #f0f4fa;
  --text-muted: #9db0cc;
  --text-dim: #60728f;

  /* Accents */
  --cyan: #38bdf8;
  --cyan-bright: #67e8f9;
  --violet: #818cf8;
  --purple: #c084fc;
  --emerald: #34d399;
  --amber: #fbbf24;

  --accent: #38bdf8;
  --accent-secondary: #818cf8;
  --accent-glow: rgba(56, 189, 248, 0.22);
  --accent-glow-strong: rgba(56, 189, 248, 0.45);

  --grad-text: linear-gradient(110deg, #67e8f9 0%, #818cf8 50%, #c084fc 100%);
  --grad-btn: linear-gradient(120deg, #38bdf8, #818cf8);
  --grad-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  --grad-badge: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(129, 140, 248, 0.12));

  /* Typography */
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Dimensions & Spacing */
  --container: 1220px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --nav-h: 76px;

  /* Animations */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

::selection {
  background: rgba(56, 189, 248, 0.3);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.25s var(--ease);
}

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

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

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  z-index: 9999;
  background: var(--cyan);
  color: #040711;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 20px;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Atmosphere & Canvas Layers */
.canvas-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.85;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 85% 65% at 50% 10%, #000 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 10%, #000 35%, transparent 80%);
}

.bg-glow-blobs {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.16;
}

.blob-1 {
  width: 650px;
  height: 500px;
  top: -120px;
  right: -50px;
  background: radial-gradient(circle, var(--cyan), transparent 70%);
}

.blob-2 {
  width: 700px;
  height: 550px;
  top: 15%;
  left: -150px;
  background: radial-gradient(circle, var(--violet), transparent 70%);
}

.blob-3 {
  width: 800px;
  height: 600px;
  bottom: 5%;
  right: 10%;
  background: radial-gradient(circle, var(--purple), transparent 70%);
}

/* Cursor Glow Spotlight */
.cursor-spotlight {
  position: fixed;
  top: -250px;
  left: -250px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.065), transparent 65%);
  mix-blend-mode: screen;
  will-change: transform;
}

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

.section {
  padding-block: 7rem;
  position: relative;
}

.section-tight {
  padding-block: 4.5rem;
}

.section-head {
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.9rem;
}

.section-tag::before {
  content: "";
  display: inline-block;
  width: 1.8rem;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-bottom: 1rem;
}

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

.section-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 64ch;
  line-height: 1.7;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-btn);
  color: #030712;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.28);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(56, 189, 248, 0.42);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text-main);
  border-color: var(--border-strong);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  transform: translateY(-2px);
  background: var(--surface-3);
  border-color: var(--cyan);
  color: #fff;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.15);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(56, 189, 248, 0.05);
}

.btn-github {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  font-weight: 600;
}
.btn-github:hover {
  background: #fff;
  color: #040711;
  border-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 255, 255, 0.25);
}

.btn-live {
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan-bright);
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.btn-live:hover {
  background: var(--cyan);
  color: #040711;
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.3);
}

.btn-details {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  padding: 0.7rem 1.1rem;
}
.btn-details:hover {
  background: var(--surface-2);
  color: var(--text-main);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 0.95rem 2rem;
  font-size: 1.02rem;
}

.btn-sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
}

/* Badges & Chips */
.tech-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  transition: all 0.2s var(--ease);
}
.tech-pill:hover {
  border-color: var(--cyan);
  color: var(--cyan-bright);
  background: rgba(56, 189, 248, 0.08);
}

.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(14, 22, 48, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cyan-bright);
  backdrop-filter: blur(10px);
}

.award-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--amber);
  backdrop-filter: blur(10px);
}

/* Toast Alerts */
.portfolio-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.4rem;
  background: rgba(8, 13, 30, 0.94);
  border: 1px solid var(--border-glow);
  color: var(--text-main);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.2);
  backdrop-filter: blur(16px);
  font-size: 0.92rem;
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.portfolio-toast.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
