/* ===== Tokens ===== */
:root {
  --bg: #151A22;
  --surface: #344352;
  --surface-dark: #202832;
  --text: #DDE5E9;
  --text-secondary: #89949E;
  --text-muted: #67747F;
  --accent: #31C8F2;   /* destaque */
  --cta: #E85C78;      /* secundária / CTA */
  --on-accent: #151A22;
  --border: rgba(221, 229, 233, 0.12);
  --radius: 10px;
  --font-display: "Montserrat", sans-serif;
  --font-body: "Montserrat", sans-serif;
  --font-serif: "Bitter", serif;
  --max-w: 1080px;
}

::selection { background: var(--accent); color: var(--on-accent); }

.accent-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
  color: var(--accent);
}

.main-nav a,
.contact-freelance a {
  position: relative;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 0.25s ease;
}
.main-nav a:hover,
.main-nav a:focus-visible,
.contact-freelance a:hover,
.contact-freelance a:focus-visible {
  background-size: 100% 1px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
  @media (max-width: 640px) {
    html, body {
      overflow-x: hidden;
    }
  }

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.15; margin: 0 0 0.6em; }
h2 { font-size: clamp(1.4rem, 3vw, 2.5rem); }
h3 { font-size: 1rem; font-weight: 500; margin-bottom: 0.5em; }
p { margin: 0 0 1em; color: var(--text-secondary); }
a { color: inherit; }
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section-intro { max-width: 690px; }

/* ===== Accessibility ===== */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--cta);
  color: var(--on-accent);
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  z-index: 100;
  font-weight: 500;
}
.skip-link:focus { left: 0; top: 0; }
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== Motion ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-anim { opacity: 0; animation: fadeInUp 0.7s ease forwards; }
.hero .eyebrow.hero-anim { animation-delay: 0.05s; }
.hero h1.hero-anim { animation-delay: 0.15s; }
.hero .hero-sub.hero-anim { animation-delay: 0.28s; }
.hero .hero-actions.hero-anim { animation-delay: 0.4s; }
.hero .hero-photo.hero-anim { animation-delay: 0.3s; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@keyframes reveal-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modern browsers (~84% global support in 2026): scroll-driven reveal in pure CSS,
   no JS, runs on the compositor thread. JS IntersectionObserver is the fallback
   for the rest — see script.js feature detection. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal-up 0.6s ease both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-anim { animation: none; opacity: 1; }
  .reveal { transition: none; opacity: 1; transform: none; }
}

