/* Fonts are loaded via <link> in index.html (parallel, non-blocking) — never
   @import here: it serialises the download chain and stalls first paint. */

/* ═══════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════ */
:root {
  --bg: #0a0b0f;
  --bg-card: #0d0d14;
  --bg-card-hover: #12121c;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);

  --text: #e4e4eb;
  --text-muted: #8b8b9e;
  --text-dim: #5a5a6e;

  --accent: #6366f1;
  --accent-light: #818cf8;
  --cyan: #06b6d4;
  --gradient: linear-gradient(135deg, #6366f1, #06b6d4);
  --gradient-text: linear-gradient(135deg, #818cf8, #22d3ee);
  --glow: 0 0 60px rgba(99,102,241,0.15), 0 0 120px rgba(6,182,212,0.08);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --container: 1100px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══════════════════════════════════════════════
   AMBIENT BACKGROUND
   ═══════════════════════════════════════════════ */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  /* Static by default — animating a 100px-blur layer every frame is the single
     biggest perf killer on mobile Safari. A slow drift is re-enabled on large
     screens only (see media query at the foot of this file). */
}

.ambient-orb:nth-child(1) {
  width: 600px; height: 600px;
  background: var(--accent);
  top: -10%; left: -10%;
  animation-delay: 0s;
}

.ambient-orb:nth-child(2) {
  width: 500px; height: 500px;
  background: var(--cyan);
  bottom: -15%; right: -10%;
  animation-delay: -10s;
}

.ambient-orb:nth-child(3) {
  width: 300px; height: 300px;
  background: #a855f7;
  top: 40%; left: 50%;
  animation-delay: -5s;
  opacity: 0.15;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(15px, 30px) scale(1.02); }
}

/* ═══════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s;
}

.nav.scrolled {
  background: rgba(5,5,8,0.85);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.3s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--gradient);
  transition: width 0.3s;
}

.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

.nav-cta {
  background: var(--gradient);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 100px;
  font-weight: 600;
  -webkit-text-fill-color: #fff;
}

.nav-cta::after { display: none; }
.nav-cta:hover { opacity: 0.9; transform: translateY(-1px); }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-hamburger span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5,5,8,0.97);
  backdrop-filter: blur(30px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.nav-mobile.open { display: flex; }

.nav-mobile .nav-link {
  font-size: 1.5rem;
  font-family: var(--font-heading);
  color: var(--text);
}

/* ═══════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 24px 80px;
  overflow: hidden;
}

/* GPU-light neural-node canvas (drawn in script.js; pauses off-screen, static
   under prefers-reduced-motion). */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  /* Mask so nodes fade out toward the edges and behind the text. */
  -webkit-mask-image: radial-gradient(120% 90% at 50% 40%, #000 35%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 40%, #000 35%, transparent 78%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 56px;
}

.hero-content {
  text-align: left;
}

/* ── Interactive terminal ── */
.terminal {
  border: 1px solid var(--border-hover);
  border-radius: 14px;
  background: rgba(10,11,16,0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 24px 70px rgba(0,0,0,0.5), var(--glow);
  overflow: hidden;
  opacity: 0;
  animation: fadeUp 0.8s 0.5s forwards;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.term-dots { display: inline-flex; gap: 6px; }
.term-dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a2a38; display: block; }
.term-dots i:nth-child(1) { background: #ff5f57; }
.term-dots i:nth-child(2) { background: #febc2e; }
.term-dots i:nth-child(3) { background: #28c840; }
.term-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
}
.term-live {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
}
.term-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #28c840; box-shadow: 0 0 6px #28c840; }
@media (prefers-reduced-motion: no-preference) { .term-live-dot { animation: pulseDot 2s ease-in-out infinite; } }

.term-body {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.7;
  padding: 16px 18px;
  height: 340px;
  overflow-y: auto;
  cursor: text;
  -webkit-overflow-scrolling: touch;
}
.term-body::-webkit-scrollbar { width: 8px; }
.term-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 8px; }

.term-line { white-space: pre-wrap; word-break: break-word; color: var(--text-muted); }
.term-line.cmd { color: var(--text); }
.term-line.out { color: var(--text-muted); }
.term-line.accent { color: #22d3ee; }
.term-line.err { color: #f87171; }
.term-prompt { color: #818cf8; margin-right: 8px; white-space: nowrap; }
.term-prompt-user { color: #28c840; }

.term-line-input { display: flex; align-items: center; }
.term-input {
  flex: 1;
  background: none; border: none; outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px; /* ≥16px stops iOS auto-zoom on focus */
  caret-color: #22d3ee;
}
.term-cursor {
  display: inline-block; width: 9px; height: 1.05em;
  background: #22d3ee; vertical-align: text-bottom; margin-left: 2px;
}
@media (prefers-reduced-motion: no-preference) { .term-cursor { animation: blink 1.1s steps(1) infinite; } }
@keyframes blink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }

/* Desktop = text left of terminal */
.hero-content .hero-subtitle { margin-left: 0; margin-right: 0; }
.hero-content .hero-actions { justify-content: flex-start; }

/* Stack on smaller screens; text centered above the terminal */
@media (max-width: 900px) {
  .hero { padding-top: 110px; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-content { text-align: center; }
  .hero-content .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-content .hero-actions { justify-content: center; }
  .term-body { height: 240px; }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: rgba(255,255,255,0.03);
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}

.hero-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 8px #22d3ee;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-eyebrow-dot { animation: pulseDot 2.4s ease-in-out infinite; }
}
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}

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

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 550px;
  margin: 0 auto 40px;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-dim);
  animation: bounce 2s infinite;
}

.hero-scroll::after {
  content: '';
  display: block;
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  margin: 8px auto 0;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99,102,241,0.4);
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--text); }

/* Sticky "Hire me" CTA — revealed once past the hero (JS toggles .show) */
.hire-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  padding: 12px 22px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 8px 28px rgba(99,102,241,0.4);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.hire-fab.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.hire-fab:hover { transform: translateY(-2px); }

/* ═══════════════════════════════════════════════
   SECTION SHARED
   ═══════════════════════════════════════════════ */
.section-pad { padding: 120px 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--cyan);
  margin-bottom: 16px;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
}

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ═══════════════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}

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

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════
   SKILLS
   ═══════════════════════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: all 0.4s;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.4s;
}

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

