:root {
  --background: #f7f9fb;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-soft: #eceef0;
  --primary: #020135;
  --primary-2: #1a1b4b;
  --secondary: #712ae2;
  --cyan: #2fd9f4;
  --muted: #57596a;
  --line: rgba(2, 1, 53, 0.12);
  --line-strong: rgba(2, 1, 53, 0.22);
  --shadow: 0 22px 70px rgba(26, 27, 75, 0.08);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--primary);
  font-family: var(--sans);
  overflow-x: clip;
  background:
    radial-gradient(circle at 2px 2px, rgba(2, 1, 53, 0.045) 1px, transparent 0),
    var(--background);
  background-size: 40px 40px;
}

main {
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(113, 42, 226, 0.12), transparent 26vw),
    radial-gradient(circle at 88% 22%, rgba(47, 217, 244, 0.14), transparent 24vw),
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(247, 249, 251, 0.9));
}

a {
  color: inherit;
}

.paper-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(2, 1, 53, 0.05) 50%, transparent calc(50% + 1px)),
    linear-gradient(rgba(2, 1, 53, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 100% 120px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  width: min(100% - 48px, 1440px);
  min-height: 84px;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
  margin: 18px auto 0;
  padding: 18px 26px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}

.brand {
  display: grid;
  gap: 1px;
  text-decoration: none;
}

.brand span {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.brand small,
.meta-label,
.section-index,
.date,
.tags span,
.hire-link,
.icon-action,
.main-nav,
.primary-action,
.text-action,
.github-text-link,
.orbit-card span,
.site-footer span,
.site-footer a {
  font-family: var(--mono);
}

.brand small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 34px);
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-nav a,
.hire-link,
.icon-action,
.primary-action,
.text-action,
.github-text-link {
  text-decoration: none;
}

.main-nav a:hover,
.text-action:hover,
.github-text-link:hover {
  color: var(--secondary);
}

.icon-action {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--primary);
  background: rgba(255, 255, 255, 0.46);
  transition: transform 180ms ease, color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.icon-action svg,
.github-text-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.icon-action span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon-action:hover {
  color: var(--secondary);
  border-color: rgba(113, 42, 226, 0.38);
  background: rgba(255, 255, 255, 0.72);
  transform: translateY(-2px);
}

.hire-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--primary);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.hire-link:hover,
.primary-action:hover {
  transform: translateY(-2px);
  background: var(--secondary);
  box-shadow: 0 18px 40px rgba(113, 42, 226, 0.22);
}

.section-shell {
  width: min(100% - 48px, 1440px);
  margin-inline: auto;
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100vh - 102px);
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  align-items: center;
  gap: clamp(48px, 8vw, 120px);
  padding-block: clamp(72px, 9vw, 142px);
}

.hero-copy {
  max-width: 760px;
}

.meta-label,
.section-index {
  margin: 0 0 24px;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  color: var(--primary);
}

