/* Estático e sem dependências. A foto mantém proporção e cores originais. */
:root {
  color-scheme: light;
  --paper: #fafaf8;
  --ink: #202320;
  --muted: #626761;
  --line: #dcded7;
  --dark: #171918;
  --accent: #d7e2c3;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.75 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: .25em; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 3px solid #718c52; outline-offset: 6px; }
::selection { color: var(--dark); background: var(--accent); }
h1, h2, h3, h4, p, figure, dl { margin: 0; }
h1, h2, h3 { font-weight: 550; line-height: 1.15; letter-spacing: -.045em; }
h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); }
h3 { font-size: 1.4rem; letter-spacing: -.025em; }
h4 { font-size: .95rem; margin-top: 2rem; }
p + p { margin-top: 1rem; }
.container { width: min(1160px, calc(100% - clamp(2rem, 7vw, 6rem))); margin-inline: auto; }
/* Permite que textos e colunas encolham sem criar rolagem horizontal. */
.hero-grid > *, .section-grid > *, .project-grid > *, .header-inner > * { min-width: 0; }
h1, h2, h3, p, li, dd, a { overflow-wrap: break-word; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: 1rem; left: 1rem; transform: translateY(-200%); background: white; padding: .7rem 1rem; z-index: 10; }
.skip-link:focus { transform: translateY(0); }
.site-header { background: var(--dark); color: #e9ece6; border-bottom: 1px solid #343734; }
.header-inner { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.wordmark { font-size: 2.1rem; font-weight: 650; text-decoration: none; letter-spacing: -.1em; line-height: 1; min-height: 44px; display: inline-flex; align-items: center; flex-shrink: 0; }
.wordmark span { color: var(--accent); }
nav { display: flex; flex-wrap: wrap; gap: 1rem 1.9rem; }
nav a { font-size: .82rem; text-decoration: none; color: #c4c9c2; min-height: 44px; display: inline-flex; align-items: center; gap: .35rem; }
nav a:hover { color: white; text-decoration: underline; }
.hero { background: var(--dark); color: #f3f4f0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); align-items: center; gap: clamp(2rem, 5vw, 5rem); padding-block: 4.5rem 4rem; }
.eyebrow { font-size: .69rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; line-height: 1.7; }
.hero .eyebrow { color: #c2c9bc; display: flex; align-items: center; gap: .6rem; }
.status-dot { width: 6px; height: 6px; flex-shrink: 0; background: var(--accent); border-radius: 50%; }
h1 { margin: 1.5rem 0 1.7rem; font-size: clamp(4rem, 7.2vw, 6.3rem); letter-spacing: -.065em; line-height: .98; }
.hero-description { font-size: 1.3rem; line-height: 1.5; letter-spacing: -.02em; }
.hero-detail { color: #b7bdb5; max-width: 47ch; font-size: .94rem; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.4rem; margin-top: 2rem; }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: space-between; gap: 1.4rem; text-decoration: none; font-size: .85rem; font-weight: 650; border-radius: 3px; padding: .85rem 1.2rem; transition: background .2s; }
.button-primary { color: var(--dark); background: var(--accent); }
.button-primary:hover { background: #e7eedc; }
.text-link { display: inline-flex; align-items: center; gap: .7rem; font-size: .85rem; text-decoration: none; padding-block: .5rem; min-height: 44px; }
.text-link:hover { text-decoration: underline; }
.location { color: #a7afa2; font-size: .73rem; margin-top: 2.2rem; }
.location span { margin-inline: .65rem; color: #747d6d; }
.portrait { width: 100%; }
.portrait img { display: block; width: 100%; max-width: 100%; height: auto; }
.portrait figcaption { display: flex; justify-content: space-between; gap: 1rem; margin-top: .9rem; color: #b2b9ac; font-size: .54rem; letter-spacing: .14em; }
.portrait figcaption span { color: #9ba394; }
.hero-bottom { border-top: 1px solid #343734; display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; color: #aeb6a7; font-size: .7rem; }
.hero-bottom a { text-decoration: none; }
.hero-bottom a:hover { text-decoration: underline; }
.hero-bottom a span { margin-left: 1rem; }
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); gap: clamp(2rem, 5vw, 5rem); }
.container.section + .container.section { border-top: 1px solid var(--line); }
.section-heading .eyebrow { color: var(--muted); margin-bottom: 1.1rem; }
.prose p { color: var(--muted); }
.prose .lead { color: var(--ink); font-size: 1.4rem; line-height: 1.5; letter-spacing: -.025em; margin-bottom: 1.5rem; }
.entry-top { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: .9rem; }
.period { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.muted { color: var(--muted); font-size: .92rem; margin-top: .6rem; }
.detail-list { margin: 1.6rem 0 0; padding-left: 1.1rem; color: var(--muted); }
.detail-list li { padding-left: .5rem; margin-bottom: .85rem; }
.detail-list li::marker { color: #7f8a75; font-size: .7em; }
.projects-band { background: #eff0eb; border-block: 1px solid var(--line); }
.wide-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 1.2rem; margin-bottom: 3rem; }
.wide-heading .eyebrow { color: var(--muted); margin-bottom: .9rem; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3.5rem; }
.project { position: relative; border-top: 1px solid #cdd1c7; padding: 2rem 2.3rem 2.2rem 0; }
.project-number { position: absolute; top: 2rem; right: 0; color: #69745e; font-size: .72rem; }
.project .eyebrow { color: var(--muted); font-size: .62rem; }
.project h3 { margin-block: .8rem 1rem; max-width: 28ch; }
.project > p:last-child { font-size: .94rem; color: var(--muted); }
.education-status { margin-top: .9rem; font-size: .78rem; font-weight: 600; }
.education-list article > .eyebrow { color: var(--muted); margin-bottom: .75rem; }
.education-list article + article { margin-top: 2.5rem; border-top: 1px solid var(--line); padding-top: 2.5rem; }
.education-list article > h3 + p { margin-top: .9rem; }
.subjects div { margin-top: 1.1rem; }
.subjects dt { font-size: .93rem; font-weight: 650; }
.subjects dd { color: var(--muted); font-size: .93rem; margin: .25rem 0 0; }
.skills > div + div { margin-top: 2.7rem; }
.skills h3 { font-size: 1.25rem; }
.level { display: inline-block; font-size: .73rem; border: 1px solid #cdd2c5; background: #eff1ea; padding: .25rem .65rem; margin-top: .85rem; border-radius: 3px; }
.skill-list { list-style: none; padding: 0; margin: 1.1rem 0 0; }
.skill-list li { border-bottom: 1px solid var(--line); padding-block: .85rem; font-size: .94rem; }
.skill-list span { color: var(--muted); display: block; font-size: .82rem; margin-top: .2rem; }
.languages div { display: flex; justify-content: space-between; gap: 1.5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.languages div:first-child { padding-top: 0; }
.languages dt { font-weight: 600; }
.languages dd { margin: 0; text-align: right; color: var(--muted); font-size: .9rem; }
.languages dd span { display: block; font-size: .78rem; }
.contact { background: var(--dark); color: #eef1e9; }
.contact .section-heading .eyebrow { color: #aeb6a7; }
.contact h2 { font-size: clamp(2.3rem, 4vw, 3.4rem); }
.contact h2 > span { color: var(--accent); }
.contact-location { font-size: .8rem; color: #b1b9aa; margin-top: 1.4rem; }
.contact-links { font-style: normal; min-width: 0; }
.contact-links a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; text-decoration: none; padding: 1.1rem 0; border-bottom: 1px solid #3c4238; font-size: clamp(.9rem, 1.5vw, 1.2rem); overflow-wrap: anywhere; }
.contact-links a:first-child { padding-top: 0; }
.contact-links a > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.contact-links a > span:last-child { flex-shrink: 0; }
.contact-links small { display: block; text-transform: uppercase; font-size: .61rem; color: #aeb6a7; letter-spacing: .13em; margin-bottom: .35rem; }
.contact-links a > span:last-child { color: var(--accent); }
.contact-links a:hover { color: var(--accent); }
.site-footer { background: var(--dark); color: #aeb6a7; border-top: 1px solid #343734; font-size: .71rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; }
.footer-inner p span { color: #a0a999; margin-left: .5rem; }
.footer-inner a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; gap: .5rem; }
.footer-inner a:hover { text-decoration: underline; }
@media (min-width: 1600px) { .hero-grid { padding-block: 5.5rem; } }
@media (max-width: 1050px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 290px); gap: 2.5rem; }
  nav { gap: .75rem; }
  .hero-actions { gap: .8rem 1.3rem; }
}
/* Tablet: o texto ganha a largura disponível antes de ficar comprimido. */
@media (max-width: 960px) {
  .section-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .section-heading h2 br { display: none; }
  .section-heading { max-width: 38rem; }
  .header-inner { gap: 1.5rem; }
  .hero-grid { gap: 2rem; grid-template-columns: minmax(0, 1fr) minmax(0, 260px); }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .project-grid { gap: 0 2rem; }
}
@media (max-width: 760px) {
  .header-inner { align-items: flex-start; padding-block: 1rem; gap: .65rem; flex-direction: column; }
  .wordmark { font-size: 1.9rem; }
  nav { width: 100%; justify-content: flex-start; gap: .1rem 1.25rem; }
  nav a { font-size: .82rem; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2.7rem; padding-block: 2.5rem 2rem; }
  h1 { font-size: clamp(3.5rem, 14vw, 6rem); }
  .hero-detail { max-width: 52ch; }
  .hero .eyebrow { font-size: .65rem; letter-spacing: .07em; }
  .portrait { max-width: 340px; justify-self: center; }
  .hero-description { font-size: 1.2rem; }
  .hero-bottom { flex-wrap: wrap; align-items: center; gap: .5rem; }
  .hero-bottom a { display: inline-flex; align-items: center; min-height: 44px; }
  .section-heading .eyebrow { margin-bottom: .7rem; }
  .prose .lead { font-size: 1.25rem; }
  .wide-heading { margin-bottom: 1.7rem; }
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .project { padding-block: 1.6rem 2rem; }
  .project-number { top: 1.6rem; }
  .languages div { gap: 1rem; }
  .contact-links a { font-size: 1rem; }
  .footer-inner { align-items: start; flex-wrap: wrap; }
  .footer-inner p span { display: block; margin: 0; }
}
/* Celulares compactos e viewports reduzidos por zoom. */
@media (max-width: 480px) {
  .hero-actions { width: 100%; align-items: stretch; gap: .75rem; }
  .button { width: 100%; padding-inline: 1rem; gap: .75rem; }
  .hero-actions .text-link { justify-content: center; }
  .location { margin-top: 1.5rem; }
  .hero-description br { display: none; }
  .portrait figcaption { flex-wrap: wrap; gap: .25rem 1rem; }
  h2 { font-size: clamp(1.7rem, 7.5vw, 2.2rem); }
  .contact h2 { font-size: clamp(2rem, 9vw, 2.7rem); }
  .entry-top { flex-direction: column; gap: .3rem; }
  .languages div { flex-direction: column; gap: .2rem; }
  .languages dd { text-align: left; }
  .project { padding-right: 1.5rem; }
}

/* ---------- Elementos novos (valem também sem JavaScript) ---------- */
.panel-dark { --ink: #eef1e9; --muted: #aeb6a7; --line: #343734; background: var(--dark); color: var(--ink); }
.line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.line > span { display: block; }
.h1-soft { color: #b7beb2; }
.accent-mark { color: var(--accent); }
.h2-big { font-size: clamp(2.4rem, 4.6vw, 4rem); line-height: 1.04; }
.menu-toggle, .deck-bar, .edu-tabs { display: none; }
.portrait-frame { display: block; position: relative; }
html:not(.js) .panel + .panel { border-top: 1px solid var(--line); }
.experience .eyebrow { color: var(--muted); }
.edu-title { font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.12; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 1.4rem 0 0; }
.chips li { font-size: .78rem; line-height: 1; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 3px; }

/* Planilha da Experiência */
.sheet { --row: clamp(1.75rem, 4.9vh, 2.5rem); position: relative; align-self: center; background: #fff; border: 1px solid var(--line); font-size: .86rem; line-height: 1.2; overflow: hidden; }
.sheet-row { display: grid; grid-template-columns: 2.2rem 3fr 2fr 1fr 1fr; height: var(--row); }
.sheet-row > * { position: relative; z-index: 1; display: flex; align-items: center; min-width: 0; padding-inline: .6rem; border-right: 1px solid #e9ebe4; border-bottom: 1px solid #e9ebe4; font-style: normal; font-weight: 400; white-space: nowrap; }
.sheet-row > b { justify-content: center; padding: 0; font-size: .64rem; color: #8b9186; background: #f3f4ef; }
.sheet-letters > * { justify-content: center; font-size: .64rem; color: #8b9186; background: #f3f4ef; }
.sheet-title { grid-column: 2 / -1; font-size: 1.15rem; font-weight: 600; letter-spacing: -.03em; border-right: 0 !important; }
.sheet-head span { font-size: .72rem; font-weight: 650; }
.sheet [data-status] { gap: .4rem; }
.sheet [data-status] em { color: #58743b; font-style: normal; font-weight: 700; }
.sheet [data-status] i { font-style: normal; }
.sheet [data-status].is-pending em { visibility: hidden; }
.sheet-cursor { position: absolute; top: 0; left: 0; z-index: 0; opacity: 0; background: var(--accent); box-shadow: inset 0 0 0 2px #2c332a; transition: transform .17s cubic-bezier(.3,0,.2,1), opacity .2s; }
.sheet-cursor.is-on { opacity: 1; }

/* Código da Formação */
.code-window { margin-top: 1.6rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.code-name { font: 400 .74rem/1.4 ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--muted); margin-bottom: .8rem; }
.code { margin: 0; font: 400 clamp(.72rem, 1vw, .86rem)/1.7 ui-monospace, "Cascadia Code", Consolas, monospace; color: #d6dbd0; tab-size: 2; overflow-x: auto; }
.code .k { color: var(--accent); }
.code .t { color: #fff; }
.ch { visibility: hidden; }
.ch.on { visibility: visible; }
.caret { display: inline-block; width: .55em; height: 1.05em; margin-right: -.55em; vertical-align: text-bottom; background: var(--accent); animation: blink 1s steps(1) infinite; }

/* Mapa dos Idiomas */
.route { display: block; width: 100%; max-height: 62vh; overflow: visible; }
.route-grid { stroke: #2c302b; stroke-width: 1; }
.route-equator { stroke: #4a5048; stroke-width: 1; }
.route-arc { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 1; }
.route-point circle { fill: var(--accent); }
.route-name { fill: #f3f4f0; font-size: 15px; font-weight: 600; }
.route-coord { fill: #8d9588; font: 10.5px ui-monospace, Consolas, monospace; }

/* ---------- Modo de telas: só na tela e com JavaScript ---------- */
@media screen {
  .js body { --bar: var(--dark); --bar-ink: #e9ece6; --bar-soft: #aeb6a7; --bar-line: #343734; height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; background: var(--bar); }
  .js body[data-theme="light"] { --bar: var(--paper); --bar-ink: var(--ink); --bar-soft: var(--muted); --bar-line: var(--line); }
  .js main { position: relative; min-height: 0; outline: none; overflow: hidden; }
  .js .site-footer { display: none; }

  .js .site-header { background: var(--bar); color: var(--bar-ink); border-bottom-color: var(--bar-line); transition: background .25s, color .25s, border-color .25s; position: relative; z-index: 5; }
  .js .header-inner { min-height: 62px; }
  .js .wordmark { font-size: 1.7rem; }
  .js nav a { color: var(--bar-soft); position: relative; }
  .js #nav-principal { gap: .25rem 1.7rem; }
  .js #nav-principal a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
  .js #nav-principal a:hover { color: var(--bar-ink); text-decoration: none; }
  .js #nav-principal a:hover::after, .js #nav-principal a[aria-current]::after { transform: scaleX(1); }
  .js #nav-principal a[aria-current] { color: var(--bar-ink); }

  .js .panel { position: absolute; inset: 0; display: none; flex-direction: column; overflow-x: hidden; overflow-y: auto; outline: none; background: var(--paper); }
  .js .panel.panel-dark { background: var(--dark); }
  .js .panel.projects-band { background: #eff0eb; border: 0; }
  .js .panel.is-active { display: flex; }
  .js .panel-inner { margin-block: auto; }
  .js .panel-inner.section { padding-block: clamp(1.2rem, 3.6vh, 2.5rem); }
  .js .panel-inner.section-grid { align-items: center; }

  /* Início */
  .js .hero { background-image: linear-gradient(#ffffff06 1px, transparent 1px), linear-gradient(90deg, #ffffff06 1px, transparent 1px); background-size: 56px 56px; }
  .js .hero-grid { grid-template-columns: minmax(0, 1fr) auto; padding-block: clamp(1rem, 3vh, 2.2rem); }
  .js h1 { margin-block: clamp(.7rem, 2vh, 1.4rem); font-size: clamp(3.4rem, min(7.2vw, 13vh), 6.3rem); }
  .js .hero-actions { margin-top: clamp(1rem, 2.4vh, 1.8rem); }
  .js .location { margin-top: clamp(.8rem, 2.2vh, 1.6rem); }
  .js .portrait { width: auto; justify-self: end; }
  .js .portrait img { width: auto; max-height: calc(100vh - 62px - 58px - 5.5rem); max-height: calc(100dvh - 62px - 58px - 5.5rem); }
  .js .portrait-frame { width: fit-content; }
  .js .portrait-frame::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px var(--accent); pointer-events: none; }
  .js .portrait-frame::before { content: ""; position: absolute; right: -4px; bottom: -4px; z-index: 1; width: 9px; height: 9px; background: var(--accent); border: 2px solid var(--dark); }
  .js .status-dot { animation: pulse 2.2s ease-out infinite; }
  .js .hero-bottom { display: none; }
  @media (min-height: 860px) { .js .hero-bottom { display: flex; } .js .portrait img { max-height: calc(100dvh - 62px - 58px - 9.5rem); } }

  /* Experiência */
  .js .exp-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .js .exp-grid h3 { margin-top: .2rem; }
  .js .exp-grid .detail-list { margin-top: clamp(.5rem, 1.6vh, 1.1rem); font-size: .9rem; line-height: 1.55; }
  .js .exp-grid .detail-list li { margin-bottom: clamp(.3rem, 1vh, .65rem); }
  .js .exp-grid .section-heading { margin-bottom: clamp(.8rem, 2.4vh, 1.6rem); }

  /* Projetos */
  .js .projects-band .wide-heading { margin-bottom: clamp(.8rem, 2.6vh, 2rem); }
  .js .project { padding-block: clamp(.8rem, 2.2vh, 1.5rem); transition: background .25s; }
  .js .project::before { content: ""; position: absolute; top: -1px; left: 0; width: 100%; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
  .js .project:hover::before { transform: scaleX(1); }
  .js .project > p:last-child { font-size: .9rem; line-height: 1.6; }
  .js .project h3 { margin-block: .35rem .5rem; font-size: 1.28rem; max-width: none; padding-right: 1rem; }

  /* Formação */
  .js .edu-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .js .edu-tabs { display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
  .edu-tabs button { position: relative; min-height: 44px; padding: 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: .86rem; cursor: pointer; }
  .edu-tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
  .edu-tabs button:hover, .edu-tabs button[aria-selected="true"] { color: var(--ink); }
  .edu-tabs button[aria-selected="true"]::after { transform: scaleX(1); }
  .edu-tabs button:focus-visible { outline: 3px solid #718c52; outline-offset: 2px; }
  .js .edu-pane { display: none; }
  .js .edu-pane.is-on { display: block; animation: rise .55s cubic-bezier(.16,1,.3,1) both; }
  .js .education-list article + article { margin-top: 0; padding-top: 0; border-top: 0; }
  .js .edu-pane h4 { margin-top: 0; }
  .js .subjects div { margin-top: .85rem; }

  /* Habilidades */
  .js .skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4.5rem); }
  .js .skills > div + div { margin-top: 0; }
  .js #habilidades .wide-heading { margin-bottom: clamp(.8rem, 2.6vh, 2rem); }
  .js .skill-list { margin-top: .6rem; }
  .js .skill-list li { font-size: .9rem; line-height: 1.5; padding-block: clamp(.35rem, 1.2vh, .75rem); transition: padding-left .25s, background .25s; }
  .js .skill-list li:hover { padding-left: .6rem; background: var(--accent); }

  /* Idiomas */
  .js .lang-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  .js .languages { margin-top: clamp(1rem, 3vh, 2rem); }
  .js .panel.is-active .route-arc { animation: draw 1.5s .55s cubic-bezier(.65,0,.35,1) both; }
  .js .panel.is-active .route-point { transform-box: fill-box; transform-origin: 8px 50%; animation: pop .45s cubic-bezier(.2,1.4,.4,1) both; }
  .js .panel.is-active .route-a { animation-delay: .4s; }
  .js .panel.is-active .route-b { animation-delay: 1.95s; }

  /* Contato */
  .js .contact h2 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: 1.05; }
  .js .contact-links a { transition: padding-left .25s, color .2s; }
  .js .contact-links a:hover { padding-left: .6rem; }

  /* Barra inferior */
  .js .deck-bar { display: block; position: relative; z-index: 5; background: var(--bar); color: var(--bar-soft); transition: background .25s, color .25s; }
  .deck-progress { display: flex; gap: 3px; height: 3px; background: var(--bar-line); }
  .deck-progress a { flex: 1; background: transparent; transition: background .35s; }
  .deck-progress a.is-done { background: var(--accent); }
  .js body[data-theme="light"] .deck-progress a.is-done { background: #5d7445; }
  .deck-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 55px; font-size: .78rem; }
  .deck-sign span { opacity: .75; }
  .js .deck-controls { display: flex; align-items: center; gap: 1.2rem; }
  .deck-controls a { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; color: var(--bar-ink); text-decoration: none; }
  .deck-controls a:hover .deck-label { text-decoration: underline; }
  .deck-controls a.is-off { visibility: hidden; }
  .deck-count { font-variant-numeric: tabular-nums; letter-spacing: .06em; min-width: 3.9rem; text-align: center; }

  /* Transição e abertura */
  .wipe { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; pointer-events: none; }
  .wipe i { flex: 1 1 0; margin-block: -.5px; background: var(--wipe, var(--dark)); transform: scaleX(0); will-change: transform; }
  .intro { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: var(--dark); animation: intro-out .55s 1.05s cubic-bezier(.76,0,.24,1) both; }
  .intro-box { position: relative; display: grid; place-items: center; width: 260px; height: 150px; color: #fff; font-size: 4.3rem; font-weight: 750; letter-spacing: -.09em; line-height: 1; }
  .intro-box svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .intro-box rect { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 1; animation: draw .6s cubic-bezier(.65,0,.35,1) both; }
  .intro-box span { animation: rise .5s .35s cubic-bezier(.16,1,.3,1) both; }
  .intro-box b { color: var(--accent); font-weight: inherit; }

  /* Entradas */
  .js .panel.is-active [data-r] { animation: rise .7s calc(var(--i, 0) * 45ms + 120ms) cubic-bezier(.16,1,.3,1) both; }
  .js .panel.is-active .line > span { animation: line-up .85s calc(var(--i, 0) * 60ms + 90ms) cubic-bezier(.16,1,.3,1) both; }
  .js .panel.is-active .portrait-frame { animation: curtain 1s .2s cubic-bezier(.76,0,.24,1) both; }

  /* Altura pequena: textos secundários ficam mais compactos. */
  @media (max-height: 700px) {
    .js .prose p { font-size: .9rem; line-height: 1.55; }
    .js .prose .lead { font-size: 1.15rem; margin-bottom: .8rem; }
    .js .hero-detail { font-size: .86rem; line-height: 1.5; }
    .js .hero-description { font-size: 1.1rem; }
    .js .button { min-height: 44px; padding-block: .5rem; }
  }

  @media (max-width: 1050px) {
    .js #nav-principal { gap: .25rem 1rem; }
  }

  @media (max-width: 860px) {
    .js .menu-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .9rem; color: var(--bar-ink); background: none; border: 1px solid var(--bar-line); border-radius: 3px; font: inherit; font-size: .8rem; cursor: pointer; }
    .js .header-inner { flex-direction: row; align-items: center; padding-block: .45rem; min-height: 60px; }
    .js #nav-principal { position: fixed; inset: 61px 0 0; z-index: 6; width: 100%; flex-direction: column; flex-wrap: nowrap; gap: 0; padding: 1rem clamp(1rem, 7vw, 3rem); background: var(--bar); visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .25s, visibility .25s; overflow-y: auto; }
    .js .menu-is-open #nav-principal { visibility: visible; opacity: 1; transform: none; }
    .js #nav-principal a { min-height: 58px; font-size: 1.5rem; letter-spacing: -.03em; border-bottom: 1px solid var(--bar-line); }
    .js #nav-principal a::after { display: none; }

    .js .panel-inner.section-grid, .js .exp-grid, .js .edu-grid, .js .lang-grid, .js .skills { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
    .js .panel-inner { margin-block: 0 auto; }
    /* A planilha sobe para logo depois do título, onde a animação fica visível. */
    .js .exp-grid { gap: 1.1rem; }
    .js .exp-grid > div:first-child { display: contents; }
    .js .exp-grid .section-heading { order: 1; margin-bottom: 0; }
    .js .sheet { --row: 1.95rem; order: 2; width: 100%; }
    .js .sheet-blank { display: none; }
    .js .experience { order: 3; }
    .js .route { max-height: none; }
    .js .deck-sign { display: none; }
    .js .deck-controls { width: 100%; justify-content: space-between; }

    .js .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 34%); align-items: start; gap: 1rem; padding-block: 1.4rem; }
    .js .portrait { justify-self: end; }
    .js .portrait img { width: 100%; height: auto; max-height: none; }
    .js .portrait figcaption { display: none; }
  }

  @media (max-width: 520px) {
    .js .hero-grid { grid-template-columns: minmax(0, 1fr); }
    .js .hero-copy { display: contents; }
    .js .hero .eyebrow { order: 1; }
    .js .hero h1 { order: 2; margin-block: 0; font-size: clamp(3.3rem, 17vw, 4.6rem); }
    .js .portrait { order: 3; justify-self: start; width: 46%; }
    .js .hero-description { order: 4; }
    .js .hero-detail { order: 5; margin-top: 0; }
    .js .hero-actions { order: 6; margin-top: 0; }
    .js .location { order: 7; margin-top: 0; }
    .js .sheet-row { grid-template-columns: 1.8rem 3fr 2.2fr .9fr .9fr; font-size: .76rem; }
    .js .sheet-row > * { padding-inline: .35rem; }
    .js .sheet-head span { font-size: .66rem; }
    .js .lang-grid { gap: .6rem; }
    .js .languages { margin-top: .9rem; }
    .js .languages div { flex-direction: row; gap: 1rem; padding-block: .6rem; }
    .js .languages dd { text-align: right; }
    .js .route-name { font-size: 18px; }
    .js .route-coord { font-size: 13px; }
  }
}

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes line-up { from { transform: translateY(112%); } to { transform: none; } }
@keyframes curtain { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(-6px); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 #d7e2c380; } 80%, 100% { box-shadow: 0 0 0 9px #d7e2c300; } }
@keyframes intro-out { to { clip-path: inset(0 0 100% 0); } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print {
  .site-header, .hero-bottom, .hero-actions, .site-footer, .skip-link, .sheet, .code-window, .route, .wipe, .intro { display: none; }
  .panel-dark { --ink: #111; --muted: #444; --line: #ccc; }
  body, .hero, .contact, .projects-band, .panel-dark { color: #111; background: white; }
  .container { width: 100%; }
  .hero-grid { grid-template-columns: 1fr 150px; padding: 1rem 0 2rem; gap: 2rem; }
  h1 { font-size: 3rem; }
  .hero-detail, .hero .eyebrow, .hero h1 span, .location, .contact .section-heading .eyebrow, .contact-location, .contact-links small { color: #444; }
  .section { padding-block: 2rem; }
  .section-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .project, .education-list article, .languages div { break-inside: avoid; }
  .contact-links a { color: #111; }
}
