:root{
  --bg: #0b1220;
  --panel: rgba(255,255,255,.06);
  --line: rgba(255,255,255,.12);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.70);
  --shadow: 0 22px 60px rgba(0,0,0,.45);
  --radius: 18px;
  --accent: #7c5cff;
  --accent2: #00d1ff;
}

[data-theme="light"]{
  --bg: #f6f7fb;
  --panel: rgba(0,0,0,.04);
  --line: rgba(0,0,0,.10);
  --text: rgba(11,18,32,.92);
  --muted: rgba(11,18,32,.70);
  --shadow: 0 18px 50px rgba(0,0,0,.12);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  background:
    radial-gradient(900px 450px at 18% 10%, rgba(124,92,255,.30), transparent 60%),
    radial-gradient(900px 450px at 85% 85%, rgba(0,209,255,.14), transparent 60%),
    var(--bg);
}

a{ color: inherit; }
a:focus-visible, button:focus-visible{
  outline: 2px solid rgba(124,92,255,.65);
  outline-offset: 3px;
  border-radius: 12px;
}

.wrap{
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.card{
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

/* TOPBAR */
.topbar{
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(0,0,0,.22), rgba(0,0,0,0));
}
[data-theme="light"] .topbar{
  background: linear-gradient(to bottom, rgba(255,255,255,.85), rgba(255,255,255,0));
}

header{
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}

nav{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

nav a{
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
}

nav a:hover{
  color: var(--text);
  border-color: var(--line);
  background: rgba(255,255,255,.04);
}

/* BUTTONS */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  font-weight: 650;
  font-size: 14px;
  background: rgba(255,255,255,.04);
  transition: transform .08s ease, background .15s ease;
  cursor: pointer;
}

.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.08);
}

.btn.primary{
  border-color: rgba(124,92,255,.45);
  background: linear-gradient(135deg, rgba(124,92,255,.80), rgba(0,209,255,.22));
}

.btn.ghost{
  background: transparent;
}

/* HERO */
.hero{
  padding: 28px 18px 22px 18px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1.2fr .8fr;
}

@media (max-width: 860px){
  .hero{ grid-template-columns: 1fr; }
}

.kicker{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 999px;
  width: fit-content;
}

.dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(124,92,255,.18);
}

h1{
  margin: 10px 0 6px 0;
  letter-spacing: -0.02em;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.08;
}

.headline{
  margin: 0 0 10px 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  max-width: 62ch;
}

.ctaRow{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.panel{
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255,255,255,.03);
}

/* PROOF BULLETS */
.bullets{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.bullets li{
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 12px;
  background: rgba(255,255,255,.03);
}

.bullets b{ color: var(--text); }

/* SECTIONS */
section{
  padding: 18px;
  border-top: 1px solid var(--line);
}

section h2{
  margin: 0 0 10px 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}

section p{
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

/* FOOTER */
footer{
  padding: 16px 18px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .btn{ transition: none; }
}

/* TIMELINE */
.timeline{
  margin: 14px 0 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.t-item{
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
}

.t-item::before{
  content:"";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,.08);
}
[data-theme="light"] .t-item::before{
  background: rgba(0,0,0,.08);
}

.t-dot{
  width: 14px;
  height: 14px;
  margin-top: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(0,209,255,.55));
  box-shadow: 0 0 0 6px rgba(124,92,255,.14);
  z-index: 1;
}

.t-card{
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-radius: 18px;
  padding: 14px 14px;
}

.t-top{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: baseline;
}

.t-role{
  font-weight: 750;
  letter-spacing: -0.01em;
}

.t-company{
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.t-meta{
  color: var(--muted);
  font-size: 12px;
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.02);
}

.t-bullets{
  margin: 10px 0 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}
.t-bullets b{ color: var(--text); }

.subblock{
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.02);
}

.subblock h3{
  margin: 0 0 8px 0;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.muted{ color: var(--muted); }

/* HIGHLIGHTS */
.h-grid{
  margin-top: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 920px){
  .h-grid{ grid-template-columns: 1fr; }
}

.h-card{
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 14px;
  background: rgba(255,255,255,.03);
  transition: transform .10s ease, background .15s ease;
}

.h-card:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.05);
}

.h-top{
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  margin-bottom: 8px;
}

.h-card h3{
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.h-card p{
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.h-pill{
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.02);
  white-space: nowrap;
}

.h-tags{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.h-tags span{
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.02);
}

/* SKILLS */
.skills-grid{
  margin-top: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 860px){
  .skills-grid{ grid-template-columns: 1fr; }
}

.skill-card{
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.03);
}

.skill-card h3{
  margin: 0 0 10px 0;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--text);
}

.chips{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip{
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.02);
  white-space: nowrap;
}

.chip.strong{
  color: var(--text);
  border-color: rgba(124,92,255,.35);
  background: rgba(124,92,255,.10);
}

/* EDUCATION */
.edu-grid{
  margin-top: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 860px){
  .edu-grid{ grid-template-columns: 1fr; }
}

.edu-card{
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.03);
}

.edu-top{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: baseline;
  margin-bottom: 8px;
}

.edu-title{
  font-weight: 750;
  letter-spacing: -0.01em;
}

.edu-sub{
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.edu-meta{
  color: var(--muted);
  font-size: 12px;
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.02);
}

.edu-text{
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.edu-subgrid{
  margin-top: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 860px){
  .edu-subgrid{ grid-template-columns: 1fr; }
}

/* MOBILE DRAWER NAV */
.header-actions{
  display: flex;
  gap: 10px;
  align-items: center;
}

.menu-btn{
  display: none; /* desktop hidden */
}

@media (max-width: 820px){
  .nav-desktop{ display: none; }
  .menu-btn{ display: inline-flex; }
}

.drawer{
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.drawer.is-open{
  display: block;
}

.drawer-overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}

.drawer-panel{
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(360px, 88vw);
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  padding: 14px;
  transform: translateX(12px);
  opacity: 0;
  transition: transform .15s ease, opacity .15s ease;
}

.drawer.is-open .drawer-panel{
  transform: translateX(0);
  opacity: 1;
}

.drawer-top{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.drawer-title{
  font-weight: 750;
  letter-spacing: -0.01em;
}

.drawer-nav{
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.drawer-nav a{
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-radius: 14px;
  padding: 12px 12px;
}

.drawer-nav a:hover{
  background: rgba(255,255,255,.06);
}

.no-scroll{
  overflow: hidden;
}

/* --- Android/WebView hardening --- */
.drawer[hidden]{ display:none !important; }

/* Fallback si color-mix no existe */
.drawer-panel{
  background: rgba(11,18,32,.92);
}
[data-theme="light"] .drawer-panel{
  background: rgba(246,247,251,.92);
}

/* Si el navegador soporta color-mix, usamos el “pro” */
@supports (background: color-mix(in srgb, black 50%, white)){
  .drawer-panel{
    background: color-mix(in srgb, var(--bg) 85%, transparent);
  }
}

/* --- Mobile polish (full width + burger visible) --- */
@media (max-width: 820px){
  .wrap{ padding: 12px; }            /* menos “márgenes” */
  .card{
    border: 0;
    border-radius: 0;
    box-shadow: none;                /* evita el look “caja estrecha” */
    backdrop-filter: none;
  }

  header{ padding: 10px 10px; }      /* acerca los botones al borde */
  .header-actions{ margin-left: auto; gap: 8px; }
  .menu-btn{ margin-right: -4px; }   /* un pelín más a la derecha */

  /* Por si Chrome te lo está dejando oculto: */
  .nav-desktop{ display: none !important; }
  .menu-btn{ display: inline-flex !important; }
}
