:root {
  --bg-deep: #070a12;
  --bg-elevated: rgba(15, 18, 32, 0.72);
  --surface: rgba(18, 22, 38, 0.85);
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(45, 255, 130, 0.38);
  --text: #e8edf7;
  --muted: #94a3b8;
  /* Verde estilo Matrix (terminal) */
  --accent: #36f372;
  --accent-soft: rgba(45, 255, 130, 0.14);
  --accent-glow: rgba(45, 255, 130, 0.45);
  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-card: 0 24px 48px -24px rgba(0, 0, 0, 0.55);
  --font-sans: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  /* Transições compartilhadas */
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 0.2s;
  --t-base: 0.32s;
  --t-slow: 0.55s;
  /* Espaçamento entre seções da página */
  --section-pad-y: clamp(4.75rem, 11vw, 8.5rem);
  --section-pad-x: 10%;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Chuva binária (Matrix) — canvas atrás do conteúdo */
.matrix-rain-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
  opacity: 0.48;
}

.page-shell {
  position: relative;
  z-index: 1;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(ellipse 120% 80% at 10% -10%, rgba(45, 255, 130, 0.14), transparent 50%),
    radial-gradient(ellipse 90% 60% at 100% 0%, rgba(20, 110, 60, 0.14), transparent 45%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(0, 160, 80, 0.08), transparent 50%),
    linear-gradient(180deg, #070a12 0%, #0a0e18 40%, #070a12 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%2394a3b8' stroke-opacity='0.06'%3E%3Cpath d='M0 0h160v160H0z'/%3E%3Cpath d='M0 40h160M0 80h160M0 120h160M40 0v160M80 0v160M120 0v160'/%3E%3C/g%3E%3C/svg%3E");
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  transition: outline-offset var(--t-fast) var(--ease-soft);
}

/* ——— Nav ——— */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 10%;
  background: rgba(7, 10, 18, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition:
    background var(--t-base) var(--ease-soft),
    border-color var(--t-base) var(--ease-soft),
    backdrop-filter var(--t-base) var(--ease-soft);
}

.site-nav .brand {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: opacity var(--t-base) var(--ease-soft), transform var(--t-fast) var(--ease-out);
}

.site-nav .brand:hover {
  opacity: 0.92;
}

.site-nav .brand span {
  color: var(--accent);
  transition: color var(--t-base) var(--ease-soft), text-shadow var(--t-base) var(--ease-soft);
}

.site-nav .brand:hover span {
  text-shadow: 0 0 20px var(--accent-glow);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  align-items: center;
}

.site-nav a:not(.brand) {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  position: relative;
  transition:
    color var(--t-base) var(--ease-soft),
    transform var(--t-fast) var(--ease-out);
}

.site-nav a:not(.brand):hover {
  color: var(--accent);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .site-nav ul {
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .site-nav a:not(.brand) {
    font-size: 0.8rem;
  }
}

/* ——— Header / Hero ——— */
.site-hero {
  padding: 80px var(--section-pad-x) clamp(5.5rem, 12vw, 7.5rem);
  max-width: 1200px;
  margin: 0 auto;
}

.hero-inner {
  max-width: 640px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(45, 255, 130, 0.25);
  transition:
    border-color var(--t-base) var(--ease-soft),
    background var(--t-base) var(--ease-soft),
    box-shadow var(--t-base) var(--ease-soft),
    transform var(--t-fast) var(--ease-out);
}

.badge:hover {
  border-color: rgba(45, 255, 130, 0.45);
  box-shadow: 0 0 24px -4px var(--accent-glow);
  transform: translateY(-1px);
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.35rem);
  line-height: 1.08;
  margin: 22px 0 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

h1 span {
  background: linear-gradient(135deg, #9dffc4 0%, #36f372 45%, #22dd6a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  color: var(--muted);
  max-width: 520px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.92rem;
  transition:
    transform var(--t-fast) var(--ease-out),
    box-shadow var(--t-base) var(--ease-soft),
    background var(--t-base) var(--ease-soft),
    border-color var(--t-base) var(--ease-soft),
    color var(--t-base) var(--ease-soft),
    filter var(--t-fast) var(--ease-soft);
}

.btn-primary {
  background: linear-gradient(135deg, #36f372, #0a9f4a);
  color: #020617;
  box-shadow: 0 12px 32px -8px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -8px var(--accent-glow);
  filter: brightness(1.05);
}

.btn-primary:active {
  transform: translateY(-1px);
  transition-duration: 0.1s;
}

.btn-outline {
  border: 1px solid rgba(45, 255, 130, 0.45);
  color: var(--accent);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -12px rgba(45, 255, 130, 0.35);
}

.btn-outline:active {
  transform: translateY(-1px);
  transition-duration: 0.1s;
}

.hero-contact {
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-contact a {
  color: var(--accent);
  transition:
    opacity var(--t-base) var(--ease-soft),
    color var(--t-base) var(--ease-soft),
    text-decoration-color var(--t-base) var(--ease-soft);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
}

.hero-contact a:hover {
  opacity: 0.95;
  color: #8effb4;
  text-decoration-color: rgba(130, 255, 190, 0.55);
}

/* ——— Sections ——— */
section.page-section {
  padding: var(--section-pad-y) var(--section-pad-x);
  max-width: 1280px;
  margin: 0 auto;
  scroll-margin-top: 88px;
}

.section-title {
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-title span {
  background: linear-gradient(135deg, #c6ffd8, #36f372);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-lead {
  color: var(--muted);
  max-width: 560px;
  margin-bottom: clamp(2.5rem, 5vw, 3.25rem);
  font-size: 0.98rem;
  transition: color var(--t-base) var(--ease-soft);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
  gap: clamp(22px, 3vw, 32px);
}

/* Grade explícita dos projetos (Web + Dados & BI) */
.grid.projects-grid {
  grid-template-columns: 1fr;
  align-items: stretch;
  width: 100%;
}

@media (min-width: 600px) {
  .grid.projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid.projects-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.grid.projects-grid > .card.project-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(165deg, #101a14 0%, #0a100d 48%, #070c0a 100%);
  border: 1px solid rgba(45, 255, 130, 0.12);
  border-radius: 18px;
  box-shadow:
    0 16px 40px -20px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(45, 255, 130, 0.06),
    inset 0 1px 0 rgba(45, 255, 130, 0.04);
}

.grid.projects-grid > .card.project-card:hover {
  border-color: rgba(45, 255, 130, 0.32);
  box-shadow:
    0 22px 48px -18px rgba(0, 0, 0, 0.6),
    0 0 36px -14px rgba(45, 255, 130, 0.18),
    inset 0 1px 0 rgba(45, 255, 130, 0.07);
}

/* ——— Cards vitrine (Matrix: faixa colorida + corpo escuro esverdeado) ——— */
.project-card .card-media {
  position: relative;
  height: 150px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #031a0d 0%, #14532d 50%, #36f372 120%);
}

.project-card .card-media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
}

.project-card[data-media-tone="0"] .card-media {
  background: linear-gradient(135deg, #020617 0%, #14532d 42%, #4ade80 100%);
}

.project-card[data-media-tone="1"] .card-media {
  background: linear-gradient(135deg, #0f172a 0%, #134e4a 48%, #36f372 100%);
}

.project-card[data-media-tone="2"] .card-media {
  background: linear-gradient(135deg, #1e1b4b 0%, #166534 45%, #86efac 100%);
}

.project-card[data-media-tone="3"] .card-media {
  background: linear-gradient(135deg, #422006 0%, #3f6212 40%, #bef264 100%);
}

.project-card[data-media-tone="4"] .card-media {
  background: linear-gradient(135deg, #0c4a6e 0%, #0e7490 50%, #5eead4 100%);
}

.project-card .card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, transparent 0%, transparent 38%, #0d1411 88%, #0a100d 100%);
  pointer-events: none;
}

.project-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 8px;
  min-height: 0;
  background: transparent;
}

.project-card .card-body h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ecfdf5;
}

.project-card .card-body p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.62;
  color: #9db8a8;
  flex: 1;
}

.project-card .tags {
  margin-top: 14px;
  gap: 6px;
}

.project-card .tag {
  background: rgba(45, 255, 130, 0.06);
  border-color: rgba(45, 255, 130, 0.14);
  color: #b8d4c4;
  padding: 4px 10px;
  font-size: 0.68rem;
}

.project-card .tag:hover {
  border-color: rgba(45, 255, 130, 0.35);
  background: rgba(45, 255, 130, 0.12);
  color: #ecfdf5;
}

.project-card .gh-repo-meta {
  margin-top: 12px;
  font-size: 0.75rem;
  color: #7a9e8a;
}

.card-icon-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 18px;
  margin-top: auto;
  border-top: 1px solid rgba(45, 255, 130, 0.1);
  background: rgba(5, 10, 8, 0.65);
}

.card-icon-row--muted {
  justify-content: flex-start;
}

.card-soon {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b8f7a;
}

.card-icon-link {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #86efac;
  background: rgba(18, 28, 22, 0.9);
  border: 1px solid rgba(45, 255, 130, 0.18);
  font-size: 1.05rem;
  transition:
    color var(--t-base) var(--ease-soft),
    border-color var(--t-base) var(--ease-soft),
    background var(--t-base) var(--ease-soft),
    transform var(--t-fast) var(--ease-out),
    box-shadow var(--t-base) var(--ease-soft);
}

.card-icon-link:hover {
  color: #ecfdf5;
  border-color: rgba(45, 255, 130, 0.45);
  background: rgba(45, 255, 130, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -10px rgba(45, 255, 130, 0.28);
}

.project-card.card::before {
  opacity: 0;
}

.project-card.card:hover::before {
  opacity: 0.35;
}

.github-timeline .timeline-card.project-card {
  max-width: 340px;
  padding: 0;
}

.github-timeline .timeline-card.project-card .card-body {
  padding-bottom: 12px;
}

/* ——— Cards (base / sobre / geral) ——— */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 26px 24px;
  transition:
    opacity var(--t-slow) var(--ease-out),
    transform var(--t-slow) var(--ease-out),
    border-color var(--t-base) var(--ease-soft),
    box-shadow var(--t-base) var(--ease-soft),
    background var(--t-base) var(--ease-soft);
  cursor: default;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(28px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(45, 255, 130, 0.2), transparent 40%, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-soft);
}

.card:hover::before {
  opacity: 1;
}

.card.show {
  opacity: 1;
  transform: translateY(0);
}

.card.show:hover {
  transform: translateY(-6px);
}

.card:hover {
  border-color: rgba(45, 255, 130, 0.28);
  box-shadow: 0 28px 56px -20px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(45, 255, 130, 0.08);
}

.card h3 {
  margin-bottom: 10px;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card p {
  color: var(--muted);
  font-size: 0.94rem;
}

.card ul {
  padding-left: 18px;
}

.card li {
  margin-bottom: 8px;
  color: #b9e8cf;
  font-size: 0.94rem;
}

.tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #cbd5e1;
  transition:
    border-color var(--t-base) var(--ease-soft),
    background var(--t-base) var(--ease-soft),
    color var(--t-base) var(--ease-soft),
    transform var(--t-fast) var(--ease-out);
}

.tag:hover {
  border-color: rgba(45, 255, 130, 0.25);
  background: rgba(45, 255, 130, 0.08);
  color: var(--text);
  transform: translateY(-1px);
}

.card-links {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-links a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  transition:
    gap var(--t-base) var(--ease-spring),
    opacity var(--t-base) var(--ease-soft),
    color var(--t-base) var(--ease-soft),
    transform var(--t-fast) var(--ease-out);
}

.card-links a:hover {
  gap: 10px;
  opacity: 0.95;
  color: #8effb4;
  transform: translateX(2px);
}

.card-links span[data-i18n] {
  pointer-events: none;
}

.github-web-loading {
  text-align: center;
  color: var(--muted);
  padding: 20px 0 8px;
  font-size: 0.92rem;
  margin: 0;
}

/* —— Portal (gatilho na página) —— */
.timeline-portal {
  min-height: min(52vh, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.timeline-portal-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  opacity: 0.85;
  transition: opacity var(--t-base) var(--ease-soft);
}

.timeline-portal.is-armed .timeline-portal-inner,
.timeline-portal.is-visited .timeline-portal-inner {
  opacity: 1;
}

.timeline-portal-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.timeline-portal-btn {
  font-size: 0.88rem;
  padding: 0.65rem 1.25rem;
}

body.timeline-mode {
  overflow: hidden;
}

/* Esconde o portfólio por baixo, mas mantém a chuva de binários visível */
body.timeline-mode:not(.timeline-leaving) .page-shell {
  visibility: hidden;
  pointer-events: none;
}

body.timeline-mode .matrix-rain-canvas {
  opacity: 0.55;
}

/* —— Experiência imersiva —— */
.timeline-experience {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}

.timeline-experience.is-active {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.timeline-burst {
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* Véu leve — binários do Matrix continuam aparecendo atrás */
  background: linear-gradient(
    180deg,
    rgba(5, 8, 15, 0.42) 0%,
    rgba(7, 10, 18, 0.5) 45%,
    rgba(8, 16, 12, 0.55) 100%
  );
  transform: translateY(100%);
  transition: transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}

.timeline-experience.is-entering .timeline-burst,
.timeline-experience.is-active:not(.is-leaving) .timeline-burst {
  transform: translateY(0);
}

.timeline-experience.is-leaving .timeline-burst {
  transform: translateY(100%);
  transition-duration: 0.95s;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 0.18s;
}

.timeline-experience.is-leaving .timeline-experience-scroll,
.timeline-experience.is-leaving .timeline-exit-btn {
  opacity: 0;
  transform: translateY(16px);
  transition-duration: 0.45s;
  transition-delay: 0s;
  pointer-events: none;
}

.timeline-burst-wave {
  position: absolute;
  left: 50%;
  bottom: -18%;
  width: min(140vw, 920px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateX(-50%) scale(0.35);
  opacity: 0;
  background: radial-gradient(
    circle,
    rgba(54, 243, 114, 0.28) 0%,
    rgba(45, 255, 130, 0.1) 38%,
    transparent 68%
  );
  pointer-events: none;
}

.timeline-experience.is-entering .timeline-burst-wave {
  animation: timelineSoftBurst 1.35s var(--ease-out) forwards;
}

.timeline-experience.is-leaving .timeline-burst-wave {
  animation: timelineSoftCollapse 1.2s var(--ease-out) forwards;
}

.timeline-burst-wave:nth-child(2) {
  animation-delay: 0.12s;
  width: min(120vw, 760px);
  bottom: -12%;
}

.timeline-burst-wave:nth-child(3) {
  animation-delay: 0.24s;
  width: min(100vw, 620px);
  bottom: -6%;
}

.timeline-experience.is-leaving .timeline-burst-wave:nth-child(2) {
  animation-delay: 0.1s;
}

.timeline-experience.is-leaving .timeline-burst-wave:nth-child(3) {
  animation-delay: 0.2s;
}

@keyframes timelineSoftBurst {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.28);
  }
  35% {
    opacity: 0.85;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(1.55);
  }
}

/* Espelho da entrada: a explosão encolhe em vez de crescer */
@keyframes timelineSoftCollapse {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(1.55);
  }
  30% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(0.18);
  }
}

.timeline-experience-scroll {
  position: relative;
  z-index: 3;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: clamp(4.5rem, 10vh, 6.5rem) var(--section-pad-x) 6rem;
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s var(--ease-out) 0.35s,
    transform 0.7s var(--ease-out) 0.35s;
}

.timeline-experience.is-ready .timeline-experience-scroll {
  opacity: 1;
  transform: translateY(0);
}

.timeline-intro {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto clamp(2.75rem, 7vw, 4rem);
  opacity: 0;
  transform: translateY(36px) scale(0.98);
  transition:
    opacity 0.75s var(--ease-out),
    transform 0.75s var(--ease-out);
}

.timeline-experience.is-ready .timeline-intro {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.timeline-intro-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.85rem;
}

.timeline-intro h2 {
  font-size: clamp(1.55rem, 4.2vw, 2.35rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}

.timeline-experience-body {
  max-width: min(960px, 100%);
  margin: 0 auto;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.65s var(--ease-out) 0.45s,
    transform 0.65s var(--ease-out) 0.45s;
}

.timeline-experience.show-content .timeline-experience-body {
  opacity: 1;
  transform: translateY(0);
}

.timeline-end-sentinel {
  height: 1px;
  width: 100%;
  margin-top: clamp(3rem, 8vh, 5rem);
  pointer-events: none;
}

.timeline-exit-btn {
  position: fixed;
  right: max(1.1rem, env(safe-area-inset-right));
  bottom: max(1.1rem, env(safe-area-inset-bottom));
  z-index: 90;
  appearance: none;
  border: 1px solid rgba(45, 255, 130, 0.35);
  background: rgba(7, 10, 18, 0.82);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity var(--t-base) var(--ease-soft),
    transform var(--t-base) var(--ease-soft),
    border-color var(--t-base) var(--ease-soft),
    background var(--t-base) var(--ease-soft),
    color var(--t-base) var(--ease-soft);
}

.timeline-experience.show-content .timeline-exit-btn {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.timeline-exit-btn:hover {
  border-color: rgba(45, 255, 130, 0.65);
  background: rgba(12, 22, 16, 0.92);
  color: #8effb4;
}

.github-timeline:empty {
  display: none;
}

.github-timeline:not(:empty) {
  position: relative;
  margin-top: 12px;
  margin-bottom: 16px;
  margin-left: auto;
  margin-right: auto;
  max-width: min(900px, 100%);
  padding: 0.5rem 0 1rem;
}

/* Trilho vertical contínua no centro */
.github-timeline:not(:empty)::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    rgba(45, 255, 130, 0.45),
    rgba(45, 255, 130, 0.12) 40%,
    rgba(45, 255, 130, 0.08) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.timeline-item {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  gap: 12px 16px;
  align-items: start;
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-rail {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 2px;
  min-height: 44px;
  width: 44px;
}

.timeline-item:nth-child(odd) .timeline-card {
  grid-column: 3;
  grid-row: 1;
}

.timeline-item:nth-child(even) .timeline-card {
  grid-column: 1;
  grid-row: 1;
}

.timeline-date {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  line-height: 1.2;
  max-width: 76px;
  margin-bottom: 8px;
}

.timeline-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(145deg, #8effb4, var(--accent));
  box-shadow:
    0 0 0 4px var(--bg-deep),
    0 0 16px var(--accent-glow);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

/* Cards menores; alinhados ao eixo central */
.github-timeline .timeline-card.card {
  margin: 0;
  max-width: 340px;
  width: 100%;
  justify-self: end;
}

.github-timeline .timeline-item:nth-child(even) .timeline-card {
  justify-self: start;
}

.github-timeline .timeline-card h3 {
  font-size: 0.98rem;
  margin-bottom: 6px;
}

.github-timeline .timeline-card p {
  font-size: 0.82rem;
  line-height: 1.55;
}

.github-timeline .timeline-card .tags {
  margin-top: 10px;
}

.github-timeline .timeline-card .tag {
  padding: 4px 9px;
  font-size: 0.65rem;
}

.github-timeline .timeline-card .gh-repo-meta {
  margin-top: 10px;
  font-size: 0.72rem;
}

.github-timeline .timeline-card .card-links {
  margin-top: 12px;
}

.github-timeline .timeline-card .card-links a {
  font-size: 0.8rem;
}

@media (max-width: 720px) {
  .timeline-experience-scroll {
    padding-inline: 6%;
    padding-bottom: 5.5rem;
  }

  .timeline-exit-btn {
    font-size: 0.72rem;
    padding: 0.62rem 0.9rem;
  }

  .github-timeline:not(:empty) {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
  }

  .github-timeline:not(:empty)::before {
    left: 22px;
    transform: none;
  }

  .timeline-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px 14px;
  }

  .timeline-rail {
    grid-column: 1;
    grid-row: 1;
    width: 36px;
    align-items: center;
    padding-left: 0;
  }

  .timeline-item:nth-child(odd) .timeline-card,
  .timeline-item:nth-child(even) .timeline-card {
    grid-column: 2;
    grid-row: 1;
    max-width: none;
    justify-self: stretch;
  }

  .timeline-date {
    max-width: 56px;
    font-size: 0.6rem;
    text-align: center;
  }
}

.web-repos-footer {
  margin-top: 8px;
}

.repos-footer {
  text-align: center;
}

.repos-footer a {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    gap var(--t-base) var(--ease-spring),
    color var(--t-base) var(--ease-soft),
    opacity var(--t-base) var(--ease-soft);
}

.repos-footer a:hover {
  gap: 10px;
  color: #8effb4;
  opacity: 0.95;
}

.repos-error {
  color: #fca5a5 !important;
}

.gh-repo-card .gh-repo-meta {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}

.gh-repo-card .gh-repo-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ——— Social & lang ——— */
.social-fixed {
  position: fixed;
  top: 88px;
  right: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 1000;
}

.social-fixed a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.15rem;
  color: var(--muted);
  background: var(--elevated);
  border: 1px solid var(--border);
  transition:
    color var(--t-base) var(--ease-soft),
    border-color var(--t-base) var(--ease-soft),
    transform var(--t-fast) var(--ease-spring),
    background var(--t-base) var(--ease-soft),
    box-shadow var(--t-base) var(--ease-soft);
}

.social-fixed a:hover {
  color: var(--accent);
  border-color: rgba(45, 255, 130, 0.35);
  transform: translateX(-4px) scale(1.04);
  box-shadow: 0 8px 24px -8px var(--accent-glow);
}

.lang-switch {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  z-index: 1001;
  transition:
    background var(--t-base) var(--ease-soft),
    color var(--t-base) var(--ease-soft),
    border-color var(--t-base) var(--ease-soft),
    transform var(--t-fast) var(--ease-spring),
    box-shadow var(--t-base) var(--ease-soft);
  font-family: inherit;
}

.lang-switch:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: scale(1.04);
  box-shadow: 0 8px 28px -10px var(--accent-glow);
}

.lang-switch:active {
  transform: scale(0.98);
  transition-duration: 0.1s;
}

/* ——— Footer ——— */
footer {
  padding: clamp(3.5rem, 8vw, 5rem) var(--section-pad-x);
  text-align: center;
  color: #64748b;
  font-size: 0.88rem;
  max-width: 1280px;
  margin: 0 auto;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

footer p {
  transition: color var(--t-base) var(--ease-soft);
}

footer:hover p {
  color: var(--muted);
}

.section-outro {
  margin-top: clamp(2.75rem, 6vw, 4rem);
  color: var(--muted);
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ——— Sobre mim (visual premium) ——— */
.about-section {
  position: relative;
}

.about-intro {
  margin-bottom: clamp(2.25rem, 5vw, 3.25rem);
  padding-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.about-section .about-title {
  margin-bottom: 1.15rem;
}

.about-section .about-lead {
  max-width: 52ch;
  margin-bottom: 0;
  font-size: clamp(1rem, 1.9vw, 1.12rem);
  line-height: 1.78;
  color: #b5d4c4;
}

.about-grid {
  gap: clamp(20px, 2.5vw, 28px);
}

@media (min-width: 960px) {
  .about-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-card--hero {
    grid-column: 1 / -1;
  }
}

.about-section .about-card {
  border-radius: 20px;
  padding: 22px 24px 20px;
  background:
    linear-gradient(168deg, rgba(32, 42, 72, 0.45) 0%, rgba(18, 22, 38, 0.92) 48%, rgba(14, 18, 32, 0.96) 100%);
  border-color: rgba(45, 255, 130, 0.14);
  box-shadow:
    var(--shadow-card),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.about-section .about-card--hero {
  padding: clamp(26px, 4vw, 38px) clamp(24px, 4vw, 44px) clamp(24px, 4vw, 36px)
    clamp(28px, 5vw, 52px);
  border-color: rgba(45, 255, 130, 0.24);
  background:
    linear-gradient(125deg, rgba(45, 255, 130, 0.1) 0%, transparent 45%),
    linear-gradient(168deg, rgba(36, 48, 82, 0.55) 0%, rgba(18, 22, 38, 0.96) 55%);
  position: relative;
}

.about-section .about-card--hero::after {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #c6ffd8, var(--accent) 40%, rgba(45, 255, 130, 0.15));
  box-shadow: 0 0 24px rgba(45, 255, 130, 0.35);
}

.about-section .about-card h3 {
  font-size: 1.04rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f0fff4;
  letter-spacing: -0.02em;
}

.about-section .about-card--hero h3 {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  margin-bottom: 16px;
}

.about-section .about-card p {
  color: #b4c4d8;
  line-height: 1.72;
}

.about-section .about-card--hero p {
  font-size: clamp(0.98rem, 1.5vw, 1.06rem);
  line-height: 1.82;
  color: #c9e8dc;
}

.about-section .about-card p:not(:last-child) {
  margin-bottom: 0.85rem;
}

.about-section .about-card p + ul {
  margin-top: 0.35rem;
}

.about-section .about-card ul {
  padding-left: 0;
  list-style: none;
}

.about-section .about-card li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 10px;
  color: #b8cadb;
  font-size: 0.93rem;
  line-height: 1.55;
}

.about-section .about-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.about-section .about-card li strong {
  color: #e2e8f0;
}

.section-outro.about-outro {
  margin-top: clamp(3rem, 6vw, 4.25rem);
  padding: clamp(22px, 4vw, 30px) clamp(24px, 5vw, 40px);
  max-width: 720px;
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(24, 30, 52, 0.75), rgba(15, 18, 32, 0.9));
  border: 1px solid rgba(45, 255, 130, 0.2);
  box-shadow:
    0 24px 56px -28px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-size: clamp(0.98rem, 1.6vw, 1.06rem);
  line-height: 1.75;
  color: #e2e8f0;
}

@media (prefers-reduced-motion: reduce) {
  .about-section .about-card--hero::after {
    box-shadow: none;
  }
}

@media (max-width: 768px) {
  .site-hero {
    padding-top: 48px;
    padding-bottom: clamp(4rem, 10vw, 5.5rem);
    padding-inline: 6%;
  }

  section.page-section {
    padding: clamp(3.25rem, 9vw, 4.5rem) 6%;
    scroll-margin-top: 72px;
  }

  footer {
    padding-inline: 6%;
  }

  .social-fixed {
    right: 14px;
    top: 72px;
  }

  .social-fixed a {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .lang-switch {
    bottom: 18px;
    right: 18px;
  }

  h1 {
    font-size: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .matrix-rain-canvas {
    display: none !important;
  }

  .card,
  .gh-repo-card {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .card.show:hover {
    transform: none !important;
  }

  .site-nav,
  .site-nav .brand,
  .site-nav .brand span,
  .site-nav a:not(.brand),
  .badge,
  .btn,
  .hero-contact a,
  .tag,
  .card-links a,
  .card-icon-link,
  .repos-footer a,
  .social-fixed a,
  .lang-switch,
  footer p {
    transition: none !important;
  }

  .site-nav a:not(.brand):hover,
  .badge:hover,
  .btn:hover,
  .btn:active,
  .tag:hover,
  .card-links a:hover,
  .card-icon-link:hover,
  .social-fixed a:hover,
  .lang-switch:hover,
  .lang-switch:active {
    transform: none !important;
  }

  .btn-primary:hover {
    filter: none !important;
  }

  .timeline-burst,
  .timeline-experience-scroll,
  .timeline-intro,
  .timeline-experience-body,
  .timeline-exit-btn {
    transition: none !important;
    animation: none !important;
  }

  .timeline-burst-wave {
    display: none !important;
  }

  .timeline-experience.is-active .timeline-burst {
    transform: none;
  }

  .timeline-experience.is-active .timeline-experience-scroll,
  .timeline-experience.is-ready .timeline-intro,
  .timeline-experience.show-content .timeline-experience-body,
  .timeline-experience.show-content .timeline-exit-btn {
    opacity: 1 !important;
    transform: none !important;
  }
}
