:root {
  --bg: #07090f;
  --surface: #0d1220;
  --border: #1c2744;
  --gold: #9d8dfa;
  --gold-dim: #3f4899;
  --text: #d8e4f5;
  --muted: #7879b6;
  --white: #eef3ff;
}

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

a { 
  color: var(--gold); 
  text-decoration: none; 
}

a:hover { 
  opacity: 0.8; 
}

/* PAGINA */
.page {
  max-width: 65%;
  margin: 0 auto;
  padding: 0 28px 64px;
}

/* SECCION SUPERIOR */
.above-fold {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  min-height: 475px;
  max-height: 475px;
  gap: 0 40px;
}

.fold__ring {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fold__identity {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* HEROE */
.hero__identity {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__name {
  font-size: 3.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--white);
  letter-spacing: -1.5px;
}

.hero__name span { 
  color: var(--gold); 
}

.hero__role {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 14px;
}

.hero__location {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 6px;
}

/* ANILLO */
.ring {
  position: relative;
  width: 300px;
  height: 300px;
  flex-shrink: 0;
}

.ring__center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 170px; height: 170px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--gold);
  box-shadow: 0 0 24px rgba(91,156,246,0.20);
  z-index: 1;
}

.ring__center img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.ring__icon {
  position: absolute;
  top: 50%; left: 50%;
  width: 58px; height: 58px;
  margin: -29px 0 0 -29px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  padding: 7px;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.ring__icon:hover {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(91,156,246,0.30);
}

.ring__icon img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.ring__icon:nth-child(1) { transform: rotate(0deg)   translateX(155px) rotate(0deg); }
.ring__icon:nth-child(2) { transform: rotate(51deg)  translateX(155px) rotate(-51deg); }
.ring__icon:nth-child(3) { transform: rotate(103deg) translateX(155px) rotate(-103deg); }
.ring__icon:nth-child(4) { transform: rotate(154deg) translateX(155px) rotate(-154deg); }
.ring__icon:nth-child(5) { transform: rotate(206deg) translateX(155px) rotate(-206deg); }
.ring__icon:nth-child(6) { transform: rotate(257deg) translateX(155px) rotate(-257deg); }
.ring__icon:nth-child(7) { transform: rotate(309deg) translateX(155px) rotate(-309deg); }

/* BANNER */
.workspace-banner {
  position: relative;
  overflow: hidden;
  margin-top: 0;
}

.workspace-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 25% 60%;
  display: block;
  filter: brightness(0.82) contrast(1.05);
}

.workspace-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom,
      var(--bg) 0%,
      transparent 32%,
      transparent 68%,
      var(--bg) 100%);
}

.workspace-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to right,
      var(--bg) 0%,
      transparent 16%,
      transparent 84%,
      var(--bg) 100%);
}

/* PARTE PRINCIPAL */
.body-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0 48px;
  margin-top: 44px;
}

/* SECCIONES */
section { 
  margin-bottom: 40px; 
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* SOBRE MI */
p { 
  color: var(--muted); 
  font-size: 0.875rem; 
  line-height: 1.8; 
}

.about-text { 
  color: #9ab3d4; 
}

/* EDUCACION */
.edu-item { 
  margin-bottom: 14px; 
}

.edu-item__name { 
  font-size: 0.88rem; 
  color: var(--text); 
  font-weight: 500; 
}

.edu-item__sub { 
  font-size: 0.76rem; 
  color: var(--muted); 
}


/* PROYECTOS */
.project {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: border-left-color 0.2s;
}

.project:hover { 
  border-left-color: var(--gold-dim); 
}

.project__title {
  font-size: 0.95rem;
  color: var(--white);
  margin-bottom: 5px;
  font-weight: 500;
}

.project__desc {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.6;
}

.project__techs { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 4px; 
}

.tag {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 0.66rem;
  padding: 2px 7px;
  border-radius: 2px;
}

/* CONOCIMIENTOS */
.knowledge-list { 
  list-style: none; 
}

.knowledge-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}

.knowledge-list li::before { 
  content: '▸'; 
  color: var(--gold); 
  font-size: 0.6rem; 
}

