/* ─────────────────────────────────────────────
   FONTS
───────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─────────────────────────────────────────────
   BASE RESET & VARIABLES
───────────────────────────────────────────── */
:root {
  --bg-primary:   #0a0f1e;
  --bg-secondary: #0f172a;
  --bg-card:      rgba(15, 23, 42, 0.8);
  --accent-blue:  #3b82f6;
  --accent-purple:#8b5cf6;
  --accent-cyan:  #06b6d4;
  --text-primary: #f1f5f9;
  --text-muted:   #94a3b8;
  --border:       rgba(148, 163, 184, 0.12);
  --glow-blue:    0 0 40px rgba(59, 130, 246, 0.25);
  --glow-purple:  0 0 40px rgba(139, 92, 246, 0.25);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

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

/* ─────────────────────────────────────────────
   CUSTOM SCROLLBAR
───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent-blue), var(--accent-purple));
  border-radius: 3px;
}

/* ─────────────────────────────────────────────
   KEYFRAME ANIMATIONS
───────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}

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

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
  50%       { box-shadow: 0 0 40px rgba(59, 130, 246, 0.6); }
}

@keyframes typewriter {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes blink {
  0%, 100% { border-color: transparent; }
  50%       { border-color: var(--accent-blue); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

/* ─────────────────────────────────────────────
   SCROLL REVEAL (JS toggled)
───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ─────────────────────────────────────────────
   NAVBAR
───────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  transition: background 0.3s, box-shadow 0.3s;
}
#navbar.scrolled {
  background: rgba(10, 15, 30, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-logo {
  font-weight: 800;
  font-size: 1.2rem;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.25rem 0;
  position: relative;
  transition: color 0.2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  transform: scaleX(0);
  transition: transform 0.2s;
  border-radius: 1px;
}
.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}
.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

/* Mobile menu */
#mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: rgba(10, 15, 30, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 1.5rem;
  z-index: 99;
  border-bottom: 1px solid var(--border);
  animation: fadeInUp 0.2s ease;
}
#mobile-menu.open { display: block; }
#mobile-menu a {
  display: block;
  padding: 0.75rem 0;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
#mobile-menu a:last-child { border-bottom: none; }
#mobile-menu a:hover { color: var(--text-primary); }

/* Hamburger */
.hamburger { cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  margin: 5px 0;
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s, background 0.2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--accent-blue); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--accent-blue); }

/* ─────────────────────────────────────────────
   HERO SECTION
───────────────────────────────────────────── */
.hero-bg {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(59, 130, 246, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(139, 92, 246, 0.12) 0%, transparent 60%),
    var(--bg-primary);
  z-index: 0;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
}
.hero-content { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease 0.1s both;
}
.hero-badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-glow 2s ease infinite;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
}
@keyframes pulse-glow {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  animation: fadeInUp 0.6s ease 0.2s both;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple), var(--accent-cyan));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.75;
  animation: fadeInUp 0.6s ease 0.35s both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 0.625rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
  animation: fadeInUp 0.6s ease 0.5s both;
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text-primary);
  padding: 0.75rem 1.75rem;
  border-radius: 0.625rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
  animation: fadeInUp 0.6s ease 0.55s both;
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(148, 163, 184, 0.3);
  transform: translateY(-2px);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #25d366;
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 0.625rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover {
  background: #20bd5a;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.45);
}

.hero-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.65s both;
}
.stat { text-align: center; }
.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─────────────────────────────────────────────
   SECTION SHARED
───────────────────────────────────────────── */
.section { padding: 5rem 0; }
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-blue);
  margin-bottom: 0.75rem;
}
.section-label::before {
  content: '';
  width: 20px; height: 1px;
  background: var(--accent-blue);
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 560px;
}
.divider {
  width: 48px; height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  border-radius: 2px;
  margin: 1rem 0 2.5rem;
}

/* ─────────────────────────────────────────────
   ABOUT SECTION
───────────────────────────────────────────── */
.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2.5rem;
  backdrop-filter: blur(8px);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.about-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: var(--glow-blue);
}

.avatar-ring {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.highlight-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
}
.highlight-tag:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
}

/* ─────────────────────────────────────────────
   SKILLS SECTION
───────────────────────────────────────────── */
.skills-bg {
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(139, 92, 246, 0.08) 0%, transparent 60%),
    var(--bg-secondary);
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.75rem;
  backdrop-filter: blur(8px);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.skill-category:hover {
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--glow-blue);
}
.skill-category-icon {
  width: 48px; height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.skill-category-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.375rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  cursor: default;
}
.skill-badge:hover {
  color: var(--text-primary);
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.08);
}

/* ─────────────────────────────────────────────
   PROJECT CARDS
───────────────────────────────────────────── */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2rem;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--card-accent, var(--accent-blue)), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.project-card:hover::before { opacity: 1; }
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
}
.project-card.featured {
  border-color: rgba(59, 130, 246, 0.25);
}
.project-card.featured:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: var(--glow-blue), 0 20px 48px rgba(0, 0, 0, 0.4);
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2));
  border: 1px solid rgba(139,92,246,0.3);
  color: #c4b5fd;
  padding: 0.2rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.2rem 0.65rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.project-link:hover { color: var(--text-primary); }
.project-link svg { transition: transform 0.2s; }
.project-link:hover svg { transform: translateX(3px); }

/* ─────────────────────────────────────────────
   CONTACT SECTION
───────────────────────────────────────────── */
.contact-bg {
  background:
    radial-gradient(ellipse 70% 60% at 30% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 60%),
    var(--bg-primary);
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 2rem;
  text-align: center;
  backdrop-filter: blur(8px);
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.contact-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--glow-blue);
  color: var(--text-primary);
}
.contact-icon {
  width: 56px; height: 56px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  transition: transform 0.3s;
}
.contact-card:hover .contact-icon { transform: scale(1.1); }

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
footer a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s;
}
footer a:hover { color: #93c5fd; }

/* ─────────────────────────────────────────────
   UTILITIES
───────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Scroll to top button */
#scroll-top {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
  z-index: 50;
}
#scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}
#scroll-top:hover {
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.6);
  transform: translateY(-2px);
}

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-title { font-size: 2.4rem; }
  .hero-stats { gap: 1.25rem; }
  .section { padding: 3.5rem 0; }
  .project-card { padding: 1.5rem; }
  .about-card { padding: 1.75rem; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .stat-number { font-size: 1.4rem; }
}
