/* ==========================================================================
   KAAMIL SIDDIQUI - MODERN PERSONAL WEBSITE DESIGN SYSTEM
   ========================================================================== */

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

/* --------------------------------------------------------------------------
   CSS VARIABLES & THEMING
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette - Dark Mode Default */
  --bg-body: #090d16;
  --bg-card: rgba(17, 24, 39, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --bg-nav: rgba(9, 13, 22, 0.85);
  --bg-input: rgba(30, 41, 59, 0.5);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(56, 189, 248, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.25);
  --accent-indigo: #6366f1;
  --accent-indigo-glow: rgba(99, 102, 241, 0.25);
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  
  --gradient-hero: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  --gradient-card-border: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(99, 102, 241, 0.1));
  --gradient-badge: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.15));
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 30px rgba(56, 189, 248, 0.15);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --font-heading: 'Plus Jakarta Sans', -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.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Overrides */
[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-nav: rgba(255, 255, 255, 0.9);
  --bg-input: #f1f5f9;
  
  --border-color: #e2e8f0;
  --border-hover: #38bdf8;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --accent-cyan: #0284c7;
  --accent-cyan-glow: rgba(2, 132, 199, 0.15);
  --accent-indigo: #4f46e5;
  --accent-indigo-glow: rgba(79, 70, 229, 0.15);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 25px rgba(2, 132, 199, 0.12);
}

/* --------------------------------------------------------------------------
   RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

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

a:hover {
  color: var(--accent-indigo);
}

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

/* --------------------------------------------------------------------------
   LAYOUT & CONTAINER
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
  position: relative;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 32px;
  background: var(--gradient-hero);
  border-radius: var(--radius-full);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin-bottom: 40px;
}

/* --------------------------------------------------------------------------
   NAVIGATION BAR
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}

.logo-badge {
  background: var(--accent-cyan);
  color: #090d16;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 6px 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: var(--radius-full);
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
}

/* --------------------------------------------------------------------------
   HERO SECTION
   -------------------------------------------------------------------------- */
.hero {
  padding-top: 150px;
  padding-bottom: 70px;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(99, 102, 241, 0.08) 50%, rgba(0, 0, 0, 0) 70%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 60px;
  align-items: center;
}

.hero-text {
  max-width: 700px;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gradient-badge);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent-cyan);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

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

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

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

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

.hero-tagline {
  font-size: 1.35rem;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 12px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--gradient-hero);
  color: #090d16;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.4);
  color: #090d16;
}

.btn-secondary {
  background: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-primary);
}

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

/* Headshot Card */
.hero-avatar-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.avatar-card {
  position: relative;
  width: 280px;
  height: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform var(--transition-normal);
}

.avatar-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow);
}

.avatar-img-frame {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 3px solid var(--accent-cyan);
  box-shadow: 0 0 20px var(--accent-cyan-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  overflow: hidden;
}

.avatar-initials {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.avatar-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.avatar-role {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   STATISTICS TICKER BANNER
   -------------------------------------------------------------------------- */
.stats-banner {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 32px 0;
  margin: 30px 0 60px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent-cyan);
  line-height: 1.1;
  margin-bottom: 6px;
}

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

/* --------------------------------------------------------------------------
   GLASS CARDS & GRIDS
   -------------------------------------------------------------------------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
  position: relative;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--gradient-badge);
  border: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: var(--accent-cyan);
}

.card-title {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.card-impact {
  background: rgba(56, 189, 248, 0.08);
  border-left: 3px solid var(--accent-cyan);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 20px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--accent-cyan);
}

.card-link:hover {
  gap: 12px;
  color: var(--accent-indigo);
}

/* --------------------------------------------------------------------------
   INTERACTION: GLOBAL WISDOM CARDS (PROJECTS PAGE)
   -------------------------------------------------------------------------- */
.phrases-header {
  margin: 30px 0 20px;
}

.phrases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.phrase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.phrase-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow);
}

.phrase-region {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  font-weight: 700;
  margin-bottom: 8px;
}

.phrase-native {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.phrase-meaning {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   INTERESTS & HOBBIES (CHESS & READING)
   -------------------------------------------------------------------------- */
.interest-card {
  position: relative;
  overflow: hidden;
}

.interest-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  margin-bottom: 14px;
}

.interest-card.chess .interest-badge {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
}

.interest-card.reading .interest-badge {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

/* --------------------------------------------------------------------------
   VISUAL HIGHLIGHTS GALLERY & LIGHTBOX
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  height: 160px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  transition: all var(--transition-normal);
}

.gallery-item:hover {
  transform: scale(1.03);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow);
}

.gallery-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.gallery-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 550px;
  width: 100%;
  padding: 32px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-md);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
}

.lightbox-close:hover {
  color: var(--text-primary);
}

/* --------------------------------------------------------------------------
   PROJECT FILTER TABS (PROJECTS PAGE)
   -------------------------------------------------------------------------- */
.filter-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--gradient-hero);
  color: #090d16;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

/* --------------------------------------------------------------------------
   CONTACT MODAL & FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background: var(--bg-nav);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-socials a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}

.footer-socials a:hover {
  color: var(--accent-cyan);
}

.copyright {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Scroll to top button */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-3px);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--accent-cyan);
  color: #090d16;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal);
  z-index: 3000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------------------
   RESPONSIVE MEDIA QUERIES
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-badge-pill {
    margin: 0 auto 20px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

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

  .nav-links {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg-nav);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

  .section {
    padding: 60px 0;
  }
}
