/* ═══════════════════════════════════════════════════════
   MARIO HENRIQUEZ — style.css
   Single-page scrolling personal profile site
═══════════════════════════════════════════════════════ */

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: #e8eaf0;
  background: #2c3347;
  line-height: 1.7;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
p   { margin-bottom: 1rem; }
ul  { list-style: none; }

/* ── CONTAINER — 1200px max, centered, fluid side padding ── */
.container {
  max-width: 1200px;
  margin-inline: auto;
  width: 100%;
  padding-inline: clamp(1.5rem, 5vw, 4rem);
}

/* ── SECTION TITLE ── */
.section-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2c3347;
  margin-bottom: 0.4rem;
}
.section-title--center { text-align: center; }


/* ══════════════════════════════════════════
   STICKY NAVIGATION
   (outside #hero, floats over page top)
══════════════════════════════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #2c3347;
  transition: box-shadow 0.3s ease;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.1rem;
}

.nav__logo {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.9rem;
  color: #ffffff;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
}

.nav__dot { color: #5b9bd5; }

.nav__linkedin {
  color: #bcc8e0;
  display: flex;
  align-items: center;
  transition: color 0.2s ease, transform 0.2s ease;
}
.nav__linkedin:hover {
  color: #5b9bd5;
  transform: scale(1.1);
}


/* ══════════════════════════════════════════
   SECTION 1 — HERO
   Full-viewport portrait with text overlay
══════════════════════════════════════════ */
#hero {
  position: relative;
  /* calc subtracts approximate nav height so hero fills remaining viewport */
  height: calc(100vh - 60px);
  overflow: hidden;
  background: #2c3347;
}

/* Portrait image: contain so the full person is always visible.
   Anchored to top so no gap appears above the photo.
   Dark navy bg (#2c3347) fills any empty sides/bottom. */
.hero__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  display: block;
}

/* Dark gradient rising from bottom — ensures text legibility */
.hero__gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65%;
  background: linear-gradient(
    to top,
    rgba(44, 51, 71, 0.95) 0%,
    rgba(44, 51, 71, 0.60) 45%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Text overlay container — positioned 10% from bottom */
.hero__overlay {
  position: absolute;
  bottom: 8%;
  left: 0;
  right: 0;
  z-index: 2;
}

/* Two-column layout: quote left, name right — mirrors original design */
.hero__overlay .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 3rem;
}

.hero__quote {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 400;
  font-style: normal;
  color: #c8d3e8;
  max-width: 52%;
  line-height: 1.5;
  border: none;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.hero__identity {
  text-align: right;
  flex-shrink: 0;
}

.hero__name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  font-weight: 400;
  color: #e8eaf0;
  letter-spacing: 0.05em;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid #c0392b;
  display: inline-block;
  margin-bottom: 0.35rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.hero__title {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: #8fa3bf;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}


/* ══════════════════════════════════════════
   SECTION 2 — FEATURE CARDS
══════════════════════════════════════════ */
#cards { background-color: #2c3347; }

.accent-bar {
  height: 5px;
  background: linear-gradient(90deg, #3d6bb0 0%, #5b9bd5 50%, #3d6bb0 100%);
  width: 100%;
}

.cards__container {
  max-width: 1200px;
  margin-inline: auto;
  width: 100%;
}

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

.card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255,255,255,0.08);
  padding: clamp(1.8rem, 3vw, 2.8rem) clamp(1.5rem, 2.5vw, 2.2rem);
  text-align: center;
  transition: background 0.2s ease;
}
.card:hover { background: rgba(255, 255, 255, 0.12); }

.card__icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  color: #5b9bd5;
  font-size: 1.2rem;
}

.card__title {
  font-weight: 600;
  font-size: 1rem;
  color: #e8eaf0;
  margin-bottom: 0.9rem;
  line-height: 1.4;
}

.card__text {
  font-size: 0.85rem;
  color: #8fa3bf;
  line-height: 1.7;
  margin-bottom: 0;
}


/* ══════════════════════════════════════════
   SECTION 3 — PERFIL
══════════════════════════════════════════ */
#perfil {
  background-color: #b8c4d8;
  color: #2c3347;
  padding-block: 5rem;
}

.perfil__inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
}

.perfil__photo {
  width: 100%;
  max-width: 380px;
  border-radius: 16px;
  object-fit: cover;
  aspect-ratio: 3/4;
  box-shadow: 0 8px 32px rgba(44, 51, 71, 0.28);
}

