/* dynamic-portfolio/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Apple iOS Glass Dark Palette (Default) */
  --bg-base: #060911;
  --bg-surface: #0c1220;
  --bg-card: rgba(16, 24, 40, 0.65);
  --bg-card-hover: rgba(24, 36, 60, 0.82);
  --bg-glass: rgba(12, 18, 32, 0.72);
  --bg-glass-heavy: rgba(8, 12, 22, 0.88);
  --bg-control: rgba(255, 255, 255, 0.08);
  --surface-translucent: rgba(12, 18, 32, 0.72);

  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-highlight: rgba(255, 255, 255, 0.24);
  --border-hover: rgba(0, 242, 254, 0.45);
  --border-ios: rgba(255, 255, 255, 0.16);
  --border-glass: rgba(255, 255, 255, 0.14);
  --border-glass-bright: rgba(0, 242, 254, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-heading: #ffffff;

  /* Vibrant iOS Neon Accents */
  --accent-cyan: #00f2fe;
  --accent-blue: #0a84ff;
  --accent-purple: #bf5af2;
  --accent-emerald: #30d158;
  --accent-amber: #ffd60a;
  --accent-coral: #ff375f;

  --gradient-ios: linear-gradient(135deg, #0a84ff 0%, #00f2fe 50%, #bf5af2 100%);
  --gradient-primary: linear-gradient(135deg, #0a84ff 0%, #00f2fe 50%, #bf5af2 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
  --gradient-aurora: radial-gradient(circle at 50% 0%, rgba(10, 132, 255, 0.22), rgba(191, 90, 242, 0.12) 50%, transparent 80%);

  /* iOS Spec Shadows */
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37), inset 0 1px 0 0 rgba(255, 255, 255, 0.18);
  --shadow-glow: 0 0 40px rgba(0, 242, 254, 0.25);

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Apple Smooth Radii */
  --radius-xs: 8px;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --radius-pill: 9999px;

  /* Apple Spring Physics Timing */
  --spring-fast: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  --spring-smooth: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  --spring-bounce: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-medium: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Luminous Modern Apple Silicon & Linear Luxury Light Theme */
[data-theme="light"] {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(255, 255, 255, 0.82);
  --bg-glass-heavy: rgba(255, 255, 255, 0.95);
  --bg-control: rgba(15, 23, 42, 0.05);
  --surface-translucent: rgba(255, 255, 255, 0.85);

  --border-subtle: rgba(203, 213, 225, 0.75);
  --border-highlight: rgba(255, 255, 255, 0.95);
  --border-hover: rgba(37, 99, 235, 0.45);
  --border-ios: rgba(148, 163, 184, 0.28);
  --border-glass: rgba(203, 213, 225, 0.8);
  --border-glass-bright: rgba(2, 132, 199, 0.35);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-heading: #090d16;

  /* Vivid luxury accents for light mode */
  --accent-cyan: #0284c7;
  --accent-blue: #2563eb;
  --accent-purple: #7c3aed;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-coral: #e11d48;

  --gradient-ios: linear-gradient(135deg, #2563eb 0%, #0284c7 45%, #7c3aed 100%);
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #0284c7 45%, #7c3aed 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.55) 100%);
  --gradient-aurora: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.08) 50%, transparent 80%);

  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 50px rgba(15, 23, 42, 0.12);
  --shadow-glass: 0 10px 32px rgba(15, 23, 42, 0.06), inset 0 1px 0 0 rgba(255, 255, 255, 1);
  --shadow-glow: 0 8px 32px rgba(37, 99, 235, 0.18);
}

/* Dynamic Configurable Color Palettes (Controlled via Admin) */
body[data-palette="royal-violet"] {
  --accent-blue: #7c3aed;
  --accent-cyan: #c084fc;
  --gradient-ios: linear-gradient(135deg, #7c3aed 0%, #ec4899 50%, #8b5cf6 100%);
}
body[data-palette="emerald-matrix"] {
  --accent-blue: #059669;
  --accent-cyan: #10b981;
  --gradient-ios: linear-gradient(135deg, #059669 0%, #10b981 50%, #06b6d4 100%);
}
body[data-palette="crimson-flame"] {
  --accent-blue: #e11d48;
  --accent-cyan: #f43f5e;
  --gradient-ios: linear-gradient(135deg, #e11d48 0%, #fb7185 50%, #f97316 100%);
}
body[data-palette="luxury-gold"] {
  --accent-blue: #d97706;
  --accent-cyan: #f59e0b;
  --gradient-ios: linear-gradient(135deg, #d97706 0%, #fbbf24 50%, #b45309 100%);
}

/* Interactive Animated Cyber Constellation Canvas */
.cyber-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
  transition: opacity 0.5s ease;
}
[data-theme="light"] .cyber-canvas {
  opacity: 0.45;
}

/* =========================================================================
   UNIVERSAL MODERN CSS RESET & NORMALIZATION (CROSS-BROWSER)
   ========================================================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  font-size: clamp(14px, 0.95vw + 10px, 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 242, 254, 0.4) var(--bg-base);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  width: 100%;
  min-width: 320px;
  position: relative;
  transition: background-color var(--spring-smooth), color var(--spring-smooth);
}

/* Fluid Media & Image Safety */
img, picture, video, canvas, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

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

/* Selection */
::selection {
  background: var(--accent-blue);
  color: #ffffff;
}

/* Custom Scrollbar (Webkit & Modern) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--gradient-ios);
  z-index: 9999;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 14px var(--accent-blue);
}

/* iOS Dynamic Aurora Blobs */
.ambient-glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.55;
  will-change: transform;
}

.glow-1 {
  width: clamp(300px, 45vw, 650px);
  height: clamp(300px, 45vw, 650px);
  background: radial-gradient(circle, rgba(10, 132, 255, 0.28) 0%, transparent 70%);
  top: -120px;
  left: -150px;
  animation: auroraFlow 20s ease-in-out infinite alternate;
}

.glow-2 {
  width: clamp(350px, 50vw, 750px);
  height: clamp(350px, 50vw, 750px);
  background: radial-gradient(circle, rgba(191, 90, 242, 0.24) 0%, transparent 70%);
  top: 38%;
  right: -220px;
  animation: auroraFlow 24s ease-in-out infinite alternate-reverse;
}

.glow-3 {
  width: clamp(280px, 40vw, 550px);
  height: clamp(280px, 40vw, 550px);
  background: radial-gradient(circle, rgba(48, 209, 88, 0.18) 0%, transparent 70%);
  bottom: 8%;
  left: 10%;
  animation: auroraFlow 28s ease-in-out infinite alternate;
}

@keyframes auroraFlow {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  50% { transform: translate(70px, 50px) scale(1.12) rotate(15deg); }
  100% { transform: translate(-50px, 90px) scale(0.92) rotate(-15deg); }
}

/* Interactive Cursor Follower */
.cursor-glow {
  position: fixed;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.1) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: opacity 0.3s ease;
}

/* Base Containers & Responsive Layout */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 max(1.5rem, env(safe-area-inset-left)) 0 max(1.5rem, env(safe-area-inset-right));
  position: relative;
  z-index: 2;
}

section {
  padding: clamp(3.5rem, 7vw, 6.5rem) 0;
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Typography with Fluid clamp() */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  word-break: break-word;
  overflow-wrap: break-word;
}

h1 { font-size: clamp(2.2rem, 5vw + 1rem, 3.8rem); }
h2 { font-size: clamp(1.85rem, 4vw + 0.8rem, 2.85rem); }
h3 { font-size: clamp(1.35rem, 2.5vw + 0.5rem, 1.85rem); }
h4 { font-size: clamp(1.1rem, 1.8vw + 0.4rem, 1.35rem); }

.gradient-text {
  background: var(--gradient-ios);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto clamp(2.5rem, 5vw, 4.5rem) auto;
  padding: 0 0.5rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.2vw, 0.84rem);
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid rgba(0, 242, 254, 0.28);
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.section-title {
  font-size: clamp(1.95rem, 4.5vw + 0.5rem, 2.95rem);
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.5vw + 0.3rem, 1.15rem);
  line-height: 1.7;
}

