/* ============================================
   GLOBAL CSS - Variables, Reset, Base Styles
   Portfolio: Gohil Mohit
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* ---- CSS Custom Properties ---- */
:root {
  /* Color Palette - Electric Blue Accent */
  --color-bg: #F7F8FC;
  --color-surface: #FFFFFF;
  --color-surface-2: #F0F2FA;
  --color-accent: #4F8EF7;
  --color-accent-dark: #2D6FE0;
  --color-accent-light: #E8F0FE;
  --color-accent-2: #FF6B6B;
  --color-text: #111827;
  --color-text-muted: #6B7280;
  --color-text-light: #9CA3AF;
  --color-border: #E5E7EB;
  --color-border-strong: #D1D5DB;

  /* Dark Mode Colors */
  --color-dark-bg: #0D1117;
  --color-dark-surface: #161B22;
  --color-dark-surface-2: #1C2333;
  --color-dark-text: #E6EDF3;
  --color-dark-text-muted: #8B949E;
  --color-dark-border: #30363D;

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Sizing */
  --container-max: 1280px;
  --container-pad: clamp(1.5rem, 5vw, 3rem);
  --nav-height: 72px;

  /* Shadows */
  --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(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-accent: 0 8px 30px rgba(79,142,247,0.25);
  --shadow-glow: 0 0 40px rgba(79,142,247,0.15);

  /* Glassmorphism */
  --glass-bg: rgba(255,255,255,0.7);
  --glass-border: rgba(255,255,255,0.5);
  --glass-backdrop: blur(16px) saturate(180%);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
}

/* Dark Mode */
[data-theme="dark"] {
  --color-bg: var(--color-dark-bg);
  --color-surface: var(--color-dark-surface);
  --color-surface-2: var(--color-dark-surface-2);
  --color-text: var(--color-dark-text);
  --color-text-muted: var(--color-dark-text-muted);
  --color-border: var(--color-dark-border);
  --color-accent-light: rgba(79,142,247,0.15);
  --glass-bg: rgba(22,27,34,0.7);
  --glass-border: rgba(48,54,61,0.5);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-base), color var(--transition-base);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ---- Custom Cursor ---- */
.cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  background: var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease, background 0.2s ease;
  mix-blend-mode: multiply;
}

.cursor-follower {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 2px solid rgba(79,142,247,0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, width 0.3s ease, height 0.3s ease;
}

.cursor.hovered {
  width: 20px;
  height: 20px;
  background: var(--color-accent-2);
}

.cursor-follower.hovered {
  width: 56px;
  height: 56px;
  border-color: rgba(255,107,107,0.3);
}

[data-theme="dark"] .cursor {
  mix-blend-mode: screen;
}

@media (pointer: coarse) {
  .cursor, .cursor-follower { display: none; }
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* ---- Section Base ---- */
.section {
  padding: clamp(5rem, 10vw, 8rem) 0;
  position: relative;
}

.section__label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: 1.25rem;
}

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-bounce);
  cursor: pointer;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-accent);
  color: white;
  box-shadow: var(--shadow-accent);
}

.btn--primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(79,142,247,0.35);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-border-strong);
}

.btn--outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* ---- Scroll Reveal Animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal--left {
  transform: translateX(-32px);
}

.reveal--left.revealed {
  transform: translateX(0);
}

.reveal--right {
  transform: translateX(32px);
}

.reveal--right.revealed {
  transform: translateX(0);
}

/* Stagger delays */
.reveal[data-delay="100"] { transition-delay: 100ms; }
.reveal[data-delay="200"] { transition-delay: 200ms; }
.reveal[data-delay="300"] { transition-delay: 300ms; }
.reveal[data-delay="400"] { transition-delay: 400ms; }
.reveal[data-delay="500"] { transition-delay: 500ms; }
.reveal[data-delay="600"] { transition-delay: 600ms; }

/* ---- Scrollbar Styling ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 3px;
}

/* ---- Selection ---- */
::selection {
  background: rgba(79,142,247,0.2);
  color: var(--color-accent-dark);
}

/* ---- Noise Texture Overlay ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9997;
  opacity: 0.4;
}
