/* ==========================================================================
   MDMN CHESS - PREMIUM 3D & GLASSMORPHISM DESIGN SYSTEM
   Theme: Deep Midnight Navy, Regal Gold, Electric Purple, Cyber Teal
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700;800&display=swap');

/* --------------------------------------------------------------------------
   1. CSS VARIABLES & THEMES
   -------------------------------------------------------------------------- */
:root {
  /* Dark Mode Default - Deep Midnight Navy & Regal Gold */
  --bg-primary: #070B14;
  --bg-secondary: #0F172A;
  --bg-tertiary: #1E293B;
  --bg-card: rgba(15, 23, 42, 0.65);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.75);
  
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --accent-gold: #F59E0B;
  --accent-gold-bright: #FBBF24;
  --accent-gold-hover: #D97706;
  --accent-gold-light: rgba(245, 158, 11, 0.12);
  --accent-gold-glow: rgba(245, 158, 11, 0.35);
  
  --brand-yellow: #FFD200;
  --brand-yellow-bright: #FFE033;
  --brand-yellow-hover: #E6BD00;
  --brand-yellow-light: rgba(255, 210, 0, 0.15);
  --brand-yellow-glow: rgba(255, 210, 0, 0.35);
  
  --accent-purple: #8B5CF6;
  --accent-purple-light: rgba(139, 92, 246, 0.15);
  --accent-teal: #14B8A6;
  --accent-teal-light: rgba(20, 184, 166, 0.15);
  --accent-emerald: #10B981;
  --accent-emerald-light: rgba(16, 185, 129, 0.12);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(245, 158, 11, 0.4);
  --border-purple: rgba(139, 92, 246, 0.4);
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 0 30px rgba(245, 158, 11, 0.25);
  --shadow-purple: 0 0 30px rgba(139, 92, 246, 0.25);
  
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  
  --container-width: 1240px;
  --header-height: 80px;
}

/* Light Mode Override */
[data-theme="light"] {
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F1F5F9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(255, 255, 255, 0.85);
  
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  
  --accent-gold: #D97706;
  --accent-gold-bright: #F59E0B;
  --accent-gold-hover: #B45309;
  --accent-gold-light: rgba(217, 119, 6, 0.12);
  --accent-gold-glow: rgba(217, 119, 6, 0.2);
  
  --brand-yellow: #D9A800;
  --brand-yellow-bright: #F5BE00;
  --brand-yellow-hover: #B88E00;
  --brand-yellow-light: rgba(217, 168, 0, 0.14);
  --brand-yellow-glow: rgba(217, 168, 0, 0.25);
  
  --accent-purple: #7C3AED;
  --accent-purple-light: rgba(124, 58, 237, 0.12);
  --accent-teal: #0D9488;
  --accent-teal-light: rgba(13, 148, 136, 0.12);
  --accent-emerald: #059669;
  --accent-emerald-light: rgba(5, 150, 105, 0.12);
  
  --border-color: rgba(15, 23, 42, 0.08);
  --border-highlight: rgba(217, 119, 6, 0.35);
  --border-purple: rgba(124, 58, 237, 0.35);
  
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --shadow-gold: 0 0 25px rgba(217, 119, 6, 0.15);
  --shadow-purple: 0 0 25px rgba(124, 58, 237, 0.15);
}

/* --------------------------------------------------------------------------
   2. GLOBAL RESETS & NOISE OVERLAY FILTER
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

/* Noise Texture Overlay for Tactile Premium Feel */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: 999;
}

/* Three.js Fixed Background WebGL Canvas */
#three-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   BRAND LOGO & CHIP REUSABLE DESIGN SYSTEM
   -------------------------------------------------------------------------- */
.logo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #E8E8E8;
  border: 1px solid var(--border-highlight);
  border-radius: 12px;
  padding: 4px 10px;
  box-shadow: 0 0 14px var(--brand-yellow-glow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  position: relative;
  overflow: hidden;
  user-select: none;
}

[data-theme="dark"] .logo-chip {
  background: #E8E8E8;
  border-color: var(--border-highlight);
  box-shadow: 0 0 16px var(--brand-yellow-glow);
}