.skill-card:hover::before { opacity: 1; }

.skill-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.skill-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.skill-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.4s;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-8px);
  box-shadow: var(--glow);
}

.project-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.project-body {
  padding: 28px;
}

.project-body h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.project-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(99,102,241,0.1);
  color: var(--accent-light);
  border: 1px solid rgba(99,102,241,0.15);
}

.project-meta {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--cyan);
  margin-bottom: 8px;
}

.project-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-light);
  transition: color 0.3s, gap 0.3s;
}

.project-link:hover { color: var(--cyan); }

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
  margin-bottom: 8px;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.3s;
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.filter-btn.active {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
}

.project-card.hidden {
  display: none;
}

/* Wide card — spans full grid width */
.project-card--wide {
  grid-column: 1 / -1;
}

.project-banner {
  padding: 40px 36px;
  border-bottom: 1px solid var(--border);
}

.project-banner-inner {}

.platform-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--cyan);
  margin-bottom: 12px;
}

.project-banner-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 8px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.project-banner-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.platform-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: border-color 0.3s, color 0.3s;
}

.project-card--wide:hover .platform-chip {
  border-color: rgba(99,102,241,0.2);
  color: var(--text);
}


/* ═══════════════════════════════════════════════
   EXPERIENCE TIMELINE
   ═══════════════════════════════════════════════ */
.timeline {
  position: relative;
  margin-top: 48px;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--cyan), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

.timeline-dot {
  position: absolute;
  left: -33px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 12px rgba(99,102,241,0.4);
}

