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

/* ==================== VARIABLES ==================== */
:root {
  --bg:           #080812;
  --bg-2:         #0c0c1e;
  --bg-card:      rgba(255, 255, 255, 0.03);
  --bg-card-hover:rgba(255, 255, 255, 0.055);
  --border:       rgba(255, 255, 255, 0.07);
  --border-hover: rgba(124, 58, 237, 0.4);
  --purple:       #7c3aed;
  --purple-light: #a78bfa;
  --cyan:         #06b6d4;
  --cyan-light:   #67e8f9;
  --text:         #e2e8f0;
  --text-secondary:#94a3b8;
  --text-muted:   #64748b;
  --gradient:     linear-gradient(135deg, #7c3aed, #06b6d4);
  --gradient-warm:linear-gradient(135deg, #7c3aed, #ec4899);
  --shadow-glow:  0 0 60px rgba(124, 58, 237, 0.12);
  --shadow-card:  0 20px 60px rgba(0, 0, 0, 0.4);
  --transition:   all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius:       16px;
  --radius-sm:    8px;
  --nav-h:        68px;
}

/* ==================== RESET ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ==================== LIGHT MODE ==================== */
body.light-mode {
  --bg:            #f4f5ff;
  --bg-2:          #eaecff;
  --bg-card:       rgba(0, 0, 0, 0.035);
  --bg-card-hover: rgba(0, 0, 0, 0.06);
  --border:        rgba(0, 0, 0, 0.09);
  --text:          #1a1a2e;
  --text-secondary:#4a5568;
  --text-muted:    #718096;
  --shadow-glow:   0 0 60px rgba(124, 58, 237, 0.09);
  --shadow-card:   0 20px 60px rgba(0, 0, 0, 0.08);
  background: var(--bg);
  color: var(--text);
}
body.light-mode #navbar.scrolled {
  background: rgba(244, 245, 255, 0.93);
  border-bottom-color: rgba(0,0,0,0.07);
}
body.light-mode .nav-menu {
  background: rgba(244, 245, 255, 0.97);
  border-bottom-color: rgba(0,0,0,0.07);
}
body.light-mode .hero-grid-bg {
  background-image:
    linear-gradient(rgba(124,58,237,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.07) 1px, transparent 1px);
}
body.light-mode .hero-orb-1 { background: rgba(124,58,237,0.13); }
body.light-mode .hero-orb-2 { background: rgba(6,182,212,0.11); }
body.light-mode .hero-orb-3 { background: rgba(236,72,153,0.08); }
body.light-mode ::-webkit-scrollbar-track { background: var(--bg-2); }

/* Smooth theme transition */
body,
#navbar,
footer,
.stats-bar,
.project-card,
.featured-card,
.skill-group,
.contact-card,
.filter-btn,
.nav-menu,
.hero-tags span {
  transition: background 0.3s ease, background-color 0.3s ease,
              border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

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

/* ==================== UTILITY ==================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==================== NAVBAR ==================== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: var(--transition);
}
#navbar.scrolled {
  background: rgba(8, 8, 18, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
  transition: var(--transition);
}
.nav-logo span { color: var(--purple-light); }
.nav-logo:hover { opacity: 0.85; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
  justify-content: flex-end;
}
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
  padding-bottom: 3px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--gradient);
  transition: var(--transition);
  border-radius: 2px;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-social {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.nav-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
  transition: var(--transition);
}
.nav-social a:hover {
  border-color: var(--purple);
  color: var(--purple-light);
  background: rgba(124, 58, 237, 0.1);
  transform: translateY(-2px);
}

.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--purple);
  color: var(--purple-light);
  background: rgba(124, 58, 237, 0.1);
  transform: rotate(20deg);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ==================== HERO ==================== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + 4rem) 2rem 5rem;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 30%, transparent 100%);
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  will-change: transform;
}
.hero-orb-1 {
  width: 600px; height: 600px;
  background: rgba(124, 58, 237, 0.1);
  top: -150px; left: -150px;
  animation: drift 12s ease-in-out infinite;
}
.hero-orb-2 {
  width: 450px; height: 450px;
  background: rgba(6, 182, 212, 0.08);
  bottom: -100px; right: -100px;
  animation: drift 14s ease-in-out infinite reverse;
}
.hero-orb-3 {
  width: 250px; height: 250px;
  background: rgba(236, 72, 153, 0.06);
  top: 50%; left: 55%;
  animation: drift 9s ease-in-out infinite 3s;
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(25px, -25px) scale(1.05); }
  66%  { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
  animation: heroEntry 0.8s ease both;
}
@keyframes heroEntry {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  border: 1px solid rgba(124, 58, 237, 0.35);
  background: rgba(124, 58, 237, 0.08);
  color: var(--purple-light);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
  animation: heroEntry 0.8s ease 0.1s both;
}
.hero-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse-green 2s ease-in-out infinite;
}
@keyframes pulse-green {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px #4ade80; }
  50% { opacity: 0.5; box-shadow: 0 0 3px #4ade80; }
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  animation: heroEntry 0.8s ease 0.15s both;
}
.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
  animation: heroEntry 0.8s ease 0.2s both;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: heroEntry 0.8s ease 0.25s both;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  animation: heroEntry 0.8s ease 0.3s both;
}
.hero-tags span {
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-card);
  transition: var(--transition);
  cursor: default;
}
.hero-tags span:hover {
  border-color: var(--cyan);
  color: var(--cyan-light);
  background: rgba(6, 182, 212, 0.06);
  transform: translateY(-2px);
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(124, 58, 237, 0.5);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: rgba(124, 58, 237, 0.5);
  background: rgba(124, 58, 237, 0.07);
  transform: translateY(-2px);
}
.btn-sm {
  padding: 0.6rem 1.25rem;
  font-size: 0.82rem;
}

/* ==================== STATS ==================== */
.stats-bar {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.stats-grid {
  display: flex;
  justify-content: center;
  gap: 5rem;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.75rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  letter-spacing: 0.02em;
}

/* ==================== SECTION ==================== */
.section { padding: 6rem 0; }
.section-header { margin-bottom: 3rem; }
.section-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ==================== TECH TAGS ==================== */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.75rem;
}
.tech-tag {
  padding: 0.28rem 0.75rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition);
}
.tech-tag:hover {
  border-color: var(--purple);
  color: var(--purple-light);
  background: rgba(124, 58, 237, 0.06);
}

/* ==================== FEATURED PROJECT ==================== */
.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  transition: var(--transition);
  margin-bottom: 5rem;
}
.featured-card:hover {
  border-color: rgba(124, 58, 237, 0.25);
  box-shadow: var(--shadow-glow), var(--shadow-card);
  transform: translateY(-4px);
}
.featured-image {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f1ff;
  padding: 1.75rem;
}
.featured-image img {
  width: 100%; height: 100%;
  object-fit: contain;
  transition: transform 0.6s ease;
}
.featured-card:hover .featured-image img { transform: scale(1.05); }
.featured-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  background: var(--gradient);
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 1;
}
.featured-content {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
}
.featured-content > p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
}
.featured-content code,
.card-content code {
  font-family: 'Space Grotesk', monospace;
  background: rgba(124, 58, 237, 0.1);
  color: var(--purple-light);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ==================== PROJECTS GRID ==================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.project-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  border-color: rgba(124, 58, 237, 0.22);
  transform: translateY(-6px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
  background: var(--bg-card-hover);
}
.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .card-image img { transform: scale(1.08); }
.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 18, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}
.project-card:hover .card-overlay { opacity: 1; }
.card-content {
  padding: 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
  line-height: 1.3;
}
.card-content > p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--purple-light);
  transition: var(--transition);
}
.card-link:hover {
  color: var(--cyan-light);
  gap: 0.65rem;
}

