:root {
  --bg: #f4efe6;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #ffffff;
  --text: #171717;
  --muted: #5f5a53;
  --line: rgba(23, 23, 23, 0.12);
  --accent: #2f6b5f;
  --accent-2: #d97c4c;
  --shadow: 0 24px 60px rgba(17, 17, 17, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Raleway", sans-serif;
  color: var(--text);
  background:#fff;
}

img { display: block; max-width: 100%; }
button, a { font: inherit; }
button { cursor: pointer; }

.site-header, main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}
.site-header {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 15px 40px;
  background-color: #fff;
}

.title {
  font-size: 20px;
  line-height: 20px;
  color: #fff;
  margin: 4px 0px;
}
.subtitle{
  font-size: 16px;
  line-height: 16px;
  color: #000;
  margin: 4px 0px;
}
.brand { display: flex; gap: 14px; align-items: center; }
.brand-mark {
    width: 52px;
    height: 52px;
    border-radius: 50px;
    display: grid;
    place-items: center;
    background: transparent;
    color: #fff;
    font-weight: 800;
    border: 2px #000 solid;
    padding: 5px;
}

.brand-mark img {
  filter: brightness(0);
  width: 100%;
  height: auto;
}

.brand strong, .brand span { display: block; }
.brand span { color: var(--muted); font-size: 0.92rem; }

.menu-toggle { display: none; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.topbar a {
  color: #000; text-decoration: none;
  padding: 12px 16px; border-radius: 999px;
  transition: 0.2s ease;
}
.topbar a:hover { 
  background: rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
  color: #000;
  font-weight: 600;
 }
.icon-link {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0 !important;
  flex: 0 0 auto;
}
.icon-link svg { width: 20px; height: 20px; fill: currentColor; }

.hero {
  padding: 64px 0 28px;
  max-width: 760px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0 0 14px;
}
.hero h1, .section-head h2, .resume-card h2, .modal-info h3 {
  margin: 0;
  margin-bottom: 10px;
  line-height: 0.96;
  letter-spacing: -0.04em;
}
.hero h1 { 
    font-size: 40px;
    max-width: 500px;
    line-height: 44px;
 }
.hero-copy {
  max-width: 58ch; color: var(--muted); font-size: 1.08rem; line-height: 1.7;
  margin: 22px 0 0;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 20px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line); transition: .2s ease;
}
.primary { background: var(--text); color: #fff; }
.ghost { background: rgba(255,255,255,0.5); color: var(--text); }
.button:hover { 
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: #000;
    background: #fff;
    border: 1px solid rgba(23, 23, 23, 0.12);
    font-weight: 600;

}

.portfolio-section, .resume-section { padding: 32px 0 76px; }
.section-head {
  display: flex; justify-content: space-between; gap: 20px; align-items: end;
  margin-bottom: 20px;
}
.section-head p { color: var(--muted); max-width: 42ch; }
.section-head h2, .resume-card h2 { font-size: clamp(2rem, 4vw, 3.3rem); }

.project-card {
  container-type: inline-size;
  border: 0;
  padding: 0;
  text-align: left;
  background: transparent;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  width: 100%;
}
.project-card img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  max-height: 100cqw;
  object-fit: cover;
  object-position: top;
  transition: transform 0.8s ease;
}
@media (hover: hover) and (pointer: fine) {
  .project-card:hover img {
    transform: scale(1.05);
  }
  .project-card:hover .project-meta {
    opacity: 1;
  }
  .project-card:hover .project-meta::after {
    transform: translateY(-50%) scale(1.08);
  }
}
@media (prefers-reduced-motion: reduce) {
  .project-card img,
  .project-card .project-meta,
  .project-card .project-meta::after {
    transition: none;
  }
}
.project-meta {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 5px;
    padding: 10px 70px 10px 15px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    border-radius: 15px;
    opacity: 0.9;
    transition: opacity 0.8s ease;
    border: 1px solid #e1e1e1;
}
.project-meta span { 
  display: block;
   color: var(--muted);
   font-size: 0.9rem;
   margin-bottom: 4px;
 }
