/* ─── Referral Banner ───────────────────────────────────────── */
.referral-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(20, 20, 40, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.88rem;
  color: var(--text-subtle);
  text-align: center;
}

.referral-banner[hidden] { display: none; }

.referral-banner-close {
  background: none;
  border: none;
  color: var(--text-subtle);
  font-size: 1.3rem;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  padding: 0 4px;
}

.referral-banner-close:hover { color: var(--text); }

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

:root {
  --bg:           #000000;
  --bg-alt:       #111111;
  --surface:      rgba(255,255,255,0.04);
  --surface-hover:rgba(255,255,255,0.07);
  --border:       rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.16);
  --text:         #ecedee;
  --text-muted:   #71717a;
  --text-subtle:  #a1a1aa;
  --grad-from:    #6366f1;
  --grad-mid:     #8b5cf6;
  --grad-to:      #06b6d4;
  --font:         'Inter', system-ui, sans-serif;
  --radius:       14px;
  --radius-sm:    8px;
  --transition:   0.2s ease;
  --navbar-bg:    rgba(0,0,0,0.6);
  --navbar-bg-scrolled: rgba(0,0,0,0.85);
}

[data-theme="light"] {
  --bg:           #f8f9fa;
  --bg-alt:       #f1f3f5;
  --surface:      rgba(0,0,0,0.04);
  --surface-hover:rgba(0,0,0,0.07);
  --border:       rgba(0,0,0,0.09);
  --border-hover: rgba(0,0,0,0.18);
  --text:         #111111;
  --text-muted:   #6b7280;
  --text-subtle:  #4b5563;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ─── Utility ───────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--grad-from), var(--grad-mid), var(--grad-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 680px; }

/* ─── Navbar ────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 24px;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}

.scroll-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--grad-from), var(--grad-mid), var(--grad-to));
  transition: width 0.08s linear;
  z-index: 101;
  border-radius: 0 2px 2px 0;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1.05rem;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
}

.desktop-only { display: inline; }
.mobile-only  { display: none; }

@media (max-width: 768px) {
  .brand-logo   { height: 34px; }
  .desktop-only { display: none; }
  .mobile-only  { display: inline; }
}

.footer .brand-logo {
  height: 26px;
}

/* Footer logo theme switching */
.footer .footer-logo { filter: invert(1); }
[data-theme="light"] .footer .footer-logo { filter: none; }

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

.nav-end {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover { color: var(--text); background: var(--surface); }

.nav-cta {
  background: linear-gradient(135deg, var(--grad-from), var(--grad-mid)) !important;
  color: #fff !important;
  font-weight: 500 !important;
}

.nav-cta:hover { opacity: 0.88; background: linear-gradient(135deg, var(--grad-from), var(--grad-mid)) !important; }

/* ─── Theme Toggle ──────────────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-subtle);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover { background: var(--surface-hover); border-color: var(--border-hover); color: var(--text); }

[data-theme="light"] .theme-toggle {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.72);
}

[data-theme="light"] .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

/* Show sun in dark mode (click to go light), moon in light mode (click to go dark) */
.icon-sun { display: flex; }
.icon-moon { display: none; }

[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: flex; }

[data-theme="light"] .hero-badge {
  background: rgba(0,0,0,0.25);
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.85);
}

[data-theme="light"] .hero h1,
[data-theme="light"] .hero-sub,
[data-theme="light"] .hero-scroll-hint {
  color: #ffffff;
}

[data-theme="light"] .btn-ghost {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  color: #ffffff;
}

[data-theme="light"] .btn-ghost:hover {
  background: rgba(255,255,255,0.25);
}

[data-theme="light"] .hero-overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.45) 60%, rgba(0,0,0,0.75) 100%);
}

[data-theme="light"] .nav-links a:not(.nav-cta) {
  color: rgba(255, 255, 255, 0.72);
}

[data-theme="light"] .nav-links a:not(.nav-cta):hover {
  color: #ffffff;
}

[data-theme="light"] input,
[data-theme="light"] textarea {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #111111;
}

[data-theme="light"] .contact-card {
  background: var(--surface);
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
  color: #9ca3af;
}

[data-theme="light"] .skill-tags span {
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.25);
  color: #4f46e5;
}

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: saturate(1);
  transition: opacity 1.5s ease-out;
}

.hero-loaded .hero-bg {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.85) 100%);
}

.hero-noise {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.glow-1 {
  width: 600px; height: 600px;
  top: -200px; left: 50%;
  transform: translateX(-60%);
  background: radial-gradient(circle, rgba(99,102,241,0.18) 0%, transparent 70%);
  animation: floatGlow1 8s ease-in-out infinite;
}

.glow-2 {
  width: 400px; height: 400px;
  bottom: -100px; right: 10%;
  background: radial-gradient(circle, rgba(6,182,212,0.14) 0%, transparent 70%);
  animation: floatGlow2 10s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
}

.hero-content h1,
.hero-content .hero-badge,
.hero-content .hero-cta {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22,1,0.36,1), transform 0.9s cubic-bezier(0.22,1,0.36,1);
}