/* CONTACTO */
.contact-list { 
  display: flex; 
  flex-direction: column; 
  gap: 5px; 
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.2s;
}

.contact-row:hover { 
  border-color: var(--gold); 
}

.contact-row img {
  width: 20px; height: 20px;
  object-fit: contain;
  border-radius: 3px;
  flex-shrink: 0;
}

.contact-row__info { 
  display: flex; 
  flex-direction: column; 
}

.contact-row__label {
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-row__value { 
  font-size: 0.76rem; 
  color: var(--gold); 
}

.contact-row__value.plain { 
  color: var(--text); 
}

/* IDIOMAS */
.lang-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.lang-level {
  font-size: 0.68rem;
  color: var(--gold);
  background: var(--surface);
  padding: 2px 7px;
  border-radius: 2px;
}

/* HABILIDADES */
.skill-group { 
  margin-bottom: 16px; 
}

.skill-group__title {
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.skill-item { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  margin-bottom: 8px; 
}

.skill-item img {
  width: 18px; height: 18px;
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 0;
}

.skill-item__info { 
  flex: 1; 
  min-width: 0; 
}

.skill-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text);
  margin-bottom: 3px;
}

.skill-pct { 
  color: var(--gold); 
  font-size: 0.68rem; 
}

.skill-bar {
  height: 2px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-dim));
  border-radius: 99px;
  width: 0;
  transition: width 1s ease;
  box-shadow: 0 0 6px rgba(91,156,246,0.25);
}

/* APRENDIZAJE */
.learning-note { 
  font-size: 0.72rem; 
  color: var(--muted); 
  font-style: italic; 
  margin-bottom: 8px; 
}

.learning-grid { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 5px; 
}

.learning-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 3px;
  padding: 4px 8px;
  transition: border-color 0.2s;
}

.learning-chip:hover { 
  border-color: var(--gold); 
}

.learning-chip img { 
  width: 15px; 
  height: 15px; 
  object-fit: contain; 
  opacity: 0.75; 
}

.learning-chip span { 
  font-size: 0.7rem; 
  color: var(--muted); 
}

/* EXPERIENCIA */
.xp-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  padding: 14px 18px;
  margin-bottom: 10px;
  transition: border-left-color 0.2s;
}

.xp-item:hover { 
  border-left-color: var(--gold-dim); 
}

.xp-item__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2px;
}

.xp-item__role {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--white);
}

.xp-item__period {
  font-size: 0.68rem;
  color: var(--gold);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 2px;
  white-space: nowrap;
  margin-left: 8px;
}

.xp-item__company {
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.xp-item__desc {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.6;
}

/* BENTO - RINCON PERSONAL */
.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.bento__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px;
  transition: border-color 0.2s;
}

.bento__card:hover { 
  border-color: var(--gold); 
}


.bento__card--cover {
  padding: 0;
  overflow: hidden;
}

.bento__card--cover .bento__card__body {
  padding: 14px 16px 16px;
}

.bento__img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.bento__title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 6px;
}

.bento__text {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
}

/* PIE DE PAGINA */
.cv-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 65%;
  margin: 0 auto;
  padding: 20px 28px 40px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--muted);
}














































/* RESPONSIVE */

/* tablet grande / laptop pequeña */
@media (max-width: 1280px) {
  .page {
    max-width: 85%;
  }

  .cv-footer {
    max-width: 85%;
  }
}

