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

:root {
  --bg: #f7f4ec;          /* creme */
  --bg-soft: #f1ede2;     /* creme mais fechado */
  --card: #fffdf8;        /* quase branco */
  --line: rgba(38, 34, 26, 0.12);
  --line-soft: rgba(38, 34, 26, 0.07);
  --text: #201d17;        /* tinta quente */
  --muted: #6d675b;       /* cinza quente */
  --accent: #b07d1a;      /* dourado EX (legível sobre creme) */
  --accent-bright: #daa521; /* dourado da marca para detalhes maiores */
  --accent-soft: rgba(176, 125, 26, 0.1);
  --radius: 16px;
  --maxw: 1080px;
  --shadow: 0 22px 50px -30px rgba(60, 44, 28, 0.4);
}

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-name, .rotator {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 600;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* palavras em destaque — sóbrio, cor de acento */
.grad-text { color: var(--accent); }
.name-nowrap { white-space: nowrap; }

/* quebra de linha que só aparece no mobile */
.only-mobile { display: none; }

/* ===== BACKGROUND: papel sutil ===== */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg);
}
.blob { display: none; }          /* removido para o visual limpo */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000 30%, transparent 100%);
  opacity: 0.6;
}
.spotlight { display: none; }     /* sem spotlight no tema claro */

/* ===== NAV ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px;
}
.nav::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(247, 244, 236, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s;
}
.nav.scrolled::after { opacity: 1; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 1.5px solid var(--accent-bright);
  background: var(--bg-soft);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-size: 16px; }
.nav-links { display: flex; gap: 30px; }
.nav-links a {
  font-size: 14.5px;
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: -5px;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width 0.25s;
}
.nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* botão hambúrguer (só aparece no mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  cursor: pointer;
  z-index: 60;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.2s;
}
.nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--text);
  color: var(--bg);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--text); transform: translateY(-2px); }
.btn-nav { padding: 10px 18px; background: transparent; border-color: var(--line); }
.btn-nav:hover { border-color: var(--text); }
.btn-big { padding: 16px 34px; font-size: 16px; margin-top: 12px; }

/* ===== HERO ===== */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 76px) clamp(20px, 5vw, 24px) 44px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(36px, 5vw, 56px);
  align-items: center;
  min-height: 80vh;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 26px;
}
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4a9d5b;
  box-shadow: 0 0 0 0 rgba(74,157,91,0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74,157,91,0.5); }
  70% { box-shadow: 0 0 0 9px rgba(74,157,91,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,157,91,0); }
}
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 600; margin-bottom: 24px; }
.rotator {
  color: var(--accent);
  position: relative;
  border-right: 2px solid var(--accent);
  padding-right: 4px;
  animation: caret 0.8s steps(1) infinite;
}
@keyframes caret { 50% { border-color: transparent; } }
.hero-sub { color: var(--muted); font-size: 1.08rem; max-width: 520px; margin-bottom: 34px; }
.hero-sub strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 42px; }
.hero-stats { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.hero-stats > div:not(.divider) { display: flex; flex-direction: column; }
.hero-stats b { font-family: "Space Grotesk"; font-size: 1.1rem; }
.hero-stats span { font-size: 12.5px; color: var(--muted); }
.divider { width: 1px; height: 32px; background: var(--line); }

/* HERO VISUAL — moldura minimalista deslocada */
.hero-visual { display: grid; place-items: center; }
.avatar-ring {
  position: relative;
  width: 320px; height: 340px;
  display: grid;
  place-items: center;
}
.avatar-ring::before {
  content: "";
  position: absolute;
  width: 300px; height: 300px;
  top: 18px; left: 22px;
  border: 1.5px solid var(--accent-bright);
  border-radius: 50%;
  z-index: 0;
}
.avatar-card {
  position: relative;
  width: 300px; height: 300px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  z-index: 1;
}
.avatar-img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.15) contrast(1.02); }
.avatar-placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  text-align: center;
  padding: 20px;
}
.avatar-placeholder span { font-size: 42px; }
.avatar-placeholder code { color: var(--accent); font-size: 12px; }
.chip {
  position: absolute;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
  z-index: 2;
  animation: bob 4.5s ease-in-out infinite;
}
.chip-1 { top: 4%; left: -10px; }
.chip-2 { top: 44%; right: -22px; animation-delay: -1.5s; }
.chip-3 { bottom: 4%; left: 10%; animation-delay: -3s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ===== MARQUEE ===== */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  margin: 24px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  gap: 26px;
  width: max-content;
  animation: scroll 32s linear infinite;
  font-family: "Space Grotesk";
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--muted);
}
.marquee-track span:nth-child(even) { color: var(--accent); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ===== SECTIONS ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(56px, 8vw, 92px) clamp(20px, 5vw, 24px); }
.section-head { margin-bottom: 48px; text-align: left; }
.section-kicker {
  display: inline-block;
  font-family: "Space Grotesk";
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 600; }
.section-desc { color: var(--muted); margin: 12px 0 0; max-width: 520px; }

