/* ━━━━━━━━━━━━━━━━━━━━━━━
   RESET & ROOT
━━━━━━━━━━━━━━━━━━━━━━━ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --orange: #ff3b00;
  --black:  #000;
  --dark:   #0a0a0a;
  --white:  #f3f3f3;
  --fd: 'Barlow Condensed', sans-serif;
  --fb: 'Barlow', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
  font-family: var(--fd);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━
   NAV
━━━━━━━━━━━━━━━━━━━━━━━ */

nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 68px;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 9999;
}

.nav-left {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.nav-logo-main {
  height: 42px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

/* Barra separadora entre logo e imagen y nombre */
.logo-divider {
  width: 2px;
  height: 32px;
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.logo-text {
  line-height: .85;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo-text .lb {
  display: block;
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 34px;
}

.nav-links a {
  text-decoration: none;
  color: #000;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: opacity .2s;
}

.nav-links a:hover { opacity: .6; }

/* Hamburger — oculto en desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: #000;
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ━━━━━━━━━━━━━━━━━━━━━━━
   S1 — PORTADA
━━━━━━━━━━━━━━━━━━━━━━━ */

#s1 {
  min-height: 100vh;
  background: var(--orange);
  padding: 110px 5% 60px;
  display: grid;
  grid-template-columns: 42fr 18fr 40fr;
  align-items: center;
}

#s1 h1.s1-name {
  font-size: 10vw;
  font-weight: 900;
  line-height: .8;
  text-transform: uppercase;
  font-family: var(--fd);
  margin: 0;
}

.s1-photo-wrap { padding: 0 20px; }

.s1-photo {
  width: 100%;
  display: block;
  object-fit: cover;
  filter: grayscale(100%);
}

.s1-title {
  font-size: 7vw;
  line-height: .82;
  text-transform: uppercase;
  font-weight: 900;
  text-align: right;
  font-family: var(--fd);
}

.s1-bottom {
  grid-column: 1 / -1;
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.s1-year {
  font-size: 7vw;
  font-weight: 900;
  line-height: .8;
}

.s1-uni {
  text-align: right;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 0.9;
  font-style: normal;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━
   S2 — SOBRE MÍ
━━━━━━━━━━━━━━━━━━━━━━━ */

#s2 {
  background: #fff;
  padding: 0;
}

.s2-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 80px 80px 20px;
  margin-bottom: 0;
}

.s2-topbar + .s2-main-grid {
  border-top: 5px solid var(--orange);
  margin: 0 80px;
}

.s2-title {
  font-size: 7vw;
  font-weight: 900;
  line-height: .82;
  color: var(--black);
  text-transform: uppercase;
  font-family: var(--fd);
  margin: 0;
}

.s2-topbar-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.s2-topbar-meta span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #888;
}

/* Grid cuerpo */
.s2-main-grid {
  display: grid;
  grid-template-columns: 40fr 60fr;
}

/* Columna texto */
.s2-text-col {
  padding: 56px 60px 56px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: inset -1px 0 0 0 #e8e8e8;
  margin: 40px 0;
}

.s2-lead {
  font-size: clamp(13px, 1.15vw, 17px);
  line-height: 1.6;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--black);
}

.s2-body {
  font-size: clamp(12px, 0.95vw, 14px);
  line-height: 1.9;
  text-transform: uppercase;
  color: #666;
}

/* Chips de herramientas */
.s2-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.s2-chips span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 2px solid var(--orange);
  color: var(--orange);
  border-radius: 2px;
  transition: background .2s, color .2s;
}

.s2-chips span:hover {
  background: var(--orange);
  color: #fff;
}

/* Columna video */
.s2-video-col {
  padding: 48px 80px 48px 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.s2-reel-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.s2-reel-word {
  font-size: clamp(28px, 4vw, 58px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: .82;
  color: var(--orange);
  font-family: var(--fd);
}

.s2-reel-year {
  font-size: clamp(14px, 1.6vw, 22px);
  font-weight: 900;
  text-transform: uppercase;
  color: #bbb;
  letter-spacing: .08em;
}

.s2-yt {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #ddd;
}

.s2-yt iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.s2-video-footer {
  display: flex;
  justify-content: space-between;
}

.s2-video-footer span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #aaa;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━
   S3 — HISTORIAL ACADÉMICO
━━━━━━━━━━━━━━━━━━━━━━━ */

#s3 {
  background: var(--dark);
  padding: 80px 80px 90px;
}

.s3-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 3px solid var(--orange);
  padding-bottom: 20px;
  margin-bottom: 48px;
}