[data-theme="light"] .logo-chip {
  background: #FFFFFF;
  border: 1.5px solid var(--brand-yellow);
  box-shadow: 0 4px 14px rgba(217, 168, 0, 0.2);
}

.logo-chip:hover {
  transform: scale(1.03);
  box-shadow: 0 0 24px var(--brand-yellow);
  border-color: var(--brand-yellow);
}

.logo-chip img {
  height: 100%;
  width: auto;
  object-fit: contain;
  display: block;
}

/* --------------------------------------------------------------------------
   3. ANIMATED LOADING OVERLAY
   -------------------------------------------------------------------------- */
#loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #070B14;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo-chip {
  width: 200px;
  max-width: 80vw;
  padding: 12px 20px;
  border-radius: 18px;
  background: #E8E8E8;
  border: 2px solid var(--brand-yellow);
  box-shadow: 0 0 35px var(--brand-yellow-glow);
  animation: floatLogo 2.2s ease-in-out infinite;
}

.loader-logo-img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

@keyframes floatLogo {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 25px var(--brand-yellow-glow);
  }
  50% {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 0 45px var(--brand-yellow);
  }
}

.loader-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.loader-title span {
  color: var(--accent-gold);
}

.loader-bar-bg {
  width: 220px;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.loader-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-purple), var(--accent-teal));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* --------------------------------------------------------------------------
   4. PAWN SCROLL PROGRESS BAR
   -------------------------------------------------------------------------- */
.scroll-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 1001;
  background: transparent;
  pointer-events: none;
}

.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-purple), var(--accent-teal));
  box-shadow: 0 0 12px var(--accent-gold);
  transition: width 0.1s linear;
}

/* --------------------------------------------------------------------------
   5. BASE TYPOGRAPHY & LAYOUT UTILITIES
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--text-primary);
  font-weight: 700;
}

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

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

.gradient-text-purple {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6.5rem 0;
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding: 4.5rem 0;
  }
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 4rem;
}

.section-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  background: var(--accent-gold-light);
  padding: 0.35rem 1.1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
  border: 1px solid var(--border-highlight);
}

.section-title {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2.1rem;
  }
}

.section-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   6. BUTTONS & GLASS CARDS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.9rem 1.85rem;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-hover) 100%);
  color: #070B14;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.45);
  color: #000000;
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
}

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

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

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

.btn-sm {
  padding: 0.55rem 1.2rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

/* Glassmorphism Card with 3D Tilt Physics */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal), transform var(--transition-fast);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}

.glass-card:hover {
  border-color: var(--border-highlight);
  box-shadow: var(--shadow-lg), var(--shadow-gold);
}

.tilt-glare {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

/* --------------------------------------------------------------------------
   7. NAVIGATION BAR
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  height: 72px;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
}

.nav-logo-chip {
  height: 46px;
  padding: 4px 12px;
  border-radius: 12px;
}

.nav-logo-chip img {
  height: 34px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.brand-text span {
  color: var(--brand-yellow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-gold);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-gold);
  border-radius: 2px;
  transition: width var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: var(--accent-gold-light);
  color: var(--accent-gold);
  border-color: var(--border-highlight);
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  padding: 0.5rem;
}

@media (max-width: 1024px) {
  .mobile-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: var(--bg-secondary);
    padding: 2rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
  }
  
  .nav-menu.open {
    transform: translateX(0);
  }
  
  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 1.25rem;
  }
  
  .nav-link {
    font-size: 1.2rem;
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   8. HERO SECTION & ULTRA-PREMIUM PORTRAIT FRAME
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  padding-top: calc(var(--header-height) + 3.5rem);
  padding-bottom: 5rem;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 1.2rem;
  background: var(--accent-gold-light);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-full);
  color: var(--accent-gold);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-gold);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-gold);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-size: 3.65rem;
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

@media (max-width: 1200px) {
  .hero-title { font-size: 3rem; }
}
@media (max-width: 768px) {
  .hero-title { font-size: 2.35rem; }
}

.hero-subtitle {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
}

.hero-intro {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 630px;
}

@media (max-width: 992px) {
  .hero-intro {
    margin-left: auto;
    margin-right: auto;
  }
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

@media (max-width: 992px) {
  .hero-actions {
    justify-content: center;
  }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ULTRA-PREMIUM ANIMATED GRADIENT PORTRAIT FRAME */
.portrait-frame-animated {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  border-radius: 28px;
  padding: 6px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-purple), var(--accent-teal), var(--accent-gold));
  background-size: 300% 300%;
  animation: gradientShift 6s ease infinite;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  transform-style: preserve-3d;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.portrait-frame-animated img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: 22px;
  display: block;
}