/* ===== ABOUT ===== */
.about-grid { display: block; }
.about-text { max-width: 760px; }
.about-text p { color: var(--muted); margin-bottom: 18px; font-size: 1.05rem; }
.about-text strong { color: var(--text); font-weight: 600; }
.about-signature { color: var(--text) !important; font-weight: 500; }
.about-cards { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.about-cards li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.25s, border-color 0.25s;
}
.about-cards li:hover { transform: translateY(-4px); border-color: var(--text); }
.ac-icon { font-size: 22px; }
.about-cards h4 { margin: 12px 0 4px; font-size: 15px; font-weight: 600; }
.about-cards p { color: var(--muted); font-size: 14px; }
.about-cards a { color: var(--accent); }

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.skill-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: left;
  transition: transform 0.25s, border-color 0.25s;
}
.skill-card:hover { transform: translateY(-5px); border-color: var(--text); }
.skill-card > span { font-size: 26px; display: block; margin-bottom: 14px; }
.skill-card h4 { font-size: 16px; margin-bottom: 4px; font-weight: 600; }
.skill-card p { color: var(--muted); font-size: 13.5px; }

/* ===== PROJECTS ===== */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(275px, 1fr)); gap: 20px; }
.project-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  min-height: 205px;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--text);
  box-shadow: var(--shadow);
}
.pc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.pc-lang {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.pc-arrow { font-size: 19px; color: var(--muted); transition: transform 0.25s, color 0.25s; }
.project-card:hover .pc-arrow { transform: translate(3px, -3px); color: var(--accent); }
.project-card h3 { font-size: 1.2rem; margin-bottom: 10px; font-weight: 600; }
.project-card > p { color: var(--muted); font-size: 14.5px; flex: 1; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pc-tags span {
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
}
.projects-cta { text-align: center; margin-top: 40px; }

/* ===== CONTACT ===== */
.contact { text-align: center; }
.contact-inner { max-width: 760px; margin: 0 auto; }
.contact h2 { font-size: clamp(2rem, 5vw, 2.9rem); margin: 8px 0 14px; font-weight: 600; }
.contact > .contact-inner > p { color: var(--muted); font-size: 1.1rem; margin-bottom: 40px; }
.socials {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}
.social {
  display: grid;
  place-items: center;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  transition: transform 0.25s, border-color 0.25s, color 0.25s, background 0.25s;
}
.social:hover { transform: translateY(-5px); border-color: var(--text); }
.s-icon {
  display: grid;
  place-items: center;
  color: inherit;
  transition: transform 0.25s;
}
.social:hover .s-icon { transform: scale(1.1); }
.social-wa:hover { color: #1faa54; border-color: #1faa54; }
.social-in:hover { color: #0a66c2; border-color: #0a66c2; }
.social-gh:hover { color: #111; border-color: #111; }
.social-ig:hover { color: #c13584; border-color: #c13584; }

/* ===== FOOTER ===== */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}
.heart { color: var(--accent); }
.to-top { color: var(--muted); transition: color 0.2s; }
.to-top:hover { color: var(--text); }

/* ===== REVEAL ANIMATION ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

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

/* Desktop grande / monitores largos: cresce o container e a base tipográfica */
@media (min-width: 1400px) {
  :root { --maxw: 1200px; }
  body { font-size: 17px; }
}

/* Notebooks / telas médias (até ~1100px) */
@media (max-width: 1100px) {
  .hero { gap: 40px; }
  .avatar-ring { width: 290px; height: 310px; }
  .avatar-ring::before { width: 272px; height: 272px; }
  .avatar-card { width: 272px; height: 272px; }
}

/* Tablets e abaixo (até 820px): empilha o hero e ativa o menu mobile */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
    min-height: auto;
    gap: 32px;
  }
  /* hero-text alinhado à esquerda: as duas linhas do título batem no mesmo ponto */
  .hero-text { order: 2; text-align: left; }
  .hero-visual { order: 1; }
  .only-mobile { display: inline; }
  .hero h1 { text-wrap: pretty; line-height: 1.16; }
  .hero-sub { margin-left: 0; margin-right: 0; }
  .hero-cta, .hero-stats { justify-content: flex-start; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }

  /* nav: mostra o hambúrguer (o botão CTA continua na barra) */
  .nav-toggle { display: flex; }

  /* painel do menu mobile */
  .nav-links {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(78vw, 320px);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    padding: 90px 32px 40px;
    background: var(--card);
    border-left: 1px solid var(--line);
    box-shadow: -20px 0 50px -30px rgba(60,44,28,0.5);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 55;
  }
  .nav.menu-open .nav-links { transform: translateX(0); }
  .nav-links a { font-size: 1.15rem; padding: 8px 0; color: var(--text); }
  .nav-links a::after { display: none; }

  /* fundo escurecido atrás do menu */
  .nav.menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(32, 29, 23, 0.35);
    backdrop-filter: blur(2px);
    z-index: 54;
  }
}

/* Celulares (até 560px): conteúdo mais compacto e legível */
@media (max-width: 560px) {
  body { font-size: 15.5px; line-height: 1.6; }
  .hero { padding-top: 26px; gap: 26px; }
  .hero h1 { font-size: clamp(1.7rem, 7.5vw, 2.15rem); margin-bottom: 16px; }
  .hero-sub { font-size: 0.97rem; margin-bottom: 26px; max-width: 420px; }
  .hero-cta { margin-bottom: 28px; }

  /* foto menor para não dominar a tela */
  .avatar-ring { width: 100%; max-width: 220px; height: 236px; }
  .avatar-ring::before { width: 198px; height: 198px; top: 14px; left: 50%; transform: translateX(-50%); }
  .avatar-card { width: 198px; height: 198px; }
  .chip { font-size: 11.5px; padding: 6px 11px; }
  .chip-1 { left: -2px; }
  .chip-2 { right: -2px; }
  .chip-3 { left: 4%; }

  .marquee { padding: 12px 0; margin: 16px 0; }
  .marquee-track { font-size: 0.98rem; gap: 18px; }

  .section-head { margin-bottom: 32px; }
  .section-head h2 { font-size: clamp(1.55rem, 6.5vw, 1.95rem); }
  .about-text p { font-size: 0.98rem; }
  .about-cards { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .skill-card { padding: 20px 14px; }
  .skill-card > span { font-size: 23px; margin-bottom: 10px; }
  .project-card { padding: 22px; min-height: 0; }
  .hero-stats { gap: 16px; }
  .hero-stats b { font-size: 1rem; }
  .hero-cta .btn { flex: 1; }
  .contact > .contact-inner > p { font-size: 1rem; }
  .footer { flex-direction: column; text-align: center; }
}

/* Celulares pequenos (S25 ~360px, iPhone ~390px) */
@media (max-width: 400px) {
  .brand-name { display: none; }
  .hero h1 { font-size: 1.62rem; }
  .hero-sub { font-size: 0.95rem; }
  .hero-stats { flex-wrap: wrap; justify-content: flex-start; gap: 12px 18px; }
  .hero-stats .divider { display: none; }
  .about-cards { grid-template-columns: 1fr; max-width: 300px; }
  .socials { grid-template-columns: 1fr; }
  .chip-2 { display: none; }
  .section { padding: 46px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
