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

/* ==========================================================================
   Design Tokens — Ultra-Professional Dark Mode
   ========================================================================== */
:root {
  --bg-primary: #000000;
  --bg-elevated: #0A0A0A;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  --text-primary: #FAFAFA;
  --text-secondary: #A1A1AA;
  --text-tertiary: #71717A;

  --accent: #3B82F6;
  --accent-subtle: rgba(59, 130, 246, 0.08);
  --accent-glow: rgba(59, 130, 246, 0.15);

  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --container-width: 1120px;
  --nav-height: 64px;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

/* ==========================================================================
   3D Canvas Background — Kept but toned down
   ========================================================================== */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  opacity: 0.4; /* Subtle, not overwhelming */
}

/* ==========================================================================
   Cursor Aura — Desktop only, extremely subtle
   ========================================================================== */
#cursor-aura {
  display: none; /* Hidden by default, enabled via hover media query */
}

@media (hover: hover) and (pointer: fine) {
  #cursor-aura {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
    transition: none;
  }
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 0;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.25rem; }

p {
  color: var(--text-secondary);
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.7;
}

a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s var(--ease-out-expo);
}

a:hover { color: var(--text-primary); }

.text-gradient {
  background: linear-gradient(135deg, #60A5FA, #3B82F6, #818CF8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

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

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

/* ==========================================================================
   Navigation — Clean, floating pill
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s var(--ease-out-expo);
}

.navbar.scrolled {
  border-bottom-color: var(--border-hover);
}

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

.logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary) !important;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-links a {
  color: var(--text-tertiary);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s var(--ease-out-expo);
  position: relative;
}

.nav-links a::after { display: none; }

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-cta {
  padding: 8px 18px !important;
  background: var(--text-primary) !important;
  color: var(--bg-primary) !important;
  border-radius: var(--radius-sm) !important;
  border: none !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
}

.nav-cta:hover {
  opacity: 0.85;
  background: var(--text-primary) !important;
  box-shadow: none;
}

/* ==========================================================================
   Hero — Minimal, Statement-Driven
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: var(--nav-height);
  overflow: hidden;
  background: transparent;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to top, var(--bg-primary), transparent);
  z-index: 1;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 80px;
  align-items: center;
}

.hero-content {
  /* Override glass-card styles for hero */
  background: none !important;
  backdrop-filter: none !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  animation: none !important;
}

.hero-content h1 {
  margin-bottom: 16px;
}

.hero-content h2 {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 20px;
  letter-spacing: 0;
}

.hero-content p {
  font-size: 1.0625rem;
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.75;
  color: var(--text-tertiary);
}

.ssj-hero-glow {
  animation: none !important;
  box-shadow: none !important;
}

/* Buttons */
.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  transition: all 0.25s var(--ease-out-expo);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary) !important;
  box-shadow: none;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-hover);
  color: var(--text-secondary) !important;
}

.btn-outline:hover {
  border-color: var(--text-tertiary);
  color: var(--text-primary) !important;
  background: rgba(255, 255, 255, 0.03);
}

/* ==========================================================================
   Hero Visual — Bento-style card
   ========================================================================== */
.hero-visual .glass-card {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  padding: 32px !important;
}

.hero-visual .card-icon {
  background: var(--accent-subtle);
  border: 1px solid rgba(59, 130, 246, 0.15);
  color: var(--accent);
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header p {
  max-width: 560px;
  margin: 12px auto 0;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 16px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ==========================================================================
   Glass Cards — Refined
   ========================================================================== */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease-out-expo);
  z-index: 1;
  box-shadow: none;
  --local-x: 50%;
  --local-y: 50%;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);
  z-index: -1;
}

/* Glare — Desktop only */
.glass-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle at var(--local-x) var(--local-y), rgba(255, 255, 255, 0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out-expo);
  pointer-events: none;
  z-index: 0;
}

@media (hover: hover) {
  .glass-card:hover::after { opacity: 1; }
}

.glass-card > * {
  position: relative;
  z-index: 2;
}

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

.hover-lift:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
}

.hover-glow:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: none;
}

/* Card Icons */
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid rgba(59, 130, 246, 0.1);
  color: var(--accent);
  transition: all 0.3s var(--ease-out-expo);
}

.glass-card:hover .card-icon {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.2);
  transform: none;
  box-shadow: none;
}

.glass-card h3 {
  margin-bottom: 8px;
}

.glass-card p {
  font-size: 0.9375rem;
  color: var(--text-tertiary);
}

/* ==========================================================================
   Stats Cards
   ========================================================================== */
.stats-card h3 {
  font-size: 2rem !important;
  font-weight: 700;
  margin-bottom: 4px;
}

.stats-card p {
  font-size: 0.8125rem !important;
  color: var(--text-tertiary);
}

/* ==========================================================================
   Skills Grid — Clean Pill Tags
   ========================================================================== */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.skill-tag {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 100px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.25s var(--ease-out-expo);
  cursor: default;
}

.skill-tag:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card-hover);
  transform: none;
  box-shadow: none;
}

/* ==========================================================================
   Certifications Grid
   ========================================================================== */
.cert-grid .glass-card h4 {
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.cert-grid .glass-card p {
  font-size: 0.8125rem !important;
  color: var(--text-tertiary);
}

/* ==========================================================================
   Portfolio / Projects — Case Study Cards
   ========================================================================== */
#portfolio .glass-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
}

#portfolio .glass-card .label {
  color: var(--accent);
}

#portfolio .glass-card h2 {
  font-size: 2rem;
}

#portfolio .glass-card ul li {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

#portfolio .glass-card ul li svg {
  stroke: var(--accent) !important;
  flex-shrink: 0;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
#contact .glass-card {
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
  border-radius: var(--radius-xl);
}

#contact h2 { font-size: 2.25rem; }

/* ==========================================================================
   Footer — Minimal
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  background: var(--bg-primary);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  border: 1px solid var(--border);
  transition: all 0.25s var(--ease-out-expo);
}

.footer-social a:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* ==========================================================================
   Magnetic — Desktop only
   ========================================================================== */
.magnetic {
  display: inline-block;
  position: relative;
}

.btn-text {
  display: inline-block;
  pointer-events: none;
}

/* ==========================================================================
   Neon Pulse Label — toned down to a subtle opacity pulse
   ========================================================================== */
@keyframes subtle-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.neon-pulse {
  animation: subtle-pulse 3s infinite ease-in-out;
  border-color: var(--border-hover) !important;
  color: var(--accent) !important;
  font-family: var(--font-mono) !important;
  font-size: 0.75rem !important;
}

/* Float animation — very subtle */
@keyframes gentle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.float {
  animation: gentle-float 6s ease-in-out infinite;
}

/* ==========================================================================
   Reveal Animation Classes (used by GSAP & CSS fallback)
   ========================================================================== */
.reveal, .reveal-left, .reveal-right {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s var(--ease-out-expo);
}

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

.reveal.active, .reveal-left.active, .reveal-right.active {
  opacity: 1;
  transform: translate(0);
}

/* Reveal delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
