/* =========================================================
   Paolo Pinto — Portfolio Styles
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --blue: #1f3fc4;
  --blue-600: #1a36ad;
  --blue-700: #14299a;
  --navy: #0a1730;
  --navy-2: #0e1f3f;
  --white: #ffffff;
  --gray-50: #f7f8fb;
  --gray-100: #eef0f5;
  --gray-200: #dfe3ec;
  --gray-400: #9aa3b2;
  --gray-600: #525a6a;
  --gray-800: #1f2533;

  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, .06);
  --shadow-md: 0 12px 30px rgba(15, 23, 42, .10);

  --container: 1120px;
  --space: clamp(64px, 8vw, 112px);

  --ff: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--ff);
  font-size: 18px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
button { font: inherit; cursor: pointer; }

h1, h2, h3 { margin: 0 0 .5em; font-weight: 700; line-height: 1.2; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--space) 0;
}
.section--light { background: var(--white); }
.section--blue  { background: var(--blue); color: var(--white); }
.section--dark  { background: var(--navy); color: var(--white); }

.section__title {
  text-align: center;
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  margin-bottom: .35em;
}
.section__title--light { color: var(--white); }
.section__subtitle {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
  opacity: .9;
}
.section__subtitle--dark { color: var(--gray-600); opacity: 1; }

/* ---------- Placeholder ---------- */
.placeholder {
  width: 100%;
  background:
    repeating-linear-gradient(45deg,
      rgba(0,0,0,.04) 0 10px,
      rgba(0,0,0,.07) 10px 20px);
  border-radius: 8px;
  position: relative;
}
.placeholder::after{
  content: 'image';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(0,0,0,.35);
}
.placeholder--16x9 { aspect-ratio: 16/9; }
.placeholder--square { aspect-ratio: 1/1; }
.placeholder--logo {
  width: 44px; height: 44px; border-radius: 10px;
  background:
    repeating-linear-gradient(45deg,
      rgba(31,63,196,.12) 0 6px,
      rgba(31,63,196,.22) 6px 12px);
}
.placeholder--logo::after { content: ''; }
.placeholder--dark {
  background:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,.04) 0 10px,
      rgba(255,255,255,.08) 10px 20px);
}
.placeholder--dark::after { color: rgba(255,255,255,.4); }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  color: var(--white);
  background: var(--blue);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg-img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .95;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(31,63,196,.55) 0%,
    rgba(31,63,196,.85) 60%,
    rgba(31,63,196,1) 100%);
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
}
.nav__logo {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.01em;
}
.nav__logo span { color: rgba(255,255,255,.7); }
.nav__list {
  display: flex;
  gap: 28px;
  font-size: .92rem;
}
.nav__list a {
  opacity: .85;
  transition: opacity .2s;
}
.nav__list a:hover { opacity: 1; }

.hero__content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px 96px;
}
.hero__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.35);
  margin-bottom: 1.2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
}
.hero__title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 1.2rem;
}
.hero__socials {
  display: flex;
  gap: 14px;
  margin-bottom: 1.6rem;
}
.hero__socials a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  transition: background .2s, transform .2s;
}
.hero__socials a:hover { background: rgba(255,255,255,.22); transform: translateY(-2px); }
.hero__socials img { width: 16px; height: 16px; filter: brightness(0) invert(1); }

.hero__desc {
  max-width: 640px;
  font-size: 1rem;
  line-height: 1.7;
  opacity: .92;
}

/* ============ TIMELINE ============ */
.timeline {
  position: relative;
  margin: 3rem auto 0;
  max-width: 880px;
}
.timeline__line {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 2px;
  background: var(--gray-200);
  transform: translateX(-50%);
}
.timeline__item {
  position: relative;
  width: 50%;
  padding: 0 40px 48px;
}
.timeline__item--left  { margin-left: 0; padding-right: 56px; text-align: right; }
.timeline__item--right { margin-left: 50%; padding-left: 56px; }

.timeline__card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.timeline__card h3 {
  font-size: 1.05rem;
  margin-bottom: .25em;
}
.timeline__meta {
  font-size: .82rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 .7em;
}
.timeline__card p { margin: 0; color: var(--gray-600); font-size: .94rem; }
.timeline__logo { display: inline-flex; margin-bottom: 12px; }
.timeline__item--left  .timeline__logo { float: right; margin-left: 12px; }

