*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0a0f1e;
  --card: #111827;
  --accent: #2E75B6;
  --highlight: #4fa3e0;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --border: #1e293b;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--highlight); text-decoration: none; transition: color 0.3s; }
a:hover, a:focus { color: #6ab4f0; }
img, svg { display: block; max-width: 100%; }

/* NAVBAR */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(10,15,30,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000; padding: 0 1.5rem;
  transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: 0 4px 30px rgba(46,117,182,0.08); }
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em;
  color: var(--text); white-space: nowrap;
}
.nav-links { display: flex; gap: 0.25rem; list-style: none; }
.nav-links a {
  padding: 0.45rem 0.9rem; border-radius: 8px; font-size: 0.875rem;
  font-weight: 500; color: var(--muted); transition: all 0.25s;
  position: relative;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--text); background: rgba(46,117,182,0.08); }
.nav-links a.active { color: var(--highlight); background: rgba(46,117,182,0.12); }
.hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: 4px;
}
.hamburger span {
  display: block; width: 24px; height: 2px; background: var(--text);
  border-radius: 2px; transition: all 0.3s; transform-origin: center;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* SECTIONS */
section { padding: 5rem 1.5rem; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-title {
  font-size: 1.75rem; font-weight: 700; margin-bottom: 2.5rem;
  letter-spacing: -0.02em; position: relative; display: inline-block;
}
.section-title::after {
  content: ''; position: absolute; bottom: -6px; left: 0;
  width: 48px; height: 3px; background: var(--accent); border-radius: 2px;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* FADE-IN */
.fade-in {
  opacity: 0; transform: translateY(28px); transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* HERO */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 6rem 1.5rem 4rem; position: relative; overflow: hidden;
  background-size: cover; background-position: center; transition: background-image 0.8s ease;
}
.hero .hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(10,15,30,0.88) 0%, rgba(10,15,30,0.7) 50%, rgba(10,15,30,0.88) 100%);
  z-index: 1; pointer-events: none;
}
.hero .hero-accent {
  position: absolute; top: -40%; left: -20%; right: -20%; bottom: -40%;
  background: radial-gradient(ellipse at 30% 50%, rgba(46,117,182,0.08) 0%, transparent 60%);
  pointer-events: none; z-index: 1;
}
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero-profile {
  width: 140px; height: 140px; border-radius: 50%; object-fit: cover; object-position: center 20%;
  border: 3px solid var(--accent); box-shadow: 0 0 30px rgba(46,117,182,0.2);
  margin: 0 auto 1.25rem;
}
.hero-slider-dots {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 0.5rem; z-index: 3;
}
.hero-slider-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--muted);
  background: transparent; cursor: pointer; transition: all 0.3s; padding: 0;
}
.hero-slider-dots button.active { background: var(--accent); border-color: var(--accent); }
.hero-slider-dots button:hover { border-color: var(--highlight); }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800;
  letter-spacing: -0.03em; margin-bottom: 0.5rem; line-height: 1.15;
}
.hero h1 span { color: var(--accent); }
.hero .subtitle {
  font-size: clamp(1rem, 2.2vw, 1.3rem); color: var(--highlight);
  font-weight: 500; margin-bottom: 0.6rem;
}
.hero .tagline { color: var(--muted); font-size: 1rem; margin-bottom: 0.5rem; }
.hero .hero-bio { color: var(--muted); font-size: 0.9rem; max-width: 600px; margin: 0 auto 1.5rem; line-height: 1.6; }
.typing-wrap {
  font-size: 1.05rem; color: var(--muted); margin-bottom: 2rem;
  min-height: 1.8em;
}
.typing-wrap .prefix { color: var(--muted); }
.typed-text { color: var(--highlight); font-weight: 600; }
.cursor {
  display: inline-block; width: 2px; height: 1.15em; background: var(--highlight);
  margin-left: 2px; vertical-align: text-bottom; animation: blink 0.7s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem;
  border-radius: 10px; font-weight: 600; font-size: 0.9rem; font-family: inherit;
  border: none; cursor: pointer; transition: all 0.25s; text-decoration: none;
}
.btn-primary {
  background: var(--accent); color: #fff; box-shadow: 0 4px 16px rgba(46,117,182,0.25);
}
.btn-primary:hover, .btn-primary:focus-visible { background: #1f5a8a; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(46,117,182,0.35); }
.btn-secondary {
  background: transparent; color: var(--text); border: 1px solid var(--border);
}
.btn-secondary:hover, .btn-secondary:focus-visible { background: rgba(46,117,182,0.08); border-color: var(--accent); }

/* ABOUT */
.about-text { font-size: 1rem; color: var(--muted); margin-bottom: 2rem; max-width: 850px; line-height: 1.7; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.5rem 1rem; text-align: center; transition: border-color 0.3s, transform 0.3s;
}
.stat-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.stat-card .icon { font-size: 1.5rem; margin-bottom: 0.4rem; }
.stat-card .num { font-size: 1.6rem; font-weight: 700; color: var(--highlight); }
.stat-card .label { font-size: 0.85rem; color: var(--muted); margin-top: 0.2rem; }

/* SKILLS */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.skill-group { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem; }
.skill-group h3 { font-size: 0.9rem; font-weight: 600; color: var(--highlight); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.04em; }
.skill-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-badge {
  background: rgba(46,117,182,0.1); border: 1px solid rgba(46,117,182,0.2);
  color: var(--highlight); padding: 0.35rem 0.8rem; border-radius: 20px;
  font-size: 0.8rem; font-weight: 500; transition: all 0.25s;
}
.skill-badge:hover { background: rgba(46,117,182,0.2); border-color: var(--accent); }

/* PROJECTS */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.project-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.5rem; display: flex; flex-direction: column; transition: border-color 0.3s, transform 0.3s;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.project-image {
  width: 100%; height: 170px; border-radius: 10px; overflow: hidden; margin-bottom: 0.9rem;
  background: var(--bg);
}
.project-image img {
  width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s;
}
.project-card:hover .project-image img { transform: scale(1.05); }
.project-card .role-tag {
  display: inline-block; background: rgba(46,117,182,0.1); color: var(--highlight);
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem; border-radius: 6px; margin-bottom: 0.6rem; width: fit-content;
}
.project-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.project-card .desc { font-size: 0.88rem; color: var(--muted); margin-bottom: 1rem; flex: 1; }
.project-tech { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1rem; }
.project-tech span {
  background: rgba(148,163,184,0.08); border: 1px solid var(--border);
  color: var(--muted); padding: 0.2rem 0.55rem; border-radius: 6px;
  font-size: 0.72rem; font-weight: 500;
}
.project-card .btn { align-self: flex-start; }
.accordion-content {
  overflow: hidden; max-height: 0; transition: max-height 0.4s ease, padding 0.4s ease, margin 0.4s ease;
  padding: 0 0; margin: 0;
}
.accordion-content.open { max-height: 600px; padding: 0.75rem 0 0; margin: 0.75rem 0 0; border-top: 1px solid var(--border); }
.accordion-content ul { list-style: none; padding: 0; }
.accordion-content li {
  font-size: 0.85rem; color: var(--muted); padding: 0.4rem 0 0.4rem 1.2rem;
  position: relative; line-height: 1.5;
}
.accordion-content li::before {
  content: '\25B9'; position: absolute; left: 0; color: var(--accent); font-size: 0.85rem;
}

/* CERTIFICATIONS */
.certs-list { display: flex; flex-direction: column; gap: 1rem; }
.cert-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.25rem 1.5rem; display: flex; align-items: center; gap: 1rem;
  transition: border-color 0.3s;
}
.cert-card:hover { border-color: var(--accent); }
.cert-card .cert-icon {
  width: 44px; height: 44px; border-radius: 10px; background: rgba(46,117,182,0.1);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-size: 1.2rem;
}
.cert-card .cert-body h4 { font-size: 0.95rem; font-weight: 600; }
.cert-card .cert-body p { font-size: 0.82rem; color: var(--muted); margin-top: 0.15rem; }

