/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  --primary: #6c63ff;
  --primary-action: #625af0;
  --primary-dark: #574fd6;
  --primary-deep: #4a42c4;
  --primary-shadow: rgba(108, 99, 255, 0.3);
  --primary-shadow-hover: rgba(87, 79, 214, 0.45);

  --primary-tint: #ede9fe;

  --bg-white: #ffffff;
  --bg-alt: #f8fafc;
  --bg-night: #0f0f1a;

  --text: #1e1e2e;
  --text-muted: #64748b;
  --text-on-dark: #94a3b8;

  --border: #e2e8f0;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.12);

  --radius: 12px;
  --radius-sm: 6px;
  --transition: 0.3s ease;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --max-width: 1100px;

  /* Teto da altura do header fixo: uma linha de menu mede até 58 px. Abaixo de 480 px o menu
     pode quebrar em duas linhas (até 94 px), e o valor sobe no media query dessa faixa. */
  --altura-header: 3.75rem;
}

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

html {
  scroll-behavior: smooth;
  /* O pulo por âncora para abaixo do header fixo */
  scroll-padding-top: var(--altura-header);
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-white);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
  overflow-wrap: break-word;
}

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

img {
  max-width: 100%;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background: var(--primary-tint);
  color: var(--primary-dark);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1100;
  padding: 0.6rem 1rem;
  background: var(--primary-action);
  color: var(--bg-white);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease-out);
}

.skip-link:focus {
  transform: none;
}

main:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--primary-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================
   LAYOUT HELPERS
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin: 0.5rem auto 0;
  border-radius: 100px;
  background: var(--primary);
}

/* Revelar ao rolar: só ativo com JS, o conteúdo nasce visível sem ele.
   O estado escondido é o primeiro quadro da entrada feita por element.animate (main.js); sem
   transição aqui, para o CSS não disputar com o animate nem com o hover dos cards. */
.js .reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(4px);
}

.js .section-title.reveal:not(.is-in) {
  transform: none;
}

/* O traço do título se estende quando ele termina de entrar */
.js .section-title::after {
  transform: scaleX(0);
  transition: transform 0.6s var(--ease-out);
}

.js .section-title.is-in::after {
  transform: scaleX(1);
}

/* Brilho que segue o ponteiro: main.js grava --mx e --my e põe tem-brilho só com hover fino e
   sem movimento reduzido. No hero o brilho fica sobre o fundo e abaixo do conteúdo; no card fica
   abaixo do conteúdo (z-index -1 dentro do card isolado). A mistura é baixa de propósito: com 4%
   de violeta sobre o branco do card o texto --text-muted fica em 4,53:1, e o hero usa 3% porque
   o fundo dele já é um pouco mais escuro que o branco. */
.hero::after,
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}

.hero::after {
  z-index: 0;
  background: radial-gradient(
    circle 24rem at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--primary) 3%, transparent),
    transparent 70%
  );
}

.project-card::before {
  z-index: -1;
  background: radial-gradient(
    circle 16rem at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--primary) 4%, transparent),
    transparent 70%
  );
  transition-duration: 0.3s;
}

.hero.tem-brilho:hover::after,
.project-card.tem-brilho:hover::before {
  opacity: 1;
}

.section-subtitle {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================
   HEADER
   ============================================ */
header {
  background: var(--bg-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--transition);
}

header.is-scrolled {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

header .container {
  padding: 0.4rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  column-gap: 2rem;
}

nav ul li a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color var(--transition);
  position: relative;
  display: inline-block;
  padding: 0.6rem 0;
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 0.45rem;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

nav ul li a:hover,
nav ul li a.is-active {
  color: var(--primary-dark);
}

nav ul li a:hover::after,
nav ul li a:focus-visible::after,
nav ul li a.is-active::after {
  transform: scaleX(1);
}

/* ============================================
   BUTTON
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--primary-action);
  color: var(--bg-white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition:
    background var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
  box-shadow: 0 5px 15px var(--primary-shadow);
}

.btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 8px 24px var(--primary-shadow-hover);
  transform: translateY(-2px);
}

.btn:active,
.project-link:not(.project-link--private):active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.1s;
}

/* ============================================
   SOCIAL ICONS (sidebar)
   ============================================ */
.social-icons {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  background: var(--bg-white);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  z-index: 999;
}

.social-icons a {
  padding: 0.9rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  border-bottom: 1px solid var(--border);
  transition:
    background var(--transition),
    color var(--transition);
}

.social-icons a:last-child {
  border-bottom: none;
}

.social-icons a:hover {
  background: var(--primary-action);
  color: var(--bg-white);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  background: url("img/background-white.png") no-repeat center / cover;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 6rem 1.5rem 3rem;
  position: relative;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: 860px;
  width: 100%;
  /* Acima do brilho do ponteiro (.hero::after) */
  position: relative;
  z-index: 1;
}

.hero-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary);
  box-shadow: 0 8px 32px var(--primary-shadow);
  flex-shrink: 0;
}