#s3 h2.s3-title {
  font-size: 7vw;
  font-weight: 900;
  line-height: .82;
  color: var(--white);
  text-transform: uppercase;
  font-family: var(--fd);
  margin: 0;
}

.s3-header-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.s3-header-meta span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #666;
}

.s3-levels { display: flex; flex-direction: column; }

.level-row {
  display: grid;
  grid-template-columns: 80px 1fr 160px;
  align-items: center;
  gap: 30px;
  padding: 22px 0;
  border-bottom: 1px solid #1e1e1e;
  transition: background .2s, padding .2s;
}

.level-row:hover {
  background: #111;
  padding-left: 12px;
  padding-right: 12px;
  margin-left: -12px;
  margin-right: -12px;
  border-radius: 4px;
}

.level-row.active .level-num { color: var(--orange); }

.level-num {
  font-size: 3.5vw;
  font-weight: 900;
  color: #2a2a2a;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.level-info { display: flex; flex-direction: column; gap: 10px; }

.level-name {
  font-size: 2.2vw;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
}

.level-bar-wrap {
  height: 6px;
  background: #1e1e1e;
  border-radius: 3px;
  overflow: hidden;
}

.level-bar { height: 100%; border-radius: 3px; background: #333; }
.level-bar.full { width: 100%; background: var(--orange); }

.level-bar.partial {
  width: 40%;
  background: var(--orange);
  position: relative;
}

.level-bar.partial::after {
  content: '';
  position: absolute;
  right: -1px; top: 0;
  height: 100%; width: 6px;
  background: rgba(255,255,255,.5);
  border-radius: 3px;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.level-status {
  text-align: right;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.level-status.approved { color: #3a3a3a; }
.level-status.current  { color: var(--orange); }

.s3-materias { margin-top: 60px; }

.s3-materias-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #444;
  margin-bottom: 20px;
}

.s3-materias-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.materia-card {
  background: #111;
  padding: 22px 20px;
  border-top: 3px solid transparent;
  transition: border-color .2s, background .2s;
  cursor: default;
}

.materia-card:hover { border-top-color: var(--orange); background: #161616; }

.materia-num {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .2em;
  color: #333;
  margin-bottom: 10px;
}

.materia-name {
  font-size: 1.1vw;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 10px;
}

.materia-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--orange);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━
   S4 — EQUIPO
━━━━━━━━━━━━━━━━━━━━━━━ */

#s4 {
  background: var(--white);
  padding: 80px 80px 60px;
}

.s4-header {
  display: flex;
  align-items: baseline;
  gap: 28px;
  margin-bottom: 48px;
  border-bottom: 5px solid var(--orange);
  padding-bottom: 18px;
}

#s4 h2.s4-title {
  font-size: 7vw;
  font-weight: 900;
  text-transform: uppercase;
  line-height: .82;
  color: var(--black);
  font-family: var(--fd);
  margin: 0;
}

.s4-group {
  font-size: 1.6vw;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--orange);
}

.s4-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.team-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
}

.team-card-inner { position: relative; overflow: hidden; }

.team-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  filter: grayscale(60%);
  transition: filter .4s ease, transform .5s ease;
}

.team-card:hover img { filter: grayscale(0%); transform: scale(1.04); }

.team-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.3) 50%, transparent 100%);
  transition: background .4s;
}

.team-card:hover .team-card-overlay {
  background: linear-gradient(to top, rgba(255,59,0,.85) 0%, rgba(0,0,0,.2) 60%, transparent 100%);
}

.team-card-overlay::after {
  content: '↗';
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 18px;
  color: rgba(255,255,255,0);
  transition: color .3s;
  font-weight: 900;
}

.team-card:hover .team-card-overlay::after {
  color: rgba(255,255,255,.7);
}

.team-card-index {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .2em;
  color: rgba(255,255,255,.4);
  margin-bottom: 8px;
  transition: color .3s;
}

.team-card:hover .team-card-index { color: rgba(255,255,255,.8); }

.team-card-name {
  font-size: 2.4vw;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  line-height: .88;
}

.team-card-role {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  transition: color .3s;
}

.team-card:hover .team-card-role { color: rgba(255,255,255,.9); }

.s4-footer {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  border-top: 2px solid #e0e0e0;
  padding-top: 14px;
}

.s4-footer span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #999;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━
   S5 — DATOS ACADÉMICOS
━━━━━━━━━━━━━━━━━━━━━━━ */

#s5 { background: var(--orange); padding: 80px 80px 90px; }

#s5 h2.s5-title {
  text-align: center;
  font-size: clamp(52px, 9vw, 130px);
  font-weight: 900;
  line-height: .82;
  text-transform: uppercase;
  font-family: var(--fd);
  margin: 0;
}

