/* =========================================================
   Portfólio TI — folha de estilos principal
   Edite as cores base em :root para mudar a identidade.
   ========================================================= */

:root {
  --bg: #0b0f14;
  --bg-alt: #0f151d;
  --surface: #131b25;
  --surface-2: #18222e;
  --border: #22303f;
  --text: #e8eef6;
  --muted: #93a4b8;
  --accent: #38bdf8;
  --accent-2: #6366f1;
  --accent-soft: rgba(56, 189, 248, .12);
  --success: #34d399;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 45px rgba(0, 0, 0, .45);
  --shadow-sm: 0 8px 20px rgba(0, 0, 0, .3);
  --maxw: 1140px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html[data-theme="light"] {
  --bg: #f6f8fb;
  --bg-alt: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f4f7fb;
  --border: #dbe3ee;
  --text: #16202b;
  --muted: #5a6b7f;
  --accent: #0ea5e9;
  --accent-2: #4f46e5;
  --accent-soft: rgba(14, 165, 233, .12);
  --shadow: 0 18px 45px rgba(19, 33, 54, .12);
  --shadow-sm: 0 8px 20px rgba(19, 33, 54, .08);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #04121c; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: .85rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), padding .3s var(--ease);
}
/* O fundo "vidro" fica numa camada propria: backdrop-filter no .site-header
   criaria um containing block e quebraria o position: fixed do menu mobile. */
.header-bg {
  position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.site-header.scrolled { border-bottom-color: var(--border); padding: .55rem 0; }

.header-inner { display: flex; align-items: center; gap: 1.25rem; justify-content: space-between; }

.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 700; }
.brand-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121c; font-size: .85rem; font-weight: 800; letter-spacing: .02em;
  box-shadow: 0 6px 18px var(--accent-soft);
}
.brand-text { font-size: 1.02rem; }

.nav ul { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  font-size: .93rem; color: var(--muted); font-weight: 500;
  position: relative; padding: .25rem 0; transition: color .2s var(--ease);
}
.nav a:not(.nav-cta)::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .25s var(--ease);
}
.nav a:hover, .nav a.active { color: var(--text); }
.nav a:hover:not(.nav-cta)::after, .nav a.active:not(.nav-cta)::after { width: 100%; }

.nav-cta {
  color: var(--text) !important;
  padding: .5rem 1rem !important;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.nav-cta:hover { border-color: var(--accent); transform: translateY(-1px); }

.header-actions { display: flex; align-items: center; gap: .4rem; }
.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 11px; border: 1px solid var(--border); background: var(--surface);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: none; }
html[data-theme="light"] .icon-moon { display: block; }
.menu-btn { display: none; }
.nav-close { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(7rem, 14vw, 10rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero-glow {
  position: absolute; top: -22rem; left: 50%; translate: -50% 0;
  width: min(1100px, 140vw); aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 62%);
  filter: blur(10px);
}
.hero-inner {
  position: relative;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
/* Sem isto o item de grid nao encolhe abaixo do min-content do conteudo
   (a janela de codigo empurra o hero para fora da tela no celular). */
.hero-inner > * { min-width: 0; max-width: 100%; }

.eyebrow {
  display: inline-flex; flex-wrap: wrap; max-width: 100%; align-items: center; gap: .5rem;
  font-size: .82rem; color: var(--muted); font-weight: 500;
  border: 1px solid var(--border); background: var(--surface);
  padding: .4rem .85rem; border-radius: 999px; margin-bottom: 1.25rem;
}
.eyebrow .dot {
  flex: none;
  width: 8px; height: 8px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 22%, transparent);
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 50% { opacity: .45; } }

.hero-title { font-size: clamp(2.3rem, 6vw, 3.9rem); font-weight: 800; margin-bottom: .6rem; overflow-wrap: break-word; }
.grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-role { font-size: clamp(1rem, 2.2vw, 1.2rem); color: var(--accent); font-weight: 600; margin-bottom: 1rem; overflow-wrap: break-word; }
.hero-pitch { color: var(--muted); max-width: 56ch; font-size: 1.02rem; overflow-wrap: break-word; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.9rem 0 1.6rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .78rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121c; box-shadow: 0 10px 28px var(--accent-soft);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px var(--accent-soft); }
.btn-ghost { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-2px); }
.btn-block { width: 100%; }