.hero-text {
  text-align: left;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
}

.hero p {
  font-size: 1.1rem;
  max-width: 560px;
  margin-bottom: 2.5rem;
  color: var(--text-muted);
}

.hero-mark {
  color: var(--text);
  font-weight: 600;
  background: linear-gradient(var(--primary), var(--primary)) no-repeat left
    bottom / 100% 3px;
  padding-bottom: 2px;
}

/* Entrada do hero: a foto abre em círculo, o texto entra
   desfocado e o traço sob "Cloud e DevOps" se desenha por último */
.hero-photo {
  animation: photo-open 0.8s var(--ease-out) backwards;
}

.hero h1,
.hero p,
.hero .btn {
  animation: text-in 0.7s var(--ease-out) backwards;
}

.hero h1 {
  animation-delay: 0.25s;
}

.hero p {
  animation-delay: 0.4s;
}

.hero .btn {
  animation-delay: 0.55s;
}

.hero-mark {
  animation: mark-draw 0.7s var(--ease-out) 1s backwards;
}

@keyframes photo-open {
  from {
    clip-path: circle(0% at 50% 50%);
    transform: scale(1.08);
  }
  to {
    clip-path: circle(75% at 50% 50%);
    transform: scale(1);
  }
}

@keyframes text-in {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

@keyframes mark-draw {
  from {
    background-size: 0% 3px;
  }
}

/* ============================================
   INTRO SECTION cinza claro
   ============================================ */
.intro-section {
  background: var(--bg-alt);
  padding: 80px 1.5rem 60px;
  border-top: 1px solid var(--border);
}

.intro-section .section-subtitle {
  margin-bottom: 0;
}

/* ============================================
   ABOUT SECTION branco
   ============================================ */
.about-section {
  background: var(--bg-alt);
  padding: 80px 1.5rem;
}

.about-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3rem;
}

.about-text {
  flex: 1 1 320px;
  min-width: 0;
}

.about-text h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text);
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.about-text a:not(.btn) {
  color: var(--primary-dark);
  text-decoration: underline;
  transition: color var(--transition);
}

.about-text a:not(.btn):hover {
  color: var(--primary-deep);
}

.about-text .btn {
  margin-top: 1.5rem;
  text-decoration: none;
}

/* Highlights column */
.about-image-col {
  flex: 1 1 280px;
  display: flex;
  align-items: flex-start;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 100%;
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  transition: box-shadow var(--transition);
}

.highlight-item:hover {
  box-shadow: var(--card-shadow);
}

.highlight-item i {
  font-size: 1.3rem;
  color: var(--primary);
  margin-top: 2px;
  flex-shrink: 0;
}

.highlight-item div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.highlight-item strong {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
}

.highlight-item span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================
   SKILLS SECTION cinza claro
   ============================================ */
.skills-section {
  background: var(--bg-white);
  padding: 80px 1.5rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
  max-width: 920px;
  margin: 0 auto;
}

.skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1.25rem 0.5rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  text-align: center;
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.skill img,
.skill i {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.skill i {
  font-size: 2.3rem;
  line-height: 44px;
  color: var(--primary);
}

.skill span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.skill:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 10px 24px var(--primary-shadow);
}

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 0.75rem;
  }

  .skill {
    padding: 1rem 0.4rem;
  }

  .skill span {
    font-size: 0.78rem;
  }

  .skill img,
  .skill i {
    width: 36px;
    height: 36px;
  }

  .skill i {
    font-size: 1.9rem;
    line-height: 36px;
  }
}