.perfil__bio-col .section-title  { color: #2c3347; margin-bottom: 0.3rem; }

.perfil__subtitle {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: #4a5568;
  margin-bottom: 1.8rem;
}

.perfil__bio-col p {
  font-size: 0.92rem;
  color: #2c3347;
  text-align: justify;
  line-height: 1.8;
}


/* ══════════════════════════════════════════
   SECTION 4 — TRAYECTORIA
══════════════════════════════════════════ */
#trayectoria {
  background-color: #ccd4e4;
  color: #2c3347;
  padding-block: 5rem;
}

#trayectoria .section-title {
  color: #2c3347;
  margin-bottom: 3rem;
}

.timeline__item {
  display: grid;
  grid-template-columns: 72px 32px 1fr;
  gap: 0 1rem;
  align-items: start;
}

.timeline__logo-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.3rem;
}

.timeline__logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 4px;
  box-shadow: 0 1px 6px rgba(44,51,71,0.15);
}

.timeline__connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.35rem;
}

.timeline__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3d6bb0;
  border: 3px solid #ccd4e4;
  outline: 2px solid #3d6bb0;
  flex-shrink: 0;
}

.timeline__line {
  width: 2px;
  background: #3d6bb0;
  flex: 1;
  min-height: 56px;
  margin-top: 4px;
}

.timeline__body   { padding-bottom: 2.2rem; }
.timeline__item--last .timeline__body { padding-bottom: 0; }

.timeline__year {
  font-size: 0.82rem;
  color: #5a6a80;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.1rem;
}

.timeline__company {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3347;
  margin-bottom: 0.1rem;
}

.timeline__role {
  font-size: 0.88rem;
  color: #4a5568;
  margin-bottom: 0;
}

.timeline__subitems { margin-top: 0.5rem; }

.timeline__subitems li {
  font-size: 0.85rem;
  color: #4a5568;
  padding-left: 1rem;
  position: relative;
  line-height: 1.85;
}

.timeline__subitems li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: #3d6bb0;
}


/* ══════════════════════════════════════════
   SECTION 5 — EDUCACIÓN
══════════════════════════════════════════ */
#educacion {
  background-color: #b8c4d8;
  color: #2c3347;
  padding-block: 5rem;
}

#educacion .section-title {
  color: #2c3347;
  margin-bottom: 3rem;
}

.edu__grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 760px;
  margin-inline: auto;
}

.edu__item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  border-bottom: 1px solid rgba(44,51,71,0.15);
  padding-bottom: 2rem;
}
.edu__item:last-child { border-bottom: none; padding-bottom: 0; }

.edu__logo-wrap {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-shadow: 0 1px 6px rgba(44,51,71,0.12);
}

.edu__logo { width: 44px; height: 44px; object-fit: contain; }

.edu__institution {
  font-weight: 600;
  font-size: 1rem;
  color: #2c3347;
  margin-bottom: 0.25rem;
}

.edu__degree {
  font-size: 0.88rem;
  color: #4a5568;
  margin-bottom: 0.2rem;
}

.edu__year {
  font-size: 0.82rem;
  color: #5a6a80;
  letter-spacing: 0.04em;
}


/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.site-footer {
  background: #1e2538;
  color: #5a6a80;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.site-footer a {
  color: #5b9bd5;
  font-weight: 500;
  transition: color 0.2s;
}
.site-footer a:hover { color: #fff; }


/* ══════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 900px)
══════════════════════════════════════════ */
@media (max-width: 900px) {
  .cards__grid { grid-template-columns: 1fr; }
  .card { border-bottom: 1px solid rgba(255,255,255,0.06); }

  .perfil__inner {
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }
  .perfil__photo {
    max-width: 280px;
    margin: 0 auto;
  }

  #perfil,
  #trayectoria,
  #educacion { padding-block: 3.5rem; }
}


/* ══════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 600px)
══════════════════════════════════════════ */
@media (max-width: 600px) {
  /* Hero: stack quote above name on mobile */
  .hero__overlay .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .hero__quote {
    max-width: 100%;
    font-size: 1.1rem;
  }

  .hero__identity { text-align: left; }

  .hero__name  { font-size: 1.25rem; }
  .hero__title { font-size: 0.72rem; }

  #perfil,
  #trayectoria,
  #educacion { padding-block: 2.5rem; }

  .timeline__item {
    grid-template-columns: 44px 24px 1fr;
    gap: 0 0.6rem;
  }
  .timeline__logo    { width: 36px; height: 36px; }
  .timeline__company { font-size: 1.2rem; }
}
