/* =========================
   COLOR SYSTEM
========================= */

:root{
  --bg:#FFFFFF;
  --surface:#F8FAFC;

  --text:#0B0B0C;
  --heading:#0F172A;
  --muted:#4B5563;
  --border:#E5E7EB;

  --primary:#0F172A;
  --accent:#06B6D4;
  --whatsapp:#25D366;
}

body.dark{
  --bg:#020617;
  --surface:#0B1220;

  --text:#F1F5F9;
  --heading:#FFFFFF;
  --muted:#94A3B8;
  --border:#1F2937;
}

/* =========================
   BASE
========================= */

*{box-sizing:border-box;}

html,body{
  height:100%;
}

body{
  margin:0;
  font-family:'Montserrat',sans-serif;
  background:var(--bg);
  color:var(--text);
  transition:background .35s ease,color .35s ease;
}

a{
  text-decoration:none;
  color:var(--primary);
  transition:.25s;
}

a:hover{color:var(--accent);}

h1,h2,h3,.hero-name{
  color:var(--heading);
}

/* =========================
   CANVAS
========================= */

#bg-canvas{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
  z-index:-1;
  pointer-events:none;
}

/* =========================
   HEADER
========================= */

.header{
  position:sticky;
  top:0;
  background:rgba(255,255,255,.75);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 6%;
  z-index:1000;
  transition:background .3s ease;
}

body.dark .header{
  background:rgba(2,6,23,.6);
}

.logo{
  font-family:'Playfair Display',serif;
  font-size:22px;
}

nav a{
  margin:0 14px;
  font-size:14px;
  position:relative;
  color:var(--text);
}

nav a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-4px;
  width:0%;
  height:2px;
  background:var(--accent);
  transition:.3s;
}

nav a:hover::after{width:100%;}

/* =========================
   CONTROLS
========================= */

.controls{
  display:flex;
  align-items:center;
  gap:14px;
}

/* -------- LANGUAGE SWITCH PREMIUM -------- */

.lang-switch{
  display:inline-flex;
  align-items:center;
  padding:3px;
  border-radius:999px;
  background:rgba(0,0,0,0.05);
  border:1px solid rgba(0,0,0,0.06);
  backdrop-filter:blur(6px);
}

body.dark .lang-switch{
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.08);
}

.lang-btn{
  border:none;
  background:transparent;
  padding:6px 14px;
  border-radius:999px;
  font-size:12px;
  font-weight:500;
  letter-spacing:.3px;
  cursor:pointer;
  color:var(--muted);
  transition:all .25s ease;
}

.lang-btn:hover{
  color:var(--text);
  transform:translateY(-1px);
}

.lang-btn.active{
  background:#ffffff;
  color:#000;
  font-weight:600;
  box-shadow:0 2px 8px rgba(0,0,0,0.08);
}

body.dark .lang-btn.active{
  background:#1E293B;
  color:#fff;
  box-shadow:0 2px 10px rgba(0,0,0,0.35);
}

/* -------- THEME TOGGLE -------- */

.theme-toggle{
  width:44px;
  height:24px;
  border-radius:20px;
  background:rgba(0,0,0,0.15);
  position:relative;
  cursor:pointer;
  transition:.3s;
}

body.dark .theme-toggle{
  background:rgba(255,255,255,0.25);
}

.theme-toggle::before{
  content:"";
  position:absolute;
  width:18px;
  height:18px;
  border-radius:50%;
  background:#fff;
  top:3px;
  left:3px;
  transition:.3s;
  box-shadow:0 1px 3px rgba(0,0,0,0.25);
}

body.dark .theme-toggle::before{
  transform:translateX(20px);
  background:var(--accent);
}

/* =========================
   HERO
========================= */

.hero{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  padding:120px 20px 90px;
}

.hero h1{
  font-family:'Playfair Display',serif;
  font-size:clamp(40px,7vw,72px);
  margin:0;
}

.hero h1::after{
  content:"";
  display:block;
  width:60px;
  height:3px;
  background:var(--accent);
  margin:18px auto 0;
}

.hero h2{
  font-size:18px;
  color:var(--muted);
  margin-top:20px;
}

.hero p{
  max-width:620px;
  margin:20px auto 0;
  font-size:17px;
  line-height:1.6;
}