/* Apple iOS Buttons & Micro-Interactions (Min 44px Touch Target) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 48px;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-heading);
  font-size: clamp(0.9rem, 1.2vw, 0.98rem);
  font-weight: 600;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--spring-fast);
  border: 1px solid transparent;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

/* iPhone Haptic Press feedback */
.btn:active,
.btn-active-press:active {
  transform: scale(0.95) !important;
}

.btn-primary {
  background: var(--gradient-ios);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(10, 132, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(10, 132, 255, 0.5);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-subtle);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-glass);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-outline:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Glass Card Utility */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-glass);
  border-radius: var(--radius-lg);
  transition: all var(--spring-smooth);
}

.glass-panel:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
}

/* Scroll Entrance Animation Classes */
.ios-reveal {
  opacity: 0;
  transform: translateY(35px) scale(0.98);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

/* =========================================================================
   UNIVERSAL RESPONSIVE BREAKPOINT ARCHITECTURE
   ========================================================================= */

/* 1. ULTRA-WIDE SCREENS (4K, Ultra-Wide 34"+ Monitors >= 1441px) */
@media (min-width: 1441px) {
  .container {
    max-width: 1440px;
  }
  section {
    padding: 7.5rem 0;
  }
}

/* 2. LAPTOP & COMPACT DESKTOP (1025px - 1200px) */
@media (max-width: 1200px) {
  .container {
    max-width: 1080px;
    padding: 0 1.5rem;
  }
}

/* 3. TABLET LANDSCAPE & COMPACT LAPTOPS (993px - 1024px) */
@media (max-width: 1024px) {
  .container {
    max-width: 100%;
    padding: 0 1.5rem;
  }
  section {
    padding: clamp(4rem, 6vw, 5.5rem) 0;
  }
}

/* 4. TABLET PORTRAIT (769px - 992px) */
@media (max-width: 992px) {
  .container {
    padding: 0 1.35rem;
  }
  section {
    padding: clamp(3.5rem, 5vw, 4.5rem) 0;
  }
}

/* 5. MOBILE STANDARD & PHABLETS (481px - 768px) */
@media (max-width: 768px) {
  .container {
    padding: 0 max(1.1rem, env(safe-area-inset-left)) 0 max(1.1rem, env(safe-area-inset-right));
  }
  .cursor-glow {
    display: none;
  }
  section {
    padding: 3.5rem 0;
  }
  .section-header {
    margin-bottom: 2.5rem;
  }
  .ambient-glow {
    filter: blur(80px);
    opacity: 0.35;
  }
}

/* 6. MOBILE SMALL & COMPACT PHONES (<= 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 max(0.9rem, env(safe-area-inset-left)) 0 max(0.9rem, env(safe-area-inset-right));
  }
  section {
    padding: 3rem 0;
  }
  .btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
  }
}

/* 7. EXTRA SMALL DEVICES (<= 360px) */
@media (max-width: 360px) {
  .container {
    padding: 0 0.75rem;
  }
}