/* ==================== FOOTER ==================== */
footer {
  border-top: 1px solid var(--border);
  padding: 4rem 0 2.5rem;
  background: var(--bg-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}
.footer-brand > p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 260px;
}
.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col ul a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: var(--transition);
}
.footer-col ul a:hover { color: var(--purple-light); padding-left: 4px; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer-social {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
}
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: var(--transition);
}
.footer-social a:hover {
  border-color: var(--purple);
  color: var(--purple-light);
  background: rgba(124, 58, 237, 0.1);
  transform: translateY(-2px);
}

/* ==================== ABOUT PAGE ==================== */
.about-hero {
  padding: calc(var(--nav-h) + 5rem) 0 5rem;
  position: relative;
  overflow: hidden;
}
.about-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 5rem;
  align-items: center;
}
.about-photo { position: relative; }
.about-photo-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}
.about-photo-frame img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border);
  display: block;
  position: relative;
  z-index: 1;
}
.about-photo-glow {
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius) + 2px);
  background: var(--gradient);
  z-index: 0;
  filter: blur(24px);
  opacity: 0.25;
}
.about-content h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.about-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.97rem;
  margin-bottom: 1.1rem;
}
.about-content strong { color: var(--text); font-weight: 600; }
.about-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ==================== SKILLS ==================== */
.skills-section { padding: 3rem 0 5rem; }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.skill-group {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 1.6rem;
  transition: var(--transition);
}
.skill-group:hover {
  border-color: rgba(124, 58, 237, 0.2);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}