h1 {
  max-width: 860px;
  margin-bottom: 32px;
  font-size: clamp(50px, 6.7vw, 88px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.96;
}

h1 em {
  color: var(--secondary);
}

.hero-lede {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.45;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: 44px;
}

.primary-action {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--primary);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.primary-action span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.text-action {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-visual {
  position: relative;
  min-height: 600px;
  transform:
    translate3d(calc(var(--avatar-x, 0) * 1px), calc(var(--avatar-y, 0) * 1px), 0)
    rotate(calc(var(--avatar-tilt, 0) * 1deg));
  transition: transform 180ms ease-out;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 9% -5% 14% 8%;
  background: repeating-linear-gradient(
    45deg,
    rgba(47, 217, 244, 0.42) 0 5px,
    transparent 5px 16px
  );
  transform:
    translate3d(calc(var(--bg-x, 0) * 1px), calc(var(--bg-y, 0) * 1px), 0)
    rotate(calc(var(--bg-tilt, 0) * 1deg));
  transition: transform 180ms ease-out;
}

.portrait-frame {
  position: relative;
  z-index: 2;
  width: min(100%, 520px);
  margin: 0 auto;
  padding: clamp(10px, 2vw, 20px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(20px);
  box-shadow: 26px 30px 0 rgba(113, 42, 226, 0.08);
}

.profile-portrait {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 32px rgba(26, 27, 75, 0.12));
}

.orbit-card {
  position: absolute;
  z-index: 4;
  display: grid;
  max-width: 260px;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.orbit-card span {
  color: var(--secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.orbit-card strong {
  font-size: 18px;
  line-height: 1.2;
}

.orbit-card-a {
  top: 8%;
  right: 0;
}

.orbit-card-b {
  bottom: 10%;
  left: 0;
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-bottom: clamp(120px, 14vw, 180px);
  background: var(--line);
}

.proof-strip article {
  min-height: 190px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.7);
}

.proof-strip span {
  display: block;
  margin-bottom: 20px;
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 900;
  line-height: 1;
}

.proof-strip p {
  max-width: 300px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.about {
  padding-bottom: clamp(100px, 12vw, 150px);
}

.split-heading,
.education-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.62fr);
  gap: clamp(40px, 8vw, 120px);
}

.split-heading h2,
.section-heading h2,
.education h2,
.contact h2 {
  margin-bottom: 0;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1;
}

.split-heading p {
  align-self: end;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.45;
}

.timeline {
  padding-block: clamp(100px, 12vw, 160px);
}

.section-heading {
  position: relative;
  margin-bottom: clamp(74px, 9vw, 120px);
}

.section-heading h2 {
  max-width: 760px;
}

.watermark {
  display: block;
  margin-top: -20px;
  text-align: right;
  color: rgba(2, 1, 53, 0.08);
  font-family: var(--mono);
  font-size: clamp(44px, 7vw, 92px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 0.8;
}

.timeline-list {
  display: grid;
  position: relative;
  gap: clamp(72px, 8vw, 112px);
}

.timeline-list::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-strong), transparent);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(46px, 8vw, 120px);
  align-items: center;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 13px;
  border: 3px solid var(--background);
  background: var(--secondary);
  box-shadow: 0 0 0 1px rgba(113, 42, 226, 0.28);
  transform: translate(-50%, -50%);
}

.timeline-left .timeline-content {
  grid-column: 1;
  justify-self: end;
  text-align: right;
}

.timeline-left .timeline-media {
  grid-column: 2;
}

.timeline-left .tags {
  justify-content: flex-end;
}

.timeline-right .timeline-media {
  grid-column: 1;
}

.timeline-right .timeline-content {
  grid-column: 2;
  justify-self: start;
}

.timeline-media {
  position: relative;
  min-height: 310px;
  width: min(100%, 560px);
  border: 1px solid rgba(255, 255, 255, 0.54);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.42)),
    var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.timeline-media figcaption {
  position: absolute;
  top: 24px;
  left: 26px;
  z-index: 2;
  margin: 0;
  color: rgba(2, 1, 53, 0.52);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.timeline-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 310px;
  object-fit: cover;
  filter: saturate(0.94) contrast(1.02);
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline-media:hover img {
  transform: scale(1.035);
}

.timeline-content {
  max-width: 560px;
}

.date {
  display: block;
  margin-bottom: 18px;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-content h3 {
  margin-bottom: 20px;
  font-size: clamp(31px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

.timeline-content p,
.skill-card p,
.contact p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.tags span {
  padding: 8px 11px;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.knowledge {
  padding-block: clamp(100px, 12vw, 160px);
  color: #fff;
  background: var(--primary);
}

.knowledge .section-index {
  color: #c1c1fc;
}

.knowledge .section-heading h2 {
  margin-left: auto;
}

.knowledge h2,
.knowledge h3 {
  color: #f2f2ff;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.skill-card {
  min-height: 470px;
  padding: clamp(32px, 4vw, 54px);
  background: rgba(255, 255, 255, 0.035);
  transition: background 180ms ease, transform 180ms ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.07);
}

.skill-icon {
  display: inline-grid;
  width: 64px;
  height: 64px;
  place-items: center;
  margin-bottom: 34px;
  border: 1px solid rgba(193, 193, 252, 0.4);
  color: #c1c1fc;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.skill-card h3 {
  margin-bottom: 18px;
  font-size: 32px;
}

.skill-card p {
  color: rgba(255, 255, 255, 0.68);
}

.skill-card ul {
  display: grid;
  gap: 12px;
  margin: 34px 0 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--mono);
  font-size: 14px;
  list-style: none;
}

.education {
  padding-block: clamp(100px, 12vw, 150px);
}

.education-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.education-list article {
  padding: 30px;
  background: rgba(255, 255, 255, 0.72);
}

.education-list span {
  display: block;
  margin-bottom: 10px;
  color: var(--secondary);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.education-list strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.education-list p {
  margin: 0;
  color: var(--muted);
}

.mentorship {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.72fr);
  gap: clamp(42px, 8vw, 120px);
  align-items: center;
  padding-block: clamp(90px, 12vw, 150px);
}

.mentorship h2 {
  max-width: 820px;
  margin-bottom: 28px;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1;
}

.mentorship-copy p:not(.section-index) {
  max-width: 680px;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.48;
}

.mentorship-panel {
  display: grid;
  gap: 1px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.mentorship-panel article {
  padding: 30px;
  background: rgba(255, 255, 255, 0.72);
}

.mentorship-panel strong {
  display: block;
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.05;
}

.mentorship-panel span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact {
  padding-block: clamp(100px, 12vw, 170px);
  text-align: center;
  overflow: clip;
}

.contact-inner {
  position: relative;
  max-width: 940px;
  margin: 0 auto;
  contain: paint;
}

.contact-inner::before {
  content: "THIAGO";
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: -1;
  color: rgba(2, 1, 53, 0.04);
  font-family: var(--serif);
  font-size: clamp(130px, 24vw, 360px);
  font-weight: 900;
  letter-spacing: -0.04em;
  transform: translate(-50%, -50%);
}

.contact p {
  max-width: 720px;
  margin: 28px auto 0;
}

.contact-actions {
  justify-content: center;
}

.github-text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer {
  display: flex;
  width: min(100% - 48px, 1440px);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 38px 0 54px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer strong {
  color: var(--primary);
  font-family: var(--serif);
  font-size: 28px;
}

.site-footer span,
.site-footer a {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reveal-up {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 720ms cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms),
    transform 720ms cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms);
}

.reveal-up.active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .site-header {
    width: min(100% - 28px, 1440px);
  }

  .main-nav {
    display: none;
  }

  .section-shell {
    width: min(100% - 32px, 1440px);
  }

  .hero,
  .split-heading,
  .section-heading,
  .timeline-item,
  .education-grid,
  .mentorship {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 64px;
  }

  .hero-visual {
    min-height: 520px;
  }

  .watermark {
    justify-self: start;
  }

  .timeline-list::before,
  .timeline-item::before {
    display: none;
  }

  .timeline-left .timeline-content,
  .timeline-left .timeline-media,
  .timeline-right .timeline-content,
  .timeline-right .timeline-media {
    grid-column: auto;
    justify-self: stretch;
    text-align: left;
  }

  .timeline-left .tags {
    justify-content: flex-start;
  }

  .proof-strip,
  .skill-grid {
    grid-template-columns: 1fr;
  }

  .skill-card {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 70px;
    padding: 14px;
  }

  .brand small {
    display: none;
  }

  .hire-link {
    min-height: 38px;
    padding-inline: 14px;
    font-size: 10px;
  }

  .icon-action {
    width: 38px;
    height: 38px;
  }

  .icon-action svg {
    width: 18px;
    height: 18px;
  }

  h1 {
    font-size: clamp(42px, 14vw, 62px);
  }

  .hero {
    gap: 28px;
  }

  .hero-visual {
    min-height: 430px;
  }

  .portrait-frame {
    box-shadow: 14px 18px 0 rgba(113, 42, 226, 0.08);
  }

  .orbit-card {
    position: relative;
    inset: auto;
    max-width: none;
    margin-top: 14px;
  }

  .orbit-card-b {
    margin-left: 28px;
  }

  .proof-strip article {
    min-height: 150px;
    padding: 26px;
  }

  .timeline-media {
    min-height: 230px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