/* ============================================
   PROJECTS SECTION cinza claro
   Os projetos de destaque vêm primeiro e maiores. O card reage ao hover e, igual, ao foco de
   qualquer elemento dele (:focus-within). Só o transform transiciona; a sombra troca no ato.
   O preview nasce como poster estático e main.js troca para o animado no hover ou no foco.
   ============================================ */
.projects {
  background: var(--bg-alt);
  padding: 80px 1.5rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

/* ============================================
   PROJECT CARD
   ============================================ */
.project-card {
  position: relative;
  isolation: isolate;
  min-width: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition);
}

.project-card:hover,
.project-card:focus-within {
  transform: translateY(-6px);
  box-shadow:
    var(--card-shadow-hover),
    0 0 0 1px var(--primary),
    0 5px 15px var(--primary-shadow);
}

/* Preview: poster estático, animado só no hover ou no foco */
.project-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-tint) 0%, var(--bg-alt) 100%);
  border-bottom: 1px solid var(--border);
}

.project-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s var(--ease-out);
}

.project-card:hover .project-preview,
.project-card:focus-within .project-preview {
  transform: scale(1.03);
}

.project-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.project-card-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.project--destaque .project-card-body h3 {
  font-size: 1.4rem;
}

.project-card-body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}

.project-card-body code {
  background: var(--bg-alt);
  border-radius: 4px;
  padding: 0 4px;
  font-size: 0.9rem;
}

/* Tech tags: não são ação, só acompanham o estado do card com a borda violeta */
.project-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
}

.project-tags li {
  max-width: 100%;
  background: var(--primary-tint);
  color: var(--primary-dark);
  border: 1px solid var(--primary-tint);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  overflow-wrap: anywhere;
}

.project-card:hover .project-tags li,
.project-card:focus-within .project-tags li {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
}

/* Repo button */
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  margin-top: 0.25rem;
  padding: 0.6rem 1.2rem;
  background: var(--primary-action);
  color: var(--bg-white);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  align-self: flex-start;
  transition:
    background var(--transition),
    transform var(--transition);
}

.project-link:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* Selo do repositório privado: texto, não ação; não reage ao ponteiro */
.project-link--private,
.project-link--private:hover {
  background: var(--text-muted);
  cursor: default;
  transform: none;
}

/* Tablet: o destaque ocupa a linha inteira, com o preview ao lado do texto */
@media (min-width: 48rem) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }

  .project--destaque {
    grid-column: span 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  /* O preview mantém 16:9 no alto da coluna em vez de esticar até a altura do texto */
  .project--destaque .project-media {
    align-self: start;
    border-bottom: 0;
  }
}

/* Desktop: os dois destaques lado a lado (3 de 6 colunas), os demais em três (2 de 6) */
@media (min-width: 64rem) {
  .projects-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .project-card {
    grid-column: span 2;
  }

  .project--destaque {
    grid-column: span 3;
    display: flex;
  }

  .project--destaque .project-media {
    align-self: stretch;
    border-bottom: 1px solid var(--border);
  }
}

/* ============================================
   CONTACT SECTION branco
   ============================================ */
.contact-section {
  background: var(--bg-white);
  padding: 80px 1.5rem;
  border-top: 1px solid var(--border);
}

/* Quatro canais: uma coluna no celular, 2×2 no tablet e os quatro lado a lado no desktop */
.contact-list {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  max-width: 1040px;
  margin: 0 auto;
}

