/* ============================================
   JORGE CUESTA PORTFOLIO
   Stylesheet organizado y mantenible
   ============================================ */

/* VARIABLES Y PALETA DE COLORES */
:root {
  --red: #C1121F;
  --blue: #457B9D;
  --dark: #1a1a2e;
  --gray: #6b7280;
  --gray-lt: #9ca3af;
  --border: #e5e7eb;
  --bg-soft: #f9fafb;
  --white: #ffffff;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Lato', system-ui, sans-serif;
}

/* RESET Y ESTILOS GLOBALES */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--sans);
  color: var(--dark);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ANIMACIONES DE REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal.d1 { transition-delay: 0.1s; }
.reveal.d2 { transition-delay: 0.2s; }
.reveal.d3 { transition-delay: 0.3s; }
.reveal.d4 { transition-delay: 0.4s; }

/* NAVEGACIÓN */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

nav.scrolled {
  border-color: var(--border);
}

.nav-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: opacity 0.2s;
}

.nav-name:hover {
  opacity: 0.7;
}

.nav-name span {
  color: var(--red);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--dark);
  border-radius: 2px;
  background: var(--white);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--dark);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

nav.open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

nav.open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

nav.open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-mail {
  display: none;
}

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

.nav-links a {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--red);
}

.nav-contact {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 18px;
  border: 1.5px solid var(--dark);
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}

.nav-contact:hover {
  background: var(--dark);
  color: var(--white);
}

/* SECCIÓN HERO */
#hero {
  min-height: 100vh;
  padding-top: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 8vw, 96px) clamp(28px, 5vw, 72px);
  border-right: 1px solid var(--border);
}

.hero-tag {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-tag::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--red);
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.hero-name .hero-line {
  display: block;
}

.hero-name em {
  display: block;
  font-style: italic;
  color: var(--red);
  margin-bottom: -0.16em;
}

.hero-role {
  font-size: clamp(0.9rem, 1.4vw, 1rem);
  font-weight: 300;
  color: var(--gray);
  letter-spacing: 0.01em;
  margin-bottom: 40px;
  line-height: 1.5;
}

.hero-role strong {
  font-weight: 700;
  color: var(--blue);
}

.hero-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.55;
  border-left: 2px solid var(--red);
  padding-left: 20px;
  max-width: 480px;
  margin-bottom: 48px;
}

.hero-contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-contact {
  font-size: 0.9rem;
  color: var(--gray);
  font-weight: 300;
}

.hero-contact strong {
  font-weight: 700;
  color: var(--dark);
  margin-right: 6px;
}

.hero-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 8vw, 96px) clamp(28px, 5vw, 72px);
  background: var(--bg-soft);
}

.hero-right-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray-lt);
  margin-bottom: 32px;
}

.snapshot-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.snapshot-item {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.snapshot-item:first-child {
  border-top: 1px solid var(--border);
}

.snapshot-key {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-lt);
  padding-top: 2px;
}

.snapshot-val {
  font-size: 0.96rem;
  font-weight: 400;
  color: var(--dark);
  line-height: 1.5;
}

.snapshot-val em {
  display: block;
  font-style: normal;
  font-size: 0.84rem;
  color: var(--gray);
  margin-top: 2px;
}

/* SECCIONES GENERALES */
.section {
  padding: clamp(64px, 10vw, 112px) clamp(28px, 5vw, 72px);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
}

.sec-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sec-label::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--red);
}

.sec-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.sec-title em {
  font-style: italic;
  color: var(--blue);
}

.sec-lead {
  font-size: 1rem;
  font-weight: 300;
  color: var(--gray);
  max-width: 580px;
  line-height: 1.8;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 56px 0;
}

/* SECCIÓN QUIÉN SOY */
#quien {
  background: var(--white);
}

.quien-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 72px;
  margin-top: 56px;
  align-items: start;
}

.quien-text p {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--dark);
  margin-bottom: 18px;
  text-align: justify;
}

.quien-text p:last-child {
  margin-bottom: 0;
}

.quien-text strong {
  font-weight: 700;
}

.values-title {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-lt);
  margin-bottom: 20px;
}

.value-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.2s;
}

.value-row:first-of-type {
  border-top: 1px solid var(--border);
}

.value-row:hover {
  padding-left: 8px;
}

.value-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 3px;
}

.value-desc {
  font-size: 0.96rem;
  font-weight: 300;
  color: var(--gray);
  line-height: 1.5;
}

/* SECCIÓN HISTORIA */
#historia {
  background: var(--bg-soft);
}

.historia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 56px;
}

.historia-block h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--dark);
}

.historia-block p {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--dark);
  line-height: 1.85;
  margin-bottom: 14px;
  text-align: justify;
}

.historia-block p:last-child {
  margin-bottom: 0;
}

