:root{
  --bg: #0b1020;
  --panel: rgba(255,255,255,.06);
  --panel-2: rgba(255,255,255,.10);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.72);
  --border: rgba(255,255,255,.14);
  --shadow: 0 18px 45px rgba(0,0,0,.35);
  --accent: #7c4dff;
  --accent-2: #18c2ff;

  --radius: 18px;
  --radius-sm: 14px;

  --container: 1120px;
  --gap: 18px;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

[data-theme="light"]{
  --bg: #f6f7fb;
  --panel: rgba(0,0,0,.04);
  --panel-2: rgba(0,0,0,.06);
  --text: rgba(0,0,0,.90);
  --muted: rgba(0,0,0,.68);
  --border: rgba(0,0,0,.12);
  --shadow: 0 18px 45px rgba(0,0,0,.10);
  --accent: #5a3dff;
  --accent-2: #0077ff;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(124,77,255,.18), transparent 60%),
    radial-gradient(900px 600px at 80% 20%, rgba(24,194,255,.14), transparent 55%),
    radial-gradient(800px 600px at 50% 90%, rgba(124,77,255,.12), transparent 60%),
    var(--bg);
}

a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; height: auto; }

.container{
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.skip-link{
  position: absolute;
  left: -999px;
  top: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 10px;
}
.skip-link:focus{ left: 12px; z-index: 1000; }

.header{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.header__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}
.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand__dot{
  width: 12px; height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.brand__text{
  font-weight: 700;
  letter-spacing: .2px;
}

.nav{
  display: none;
  gap: 16px;
  flex-wrap: wrap;
}
.nav__link{
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 10px;
  border-radius: 12px;
}
.nav__link:hover{
  background: var(--panel);
  color: var(--text);
}

.header__actions{
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 70%, #000 0%), color-mix(in srgb, var(--accent-2) 55%, #000 0%));
  color: white;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.btn:hover{ transform: translateY(-1px); }
.btn--ghost{
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn__text{ display: none; }

.hero{
  padding: 44px 0 22px;
}
.hero__grid{
  display: grid;
  gap: 22px;
}
.badge{
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-weight: 650;
  font-size: 13px;
}
.hero__title{
  margin: 14px 0 8px;
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1.05;
}
.hero__subtitle{
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}
.hero__cta{
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero__meta{
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.meta{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}
.meta__k{
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.meta__v{
  font-weight: 750;
  font-size: 14px;
}

.chips{
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip{
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 13px;
}

.profile{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), transparent);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero__card{
  margin-top: 100px;
}

.hero__identity{
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 720px; 
}

.hero__avatar{
  width: 96px;           
  height: 96px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center 20%;
  border: 2px solid var(--border);
  flex-shrink: 0;        
}

.hero__identity-text{
  display: flex;
  flex-direction: column;
}

.hero__title{
  margin: 0;
}

.hero__subtitle{
  margin-top: 6px;
  line-height: 1.6;
}


.hero__identity h1{
  margin-bottom: 6px;
}

.hero__text{
  display: flex;
  flex-direction: column;
  gap: 16px;
}


.profile__content{ padding: 16px; }

.section{
  padding: 28px 0;
}
.section__head{
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}
.section__title{
  margin: 0;
  font-size: 26px;
  letter-spacing: .1px;
}
.section__title--small{
  font-size: 16px;
  margin: 0 0 10px;
}
.section__desc{
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 80ch;
}

.grid{
  display: grid;
  gap: var(--gap);
}
.grid--2{ grid-template-columns: 1fr; }
.grid--3{ grid-template-columns: 1fr; }
.project--featured{
  grid-column: span 2;
}
.project--full{
  grid-column: 1 / -1;
}

.card{
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card--soft{
  background: linear-gradient(135deg, var(--panel), color-mix(in srgb, var(--panel) 40%, transparent));  
  margin-top: 18px;
}
.card__title{
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: .1px;
}
.muted{ color: var(--muted); line-height: 1.7; }

.list{
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}
.list--compact li{ margin-bottom: 6px; }

.callout{
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), var(--panel));
  color: var(--text);
}

.divider{
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}

.timeline{
  display: grid;
  gap: var(--gap);
}
.timeline__top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.timeline__right{ display: none; }
.pill{
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 25%, transparent), color-mix(in srgb, var(--accent-2) 20%, transparent));
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 12px;
}

.tag{
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 12px;
}
.tag--outline{
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
}

.note{
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  color: var(--muted);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
}

.project__links{
  margin-top: 12px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.link{
  color: color-mix(in srgb, var(--accent-2) 85%, var(--text));
  font-weight: 750;
}
.link[aria-disabled="true"]{
  opacity: .55;
  pointer-events: none;
  text-decoration: line-through;
}

.contact{
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.contact__row{
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  align-items: baseline;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 60%, transparent);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}
.contact__k{
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.contact__v{
  font-weight: 800;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.form{
  display: grid;
  gap: 12px;
  margin-top: 10px;
}
.label{
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.input, .textarea{
  width: 100%;
  padding: 12px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  color: var(--text);
  outline: none;
}
.input:focus, .textarea:focus{
  border-color: color-mix(in srgb, var(--accent-2) 55%, var(--border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 18%, transparent);
}

.footer{
  padding: 26px 0 44px;
  border-top: 1px solid var(--border);
  margin-top: 18px;
}
.footer__inner{
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Responsive */
@media (min-width: 920px){
  .nav{ display: flex; }
  .btn__text{ display: inline; }
  .hero__grid{ grid-template-columns: 1.3fr .9fr; align-items: start; }
  .hero__meta{ grid-template-columns: 1fr 1fr 1fr; }
  .grid--2{ grid-template-columns: 1fr 1fr; }
  .grid--3{ grid-template-columns: 1fr 1fr 1fr; }
  .timeline__right{ display: inline-flex; }
}

/* Ajuste de avatar en móvil */
@media (max-width: 480px){
  .hero__avatar{
    width: 84px;
    height: 84px;
  }
}

/* Print (por si alguien imprime tu CV desde la web) */
@media print{
  .header, .hero__cta, .footer, #themeToggle { display: none !important; }
  body{ background: #fff; color: #000; }
  .card{ box-shadow: none; }
}