body.dark .hero-name{
  text-shadow:0 0 18px rgba(6,182,212,0.25);
}

/* =========================
   SECTIONS
========================= */

section{
  max-width:1000px;
  margin:auto;
  padding:90px 20px;
}

section:nth-child(even){
  background:var(--surface);
}

h2{
  font-family:'Playfair Display',serif;
  font-size:28px;
  margin-bottom:25px;
}

/* =========================
   SKILLS
========================= */

.skills-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:20px;
  margin:40px auto 0;
  max-width:820px;
  padding-bottom: 3em;	
}

.skill-card{
  padding:22px 18px;
  border-radius:14px;
  background:var(--bg);
  border:1px solid var(--border);
  text-align:center;
  transition:.35s;
}

.skill-card:hover{
  transform:translateY(-6px);
  border-color:var(--accent);
}

body.dark .skill-card{
  background:#0F172A;
  border:1px solid #1E293B;
}

/* =========================
   CONTACT
========================= */

#contact{text-align:center;}

.contact-wrapper{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:16px;
  margin-top:30px;
}

.contact-btn{
  min-width:280px;
  padding:12px 24px;
  border-radius:30px;
  border:1px solid var(--primary);
  color:var(--primary);
  transition:.25s;
}

.contact-btn:hover{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}

.contact-btn.whatsapp{
  border-color:var(--whatsapp);
  color:var(--whatsapp);
}

.contact-btn.whatsapp:hover{
  background:var(--whatsapp);
  color:#fff;
}

body.dark .contact-btn{
  color:#E5E7EB;
  border-color:#334155;
}

/* =========================
   FOOTER
========================= */

.footer{
  text-align:center;
  padding:25px 20px;
  font-size:12px;
  color:var(--muted);
  border-top:1px solid var(--border);
  background:var(--surface);
}


/* =========================
   DOWNLOAD CV — PREMIUM UPGRADE
========================= */

.btn-primary{
  position:relative;
  padding:14px 32px;
  border-radius:999px;

  font-weight:600;
  font-size:14px;
  letter-spacing:.4px;

  background:linear-gradient(135deg,var(--primary),#1e293b);
  color:#ffffff;
  border:none;

  transition:
    transform .25s ease,
    box-shadow .25s ease,
    background .25s ease,
    filter .25s ease;

  box-shadow:
    0 6px 18px rgba(15,23,42,.15),
    0 2px 6px rgba(0,0,0,.08);
}

/* Hover */

.btn-primary:hover{
  transform:translateY(-3px);

  background:linear-gradient(135deg,var(--accent),#0ea5e9);
  color:#ffffff;

  box-shadow:
    0 12px 28px rgba(6,182,212,.35),
    0 4px 12px rgba(0,0,0,.12);

  filter:saturate(1.1);
}

/* Click */

.btn-primary:active{
  transform:translateY(-1px);
  box-shadow:
    0 4px 10px rgba(0,0,0,.15);
}

/* Dark refinement */

body.dark .btn-primary{
  box-shadow:
    0 6px 18px rgba(0,0,0,.45);
}

/* =========================
   HERO NAME ANIMATION — RESTORED
========================= */

/* Estado inicial */

.hero-name{
  opacity:0;
  transform:translateY(30px) scale(.98);
  letter-spacing:1px;
  animation:heroReveal 1.1s cubic-bezier(.22,.61,.36,1) forwards;
}

/* Subtítulo */

.hero-subtitle{
  opacity:0;
  transform:translateY(25px);
  animation:heroReveal 1s ease forwards;
  animation-delay:.25s;
}

/* Descripción */

.hero-description{
  opacity:0;
  transform:translateY(25px);
  animation:heroReveal 1s ease forwards;
  animation-delay:.45s;
}

/* Keyframes */

@keyframes heroReveal{
  0%{
    opacity:0;
    transform:translateY(30px) scale(.98);
  }
  60%{
    opacity:.85;
  }
  100%{
    opacity:1;
    transform:translateY(0) scale(1);
    letter-spacing:0;
  }
}

/* Glow sutil en dark */

body.dark .hero-name{
  text-shadow:0 0 18px rgba(6,182,212,0.25);
}