.hero-loaded .hero-content .hero-badge {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s;
}

.hero-loaded .hero-content h1 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.55s;
}

.hero-loaded .hero-content .hero-cta {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.7s;
}

/* ─── Hero Loader ───────────────────────────────────────────── */
.hero-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.hero-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.hero-spinner {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes floatGlow1 {
  0%, 100% { transform: translateX(-60%) translateY(0px); }
  50%       { transform: translateX(-60%) translateY(-30px); }
}

@keyframes floatGlow2 {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(24px); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.82rem;
  color: var(--text-subtle);
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
  margin: 36px 0 8px;
}

.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--grad-from), var(--grad-to));
  box-shadow: 0 0 8px rgba(99,102,241,0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero h1 {
  font-size: clamp(2.7rem, 5.5vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-sub {
  max-width: 520px;
  color: var(--text-subtle);
  font-size: 1.1rem;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1;
}

.scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--grad-from), var(--grad-mid));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(99,102,241,0.3), 0 4px 20px rgba(99,102,241,0.25);
}

.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(99,102,241,0.5), 0 8px 32px rgba(99,102,241,0.35);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover { background: var(--surface-hover); border-color: var(--border-hover); }

.btn-full { width: 100%; justify-content: center; }

/* ─── Sections ──────────────────────────────────────────────── */
.section { padding: 100px 24px; }
.section-alt { background: var(--bg-alt); }

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grad-from);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 40px;
}

/* ─── About ─────────────────────────────────────────────────── */
.about-text-wide {
  max-width: 780px;
}

.about-text p {
  color: var(--text-subtle);
  margin-bottom: 18px;
  font-size: 1.02rem;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  backdrop-filter: blur(8px);
  transition: border-color var(--transition), background var(--transition);
}

.stat-card:hover { border-color: var(--border-hover); background: var(--surface-hover); }

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

/* ─── Skills Grid ───────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.4), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.skill-card:hover { border-color: var(--border-hover); background: var(--surface-hover); transform: translateY(-2px); }
.skill-card:hover::before { opacity: 1; }

.skill-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(6,182,212,0.1));
  border: 1px solid rgba(99,102,241,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grad-from);
  margin-bottom: 16px;
}

.skill-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.skill-card p { font-size: 0.87rem; color: var(--text-muted); margin-bottom: 16px; }

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tags span {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  color: #a5b4fc;
  letter-spacing: 0.01em;
}
/* ─── AI Section ───────────────────────────────────────────── */
.ai-grid {
  margin-top: 16px;
}

.ai-text-wide {
  max-width: 780px;
}

.ai-text p {
  color: var(--text-subtle);
  margin-bottom: 18px;
  font-size: 1.02rem;
}

.ai-callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
}

.ai-callout-num {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 12px;
}

.ai-callout-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}

.ai-callout-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}

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

/* ─── Joke Stats ───────────────────────────────────────────── */
.joke-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.joke-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  transition: border-color var(--transition), background var(--transition);
}

.joke-stat:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.joke-value {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.joke-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.joke-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}

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

@media (max-width: 480px) {
  .joke-stats { grid-template-columns: 1fr; }
}

/* ─── Evolve Steps ───────────────────────────────────────────── */
.evolve-steps {
  display: flex;
  align-items: stretch;
  gap: 12px;
  justify-content: center;
  max-width: 860px;
  margin: 0 auto;
}

.evolve-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  flex: 1;
  min-width: 0;
  text-align: center;
  transition: border-color var(--transition), background var(--transition);
}

.evolve-step:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.evolve-num {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.evolve-step h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.evolve-step p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.evolve-arrow {
  font-size: 1.4rem;
  color: var(--text-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

@media (max-width: 640px) {
  .evolve-steps { flex-direction: column; align-items: stretch; }
  .evolve-arrow { display: none; }
  .evolve-step { min-width: 0; }
}
/* ─── Tech Groups ───────────────────────────────────────────── */
.tech-groups {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.tech-group-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grad-from);
  margin-bottom: 12px;
}

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

.tech-tags span {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-subtle);
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  user-select: none;
}

.tech-tags span:hover {
  background: rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.35);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}

/* ─── Beyond a Basic Website ─────────────────────────────────── */
.beyond-intro {
  color: var(--text-subtle);
  font-size: 1.05rem;
  max-width: 680px;
  margin-bottom: 40px;
}

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

.beyond-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 24px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.beyond-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.beyond-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--grad-from);
  font-size: 1.1rem;
  transition: background var(--transition);
}