.site-header { transition: box-shadow 0.25s ease, border-color 0.25s ease; }
.site-header.is-scrolled { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); border-bottom-color: transparent; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  min-height: 44px;
  border: 0.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, border-color 0.2s ease;
}
.btn i { font-size: 16px; }
.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.32);
}
.btn:active { transform: translateY(0); filter: brightness(0.96); box-shadow: none; }
.btn-outline:hover,
.btn-outline-dark:hover { border-color: var(--accent); }
.btn-cta { background: var(--cta); color: var(--on-accent); }
.btn-outline { border-color: var(--text); color: var(--text); }
.btn-dark { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn-outline-dark { border-color: var(--on-accent); color: var(--on-accent); }
.btn-small { padding: 8px 16px; min-height: 36px; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(21, 26, 34, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 0.5px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 17px 24px; }
.logo img { height: 40px; width: auto; }
.nav-toggle { background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; display: block; }
  @media (max-width: 640px) {
    .nav-toggle {
      position: relative;
      z-index: 30;
    }
  }

.main-nav {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(280px, 80vw);
  background: var(--surface);
  border-left: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 80px 24px 24px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
  @media (max-width: 640px) {
    .main-nav {
      position: fixed;
      inset: 0 0 0 auto;
      height: 100vh;
      height: 100dvh;
      width: min(280px, 80vw);
      z-index: 25; /* abaixo do botão, acima do resto do header */
    }
  }

.main-nav.is-open { transform: translateX(0); }
.main-nav a { text-decoration: none; font-size: 15px; }
.lang-toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.lang-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 13px; padding: 2px 4px; }
.lang-btn.is-active { color: var(--accent); font-weight: 500; }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .main-nav {
    position: static; width: auto; background: none; border: none;
    flex-direction: row; align-items: center; padding: 0; transform: none; gap: 28px;
  }
}

/* ===== Hero ===== */
.hero { position: relative; padding: 0; overflow: visible; background-color: #202832; }
  @media (max-width: 640px) {
    .hero {padding: 30px 10px 10px 0;}
  }
.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}
  @media (min-width: 860px) {
    .hero-grid { grid-template-columns: 1.05fr 0.95fr; }
  }
  @media (max-width: 640px) {
    .hero-grid { gap: 10px; }
  }
.hero-content { text-align: left; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--accent); margin-bottom: 12px; }
.hero h1 { font-size: clamp(1.8rem, 4.2vw, 2.6rem); max-width: 540px; }
.hero-sub { max-width: 440px; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-photo { display: flex; justify-content: center; }
.hero-photo-stage {
  position: relative;
  width: 100%;
  max-width: 430px;
  aspect-ratio: 4 / 5;
}
  @media (max-width: 640px) {
    .hero-photo-stage {
      aspect-ratio: 4 / 4;
    }
  }
.hero-photo-box { position: absolute; border-radius: 20px; }
.hero-photo-box-1 {   
  position: absolute;
  left: 48%;
  top: 43px;
  width: 40%;
  height: auto;
  opacity: 25% !important;
 }
  @media (max-width: 640px) {
    .hero-photo-box-1 { 
      left: 5%;
      top: 454px;
      width: 90%;
    }
  }

.hero-photo-box-2 { inset: 0 18px 18px 0; background: var(--surface); }
.hero-photo-img {
  position: absolute;
  z-index: 2;
  left: 55%;
  top: 15px;
  width: 100%;
  height: auto;
  transform: translateX(-50%);
}
  @media (max-width: 640px) {
    .hero-photo-img { 
      position: absolute;
      z-index: 2;
      left: 55%;
      top: 20px;
      width: 80%;
      height: auto;
      transform: translateX(-50%);}
    }

/* ===== Sections ===== */
.section { padding: 56px 0; }
.section-alt { background: var(--surface); }
.section-compact { padding: 36px 0; }

/* Projetos */
.project-grid h2 { color: var(--accent); text-transform: uppercase; }
.project-grid { background: url(../assets/bg_grid.png); background-size: cover; background-position: center; }

/* Sobre */
.about-grid h2 { color: var(--cta); text-transform: uppercase; }
.about-grid { display: grid; gap: 24px; }
.about-photo { width: 180px; height: 225px; border-radius: 12px; background: var(--surface); margin-bottom: 14px; overflow: hidden; border: 2px solid #67747F;}
.stat { margin: 0; line-height: 1.2; }
.stat-num { display: block; font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: 2rem; color: var(--accent); }
.stat-label { display: block; font-size: 11px; color: var(--text-muted); }
@media (min-width: 640px) { .about-grid { grid-template-columns: 180px 1fr; align-items: start; } }

/* Competências */
.skills h2 { text-transform: uppercase; }
.skills-grid { display: grid; gap: 14px; margin-bottom: 20px; }
@media (min-width: 640px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .skills-grid { grid-template-columns: repeat(3, 1fr); } }
.skill-group { background: #0E1218; border: 0.5px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.skill-group h3 { color: var(--text); }
.skill-group p { font-size: 13px; margin: 0; }
.skills-footnote { font-size: 12px; color: var(--text-muted); border-top: 0.5px solid var(--border); padding-top: 16px; margin: 0; }

/* Projetos */
.projects-featured { display: grid; gap: 12px; margin-bottom: 24px; }
@media (min-width: 640px) { .projects-featured { grid-template-columns: 1fr; } }
.project-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.project-card summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 20px 30px;
}
.project-card summary::-webkit-details-marker { display: none; }
.project-title { display: block; font-size: 22px; font-weight: 600; color: var(--text); }
.project-title-comp { display: block; font-size: 15px; font-weight: 600; color: var(--text); margin-top: 10px; }
.project-sub { display: block; font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.project-sub-comp { display: block; font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.project-sub i { font-size: 13px; color: var(--cta) !important; padding: 0 3px 0 0; }
.project-card summary i { color: var(--accent); transition: transform 0.2s ease; }
.project-card[open] summary i { transform: rotate(180deg); }
.project-body { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.project-body p { font-size: 14px; padding: 25px 30px 25px 30px; margin: 0; border-top: 0.5px solid var(--border); color: #DDE5E9; }

.projects-others-label { font-size: 16px; color: var(--accent); margin-bottom: 10px; }
.projects-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 2fr 2fr; gap: 15px;}
  @media (max-width: 640px) {
    .projects-list { grid-template-columns: 1fr; gap: 10px; }
  }

.projects-list li {
  font-size: 14px; 
  color: var(--text-secondary)80; 
  padding: 20px; 
  background: #34435270;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(5px); /* Desfoque do fundo */
}
.projects-list li img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  overflow: hidden;
}
.projects-list li:last-child { border-bottom: 0.5px solid var(--border); }
.tag-projects {border: #E85C78 solid 0.5px; border-radius: 12px; padding: 4px 9px;}

/* Experiência */
.exp-timeline { background: url(../assets/bg_grid2.png); background-size: cover; background-position: center; }
.exp-timeline h2 { color: var(--cta); text-transform: uppercase; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.timeline li { position: relative; padding-left: 20px; }
.dot { position: absolute; left: 0; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); }
.dot-accent { background: var(--accent); }
.timeline-role { color: var(--text); font-size: 16px; font-weight: 500; margin: 0 0 2px; }
.timeline-date { font-size: 14px; color: var(--text-muted); margin: 0 0 6px; }
.timeline-desc { font-size: 15px; margin: 0; }

/* Formação */
.education h2 { color: var(--accent); text-transform: uppercase; }
.education-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; font-size: 15px; color: var(--text); }
.education-list li {
  background: #0E1218;
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 20px 30px;
}

.education-ongoing { color: var(--accent); font-size: 13px; margin: 0; }

/* Contato */
.contact { background: var(--cta); color: var(--on-accent); background-image: url(../assets/logo-a6-linhas.svg); background-size: cover; background-position: center;}
.contact h2 { color: var(--on-accent); text-transform: uppercase; }
.contact-actions { display: flex; gap: 12px;  flex-wrap: wrap; margin-top: 20px; }
.contact-freelance { font-size: 16px; color: var(--on-accent); margin: 0; }
.contact-freelance a { text-decoration: underline; font-weight: 500; color: #4A0F1D; }
.contact-grid { padding: 30px; display: grid; grid-template-columns: 2fr 2fr; gap: 40px; background-color: #DDE5E935; backdrop-filter: blur(10px); border-radius: 10px;}
  @media (max-width: 640px) {
    .contact-grid { grid-template-columns: 1fr; gap: 10px; }
  }

.grid-contatos ul { list-style: none; margin: 0 0 0 30px; padding: 0;}
  @media (max-width: 640px) {
    .grid-contatos ul { margin: 20px 0 0 0; padding: 0;}
  }

.grid-contatos ul li { margin-bottom: 20px; font-weight: 400; align-items: center; display: flex;}
  @media (max-width: 640px) {
    .grid-contatos ul li { margin: 20px 0 0 0; padding: 0; font-size: 13px;}
  }
.grid-contatos ul li i { background-color: #151A22; color: #DDE5E9; border-radius: 20px; padding: 5px; font-size: 20px; margin-right: 10px;}

/* Footer */
.site-footer { padding: 32px 24px; text-align: center; font-size: 12px; color: var(--text-muted); border-top: 0.5px solid var(--border); }
.site-footer a { color: var(--text-muted); }
.footer-logo { margin-bottom: 20px;}

/* Icons */
.skills-grid .ph-light {color: #E85C78; font-size: 40px;}