/* tablet */
@media (max-width: 1024px) {
  .page {
    max-width: 95%;
    padding: 0 20px 48px;
  }

  .cv-footer {
    max-width: 95%;
    padding: 16px 20px 32px;
  }

  .above-fold {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    min-height: unset;
    max-height: unset;
    gap: 24px 32px;
  }

  .workspace-banner {
    grid-column: 1 / -1;
    max-height: 220px;
  }

  .ring {
    width: 240px;
    height: 240px;
  }

  .ring__center {
    width: 136px;
    height: 136px;
  }

  .ring__icon {
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
  }

  .ring__icon:nth-child(1) { transform: rotate(0deg)   translateX(124px) rotate(0deg); }
  .ring__icon:nth-child(2) { transform: rotate(51deg)  translateX(124px) rotate(-51deg); }
  .ring__icon:nth-child(3) { transform: rotate(103deg) translateX(124px) rotate(-103deg); }
  .ring__icon:nth-child(4) { transform: rotate(154deg) translateX(124px) rotate(-154deg); }
  .ring__icon:nth-child(5) { transform: rotate(206deg) translateX(124px) rotate(-206deg); }
  .ring__icon:nth-child(6) { transform: rotate(257deg) translateX(124px) rotate(-257deg); }
  .ring__icon:nth-child(7) { transform: rotate(309deg) translateX(124px) rotate(-309deg); }

  .hero__name {
    font-size: 2.6rem;
  }

  .body-grid {
    grid-template-columns: 1fr 240px;
    gap: 0 32px;
  }
}

/* tablet chica / movil grande */
@media (max-width: 768px) {
  .page {
    max-width: 100%;
    padding: 0 16px 40px;
  }

  .cv-footer {
    max-width: 100%;
    padding: 14px 16px 28px;
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  /* header: anillo arriba centrado, identidad abajo, banner oculto */
  .above-fold {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
    min-height: unset;
    max-height: unset;
    padding-top: 24px;
  }

  .workspace-banner {
    display: none;
  }

  .fold__ring {
    justify-content: center;
  }

  .ring {
    width: 200px;
    height: 200px;
  }

  .ring__center {
    width: 114px;
    height: 114px;
  }

  .ring__icon {
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
  }

  .ring__icon:nth-child(1) { transform: rotate(0deg)   translateX(103px) rotate(0deg); }
  .ring__icon:nth-child(2) { transform: rotate(51deg)  translateX(103px) rotate(-51deg); }
  .ring__icon:nth-child(3) { transform: rotate(103deg) translateX(103px) rotate(-103deg); }
  .ring__icon:nth-child(4) { transform: rotate(154deg) translateX(103px) rotate(-154deg); }
  .ring__icon:nth-child(5) { transform: rotate(206deg) translateX(103px) rotate(-206deg); }
  .ring__icon:nth-child(6) { transform: rotate(257deg) translateX(103px) rotate(-257deg); }
  .ring__icon:nth-child(7) { transform: rotate(309deg) translateX(103px) rotate(-309deg); }

  .fold__identity {
    align-items: center;
    text-align: center;
  }

  .hero__name {
    font-size: 2.2rem;
    letter-spacing: -1px;
  }

  /* main + aside en columna */
  .body-grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 28px;
  }

  /* el aside debajo del main */
  aside {
    margin-top: 8px;
  }

  .bento {
    grid-template-columns: 1fr;
  }

  .xp-item__header {
    flex-direction: column;
    gap: 4px;
  }

  .xp-item__period {
    margin-left: 0;
    align-self: flex-start;
  }
}

/* movil */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .hero__name {
    font-size: 1.9rem;
  }

  .ring {
    width: 170px;
    height: 170px;
  }

  .ring__center {
    width: 96px;
    height: 96px;
  }

  .ring__icon {
    width: 38px;
    height: 38px;
    margin: -19px 0 0 -19px;
  }

  .ring__icon:nth-child(1) { transform: rotate(0deg)   translateX(88px) rotate(0deg); }
  .ring__icon:nth-child(2) { transform: rotate(51deg)  translateX(88px) rotate(-51deg); }
  .ring__icon:nth-child(3) { transform: rotate(103deg) translateX(88px) rotate(-103deg); }
  .ring__icon:nth-child(4) { transform: rotate(154deg) translateX(88px) rotate(-154deg); }
  .ring__icon:nth-child(5) { transform: rotate(206deg) translateX(88px) rotate(-206deg); }
  .ring__icon:nth-child(6) { transform: rotate(257deg) translateX(88px) rotate(-257deg); }
  .ring__icon:nth-child(7) { transform: rotate(309deg) translateX(88px) rotate(-309deg); }

  .contact-row__value.plain {
    font-size: 0.68rem;
    word-break: break-all;
  }
}
