/* ===================================================================
   Pankaj TECH STUDIO - DESIGN SYSTEM & TOKENS (CSS VARIABLES)
   High-Performance, Advanced Engineering & Servicing Portfolio
   =================================================================== */

:root {
  /* Obsidian Dark (Default Premium Theme) */
  --bg-primary: #080b11;
  --bg-secondary: #0e131f;
  --bg-tertiary: #141b2d;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(26, 35, 56, 0.85);
  --bg-glass: rgba(14, 19, 31, 0.65);
  --bg-glass-strong: rgba(10, 14, 23, 0.88);

  /* Neon & Electric Accents */
  --accent-cyan: #00f0ff;
  --accent-cyan-glow: rgba(0, 240, 255, 0.25);
  --accent-blue: #3b82f6;
  --accent-blue-glow: rgba(59, 130, 246, 0.25);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-purple: #8b5cf6;
  --accent-purple-glow: rgba(139, 92, 246, 0.25);
  --accent-amber: #f59e0b;

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;
  --text-accent: #38bdf8;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-focus: rgba(0, 240, 255, 0.45);
  --border-glow: 0 0 20px rgba(0, 240, 255, 0.18);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 35px rgba(0, 240, 255, 0.15);

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;

  /* Dimensions & Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 400ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --container-max: 1280px;
  --container-wide: 1400px;
  --section-spacing: 120px;
  --section-spacing-mobile: 70px;
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-glass: rgba(255, 255, 255, 0.92);
  --bg-glass-strong: rgba(255, 255, 255, 0.98);

  --accent-cyan: #0284c7;
  --accent-cyan-glow: rgba(2, 132, 199, 0.2);
  --accent-blue: #2563eb;
  --accent-blue-glow: rgba(37, 99, 235, 0.2);
  --accent-emerald: #059669;
  --accent-emerald-glow: rgba(5, 150, 105, 0.2);
  --accent-purple: #7c3aed;
  --accent-purple-glow: rgba(124, 58, 237, 0.2);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #475569;
  --text-dim: #64748b;
  --text-accent: #0284c7;

  --border-subtle: rgba(15, 23, 42, 0.12);
  --border-medium: rgba(15, 23, 42, 0.22);
  --border-focus: #0284c7;
  --border-glow: 0 0 20px rgba(2, 132, 199, 0.18);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.1), 0 4px 10px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 35px rgba(2, 132, 199, 0.15);
}

/* ===================================================================
   GLOBAL RESETS & BASE STYLES
   =================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 75px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Global Typography & Safe Word Wrapping */
h1, h2, h3, h4, h5, h6, .section-title, .hero-title {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

p, span, .section-desc, .hero-subtitle {
  overflow-wrap: break-word;
  word-break: normal;
}

/* Global Media & Container Containment against horizontal overflow */
.container, .container-wide, .section, main, header, footer, section, [id] {
  max-width: 100%;
  box-sizing: border-box;
  scroll-margin-top: 75px;
}

pre, code {
  max-width: 100%;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
}

.ambient-glow {
  pointer-events: none;
  max-width: 100vw;
  overflow: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Selection */
::selection {
  background: rgba(0, 240, 255, 0.25);
  color: #ffffff;
}

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

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

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

button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

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

.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section {
  padding-top: var(--section-spacing);
  padding-bottom: var(--section-spacing);
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding-top: var(--section-spacing-mobile);
    padding-bottom: var(--section-spacing-mobile);
  }
}

/* Section Header Typography */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 60px auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
  backdrop-filter: blur(10px);
}

.section-tag svg {
  width: 14px;
  height: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.section-title .text-gradient {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Background Ambient Orbs */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.35;
  z-index: 0;
  will-change: transform;
  transform: translateZ(0);
}

.glow-cyan {
  background: radial-gradient(circle, var(--accent-cyan) 0%, rgba(0, 240, 255, 0) 70%);
}

.glow-purple {
  background: radial-gradient(circle, var(--accent-purple) 0%, rgba(139, 92, 246, 0) 70%);
}

.glow-blue {
  background: radial-gradient(circle, var(--accent-blue) 0%, rgba(59, 130, 246, 0) 70%);
}

.glow-emerald {
  background: radial-gradient(circle, var(--accent-emerald) 0%, rgba(16, 185, 129, 0) 70%);
}

/* Custom Interactive Cursor Glow */
.cursor-glow {
  position: fixed;
  top: -200px;
  left: -200px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.08) 0%, rgba(0, 240, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
  z-index: 999;
  transition: opacity 0.3s ease;
}

@media (max-width: 992px) {
  .cursor-glow {
    display: none;
  }
}
