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

:root {
  --bg: #0a0f1e;
  --bg-alt: #0f1629;
  --surface: #151d35;
  --surface-hover: #1c2645;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border: rgba(99, 102, 241, 0.2);
  --border-subtle: rgba(255,255,255,0.06);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: 0.25s ease;
}

body.light {
  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --accent: #6366f1;
  --accent-light: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.1);
  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  --border: rgba(99, 102, 241, 0.25);
  --border-subtle: rgba(0,0,0,0.08);
  --shadow: 0 4px 24px rgba(0,0,0,0.1);
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99,102,241,0.4); }

.btn-secondary {
  display: inline-block;
  padding: 12px 28px;
  background: transparent;
  color: var(--accent-light);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}
.btn-secondary:hover { background: var(--accent-glow); transform: translateY(-2px); }

.btn-full { width: 100%; text-align: center; }

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 15, 30, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}
.nav.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.5); }

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

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}
.nav-logo .dot { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}
.nav-links a:hover { color: var(--text); }

.btn-nav {
  padding: 8px 20px;
  background: var(--accent);
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600 !important;
}
.btn-nav:hover { background: var(--accent-light); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.theme-toggle {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover { color: var(--accent-light); border-color: var(--border); }

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 16px 24px 20px;
  gap: 16px;
  border-top: 1px solid var(--border-subtle);
}
.mobile-menu a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}
.mobile-menu a:hover { color: var(--accent-light); }
.mobile-menu.open { display: flex; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

.hero-content { flex: 1; max-width: 560px; }

.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent-light);
  font-weight: 500;
  margin-bottom: 8px;
  font-family: 'Fira Code', monospace;
}

.hero-name {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #e2e8f0 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.typed-text {
  color: var(--accent-light);
  font-weight: 600;
}