.historia-block p strong {
  color: var(--dark);
  font-weight: 700;
}

.tech-row {
  margin-top: 20px;
}

.tech-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-lt);
  margin-bottom: 12px;
}

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

.tech-item {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border: 1px solid var(--border);
  color: var(--gray);
  border-radius: 2px;
  transition: border-color 0.2s, color 0.2s;
}

.tech-item:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.pull-quote {
  background: var(--white);
  border-radius: 3px;
  padding: 24px 28px;
  margin: 20px 0;
  border-left: 4px solid var(--red);
}

.pull-quote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--dark) !important;
  line-height: 1.6;
  margin-bottom: 10px !important;
  font-weight: 700;
}

.pull-quote cite {
  font-size: 0.78rem;
  color: var(--gray);
  font-style: normal;
}

.three-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  margin-top: 28px;
}

.three-col {
  background: var(--white);
  padding: 18px 16px;
  text-align: left;
}

.three-col-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 6px;
  text-align: left;
}

.three-col-val {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--gray);
  line-height: 1.5;
  text-align: left;
}

/* SECCIÓN VALOR */
#valor {
  background: var(--white);
}

.valor-intro {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--gray);
  max-width: 700px;
  line-height: 1.85;
  margin-top: 32px;
  margin-bottom: 56px;
  text-align: justify;
}

.valor-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.2s;
}

.valor-item:first-child {
  border-top: 1px solid var(--border);
}

.valor-item:hover {
  padding-left: 8px;
}

.valor-num {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  padding-top: 2px;
  transition: color 0.2s;
}

.valor-item:hover .valor-num {
  color: var(--red);
}

.valor-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}

.valor-desc {
  font-size: 1rem;
  font-weight: 400;
  color: var(--gray);
  line-height: 1.7;
  text-align: justify;
}

/* SECCIÓN INTEGRA */
#integra {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #252946 0%, #21243f 52%, #1c1f36 100%);
  color: var(--white);
}

#integra::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 45%);
}

#integra .container {
  position: relative;
  z-index: 1;
}

#integra .sec-label {
  color: var(--red);
}

#integra .sec-label::before {
  background: var(--red);
}

#integra .sec-title {
  color: var(--white);
}

.integra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 56px;
}

.integra-col h3 {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 20px;
}

.integra-col p {
  font-size: 1.05rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.94);
  line-height: 1.85;
  margin-bottom: 14px;
  text-align: justify;
}

.integra-col p strong {
  color: var(--white);
  font-weight: 700;
}

.integra-divider {
  border-color: rgba(255, 255, 255, 0.2);
}

.hobbies-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.16);
  margin-top: 40px;
}

.hobby-card {
  background: rgba(255, 255, 255, 0.09);
  padding: 28px 20px;
  transition: background 0.2s;
}

.hobby-card:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hobby-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 10px;
}

.hobby-desc {
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
}

/* SECCIÓN CIERRE */
#cierre {
  background: var(--white);
  text-align: center;
  padding: clamp(80px, 12vw, 128px) clamp(28px, 5vw, 72px);
}

.cierre-headline {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.cierre-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--red);
  margin-bottom: 40px;
}

.cierre-text {
  font-size: 0.97rem;
  font-weight: 300;
  color: var(--gray);
  max-width: 520px;
  margin: 0 auto 52px;
  line-height: 1.85;
}

.cierre-btn {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 15px 36px;
  background: var(--dark);
  color: var(--white);
  border-radius: 2px;
  transition: background 0.2s, transform 0.15s;
  margin-bottom: 52px;
}

.cierre-btn:hover {
  background: var(--red);
  transform: translateY(-2px);
}

.cierre-contacts {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 32px;
}

.cierre-contact {
  font-size: 0.88rem;
  color: var(--gray);
  font-weight: 300;
}

.cierre-contact strong {
  color: var(--dark);
  font-weight: 700;
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

/* FOOTER */
footer {
  background: var(--dark);
  padding: 24px clamp(28px, 5vw, 72px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer p {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
}

footer span {
  color: var(--red);
}

/* MEDIA QUERIES - TABLET */
@media (max-width: 960px) {
  #hero {
    grid-template-columns: 1fr;
  }

  .hero-right {
    display: none;
  }

  .quien-grid,
  .historia-grid,
  .integra-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hobbies-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-contact {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }

  nav.open .nav-links {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 12px clamp(20px, 5vw, 72px);
  }

  .nav-mail {
    display: block;
  }

  .nav-mail a {
    color: var(--red);
    font-weight: 700;
  }
}

/* MEDIA QUERIES - MÓVIL */
@media (max-width: 560px) {
  .hobbies-grid {
    grid-template-columns: 1fr;
  }

  .three-cols {
    grid-template-columns: 1fr;
  }

  .valor-item {
    grid-template-columns: 36px 1fr;
    gap: 16px;
  }
}