.hero-watermark {
  position: absolute;
  top: 50%;
  left: 5%;
  transform: translateY(-50%);
  width: 600px;
  max-width: 55vw;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
  filter: blur(0.5px);
  user-select: none;
}

[data-theme="light"] .hero-watermark {
  opacity: 0.08;
}

.hero-portrait-brand-sticker {
  position: absolute;
  bottom: -18px;
  right: -18px;
  height: 52px;
  padding: 6px 14px;
  border-radius: 14px;
  background: #E8E8E8;
  border: 2px solid var(--brand-yellow);
  box-shadow: 0 0 25px var(--brand-yellow-glow);
  transform: rotate(-6deg);
  z-index: 10;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.hero-portrait-brand-sticker:hover {
  transform: rotate(0deg) scale(1.08);
  box-shadow: 0 0 38px var(--brand-yellow);
  border-color: var(--brand-yellow-bright);
}

.hero-portrait-brand-sticker img {
  height: 38px;
  width: auto;
}

/* --------------------------------------------------------------------------
   9. ABOUT ME SECTION
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-portrait-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.about-portrait-card img {
  width: 100%;
  height: 480px;
  object-fit: cover;
}

.fide-badge-overlay {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(7, 11, 20, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid var(--accent-gold);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.9rem;
}

.about-philosophy-quote {
  background: var(--accent-gold-light);
  border-left: 4px solid var(--accent-gold);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5rem 0 2rem;
  font-size: 1.2rem;
  font-weight: 700;
  font-style: italic;
  color: var(--text-primary);
}

.about-story-text {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   10. SKILLS SECTION (3D TILT CARDS)
   -------------------------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (max-width: 992px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.category-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  background: var(--accent-gold-light);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.skill-items-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.skill-item-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-size: 0.925rem;
  font-weight: 600;
}

.skill-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.skill-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold) 0%, var(--accent-purple) 100%);
  border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.skill-tag {
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   11. PROJECTS SECTION
   -------------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 992px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.badge-gold {
  background: var(--accent-gold-light);
  color: var(--accent-gold);
  border: 1px solid var(--border-highlight);
}

.badge-purple {
  background: var(--accent-purple-light);
  color: var(--accent-purple);
  border: 1px solid var(--border-purple);
}

.badge-teal {
  background: var(--accent-teal-light);
  color: var(--accent-teal);
  border: 1px solid rgba(20, 184, 166, 0.3);
}

.project-title {
  font-size: 1.45rem;
  margin-bottom: 0.85rem;
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
}

.metric-val {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--accent-gold);
}

.metric-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   12. WRITINGS / BLOG HUB (PREMIUM CARDS WITH SHINE EFFECT)
   -------------------------------------------------------------------------- */
.blog-filters {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-gold);
  color: #070B14;
  border-color: var(--accent-gold);
  font-weight: 700;
}

/* PREMIUM WRITING CARD WITH SHINE SWEEP EFFECT */
.premium-writing-card {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.premium-writing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.15), transparent);
  transform: skewX(-25deg);
  transition: left 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-writing-card:hover::before {
  left: 150%;
}

.premium-writing-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-lg), var(--shadow-gold);
}

.premium-writing-card .article-title {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.flagship-article-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(245, 158, 11, 0.06) 100%);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  align-items: center;
}

@media (max-width: 992px) {
  .flagship-article-card {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
}

.flagship-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-gold);
  color: #070B14;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.flagship-title {
  font-size: 2.1rem;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 992px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   13. PREMIUM LICHESS CHESSBOARD & STRATEGY DEMO
   -------------------------------------------------------------------------- */
.chess-demo-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.chess-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 992px) {
  .chess-demo-grid {
    grid-template-columns: 1fr;
  }
}