.skill-group-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.skill-group-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: white;
  flex-shrink: 0;
}
.skill-group h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.skill-tag {
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  font-size: 0.77rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition);
  cursor: default;
}
.skill-tag:hover {
  border-color: var(--cyan);
  color: var(--cyan-light);
  background: rgba(6, 182, 212, 0.06);
}

/* ==================== CONTACT ==================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: var(--transition);
  color: inherit;
}
a.contact-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  background: var(--bg-card-hover);
}
.contact-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: white;
  flex-shrink: 0;
}
.contact-card h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}
.contact-card p {
  font-size: 0.875rem;
  color: var(--text);
  font-weight: 500;
}

/* ==================== FILTER BAR ==================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filter-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-right: 0.25rem;
  white-space: nowrap;
}
.filter-btn {
  padding: 0.4rem 1.05rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}
.filter-btn:hover {
  border-color: var(--purple);
  color: var(--purple-light);
  background: rgba(124, 58, 237, 0.06);
}
.filter-btn.active {
  background: var(--gradient);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

/* Hero tags — clickable when they have data-filter */
.hero-tags span[data-filter] { cursor: pointer; }
.hero-tags span.tag-active {
  border-color: var(--purple);
  color: var(--purple-light);
  background: rgba(124, 58, 237, 0.1);
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.15);
}

/* Filtered-out cards */
.project-card.filtered-out {
  display: none;
}
.featured-card.filtered-out {
  opacity: 0.1 !important;
  pointer-events: none;
  filter: grayscale(80%);
  transform: none !important;
}

/* No results message */
.no-results {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.no-results i {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
  opacity: 0.4;
}
.no-results p { margin-bottom: 1.25rem; }

/* ==================== ANIMATIONS ==================== */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-card  { grid-template-columns: 1fr; }
  .featured-image { min-height: 260px; aspect-ratio: 16 / 9; }
  .about-hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-photo { max-width: 360px; }
  .about-photo-frame img { aspect-ratio: 4 / 3; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

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

  .nav-menu {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(8, 8, 18, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem 2rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, height 0.3s ease;
  }
  .nav-menu.open {
    height: auto;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    width: 100%;
  }
  .nav-links a { font-size: 1.05rem; }
  .nav-social {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
  }

  #hero { padding: calc(var(--nav-h) + 3rem) 1.5rem 4rem; }
  .hero-title { font-size: 2.6rem; }
  .stats-grid { gap: 2rem; }
  .stat-number { font-size: 2rem; }

  .section { padding: 4rem 0; }
  .featured-content { padding: 2rem; }
  .featured-content h2 { font-size: 1.4rem; }

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

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-brand > p { max-width: 100%; }

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

  .about-hero { padding: calc(var(--nav-h) + 3rem) 0 3rem; }
  .about-hero-grid { gap: 2.5rem; }
}

@media (max-width: 520px) {
  .container { padding: 0 1.25rem; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; justify-content: center; max-width: 260px; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats-grid { flex-direction: column; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