.beyond-card:hover .beyond-icon {
  background: linear-gradient(135deg, rgba(99,102,241,0.28), rgba(139,92,246,0.28));
}

.beyond-card h4 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

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

/* ─── Contact ───────────────────────────────────────────────── */
.contact-sub {
  color: var(--text-subtle);
  margin-bottom: 32px;
  font-size: 1rem;
}

.contact-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 36px;
  backdrop-filter: blur(12px);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-subtle);
}

input, textarea {
  font-family: var(--font);
  font-size: 0.9rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 11px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }

input:focus, textarea:focus {
  border-color: var(--grad-from);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

input.field-invalid, textarea.field-invalid {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248,113,113,0.15);
}

.field-error {
  font-size: 0.76rem;
  color: #f87171;
  margin: 0;
  min-height: 16px;
  line-height: 1.4;
}

[data-theme="light"] .field-error { color: #dc2626; }

/* Toast notification */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  min-width: 260px;
  max-width: 380px;
  padding: 14px 18px;
  border-radius: 10px;
  border-left: 4px solid transparent;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  z-index: 9999;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s cubic-bezier(0.22,1,0.36,1), transform 0.3s cubic-bezier(0.22,1,0.36,1);
  pointer-events: none;
  background: rgba(20, 20, 35, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #f1f5f9;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.05);
}

[data-theme="light"] .toast {
  background: rgba(255, 255, 255, 0.97);
  color: #111827;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
}

.toast.toast-success { border-color: #34d399; }
.toast.toast-error   { border-color: #f87171; }

.toast.toast-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 480px) {
  .toast { left: 16px; right: 16px; bottom: 20px; min-width: unset; }
}

/* Hide reCAPTCHA badge — attribution shown inline per Google's policy */
.grecaptcha-badge { visibility: hidden !important; }

.recaptcha-notice {
  margin-top: 10px;
  font-size: 0.75rem;
  text-align: center;
  color: var(--text-muted);
}

.recaptcha-notice a {
  color: var(--text-subtle);
  text-decoration: underline;
}

.recaptcha-notice a:hover { color: var(--text); }
/* ─── Modal ────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: #0e0e11;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: calc(var(--radius) + 4px);
  padding: 36px 32px 32px;
  max-width: 480px;
  width: 100%;
  position: relative;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.2s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

[data-theme="light"] .modal-box {
  background: #ffffff;
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 24px 80px rgba(0,0,0,0.2);
}

.modal-backdrop.open .modal-box {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.modal-close:hover { color: var(--text); background: var(--surface); }

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text);
}

.modal-body {
  font-size: 0.95rem;
  color: var(--text-subtle);
  line-height: 1.7;
  margin-bottom: 16px;
}

.modal-example {
  font-size: 0.83rem;
  color: var(--text-muted);
  border-left: 3px solid rgba(99,102,241,0.5);
  padding-left: 12px;
  line-height: 1.6;
  font-style: italic;
}

.modal-example:empty { display: none; }
/* ─── Footer ─────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy { font-size: 0.82rem; color: var(--text-muted); }

/* ─── Scroll To Top ──────────────────────────────────────────── */
.scroll-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--grad-from), var(--grad-mid), var(--grad-to));
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.45), 0 2px 8px rgba(0,0,0,0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s, box-shadow 0.2s ease;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.65), 0 2px 10px rgba(0,0,0,0.35);
  transform: translateY(-2px) scale(1.06);
}

/* ─── Responsive ─────────────────────────────────────────────── */

/* Medium screens — hamburger menu */
@media (max-width: 960px) {
  .hamburger { display: flex; }

  .nav-inner { position: relative; }

  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    flex-direction: column;
    align-items: stretch;
    width: 240px;
    background: rgba(12, 12, 22, 0.94);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow:
      0 20px 60px rgba(0, 0, 0, 0.65),
      0 4px 16px rgba(0, 0, 0, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.07);
    padding: 6px;
    gap: 2px;
    z-index: 99;
    transform-origin: top right;

    /* Hidden state — animated */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-6px) scale(0.97);
    transition:
      opacity 0.18s ease,
      transform 0.18s ease,
      visibility 0.18s;
  }

  .nav-links.nav-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .nav-links a:not(.nav-cta) {
    padding: 10px 14px;
    font-size: 0.9rem;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.76);
    transition: background 0.12s ease, color 0.12s ease;
  }

  .nav-links a:not(.nav-cta):hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
  }

  .nav-links .nav-cta {
    text-align: center;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9px;
  }
}

@media (max-width: 768px) {
  .container { padding: 0 12px; }
  .section { padding: 80px 12px; }
  .skills-grid { grid-template-columns: 1fr; }
  .about-stats { flex-direction: row; flex-wrap: wrap; }
  .stat-card { flex: 1; min-width: 120px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-card { padding: 24px 16px; }
  .footer-inner { justify-content: center; text-align: center; }
}