/* CONTACT */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-item { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-size: 0.95rem; }
.contact-item .ci-icon { width: 20px; text-align: center; color: var(--accent); flex-shrink: 0; }
.contact-item a { color: var(--text); }
.contact-item a:hover { color: var(--highlight); }
.contact-socials { display: flex; gap: 0.75rem; margin-top: 0.5rem; }
.contact-socials a {
  width: 40px; height: 40px; border-radius: 10px; background: var(--card);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 0.9rem; font-weight: 600;
  transition: all 0.25s; text-decoration: none;
}
.contact-socials a:hover { border-color: var(--accent); color: var(--highlight); background: rgba(46,117,182,0.08); }
.contact-form { display: flex; flex-direction: column; gap: 0.9rem; }
.contact-form input, .contact-form textarea {
  font-family: inherit; font-size: 0.9rem; padding: 0.75rem 1rem;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); outline: none; transition: border-color 0.25s;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); }
.contact-form textarea { resize: vertical; min-height: 110px; }
.contact-form .btn { align-self: flex-start; }

/* BACK TO TOP */
#backToTop {
  position: fixed; bottom: 2rem; right: 2rem; width: 44px; height: 44px;
  border-radius: 12px; background: var(--accent); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: all 0.3s; z-index: 999;
  box-shadow: 0 4px 16px rgba(46,117,182,0.25);
}
#backToTop.visible { opacity: 1; pointer-events: auto; }
#backToTop:hover { background: #1f5a8a; transform: translateY(-2px); }
#backToTop svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* WHATSAPP */
#whatsappBtn {
  position: fixed; bottom: 2rem; left: 2rem; width: 48px; height: 48px;
  border-radius: 50%; background: #25D366; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: all 0.3s; z-index: 999;
  box-shadow: 0 4px 16px rgba(37,211,102,0.3);
}
#whatsappBtn.visible { opacity: 1; pointer-events: auto; }
#whatsappBtn:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(37,211,102,0.45); }
#whatsappBtn svg { width: 24px; height: 24px; }

/* FOOTER */
footer {
  text-align: center; padding: 2rem 1.5rem; color: var(--muted);
  font-size: 0.82rem; border-top: 1px solid var(--border);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .nav-links {
    position: fixed; top: 64px; left: 0; right: 0; background: rgba(10,15,30,0.98);
    backdrop-filter: blur(12px); flex-direction: column; padding: 1rem; gap: 0.25rem;
    border-bottom: 1px solid var(--border); display: none;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .stats { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; align-items: center; }
  .cert-card { flex-direction: column; text-align: center; }
}
