/* Shared styles for the EN (/) and PT (/pt/) pages. Tokens from design.md. */
:root {
  --ink: #15191E;
  --ink-2: #60646C;
  --ink-3: #6F737B;
  --muted: #8B8D98;
  --faint: #B9BBC6;
  --paper: #FFFFFF;
  --paper-2: #F9F9FB;
  --band: #F3F3F7;
  --night: #000710;
  --on-night: #FCFCFD;
  --accent: #FF3D00;
  --accent-hover: #EB3800;
  --line: rgba(66, 87, 138, 0.15);
  --shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  --gutter: 72px;
  --ease: cubic-bezier(0, 0, 0.38, 0.9);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Inter Fallback", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 20; background: var(--paper); padding: 8px 16px; border-radius: 8px; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

/* Type scale */
.display { font-size: 72px; line-height: 1; font-weight: 500; letter-spacing: -0.02em; }
.h2 { font-size: 48px; line-height: 1; font-weight: 500; letter-spacing: -0.02em; }
.h3 { font-size: 36px; line-height: 1; font-weight: 500; letter-spacing: -0.02em; }
.h4 { font-size: 24px; line-height: 1.2; font-weight: 500; letter-spacing: -0.02em; }
.lead { font-size: 20px; line-height: 1.2; font-weight: 500; color: var(--ink-2); }
.small { font-size: 14px; line-height: 1.5; }
.caption { font-size: 12px; line-height: 1.5; color: var(--muted); }
.muted { color: var(--ink-2); }

/* Sections */
section { padding: 80px 0 48px; scroll-margin-top: 60px; }
.band { background: var(--band); }
.night { background: var(--night); color: var(--on-night); }
.section-head { margin-bottom: 48px; }
.section-head .lead { margin-top: 16px; max-width: 640px; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 20px; border-radius: 10px;
  background: var(--accent); border: 1px solid var(--accent); color: var(--on-night);
  font-size: 14px; font-weight: 400; letter-spacing: normal;
  transition: all 0.5s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.sm { height: 36px; padding: 0 12px; }
.link { color: var(--accent); }
.link::after { content: " →"; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ghost { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; padding: 4px 8px; border-radius: 10px; transition: background 0.3s var(--ease); }
.ghost:hover { background: var(--band); }

/* Header */
header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
header .wrap { height: 60px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.brand img { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.header-end { display: flex; align-items: center; gap: 16px; }

/* EN | PT segmented toggle */
.lang { display: inline-flex; gap: 0; font-size: 14px; }
.lang a, .lang span { padding: 4px 8px; border-radius: 10px; transition: color 0.3s var(--ease); }
.lang span { color: var(--ink); font-weight: 600; }
.lang a { color: var(--ink-3); }
.lang a:hover { color: var(--ink); }
.night .lang span { color: var(--on-night); }
.night .lang a { color: var(--muted); }
.night .lang a:hover { color: var(--on-night); }

/* Phone menu */
.menu-btn {
  display: none; width: 40px; height: 40px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink); cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.menu-btn:hover { background: var(--band); }
.menu-btn svg { width: 24px; height: 24px; }
.menu-btn .close { display: none; }
.menu-open .menu-btn .open { display: none; }
.menu-open .menu-btn .close { display: block; }
.mobile-menu { display: none; }

/* Hero */
.hero { padding: 80px 0 48px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero .eyebrow { font-size: 20px; font-weight: 500; color: var(--ink-2); margin-bottom: 16px; }
.hero .lead { margin-top: 24px; max-width: 540px; }
.hero .actions { margin-top: 48px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-photo { border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--band); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat .num { font-size: 48px; line-height: 1; font-weight: 500; letter-spacing: -0.03em; color: var(--accent); white-space: nowrap; }
.stat p { margin-top: 16px; font-size: 14px; color: var(--ink-2); max-width: 240px; }
.stat p strong { color: var(--ink); font-weight: 500; }

/* Video */
.video-frame { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--band); aspect-ratio: 16 / 9; }
.video-frame video { width: 100%; height: 100%; object-fit: cover; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 160px 1fr 1.2fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.timeline .when { font-size: 14px; color: var(--ink-3); padding-top: 2px; }
.timeline .role { font-weight: 500; }
.timeline .org { font-size: 14px; color: var(--ink-2); }
.timeline .what { font-size: 14px; color: var(--ink-2); }
/* Pre-fintech career, grouped so the three fintech roles lead */
.before { margin-top: 48px; max-width: 880px; }
.before-title { font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.before ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.before strong { color: var(--ink); font-weight: 500; }

/* Credibility strip under the hero: auto-scrolling logo carousel */
.trust { padding: 0 0 48px; }
.trust-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.marquee-toggle { background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; text-decoration: underline; text-underline-offset: 3px; }
.marquee-toggle:hover { color: var(--ink-2); }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track, .marquee-paused .marquee-track { animation-play-state: paused; }
.marquee-set { list-style: none; margin: 0; padding: 0 80px 0 0; display: flex; align-items: center; gap: 80px; }
.marquee-set li { flex: none; display: flex; align-items: center; height: 40px; }
/* One grey for every logo, whatever its original colours */
.marquee-set img { height: 32px; width: auto; filter: brightness(0); opacity: 0.45; }
.marquee-set img.logo-senac { height: 36px; }
.trust-text { font-size: 20px; line-height: 1.2; font-weight: 500; color: var(--muted); letter-spacing: -0.02em; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Reduced motion: no movement, show every item once as a static row */
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; width: auto; }
  .marquee-set { flex-wrap: wrap; gap: 24px 48px; padding: 0; }
  .marquee-set[aria-hidden="true"], .marquee-toggle { display: none; }
}

/* Posts */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 24px; box-shadow: var(--shadow); transition: border-color 0.3s var(--ease);
}
.post:hover { border-color: rgba(66, 87, 138, 0.35); }
.post .src { font-size: 12px; color: var(--muted); }
.post .h4 { margin-top: 8px; }
.post p { font-size: 14px; color: var(--ink-2); }
.post .link { margin-top: auto; padding-top: 16px; font-size: 14px; }

/* Book */
.book .wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 80px; align-items: center; }
/* Crop to the cover itself; the image's baked-in "+30K" headline sits above it */
.book-cover { border-radius: 12px; overflow: hidden; aspect-ratio: 5 / 4; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.book-title { font-family: "Newsreader", "Source Serif 4", Georgia, serif; font-size: 36px; line-height: 1.2; font-weight: 400; letter-spacing: normal; }
.book .num { font-size: 48px; line-height: 1; font-weight: 500; letter-spacing: -0.03em; color: var(--accent); margin-top: 48px; }
.book .on-night-2 { color: var(--faint); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.gallery figure { margin: 0; }
.gallery .ph { border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 4; background: var(--band); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { margin-top: 8px; }

/* Education */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 24px; box-shadow: var(--shadow); }
.card .h4 { margin-bottom: 8px; }
.langs { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 14px; padding: 4px 8px; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); color: var(--ink-2); }
.chip strong { color: var(--ink); font-weight: 500; }

/* Contact */
.contact { padding: 160px 0; }
.contact .lead { margin-top: 16px; max-width: 640px; }
.contact .actions { margin-top: 48px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }

/* Footer */
footer { padding: 80px 0; }
footer .wrap { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; align-items: flex-start; }
footer .brand { color: var(--on-night); font-size: 16px; }
footer .brand img { width: 48px; height: 48px; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
footer ul a { color: var(--muted); transition: color 0.3s var(--ease); }
footer ul a:hover { color: var(--on-night); }
footer .col-title { font-size: 14px; color: var(--on-night); margin-bottom: 16px; }
footer .fine { flex-basis: 100%; margin-top: 48px; font-size: 12px; color: var(--faint); }

/* Tablet */
@media (max-width: 1023px) {
  :root { --gutter: 24px; }
  .nav, .header-end .btn { display: none; }
  header .wrap { justify-content: space-between; }
  .header-end { gap: 8px; }
  .menu-btn { display: inline-flex; }
  .mobile-menu {
    position: absolute; left: 0; right: 0; top: 60px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 16px var(--gutter) 24px;
  }
  .menu-open .mobile-menu { display: block; }
  .mobile-menu a:not(.btn) { display: block; padding: 16px 0; font-size: 20px; font-weight: 500; border-bottom: 1px solid var(--line); }
  .mobile-menu .btn { margin-top: 24px; width: 100%; }
  .hero .wrap, .book .wrap { grid-template-columns: 1fr; }
  .book .wrap { gap: 48px; }
  .book-cover { max-width: 480px; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .timeline li { grid-template-columns: 120px 1fr; }
  .timeline .what { grid-column: 2; }
  .cards, .posts { grid-template-columns: 1fr; }
  .hero-photo { max-width: 480px; }
}

/* Phone */
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .display { font-size: 40px; }
  .h2 { font-size: 32px; }
  .h3 { font-size: 28px; }
  .stat .num, .book .num { font-size: 40px; }
  .book-title { font-size: 28px; }
  .hero { padding: 48px 0 32px; }
  .marquee-set { gap: 48px; padding-right: 48px; }
  .marquee-set img { height: 24px; }
  .marquee-set img.logo-senac { height: 28px; }
  .trust-text { font-size: 16px; }
  .hero .eyebrow, .lead { font-size: 18px; }
  section { padding: 48px 0; }
  .contact { padding: 80px 0; }
  .gallery { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .timeline .what { grid-column: auto; }
  .stat p { max-width: none; }
  /* "R$ 1,525 mi" does not fit in half a phone screen */
  .stats { grid-template-columns: 1fr; row-gap: 32px; }
}

/* Footer social links with icons */
footer .social a { display: inline-flex; align-items: center; gap: 8px; }
footer .social svg { width: 20px; height: 20px; flex: none; }