.timeline-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.timeline-item h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-company {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.timeline-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════
   CTA / CONTACT
   ═══════════════════════════════════════════════ */
.cta-section {
  text-align: center;
  padding: 120px 24px;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.contact-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.9rem;
  color: var(--text);
  transition: all 0.3s;
}

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

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
.footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
}

.footer a {
  color: var(--accent-light);
  transition: color 0.3s;
}

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

/* ═══════════════════════════════════════════════
   SCROLL REVEAL
   ═══════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s, transform 0.8s;
}

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

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-stats { grid-template-columns: repeat(3, 1fr); }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .hero { padding: 100px 24px 60px; }
  .section-pad { padding: 80px 0; }
}

@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  .stat-card { padding: 14px; }
  .stat-number { font-size: 1.5rem; }
  .contact-links { flex-direction: column; align-items: center; }
  .hire-fab { right: 14px; bottom: 14px; padding: 10px 18px; }
}

/* ═══════════════════════════════════════════════
   PROJECT CARD — glow border on hover (command-center feel)
   ═══════════════════════════════════════════════ */
.project-card:hover {
  border-color: rgba(34,211,238,0.35);
}

/* ═══════════════════════════════════════════════
   MOTION — orbs drift only on large screens w/ motion allowed.
   Everything stops gracefully under prefers-reduced-motion.
   ═══════════════════════════════════════════════ */
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .ambient-orb { animation: float 24s ease-in-out infinite; }
  .ambient-orb:nth-child(2) { animation-delay: -10s; }
  .ambient-orb:nth-child(3) { animation-delay: -5s; }
}

/* ═══════════════════════════════════════════════
   MOBILE PERF — kill the GPU-heavy paint on phones.
   The 3× filter:blur(100px) orbs and backdrop-filter blurs are the dominant
   compositing/paint cost on mobile Safari for zero visual payoff at this size.
   The masked hero canvas (already node-capped on mobile) carries the look.
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .ambient-orb { display: none; }
  .terminal {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #0a0b10;
  }
  .nav.scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(5,5,8,0.95);
  }
  .nav-mobile {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(5,5,8,0.985);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ═══════════════════════════════════════════════
   ⌘K COMMAND PALETTE  (the "one simple thing")
   ═══════════════════════════════════════════════ */
.cmdk-hint {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 9px;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}
.cmdk-hint:hover { border-color: var(--border-hover); background: rgba(255,255,255,0.07); }
.cmdk-hint kbd {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: none;
  border: none;
}

.cmdk[hidden] { display: none; }
.cmdk {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 14vh 16px 16px;
}
.cmdk-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4,5,9,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: cmdkFade 0.15s ease-out;
}
.cmdk-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: #0e0f16;
  border: 1px solid var(--border-hover);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), var(--glow);
  overflow: hidden;
  animation: cmdkPop 0.18s cubic-bezier(0.2,0.8,0.2,1);
}
@keyframes cmdkFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cmdkPop { from { opacity: 0; transform: translateY(-8px) scale(0.985); } to { opacity: 1; transform: none; } }

.cmdk-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.cmdk-prompt { font-family: var(--font-mono); color: var(--cyan); font-size: 1.1rem; }
.cmdk-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
}
.cmdk-input::placeholder { color: var(--text-dim); }
.cmdk-esc {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 6px;
}

.cmdk-list { list-style: none; max-height: 50vh; overflow-y: auto; padding: 8px; }
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.cmdk-item[aria-selected="true"] {
  background: rgba(99,102,241,0.14);
  color: var(--text);
}
.cmdk-item-icon { font-size: 1.05rem; width: 22px; text-align: center; }
.cmdk-item-label { flex: 1; }
.cmdk-item-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.cmdk-empty { padding: 24px; text-align: center; color: var(--text-dim); font-size: 0.9rem; }

.cmdk-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.cmdk-foot kbd {
  font-family: var(--font-mono);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  margin: 0 1px;
  font-size: 0.68rem;
}
.cmdk-foot span:last-child { margin-left: auto; color: var(--text-muted); }
@media (max-width: 560px) { .cmdk-foot span:last-child { display: none; } }