.s5-divider {
  width: 80px;
  height: 4px;
  background: #000;
  margin: 28px auto 32px;
}

.s5-sub {
  text-align: center;
  font-size: clamp(16px, 2.1vw, 30px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.s5-names {
  text-align: center;
  font-size: clamp(13px, 1.5vw, 22px);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 6px;
}

.s5-tema-label {
  text-align: center;
  font-size: clamp(14px, 1.8vw, 26px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .5;
  margin-top: 32px;
}

.s5-tema2 {
  text-align: center;
  font-size: clamp(18px, 2.2vw, 32px);
  font-weight: 900;
  text-transform: uppercase;
  margin-top: 4px;
}

.s5-materia {
  margin-top: 40px;
  text-align: center;
  font-size: clamp(16px, 2vw, 28px);
  line-height: 1.3;
  font-weight: 900;
  text-transform: uppercase;
}

.s5-table { margin-top: 52px; }

.s5-table .row { display: flex; align-items: center; margin-bottom: 14px; }

.s5-table dt.k {
  font-size: clamp(14px, 2vw, 28px);
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  margin: 0;
}

.s5-table .d {
  flex: 1;
  border-bottom: 4px dotted rgba(0,0,0,.35);
  margin: 0 12px;
  min-width: 20px;
}

.s5-table dd.v {
  font-size: clamp(12px, 1.6vw, 22px);
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  margin: 0;
}

.s5-uni {
  margin-top: 56px;
  text-align: center;
  font-size: clamp(16px, 1.8vw, 26px);
  line-height: 1.1;
  font-weight: 900;
  text-transform: uppercase;
  font-style: normal;
}

.s5-line { margin-top: 40px; border: none; border-top: 3px solid rgba(0,0,0,.25); }

.s5-disc {
  display: block;
  margin-top: 20px;
  text-align: center;
  font-size: clamp(10px, 1vw, 13px);
  line-height: 1.7;
  text-transform: uppercase;
  opacity: .6;
}

/* RESPONSIVE ≤ 900px */

@media (max-width: 900px) {
  nav { padding: 0 18px; }
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 68px; left: 0;
    width: 100%;
    background: var(--orange);
    flex-direction: column;
    padding: 20px 24px 30px;
    gap: 0;
    z-index: 9998;
    list-style: none;
  }

  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid rgba(0,0,0,.15); }
  .nav-links a { display: block; padding: 14px 0; font-size: 20px; }

  #s1 { grid-template-columns: 1fr; text-align: center; padding: 90px 5% 50px; }
  .s1-photo-wrap { max-width: 240px; margin: 20px auto; padding: 0; }
  .s1-title { text-align: center; }
  .s1-bottom { flex-direction: column; gap: 16px; align-items: center; text-align: center; }
  .s1-uni { text-align: center; }

  .s2-topbar { flex-direction: column; align-items: flex-start; gap: 12px; padding: 50px 25px 20px; }
  .s2-topbar-meta { flex-direction: row; gap: 16px; }
  .s2-topbar + .s2-main-grid { margin: 0 25px; }
  .s2-main-grid { grid-template-columns: 1fr; }
  .s2-text-col { padding: 40px 25px 36px; box-shadow: none; margin: 0; border-bottom: 1px solid #e8e8e8; }
  .s2-video-col { padding: 36px 25px 50px; }

  #s3 { padding: 50px 25px; }
  .s3-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .s3-header-meta { flex-direction: row; gap: 16px; }
  .level-row { grid-template-columns: 50px 1fr 100px; gap: 14px; }
  .level-num  { font-size: 8vw; }
  .level-name { font-size: 5vw; }
  .level-status { font-size: 11px; }
  .s3-materias-grid { grid-template-columns: 1fr 1fr; }
  .materia-name { font-size: 14px; }

  #s4 { padding: 50px 25px; }
  .s4-header { flex-wrap: wrap; gap: 10px; }
  .s4-group { font-size: 5vw; }
  .s4-grid { grid-template-columns: 1fr; gap: 3px; }
  .team-card-name { font-size: 8vw; }
  .s4-footer { flex-direction: column; gap: 6px; }

  #s5 { padding: 50px 25px 60px; }
  .s5-table .row { flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
  .s5-table .d { display: none; }
  .s5-table dt.k { width: 100%; font-size: 13px; opacity: .55; font-weight: 900; }
  .s5-table dd.v { white-space: normal; word-break: break-word; font-size: 15px; font-weight: 700; }
}

/* RESPONSIVE ≤ 480px */

@media (max-width: 480px) {
  .s3-materias-grid { grid-template-columns: 1fr; }
  #s5 { padding: 40px 20px 50px; }
}