.socials { display: flex; gap: .6rem; }
.socials a {
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  font-size: .82rem; font-weight: 700; color: var(--muted); text-transform: uppercase;
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

/* Janela de código */
.hero-card { perspective: 1200px; }
.code-window {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
  transform: rotateY(-7deg) rotateX(2deg);
  transition: transform .5s var(--ease);
}
.code-window:hover { transform: none; }
.code-bar {
  display: flex; gap: .45rem; padding: .8rem 1rem;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.code-bar span { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.code-bar span:nth-child(2) { background: #febc2e; }
.code-bar span:nth-child(3) { background: #28c840; }
.code-window pre { padding: 1.2rem 1.25rem; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.code-window code { font-family: var(--mono); font-size: .84rem; line-height: 1.75; color: var(--muted); }
.c-key { color: var(--accent-2); }
.c-str { color: var(--success); }
.c-num { color: #f59e0b; }
.c-bool { color: var(--accent); }

/* Stats */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 1.5rem 1rem;
}
.stat { text-align: center; }
.stat strong {
  display: block; font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 800;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { font-size: .82rem; color: var(--muted); }

/* ---------- Seções ---------- */
.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 60ch; margin-bottom: clamp(2.2rem, 4vw, 3.2rem); }
.section-tag {
  display: inline-block; font-family: var(--mono); font-size: .78rem;
  color: var(--accent); letter-spacing: .08em; text-transform: uppercase; margin-bottom: .7rem;
}
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.section-sub { color: var(--muted); margin-top: .7rem; }

/* ---------- Sobre ---------- */
.about-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.about-text p { color: var(--muted); margin-bottom: 1rem; font-size: 1.02rem; }
.about-text strong { color: var(--text); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: .75rem; margin-top: 1.6rem; }
.facts li {
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  padding: .8rem 1rem; display: grid; gap: .1rem;
}
.fact-k { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.fact-v { font-weight: 600; font-size: .95rem; }

.about-side { display: grid; gap: 1.1rem; }
.avatar {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); padding: .5rem;
}
.avatar img { border-radius: calc(var(--radius) - 6px); width: 100%; height: auto; object-fit: cover; }
.aside-card {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  padding: 1.3rem 1.4rem;
}
.aside-card h3 { font-size: 1rem; margin-bottom: .8rem; }

.ticks { display: grid; gap: .5rem; }
.ticks li { position: relative; padding-left: 1.5rem; color: var(--muted); font-size: .93rem; }
.ticks li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  color: var(--success); font-weight: 700;
}

/* ---------- Habilidades ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(255px, 100%), 1fr)); gap: 1.1rem; }
.card {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  padding: 1.5rem; transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: var(--shadow-sm); }
.card-icon {
  display: grid; place-items: center; width: 46px; height: 46px; font-size: 1.3rem;
  border-radius: 13px; background: var(--accent-soft); margin-bottom: 1rem;
}
.card h3 { font-size: 1.05rem; margin-bottom: .9rem; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips li {
  font-size: .8rem; padding: .3rem .7rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
}
.chips.small li { font-size: .74rem; padding: .22rem .6rem; }

.bars { margin-top: clamp(2.2rem, 4vw, 3rem); display: grid; gap: 1rem; }
.bars-title { font-size: 1.05rem; margin-bottom: .3rem; }
.bar { display: grid; grid-template-columns: minmax(140px, 240px) 1fr; gap: 1rem; align-items: center; }
.bar-label { font-size: .9rem; color: var(--muted); }
.bar-track { height: 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; }
.bar-track i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1.2s var(--ease);
}

/* ---------- Timeline ---------- */
.timeline { position: relative; display: grid; gap: 1.2rem; padding-left: 1.8rem; }
.timeline::before {
  content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), transparent);
}
.timeline-item { position: relative; }
.timeline-dot {
  position: absolute; left: -1.8rem; top: 1.55rem; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.timeline-card {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  padding: 1.4rem 1.5rem; transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.timeline-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); transform: translateX(4px); }
.timeline-date {
  display: inline-block; font-family: var(--mono); font-size: .76rem; color: var(--accent);
  background: var(--accent-soft); padding: .2rem .65rem; border-radius: 999px; margin-bottom: .7rem;
}
.timeline-card h3 { font-size: 1.08rem; }
.company { color: var(--muted); font-weight: 500; }
.timeline-loc { color: var(--muted); font-size: .85rem; margin: .3rem 0 .9rem; }
.timeline-card .chips { margin-top: 1rem; }

/* ---------- Projetos ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 1.1rem; }
.project {
  display: flex; flex-direction: column; gap: .8rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 1.5rem; position: relative; overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.project::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.project:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow-sm); }
.project:hover::before { transform: scaleX(1); }
.project-top { display: flex; align-items: center; justify-content: space-between; }
.project-badge {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 600;
  color: var(--accent); border: 1px solid var(--border); border-radius: 999px; padding: .22rem .7rem;
}
.project-link { font-size: 1.1rem; color: var(--muted); transition: color .2s var(--ease), transform .2s var(--ease); }
.project-link:hover { color: var(--accent); transform: translate(2px, -2px); }
.project h3 { font-size: 1.05rem; }
.project p { color: var(--muted); font-size: .93rem; flex: 1; }

/* ---------- Formação ---------- */
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }
.col-title { font-size: 1.05rem; margin-bottom: 1rem; }
.list-cards { display: grid; gap: .75rem; }
.list-cards li {
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  padding: .95rem 1.1rem; display: grid; gap: .15rem;
  border-left: 3px solid var(--accent);
  transition: transform .25s var(--ease);
}
.list-cards li:hover { transform: translateX(4px); }
.list-cards strong { font-size: .96rem; font-weight: 600; }
.list-cards span { font-size: .84rem; color: var(--muted); }

/* ---------- Contato ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(1.5rem, 3.5vw, 3rem); align-items: start; }
.contact-info { display: grid; gap: .7rem; }
.contact-item {
  display: flex; align-items: center; gap: .95rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  padding: .9rem 1.05rem; transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.contact-item:hover { border-color: var(--accent); transform: translateX(4px); }
.ci-icon {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 12px; background: var(--accent-soft); font-size: 1.05rem;
}
.contact-item span span, .contact-item > span { display: grid; }
.contact-item strong { font-size: .92rem; }
.contact-item em { font-style: normal; font-size: .84rem; color: var(--muted); word-break: break-word; }

.contact-form {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  padding: clamp(1.3rem, 3vw, 1.9rem); display: grid; gap: 1rem;
}
.field { display: grid; gap: .4rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.field input, .field textarea {
  width: 100%; padding: .75rem .95rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-family: inherit; font-size: .95rem; resize: vertical;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field.invalid input, .field.invalid textarea { border-color: #f87171; }
.form-status { font-size: .88rem; min-height: 1.2em; }
.form-status.ok { color: var(--success); }
.form-status.err { color: #f87171; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 2.5rem 0 1.5rem; }
.footer-inner { display: grid; gap: 1.4rem; }
.footer-brand { display: flex; align-items: center; gap: .8rem; }
.footer-brand p { color: var(--muted); font-size: .86rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-nav a { color: var(--muted); font-size: .9rem; transition: color .2s var(--ease); }
.footer-nav a:hover { color: var(--accent); }
.copyright { color: var(--muted); font-size: .82rem; border-top: 1px solid var(--border); padding-top: 1.2rem; }

.to-top {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #04121c;
  box-shadow: var(--shadow-sm); font-size: 1.15rem; font-weight: 700;
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- Animações de entrada ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  /* Largura suficiente para a janela de codigo caber sem scroll horizontal
     em tablets; abaixo de 640px o pre passa a quebrar linha. */
  .hero-card { order: -1; width: 100%; max-width: 640px; }
  .code-window { transform: none; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-side { max-width: 460px; }
}

@media (max-width: 820px) {
  .menu-btn { display: grid; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 330px); z-index: 60;
    background: var(--bg-alt); border-left: 1px solid var(--border);
    padding: 6rem 1.6rem 2rem;
    transform: translateX(100%); transition: transform .35s var(--ease);
    box-shadow: var(--shadow);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav.open { transform: none; }
  /* O header (z-index 50) e o menu ficam dentro do mesmo stacking context:
     sem elevar o header, o scrim do body.nav-open (z-index 55) cobriria o
     painel e o proprio botao do menu, deixando a tela escurecida sem saida. */
  body.nav-open .site-header { z-index: 70; }
  /* Com o menu aberto o header fica acima do scrim — fundo solido para o
     conteudo desfocado da pagina nao vazar na barra. */
  body.nav-open .header-bg { background: var(--bg); }
  .nav-close {
    display: grid; place-items: center;
    position: absolute; top: .9rem; right: 1rem;
    width: 40px; height: 40px; border-radius: 11px;
    border: 1px solid var(--border); background: var(--surface);
    transition: border-color .2s var(--ease);
  }
  .nav-close:hover { border-color: var(--accent); }
  .nav-close svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .nav ul { flex-direction: column; align-items: stretch; gap: .4rem; }
  .nav a { display: block; padding: .8rem .5rem; font-size: 1rem; border-bottom: 1px solid var(--border); }
  .nav a::after { display: none; }
  .nav-cta { text-align: center; margin-top: .8rem; border-radius: var(--radius-sm) !important; }
  body.nav-open { overflow: hidden; }
  body.nav-open::after {
    content: ''; position: fixed; inset: 0; z-index: 55;
    background: rgba(0, 0, 0, .55); backdrop-filter: blur(2px);
  }
}

@media (max-width: 900px) {
  .brand-text { display: none; }
  .nav ul { gap: 1.1rem; }
  .header-inner { gap: .8rem; }
}

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); gap: 1.4rem 1rem; }
  .bar { grid-template-columns: 1fr; gap: .4rem; }
  .timeline { padding-left: 1.4rem; }
  .timeline-dot { left: -1.4rem; }
  .container { width: min(100% - 2rem, var(--maxw)); }
  .card, .timeline-card, .project { padding: 1.2rem; }
  .aside-card { padding: 1.1rem; }
  /* No celular a janela de codigo quebra as linhas em vez de esconder o texto
     atras de um scroll horizontal que nao aparece na tela. */
  .code-window pre { padding: 1rem; white-space: pre-wrap; overflow-wrap: anywhere; }
  .code-window code { font-size: .78rem; }
  .about-side { width: 100%; }
  .stat strong { overflow-wrap: anywhere; }
}

@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
}

/* ---------- Print / acessibilidade ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