.project-meta strong { 
  display: block;
  font-size: 18px; 
  line-height: 22px;
}
.project-meta::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--accent);
  background:
    linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat;
  transform: translateY(-50%);
  transition: transform 0.8s ease;
  pointer-events: none;
}

.resume-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0.48));
  border: 1px solid rgba(23,23,23,0.08);
  border-radius: var(--radius-xl);
  padding: 34px;
  box-shadow: var(--shadow);
}
.resume-card p:last-child { color: var(--muted); max-width: 72ch; line-height: 1.75; }

.resume-section { scroll-margin-top: 24px; }
.resume-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.resume-download { display: inline-flex; align-items: center; justify-content: center; gap: 9px; flex-shrink: 0; padding: 12px 16px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent); color: #fff; font-size: .85rem; font-weight: 600; line-height: 1.4; text-decoration: none; transition: background .25s ease, color .25s ease; }
.resume-download svg { width: 19px; height: 19px; flex-shrink: 0; }
.resume-download:hover { background: #26564c; color: #fff; text-decoration: none; }
.resume-download:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (max-width: 575.98px) {
  .resume-heading { gap: 10px; }
  .resume-download { gap: 6px; padding: 11px 12px; font-size: .78rem; }
}
.resume-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin: 30px 0; padding-bottom: 12px; }
.resume-tabs button { flex: 1; padding: 13px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 600; transition: color .25s ease, background .25s ease; }
.resume-tabs button:hover { color: var(--accent); background: #f0f5f3; }
.resume-tabs button[aria-selected="true"] { color: #fff; background: var(--accent); }
.resume-tabs button:focus-visible, .resume-panel:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.resume-panel[hidden] { display: none; }
.resume-panel h3 { font-size: clamp(1.4rem, 3vw, 1.85rem); line-height: 1.3; letter-spacing: -.025em; margin: 0 0 22px; font-weight: 700; }
.resume-panel h4 { font-size: 1.1rem; line-height: 1.4; font-weight: 700; margin: 0 0 10px; }
.resume-panel p { color: var(--muted); line-height: 1.8; max-width: 80ch; margin: 0 0 16px; }
.resume-panel .resume-kicker { color: var(--accent); font-size: .85rem; font-weight: 600; margin-bottom: 10px; }
.resume-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; border-top: 1px solid var(--line); padding-top: 24px; margin: 28px 0 0; }
.resume-facts dt { font-size: .8rem; color: var(--muted); margin-bottom: 7px; }
.resume-facts dd { font-size: .95rem; line-height: 1.6; margin: 0; font-weight: 600; }
.resume-profile-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.resume-profile-bio { display: flow-root; }
.resume-portrait { float: left; width: 154px; height: 154px; margin: 0 22px 12px 0; padding: 5px; border: 1px solid var(--line); border-radius: 50%; background: #edf3f1; box-shadow: 0 4px 14px rgba(23,23,23,.08); overflow: hidden; }
.resume-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center; border-radius: 50%; }
.resume-profile-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px 22px; margin: 0; }
.resume-profile-details dt { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; font-weight: 500; margin-bottom: 7px; }
.resume-profile-details dd { margin: 0; line-height: 1.65; font-size: .95rem; overflow-wrap: break-word; }
.resume-panel .resume-profile-current { max-width: none; margin: 20px 0 0; }
@media (max-width: 991.98px) {
  .resume-profile-layout { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 575.98px) {
  .resume-portrait { float: none; width: 150px; height: 150px; margin: 0 auto 24px; }
  .resume-profile-details { grid-template-columns: 1fr; gap: 22px; }
}
.resume-skills, .resume-education { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.resume-skills article, .resume-education article { border-top: 1px solid var(--line); padding-top: 22px; }
.resume-skills-visual { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 28px; }
.resume-skills-visual .skill-group { border-top: 0; padding-top: 4px; }
.resume-skills-visual .skill-group h4 { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; line-height: 1.6; margin-bottom: 8px; }
.resume-skills-visual .skill-group p { font-size: .85rem; line-height: 1.65; margin-bottom: 18px; }
.skill-tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; padding: 0; margin: 0; gap: 16px 8px; }
.skill-tools li { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 12px 2px; }
.skill-tools img { width: 40px; height: 40px; object-fit: contain; transition: transform .35s ease; }
.skill-tools span { color: var(--text); font-size: .75rem; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) {
  .skill-tools li:hover img { transform: translateY(-4px) scale(1.05); }
}
@media (max-width: 991.98px) {
  .resume-skills-visual { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .resume-skills.resume-skills-visual { grid-template-columns: 1fr; gap: 30px; }
  .skill-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .skill-tools img { transition: none; }
  .skill-tools li:hover img { transform: none; }
}
.resume-tags { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.resume-tags li { font-size: .8rem; font-weight: 600; padding: 6px 10px; border-radius: 7px; background: #edf3f1; color: #26564c; }
.resume-date { display: block; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.resume-panel .resume-subheading { margin-top: 30px; }
.resume-courses { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.resume-courses li { display: flex; align-items: center; max-width: 100%; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: #f5f8f7; color: var(--text); font-size: .95rem; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.resume-timeline { border-left: 1px solid var(--line); margin-left: 6px; padding-left: 28px; }
.resume-timeline article { position: relative; padding-bottom: 28px; }
.resume-timeline article:last-child { padding-bottom: 0; }
.resume-timeline article::before { content: ""; position: absolute; width: 11px; height: 11px; top: 4px; left: -34px; border: 2px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.resume-panel .resume-role { color: var(--text); font-size: .9rem; font-weight: 600; margin-bottom: 10px; }
.resume-current { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 3px 8px; border-radius: 5px; font-size: .7rem; color: var(--accent); background: #edf3f1; }
@media (max-width: 575.98px) {
  .resume-card { padding: 24px 18px; border-radius: 20px; }
  .resume-tabs { gap: 4px; margin: 24px 0; }
  .resume-tabs button { padding: 12px 4px; font-size: .78rem; border-radius: 8px; }
  .resume-skills, .resume-education, .resume-facts { grid-template-columns: 1fr; gap: 20px; }
  .resume-timeline { padding-left: 22px; }
  .resume-timeline article::before { left: -28px; }
}

.modal {
  position: fixed; inset: 0; display: none; place-items: center;
  padding: 20px; z-index: 1050;
  isolation: isolate;
}
.modal.is-open { display: grid; }
.modal.is-open .modal-backdrop {
  animation: modal-backdrop-in 0.7s ease both;
}
.modal.is-open .modal-panel {
  animation: modal-panel-in 0.7s ease-in-out both;
}
.modal.is-closing .modal-backdrop {
  animation: modal-backdrop-out 0.7s ease both;
}
.modal.is-closing .modal-panel {
  animation: modal-panel-out 0.7s ease-in-out both;
}
@keyframes modal-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modal-panel-in {
  from { opacity: 0; transform: translateY(100vh); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes modal-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes modal-panel-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(100vh); }
}
@media (prefers-reduced-motion: reduce) {
  .modal.is-open .modal-backdrop,
  .modal.is-open .modal-panel {
    animation: none;
  }
}
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(10, 10, 12, 0.62);
  z-index: 0;
}
.modal-panel {
  position: relative; 
  z-index: 2;
  width: 100%;
  max-height:98vh;
  overflow: auto;
  background: var(--surface-strong);
  opacity: 1;
  border-radius: 30px 0 0 30px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.3);
}
.modal-actions {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  /* background: var(--surface-strong); */
  z-index: 2;
}
.modal-close, .modal-expand {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 1.6rem;
  z-index: 2;
}
.modal-close {
  position: relative;
  padding: 0;
  font-size: 0;
}
.modal-close::before, .modal-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}
.modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.modal-media { position: relative; min-width: 0; }
.modal-gallery img { cursor: zoom-in; }
.modal.is-gallery-expanded .modal-gallery img { cursor: zoom-out; }
.modal-expand svg { width: 22px; height: 22px; }
.modal-expand .icon-collapse { display: none; }
.modal-expand[aria-pressed="true"] .icon-expand { display: none; }
.modal-expand[aria-pressed="true"] .icon-collapse { display: block; }
.modal-close:hover, .modal-expand:hover { background: #f4efe6; }
.modal-close:focus-visible, .modal-expand:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.modal-content {  
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  padding: 24px;
  margin-top: -35px;
}
.modal-gallery img {
  width: 100%;
  border-radius: 24px;
  background: #eee;
}
.image-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.image-stack img {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
}
.image-stack img:first-child {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
.image-stack img:last-child {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}
.thumbs {
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 12px;
    background: #fff;
    padding: 15px;
    border-top: 3px solid #faf8f4;
}

.thumb-link {
  display: block;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}
.thumb-link img {
  width: 100%;
  transition: transform .25s ease;
}
.thumb-link .image-stack {
  height: 100%;
}
.thumb-link .image-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: auto;
}
.thumb-link:hover img { transform: scale(1.04); }
.modal-info { padding: 8px 6px; }
.modal-info p { color: var(--muted); line-height: 1.7; }
.details-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.details-list li {
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px;
  background: #faf8f4;
}

@media (max-width: 900px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px 20px;
  }
  .brand {
    justify-content: center;
  }
  .topbar {
    width: 100%;
    justify-content: center;
    gap: 8px;
  }
  .section-head, .modal-content { grid-template-columns: 1fr; display: grid; }
}
@media (max-width: 640px) {
  .project-card { border-radius: 16px; }
  .modal-content {margin-top:0}
  .thumbs {position: relative;}
  .site-header, main { width: min(100% - 20px, 1160px); }
  .site-header {
    padding: 16px 14px;
    width: 100%;
  }
  .brand {
    align-items: center;
    gap: 12px;
  }
  .title {
    font-size: 18px;
    line-height: 18px;
  }
  .subtitle {
    font-size: 14px;
    line-height: 14px;
  }
  .topbar {
    display: grid;
    grid-template-columns: 1fr repeat(2, 64px);
    gap: 10px;
    justify-content: stretch;
    align-items: center;
  }
  .topbar a {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
  }
  .topbar .icon-link {
    min-height: 48px;
    width: 100%;
  }
  .topbar a[href="#curriculo"] {
    grid-column: 1;
  }
  .topbar a[aria-label="LinkedIn"] {
    grid-column: 2;
  }
  .topbar a[aria-label="WhatsApp"] {
    grid-column: 3;
  }
  .topbar a[href="#portfolio"],
  .topbar a[href="#curriculo"] {
    font-size: 16px;
    font-weight: 600;
  }
  .topbar a[href="#portfolio"] { grid-column: 1 / -1; }
  .hero { padding-top: 44px; }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 4rem); }
  .project-meta { left: 12px; right: 12px; bottom: 12px; }
  .modal {
    padding: 0;
  }
  .modal-panel { 
    border-radius: 0;
    max-height: 100vh;
   }
  .modal-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
  }
  .modal-content { gap: 0; }
  .modal-info { display: contents; }
  .modal-info > * { order: 2; }
  .modal-info > .eyebrow { order: 0; }
  .modal-media { order: 1; margin-bottom: 24px; }
  .modal-info > .button { order: 3; }
  .modal-info > .thumbs { order: 4; }
  .modal.is-gallery-expanded .modal-media { margin-bottom: 0; }
}

.modal.is-gallery-expanded .modal-content {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 0;
  border: 0;
}
.modal.is-gallery-expanded .modal-info { display: none; }
.modal.is-gallery-expanded .modal-gallery img { border-radius: 0; }

/* Banner de apresentação */
main.site-main { width: 100%; max-width: none; }
.hero {
  display: flex;
  align-items: center;
  max-width: none;
  min-height: 640px;
  min-height: min(780px, 85svh);
  padding: 100px 0;
  color: #fff;
  background: linear-gradient(90deg, rgba(0,0,0,.78), rgba(0,0,0,.46) 58%, rgba(0,0,0,.16)), url("../images/banner-hero.jpg") center / cover;
}
.hero-content { width: min(1160px, calc(100% - 32px)); }
.hero-intro { margin: 0 0 22px; font-size: clamp(1.2rem, 2vw, 1.75rem); line-height: 1.5; }
.hero h1 { max-width: 900px; font-size: clamp(2.8rem, 5.5vw, 5rem); line-height: 1.1; font-weight: 700; }
.hero-copy { max-width: 720px; color: #f0f0f0; font-size: clamp(1.1rem, 1.8vw, 1.5rem); line-height: 1.65; margin: 24px 0 0; }
.hero .primary { background: #fff; color: #171717; border-color: #fff; }
.hero .primary:hover { background: #171717; color: #fff; text-decoration: none; border-color: #fff; }
.hero .ghost { background: rgba(0,0,0,.2); color: #fff; border-color: rgba(255,255,255,.65); }
.hero .ghost:hover { background: #fff; color:#171717; text-decoration: none; border-color: #fff; }
/* .hero .button:hover { color: #fff; border-color: #fff; } */
.hero .button:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
@media (max-width: 640px) {
  .hero { min-height: 560px; padding: 64px 0; background-position: 58% center; }
  .hero-content { width: calc(100% - 20px); }
  .hero-intro { margin-bottom: 16px; }
}
.site-header .title, .site-header .subtitle, .site-header .brand-mark { color: #000; }

/* Navegação compacta para tablets e celulares. */
@media (max-width: 900px) {
  .site-header {
    position: relative;
    z-index: 10;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
  }
  .site-header .brand { min-width: 0; justify-content: flex-start; gap: 10px; }
  .site-header .brand-mark { flex: 0 0 46px; width: 46px; height: 46px; }
  .site-header .title { font-size: 18px; line-height: 1.2; }
  .site-header .subtitle { max-width: 28ch; font-size: 12px; line-height: 1.4; }
  .menu-toggle {
    display: flex;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 10px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
  }
  .menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .3s ease, opacity .3s ease;
  }
  .is-menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .is-menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .is-menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-header .topbar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 16px 24px rgba(0, 0, 0, .08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
  }
  .site-header.is-menu-open .topbar { opacity: 1; visibility: visible; transform: translateY(0); }
  .site-header .topbar a {
    grid-column: auto;
    width: 100%;
    min-height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f7f7f7;
  }
  .site-header .topbar a[href="#portfolio"],
  .site-header .topbar a[href="#curriculo"] { grid-column: 1 / -1; }
  .menu-toggle:focus-visible, .topbar a:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
}
@media (max-width: 360px) {
  .site-header { padding: 14px 12px; gap: 10px; }
  .site-header .brand-mark { flex-basis: 40px; width: 40px; height: 40px; }
  .site-header .subtitle { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-toggle span, .site-header .topbar { transition: none; }
}

/* Menu compacto para celulares e tablets. */
@media (max-width: 900px) {
  .site-header {
    position: relative;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    z-index: 10;
  }
  .site-header .brand { min-width: 0; gap: 10px; justify-content: flex-start; }
  .site-header .brand-mark { width: 44px; height: 44px; flex: 0 0 44px; }
  .site-header .title { font-size: 18px; line-height: 1.2; margin: 0 0 4px; }
  .site-header .subtitle { max-width: 230px; font-size: 12px; line-height: 1.45; margin: 0; }
  .menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
  }
  .menu-toggle span { width: 22px; height: 2px; background: currentColor; transition: transform .3s ease, opacity .3s ease; }
  .menu-toggle:focus-visible, .topbar a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
  .is-menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .is-menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .is-menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-header .topbar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 16px 20px 20px;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 16px 24px rgba(0,0,0,.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
  }
  .site-header.is-menu-open .topbar { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
  .site-header .topbar a {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 16px;
    border-radius: 10px;
    background: #f7f7f7;
  }
  .site-header .topbar .icon-link { grid-column: auto; justify-content: center; }
}
@media (max-width: 360px) {
  .site-header { padding: 12px; }
  .site-header .subtitle { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-toggle span, .site-header .topbar { transition: none; }
}