.timeline__dot {
  position: absolute;
  top: 26px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--gray-200);
}
.timeline__item--left  .timeline__dot { right: -7px; }
.timeline__item--right .timeline__dot { left: -7px; }

/* ============ OPEN SOURCE ============ */
.os-card {
  background: var(--white);
  color: var(--gray-800);
  border-radius: var(--radius);
  padding: 26px 26px 28px;
  box-shadow: var(--shadow-md);
  transition: transform .25s ease;
}
.os-card:hover { transform: translateY(-4px); }
.os-card__icon {
  width: 36px; height: 36px;
  margin-bottom: 14px;
}
.os-card h3 {
  font-size: 1.1rem;
  margin-bottom: .4em;
}
.os-card p {
  margin: 0 0 1.1rem;
  color: var(--gray-600);
  font-size: .94rem;
}
.os-card__link {
  font-size: .875rem;
  font-weight: 600;
  color: var(--blue);
  transition: opacity .2s;
}
.os-card__link:hover { opacity: .7; }

/* ============ PUBLIC SPEAKING ============ */
.talk-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.talk-card__media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 16/9;
}
.talk-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.talk-card__play,
.yt__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: grid; place-items: center;
  box-shadow: var(--shadow-md);
  pointer-events: none;
}
.talk-card__play img,
.yt__play img { width: 18px; height: 18px; }
.talk-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
.talk-card p {
  margin: 0 0 .75rem;
  font-size: .9rem;
  color: var(--gray-600);
  line-height: 1.5;
}
.talk-card__link {
  font-size: .875rem;
  font-weight: 600;
  color: var(--blue);
  transition: opacity .2s;
}
.talk-card__link:hover { opacity: .7; }

/* ============ GALLERY ============ */
.gallery-card {
  background: var(--white);
  color: var(--gray-800);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.gallery-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.gallery-card p {
  margin: 0 0 .5rem;
  padding: 14px 18px 0;
  font-size: .92rem;
  font-weight: 500;
}
.gallery-card__link {
  display: block;
  padding: 0 18px 18px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--blue);
  transition: opacity .2s;
}
.gallery-card__link:hover { opacity: .7; }

/* ============ YOUTUBE ============ */
.yt {
  max-width: 780px;
  margin: 2.5rem auto 0;
  text-align: center;
}
.yt__player {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
}
.yt__caption {
  margin-top: 1.2rem;
  font-size: .95rem;
  color: rgba(255,255,255,.75);
}

/* ============ PODCAST ============ */
.podcast {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: center;
  background: var(--blue-700);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.podcast__cover .placeholder { border-radius: 12px; }
.podcast__cover iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  border-radius: 12px;
  display: block;
}
.podcast__title {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  margin-bottom: .6em;
}
.podcast__content p {
  opacity: .9;
  margin: 0 0 1.4rem;
}
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .92rem;
  transition: all .2s;
}
.btn--ghost {
  background: var(--white);
  color: var(--blue);
}
.btn--ghost:hover { transform: translateY(-2px); }

/* ============ FOOTER ============ */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 32px 24px;
  position: relative;
}
.footer__top {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--blue);
  color: var(--white);
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  transition: transform .2s;
}
.footer__top:hover { transform: translateX(-50%) translateY(-3px); }
.footer p { margin: 0; font-size: .88rem; }

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablet */
@media (max-width: 900px) {
  .nav__list { display: none; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }

  .podcast {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 28px;
  }
  .podcast__cover {
    max-width: 240px;
    margin: 0 auto;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .grid--2,
  .grid--3 { grid-template-columns: 1fr; }

  .hero__socials { flex-wrap: wrap; justify-content: center; }

  /* Timeline collapses to single column on mobile */
  .timeline__line { left: 22px; }
  .timeline__item,
  .timeline__item--left,
  .timeline__item--right {
    width: 100%;
    margin-left: 0;
    padding: 0 0 36px 56px;
    text-align: left;
  }
  .timeline__item--left .timeline__logo { float: none; margin-left: 0; }
  .timeline__item--left  .timeline__dot,
  .timeline__item--right .timeline__dot { left: 15px; right: auto; }

  .nav { padding: 18px 20px; }
  .section { padding: 72px 0; }
}