/* Lichess Board Wrapper with Coordinates */
#chess-board-container,
.board-container-wrapper {
  position: relative;
  padding: 20px;
  background: #1E293B;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  max-width: 500px;
  width: 100%;
  min-height: 400px;
  margin: 0 auto;
}

.board-wrapper {
  width: 100%;
}

/* Chessboard.js Custom Overrides for Premium Look */
#tactics-board {
  width: 100%;
  min-height: 360px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
}

/* Custom board colors to match our design */
.white-1e1d7 {
  background-color: #E8D5B5 !important;
}

.black-3c85d {
  background-color: #8B6F47 !important;
}

/* Piece styling */
.piece {
  cursor: pointer;
  transition: transform 0.1s ease;
}

.piece:hover {
  transform: scale(1.05);
}

/* Highlight last move */
.highlight-move {
  background-color: rgba(245, 158, 11, 0.4) !important;
}

/* Highlight selected square */
.highlight-square {
  background-color: rgba(245, 158, 11, 0.3) !important;
}

/* Loading indicator */
.board-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 360px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   14. TIMELINE, SERVICES & CAREER OBJECTIVE
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-gold) 0%, var(--accent-purple) 100%);
}

@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
  }
}

.timeline-item {
  position: relative;
  margin-bottom: 3.5rem;
  width: 50%;
  padding-right: 3rem;
}

.timeline-item:nth-child(even) {
  margin-left: 50%;
  padding-right: 0;
  padding-left: 3rem;
}

@media (max-width: 768px) {
  .timeline-item,
  .timeline-item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding-left: 3.5rem;
    padding-right: 0;
  }
}

.timeline-dot {
  position: absolute;
  top: 0;
  right: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 4px solid var(--accent-gold);
  box-shadow: 0 0 15px var(--accent-gold);
  z-index: 2;
}

.timeline-item:nth-child(even) .timeline-dot {
  right: auto;
  left: -12px;
}

@media (max-width: 768px) {
  .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot {
    left: 8px;
    right: auto;
  }
}

/* Highlighted Career Objective Box */
.objective-box {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(245, 158, 11, 0.08) 50%, rgba(139, 92, 246, 0.08) 100%);
  border: 2px solid var(--accent-gold);
  border-radius: 24px;
  padding: 3.5rem 3rem;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  position: relative;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   15. CONTACT FORM & SOCIAL CONNECT
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
}

@media (max-width: 992px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.social-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.social-card:hover {
  border-color: var(--accent-gold);
  transform: translateX(6px);
}

.social-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-gold-light);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-light);
}

/* Modal Overlay Reader */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 11, 20, 0.88);
  backdrop-filter: blur(14px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-container:focus-visible,
.sq:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent-gold);
  outline-offset: 3px;
}

.modal-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-highlight);
  border-radius: 24px;
  max-width: 840px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 3rem;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 0 2rem;
}

.footer-logo-chip {
  padding: 8px 22px;
  border-radius: 16px;
  background: #E8E8E8;
  border: 1.5px solid var(--border-highlight);
  box-shadow: 0 0 22px var(--brand-yellow-glow);
}

.footer-logo-chip:hover {
  transform: scale(1.05);
  box-shadow: 0 0 32px var(--brand-yellow);
  border-color: var(--brand-yellow);
}

.footer-tagline {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-yellow);
  letter-spacing: 0.04em;
  opacity: 0.95;
}

/* --------------------------------------------------------------------------
   16. SCROLL REVEAL ANIMATIONS & STAGGER DELAY UTILITIES
   -------------------------------------------------------------------------- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

@media (max-width: 768px) {
  #three-canvas { display: none; }

  .portrait-frame-animated img,
  .about-portrait-card img { height: 360px; }

  .objective-box { padding: 2.25rem 1.35rem; }
  .modal-overlay { padding: 1rem; }
  .modal-container { padding: 2.25rem 1.25rem; max-height: 90vh; }
}

@media (max-width: 700px) {
  #services .container > div {
    grid-template-columns: 1fr !important;
  }
  .hero-stats { gap: 0.75rem; }
  .stat-number { font-size: 1.55rem; }
  .stat-label { font-size: 0.72rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
  #three-canvas { display: none; }
  .animate-on-scroll { opacity: 1; transform: none; }
}