.typed-cursor {
  color: var(--accent);
  font-weight: 300;
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-socials {
  display: flex;
  gap: 16px;
}
.hero-socials a {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  transition: var(--transition);
}
.hero-socials a:hover { color: var(--accent-light); border-color: var(--accent); background: var(--accent-glow); }
.hero-socials svg { width: 18px; height: 18px; }

/* Hero Visual */
.hero-visual {
  position: relative;
  flex-shrink: 0;
  width: 340px;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-ring {
  width: 200px; height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  padding: 3px;
}

.avatar-photo {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.floating-badge {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-light);
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.badge-1 { top: 10px; right: 0; animation: float 3s ease-in-out infinite; }
.badge-2 { bottom: 30px; left: 0; animation: float 3s ease-in-out infinite 1s; }
.badge-3 { bottom: 10px; right: 10px; animation: float 3s ease-in-out infinite 2s; }
.badge-4 { top: 50%; left: -10px; transform: translateY(-50%); animation: float 3s ease-in-out infinite 0.5s; }
.badge-5 { top: 40px; left: 10px; animation: float 3s ease-in-out infinite 1.5s; }
.badge-6 { top: 50%; right: -10px; transform: translateY(-50%); animation: float 3s ease-in-out infinite 2.5s; }

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

/* ===== SECTIONS ===== */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

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

.section-label {
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  color: var(--accent-light);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 48px;
}

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

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

.about-stats {
  display: flex;
  gap: 32px;
  margin: 32px 0;
}

.stat { display: flex; flex-direction: column; }
.stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Code Window */
.code-window {
  background: #0d1117;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #161b22;
  border-bottom: 1px solid var(--border-subtle);
}

.code-header .dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.code-filename {
  margin-left: 8px;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.code-body {
  padding: 24px;
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  overflow-x: auto;
}

.kw { color: #ff7b72; }
.var { color: #79c0ff; }
.prop { color: #7ee787; }
.str { color: #a5d6ff; }

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: var(--transition);
}
.skill-card:hover {
  border-color: var(--border);
  background: var(--surface-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(99,102,241,0.15);
}

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

.skill-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.skill-card ul { display: flex; flex-direction: column; gap: 8px; }
.skill-card li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-left: 12px;
  position: relative;
}
.skill-card li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
  top: 2px;
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.project-card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(99,102,241,0.15);
}

.project-featured {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(99,102,241,0.08) 100%);
}

.featured-badge {
  position: absolute;
  top: -1px; right: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 0 0 8px 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-icon { font-size: 2rem; }

.project-links {
  display: flex;
  gap: 12px;
}
.project-links a {
  color: var(--text-dim);
  transition: var(--transition);
}
.project-links a:hover { color: var(--accent-light); }

.project-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.project-tags span {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  background: var(--accent-glow);
  color: var(--accent-light);
  border-radius: 20px;
  border: 1px solid var(--border);
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

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

.timeline-dot {
  position: absolute;
  left: -29px;
  top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-alt);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  transition: var(--transition);
}
.timeline-content:hover {
  border-color: var(--border);
  box-shadow: 0 8px 24px rgba(99,102,241,0.1);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 16px;
  flex-wrap: wrap;
}

.timeline-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.company {
  font-size: 0.875rem;
  color: var(--accent-light);
  margin-top: 2px;
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: 'Fira Code', monospace;
  white-space: nowrap;
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
}

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

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  align-items: start;
}

.contact-info > p {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 1rem;
}

.contact-items { display: flex; flex-direction: column; gap: 16px; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.contact-item svg { color: var(--accent-light); flex-shrink: 0; }
.contact-item a:hover { color: var(--accent-light); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 20px; }

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

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

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

.form-group input,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: var(--transition);
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }

.form-success {
  display: none;
  text-align: center;
  color: #4ade80;
  font-size: 0.9rem;
  padding: 12px;
  background: rgba(74, 222, 128, 0.1);
  border-radius: var(--radius);
  border: 1px solid rgba(74, 222, 128, 0.2);
}
.form-success.show { display: block; }

/* ===== FOOTER ===== */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
}
.footer p {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { gap: 40px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: 100px;
    gap: 32px;
  }
  .hero-cta { justify-content: center; }
  .hero-socials { justify-content: center; }
  .hero-visual { width: 200px; height: 200px; }
  .avatar-ring { width: 150px; height: 150px; }
  .badge-1 { top: 0; right: -10px; }
  .badge-2 { bottom: 10px; left: -10px; }
  .badge-3 { display: none; }

  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; }
  .about-stats { gap: 20px; }
}

@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
  .section { padding: 64px 0; }
  .timeline { padding-left: 24px; }
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 460px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  animation: modal-in 0.25s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 16px; right: 20px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}
.modal-close:hover { color: var(--text); }

.modal-icon { font-size: 2.4rem; margin-bottom: 12px; }

.modal h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal > p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.form-error {
  display: none;
  text-align: center;
  color: #f87171;
  font-size: 0.875rem;
  padding: 10px;
  background: rgba(248,113,113,0.1);
  border-radius: var(--radius);
  border: 1px solid rgba(248,113,113,0.2);
}
.form-error.show { display: block; }

/* ===== LEETCODE ===== */
.lc-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.lc-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.lc-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #ffa11620;
  border: 2px solid #ffa116;
  display: flex; align-items: center; justify-content: center;
  color: #ffa116;
  flex-shrink: 0;
}

.lc-username {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.lc-link {
  font-size: 0.85rem;
  color: #ffa116;
  transition: var(--transition);
}
.lc-link:hover { color: #ffb84d; }

.lc-rank-badge {
  margin-left: auto;
  background: #ffa11615;
  border: 1px solid #ffa11640;
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.85rem;
  color: #ffa116;
  font-weight: 600;
  font-family: 'Fira Code', monospace;
}

.lc-loading {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.lc-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.lc-stat-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.lc-stat-card:hover {
  border-color: var(--border);
  transform: translateY(-3px);
}

.lc-stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  font-family: 'Fira Code', monospace;
}

.lc-stat-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
}

.lc-total .lc-stat-num  { color: var(--accent-light); }
.lc-easy .lc-stat-num   { color: #4ade80; }
.lc-medium .lc-stat-num { color: #fbbf24; }
.lc-hard .lc-stat-num   { color: #f87171; }

.lc-badges-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.lc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.lc-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.lc-badge img { width: 20px; height: 20px; }

@media (max-width: 768px) {
  .lc-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .lc-rank-badge { margin-left: 0; }
}

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

/* ===== VIEW COUNTER ===== */
.view-counter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--text-dim);
  font-family: 'Fira Code', monospace;
}

.view-counter svg { color: var(--accent-light); flex-shrink: 0; }

#viewCount {
  color: var(--accent-light);
  font-weight: 600;
  transition: all 0.3s ease;
}

.view-live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

/* ===== LIGHT MODE OVERRIDES ===== */
body.light .nav {
  background: rgba(248, 250, 252, 0.9);
  border-bottom-color: rgba(0,0,0,0.08);
}

body.light .code-window { background: #f1f5f9; }
body.light .code-header { background: #e2e8f0; }
body.light .code-body   { color: #1e293b; }
body.light .kw          { color: #7c3aed; }
body.light .var         { color: #0369a1; }
body.light .prop        { color: #15803d; }
body.light .str         { color: #b45309; }

body.light .hero-name {
  background: linear-gradient(135deg, #0f172a 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.light .timeline::before { background: linear-gradient(to bottom, var(--accent), transparent); }

body.light .form-group input,
body.light .form-group textarea {
  background: #f8fafc;
  color: #0f172a;
}
body.light .form-group input::placeholder,
body.light .form-group textarea::placeholder { color: #94a3b8; }

body.light .modal { background: #ffffff; }

body.light .lc-avatar { background: #fff7ed; }

body.light ::-webkit-scrollbar-track { background: #f1f5f9; }

/* ===== IMPACT ===== */
.impact-section {
  padding: 48px 0;
  background: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, rgba(168,85,247,0.06) 100%);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.impact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.impact-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 160px;
  flex: 1;
  max-width: 200px;
  transition: var(--transition);
  text-align: center;
}

.impact-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(99,102,241,0.15);
}

.impact-icon { font-size: 1.8rem; }

.impact-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-light);
  font-family: 'Fira Code', monospace;
  line-height: 1;
}

.impact-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (max-width: 768px) {
  .impact-grid { gap: 12px; }
  .impact-card { min-width: 140px; padding: 18px 16px; }
  .impact-num  { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .impact-card { max-width: 48%; flex: 0 0 48%; }
}

/* ===== CERTIFICATIONS ===== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.cert-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
}

.cert-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(99,102,241,0.15);
}

.cert-icon { font-size: 2.4rem; flex-shrink: 0; }

.cert-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.cert-info .company {
  font-size: 0.875rem;
  color: var(--accent-light);
}

/* ===== PROJECT FILTERS ===== */
.project-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1.5px solid var(--border-subtle);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent-light); }
.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.projects-loading {
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 40px;
  text-align: center;
  grid-column: 1 / -1;
  font-family: 'Fira Code', monospace;
}

.project-cat-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--accent-glow);
  color: var(--accent-light);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== PROJECT SEARCH ===== */
.filter-search-wrap {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  margin-left: auto;
}

.filter-search {
  width: 100%;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border-subtle);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  outline: none;
}
.filter-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.filter-search::placeholder { color: var(--text-dim); }

@media (max-width: 768px) {
  .filter-search-wrap { max-width: 100%; margin-left: 0; }
}

/* ===== ADVANCED PROJECT FILTER BAR ===== */
.project-filter-bar {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-row-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.filter-pill {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border-subtle);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.filter-pill:hover { border-color: var(--accent); color: var(--accent-light); }
.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}

.filter-controls {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.filter-select {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}
.filter-select:focus { border-color: var(--accent); color: var(--text); }

.filter-search-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  min-width: 200px;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-dim);
  pointer-events: none;
}

.filter-search {
  width: 100%;
  padding: 8px 36px 8px 36px;
  border-radius: 8px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  outline: none;
}
.filter-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.filter-search::placeholder { color: var(--text-dim); }

.filter-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 4px;
  border-radius: 4px;
  transition: var(--transition);
}
.filter-clear:hover { color: var(--text); background: var(--surface-hover); }

.filter-result-count {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: 'Fira Code', monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-result-count span { color: var(--accent-light); font-weight: 600; }

@media (max-width: 768px) {
  .filter-controls { width: 100%; }
  .filter-select { flex: 1; }
  .filter-row-bottom { flex-direction: column; align-items: stretch; }
  .filter-result-count { text-align: center; }
}