@media (min-width: 40rem) {
  .contact-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.contact-link {
  /* O endereço mede a largura do cartão (cqi) para nunca quebrar no meio */
  container-type: inline-size;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.75rem;
  row-gap: 0.25rem;
  align-items: center;
  align-content: center;
  height: 100%;
  min-height: 2.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: transform var(--transition);
}

/* Coluna do ícone com largura fixa: o nome do canal começa na mesma posição em todos os cartões */
.contact-link i {
  display: flex;
  justify-content: center;
  width: 1.75rem;
  font-size: 1.4rem;
  color: var(--primary-dark);
}

.contact-rede {
  font-weight: 700;
}

/* O endereço ocupa a linha inteira abaixo do canal. O mais longo (linkedin.com/in/wagner-kauan)
   mede cerca de 17,4 em em Poppins; 5,6cqi reduz a letra só quando o cartão é estreito demais
   para ele caber numa linha, como em 320 px. Com os quatro cartões lado a lado (80rem ou mais) o
   tamanho é fixo, definido no media query dessa faixa. */
.contact-texto {
  grid-column: 1 / -1;
  font-size: min(0.88rem, 5.6cqi);
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

/* Celular: menos respiro lateral para o endereço ter mais espaço em 320 px */
@media (max-width: 30rem) {
  .contact-link {
    padding-inline: 1rem;
  }
}

/* Desktop largo: os quatro lado a lado, com o ícone acima do texto. A lista usa toda a largura
   do container e o cartão tem menos respiro lateral, para o endereço mais longo caber numa linha
   com 0,8rem; antes de 80rem fica o 2×2, em que ele cabe no tamanho cheio. */
@media (min-width: 80rem) {
  .contact-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: none;
  }

  .contact-link {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    padding-inline: 0.75rem;
  }

  .contact-link i {
    margin-bottom: 0.5rem;
  }

  .contact-texto {
    font-size: 0.8rem;
  }
}

.contact-link:hover,
.contact-link:focus-visible {
  background: var(--bg-white);
  border-color: var(--primary);
  box-shadow: var(--card-shadow);
  transform: translateY(-2px);
}

.contact-link:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.1s;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-night);
  color: var(--border);
  padding: 60px 1.5rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-nome {
  font-size: 0.9rem;
  color: var(--text-on-dark);
}

.footer-social {
  list-style: none;
  display: flex;
  gap: 0.5rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid color-mix(in srgb, var(--text-on-dark) 40%, transparent);
  border-radius: var(--radius-sm);
  color: var(--text-on-dark);
  font-size: 1.15rem;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  background: var(--primary-action);
  border-color: var(--primary-action);
  color: var(--bg-white);
}

/* No fundo escuro o anel de foco usa a cor clara do rodapé */
.footer-social a:focus-visible {
  outline-color: var(--text-on-dark);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    text-align: center;
  }

  .hero-photo {
    width: 170px;
    height: 170px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  nav ul {
    column-gap: 1rem;
  }

  nav ul li a {
    font-size: 0.85rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .about-content {
    flex-direction: column;
    flex-wrap: nowrap;
  }

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

  .social-icons {
    top: auto;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
    border-radius: var(--radius-sm);
  }

  .social-icons a {
    border-bottom: none;
    border-right: 1px solid var(--border);
    padding: 0.75rem 1rem;
  }

  .social-icons a:last-child {
    border-right: none;
  }

  /* O .container já tem padding lateral; evita margem dupla no mobile */
  .about-section,
  .skills-section,
  .projects,
  .contact-section,
  .footer {
    padding-left: 0;
    padding-right: 0;
  }

  /* Espaço para a barra fixa de redes sociais não cobrir o rodapé */
  .footer {
    padding-bottom: 100px;
  }

}

@media (max-width: 480px) {
  :root {
    --altura-header: 6rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  nav ul {
    column-gap: 0.9rem;
  }

  nav ul li a {
    font-size: 0.78rem;
  }
}

/* ============================================
   MOVIMENTO REDUZIDO
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-photo,
  .hero h1,
  .hero p,
  .hero .btn {
    animation: fade-in 0.4s ease backwards;
  }

  .hero-mark {
    animation: none;
  }

  /* Rede de segurança: nenhuma transição além de opacity, curta e sem atraso. As animações de
     CSS da página são só as do hero, trocadas acima por um fade de opacity. */
  *,
  *::before,
  *::after {
    transition-property: opacity !important;
    transition-duration: 140ms !important;
    transition-delay: 0s !important;
  }

  /* Sem animate em main.js: o elemento só recebe is-in e entra por fade */
  .js .reveal {
    transition: opacity 140ms var(--ease-out);
  }

  .js .reveal:not(.is-in) {
    transform: none;
    filter: none;
  }

  .js .section-title::after {
    transform: none;
  }

  /* O estado muda (cor, sombra, borda), nada se desloca */
  .btn:hover,
  .btn:active,
  .project-link:hover,
  .project-link:not(.project-link--private):active,
  .skill:hover,
  .project-card:hover,
  .project-card:focus-within,
  .project-card:hover .project-preview,
  .project-card:focus-within .project-preview,
  .contact-link:hover,
  .contact-link:focus-visible,
  .contact-link:active {
    transform: none;
  }

  @keyframes fade-in {
    from {
      opacity: 0;
    }
  }
}
