:root {
  --bg: #F7F4EE;
  --paper: #FBFAF6;
  --stone: #EDE9E0;
  --ink: #211F1D;
  --navy: #1F2A3D;
  --muted: #6B6A66;
  --line: #DEDAD0;
  --accent: #C08A3E;
  --accent-ink: #8C5F20;
  --gutter: clamp(24px, 5vw, 72px);
  --max: 1360px;
  --serif: 'Fraunces', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); font-family: var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; }
a { color: var(--navy); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-ink); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }
button { font-family: var(--sans); cursor: pointer; }
figure { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }

.label { font-family: var(--serif); font-size: 15px; letter-spacing: 1.5px; color: var(--navy); }

/* NAV */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(247,244,238,.86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.nav-in { max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-family: var(--serif); font-size: 19px; letter-spacing: 2px; font-weight: 500; color: var(--navy); }
.navlinks { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 32px); font-size: 13px; letter-spacing: 1px; font-weight: 500; }
.langbtn { background: none; border: 1px solid var(--navy); border-radius: 999px; padding: 6px 14px; font-size: 12px; letter-spacing: 1px; color: var(--navy); transition: background .2s, color .2s; }
.langbtn:hover { background: var(--navy); color: var(--bg); }

/* HERO */
.hero { padding: clamp(48px, 8vw, 112px) var(--gutter) clamp(56px, 8vw, 120px); }
.hero-in { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.kicker { font-size: 12px; letter-spacing: 2.5px; color: var(--accent-ink); margin: 0 0 28px; font-weight: 500; display: flex; align-items: center; gap: 16px; }
.kicker::before { content: ""; width: 40px; height: 1px; background: var(--accent); flex-shrink: 0; }
h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(46px, 6.6vw, 104px); line-height: 1.0; letter-spacing: -0.02em; margin: 0 0 36px; color: var(--navy); }
h1 .h1a, h1 .h1b { display: block; }
h1 .h1b { font-style: italic; font-weight: 300; color: var(--accent-ink); }
.herobody { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.65; color: #4A4844; max-width: 50ch; margin: 0 0 48px; }
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, max-content)); gap: 20px 48px; border-top: 1px solid var(--line); padding-top: 24px; font-size: 14px; color: var(--ink); }
.contact li { display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.clabel { font-size: 10px; letter-spacing: 2px; color: var(--muted); font-weight: 500; }
.hero-fig { position: relative; aspect-ratio: 1 / 1; background: var(--stone); overflow: hidden; }
.hero-fig::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(31,42,61,.22); pointer-events: none; }
.hero-fig img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; mix-blend-mode: multiply; transform: scale(1.28) translateY(-8%); }
.hero-fig figcaption { position: absolute; left: 28px; bottom: 26px; z-index: 2; font-size: 11px; letter-spacing: 2px; color: var(--accent-ink); font-weight: 500; }

/* SOBRE */
.about { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(56px, 7vw, 96px) var(--gutter); }
.about-in { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 48px; }
.about-side { display: flex; flex-direction: column; gap: 28px; align-items: flex-start; }
.about-photo { width: 100%; max-width: 280px; aspect-ratio: 4 / 5; background: var(--paper); overflow: hidden; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.aboutbody { font-family: var(--serif); font-weight: 300; font-size: clamp(20px, 2.1vw, 30px); line-height: 1.5; color: var(--navy); max-width: 44em; margin: 0 0 56px; letter-spacing: -0.005em; }
.process { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--navy); }
.process li { padding: 18px 16px 0 0; display: flex; flex-direction: column; gap: 10px; }
.process span { font-family: var(--serif); font-size: 13px; color: var(--accent-ink); letter-spacing: 1px; }
.process b { font-weight: 500; font-size: 14px; line-height: 1.35; color: var(--ink); }

/* TRABALHO */
.work { padding: clamp(64px, 8vw, 120px) var(--gutter) clamp(24px, 4vw, 48px); }
.work-in { max-width: var(--max); margin: 0 auto; }
.worklabel { font-family: var(--serif); font-size: 15px; letter-spacing: 1.5px; color: var(--navy); margin-bottom: clamp(24px, 4vw, 56px); }
.project { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 80px); padding: clamp(40px, 6vw, 88px) 0; border-top: 1px solid var(--line); }
.p-head { align-self: start; position: sticky; top: 112px; }
.p-num { display: block; font-family: var(--serif); font-weight: 300; font-size: clamp(56px, 6vw, 88px); line-height: 1; color: var(--accent); margin-bottom: 20px; letter-spacing: -0.02em; }
.badge { display: inline-block; background: var(--navy); color: var(--bg); font-size: 10px; letter-spacing: 1.5px; padding: 5px 12px; border-radius: 999px; margin-bottom: 18px; font-weight: 500; }
.meta { font-size: 11px; letter-spacing: 1.5px; color: var(--accent-ink); margin-bottom: 12px; font-weight: 500; line-height: 1.5; }
.cardtitle { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; margin: 0 0 16px; color: var(--navy); letter-spacing: -0.01em; }
.cardbody { font-size: 15px; line-height: 1.7; color: var(--muted); margin: 0; max-width: 46ch; }

.gallery { display: grid; gap: 12px; min-width: 0; }
.gallery figure { position: relative; overflow: hidden; background: var(--stone); cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.gallery figure:hover img { transform: scale(1.035); }
.g-ryzi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-ryzi figure { aspect-ratio: 1 / 1; }
.g-ryzi .big { grid-column: span 2; grid-row: span 2; }
.g-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-grid2 figure { aspect-ratio: 4 / 3; }
.paper img, .tall img { mix-blend-mode: multiply; object-fit: contain; }
.paper { background: var(--stone); }
.tall { aspect-ratio: 1100 / 1362 !important; background: #fff !important; }
.tall img { mix-blend-mode: normal; object-fit: cover; }
.dark { background: #262626 !important; }
.dark img { object-fit: contain; }
.g-lamoda { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g-lamoda figure.f3 { grid-column: span 2; aspect-ratio: 1 / 1; }
.g-lamoda figure.f2 { grid-column: span 3; aspect-ratio: 4 / 3; }
.g-lamoda figure.photo img { object-fit: cover; }
.g-lamoda figure.photo:last-of-type img { object-position: 0 50%; }
.gallery figcaption.tag { top: 12px; left: 12px; background: rgba(251,250,246,.93); color: var(--navy); padding: 5px 10px; border-radius: 999px; font-size: 9px; letter-spacing: 1.2px; }
.gallery figcaption { position: absolute; top: 12px; left: 14px; z-index: 2; font-size: 10px; letter-spacing: 1.5px; font-weight: 500; color: var(--accent-ink); }
.g-gren .wide { grid-column: span 2; aspect-ratio: 16 / 10; }

/* DESENHO TECNICO */
.draw { background: var(--navy); color: var(--bg); padding: clamp(64px, 8vw, 120px) var(--gutter); margin-top: clamp(32px, 5vw, 64px); }
.draw-in { max-width: var(--max); margin: 0 auto; }
.draw-head { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 48px; margin-bottom: clamp(40px, 5vw, 72px); }
.draw .label { color: var(--accent); }
.draw-title { font-family: var(--serif); font-weight: 300; font-size: clamp(24px, 3vw, 42px); line-height: 1.25; margin: 0; max-width: 24em; letter-spacing: -0.01em; }
.draw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(247,244,238,.14); border: 1px solid rgba(247,244,238,.14); }
.draw-grid figure { background: var(--navy); aspect-ratio: 1 / 1; padding: clamp(14px, 2.2vw, 36px); cursor: zoom-in; }
.draw-grid img { width: 100%; height: 100%; object-fit: contain; filter: invert(1); mix-blend-mode: screen; opacity: .94; transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .3s; }
.draw-grid figure:hover img { transform: scale(1.04); opacity: 1; }

/* COMPETENCIAS */
.skills { padding: clamp(56px, 7vw, 96px) var(--gutter); background: var(--paper); border-bottom: 1px solid var(--line); }
.skills-in { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 48px; }
.skilllist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.skilllist li { display: flex; gap: 16px; align-items: baseline; padding: 20px 0; border-top: 1px solid var(--line); font-family: var(--serif); font-size: clamp(17px, 1.6vw, 21px); color: var(--navy); line-height: 1.3; }
.skilllist li span { font-family: var(--sans); font-size: 11px; letter-spacing: 1px; color: var(--accent-ink); font-weight: 500; flex-shrink: 0; min-width: 22px; }

/* TRAJETORIA */
.timeline { padding: clamp(56px, 7vw, 104px) var(--gutter); }
.tl-in { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 48px; }
.tl-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 4fr) minmax(0, 3fr); gap: 8px 32px; align-items: baseline; padding: 22px 0; border-top: 1px solid var(--line); }
.tl-list .tl-row:first-child { border-top-color: var(--navy); }
.tl-years { font-family: var(--serif); font-size: 15px; color: var(--accent-ink); letter-spacing: .5px; white-space: nowrap; }
.tl-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tl-co { font-family: var(--serif); font-weight: 400; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.25; color: var(--navy); }
.tl-co a { color: inherit; border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; }
.tl-co a::after { content: " \2192"; font-family: var(--sans); font-size: .7em; color: var(--accent-ink); }
.tl-co a:hover { border-bottom-color: var(--accent); }
.tl-role { font-size: 13px; color: var(--muted); letter-spacing: .3px; }
.tl-note { font-size: 13px; line-height: 1.5; color: var(--muted); }
.edu { margin-top: clamp(40px, 5vw, 72px); }
.edu-label { font-family: var(--serif); font-size: 15px; letter-spacing: 1.5px; color: var(--navy); margin-bottom: 16px; }
.edu-list li { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 7fr); gap: 8px 32px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink); line-height: 1.5; }
.edu-y { font-family: var(--serif); font-size: 15px; color: var(--accent-ink); }

/* FOOTER */
.footer { background: var(--bg); padding: clamp(64px, 9vw, 128px) var(--gutter) 32px; }
.footer-in { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; }
.ctaline { font-family: var(--serif); font-weight: 300; font-size: clamp(44px, 7vw, 112px); line-height: 1; letter-spacing: -0.02em; color: var(--navy); }
.cta-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.ctabtn { display: inline-block; padding: 16px 30px; background: var(--navy); color: var(--bg); border-radius: 2px; font-size: 14px; letter-spacing: .5px; transition: background .25s, color .25s; }
.ctabtn:hover { background: var(--accent-ink); color: #fff; }
.ctacopy { min-width: 148px; padding: 15px 20px; background: none; border: 1px solid var(--navy); border-radius: 2px; font-size: 13px; letter-spacing: .5px; color: var(--navy); text-align: center; transition: background .25s, color .25s, border-color .25s; }
.ctacopy:hover { background: var(--navy); color: var(--bg); }
.ctacopy.done { border-color: var(--accent); color: var(--accent-ink); background: none; }
.ctalink { font-size: 13px; letter-spacing: 1.5px; font-weight: 500; border-bottom: 1px solid var(--navy); padding-bottom: 3px; }
.footer-base { max-width: var(--max); margin: clamp(48px, 7vw, 96px) auto 0; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; letter-spacing: 1.5px; color: var(--muted); }

.footer-note { max-width: var(--max); margin: 16px auto 0; font-size: 11px; line-height: 1.6; letter-spacing: .3px; color: var(--muted); }

/* LIGHTBOX */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(20,24,34,.92); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 92vw; max-height: 90vh; width: auto; height: auto; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: rgba(0,0,0,.28); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; transition: background .2s; }
.lb-nav:hover { background: rgba(0,0,0,.55); }
.lb-nav[hidden], .lb-count[hidden] { display: none; }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-count { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.85); font-size: 12px; letter-spacing: 2px; font-weight: 500; }
@media (max-width: 720px) { .lb-nav { width: 44px; height: 44px; top: auto; bottom: 14px; transform: none; } .lb-prev { left: 16px; } .lb-next { right: 16px; } .lightbox img { max-height: 78vh; } }
.lb-close { position: fixed; top: 16px; right: 20px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: rgba(0,0,0,.25); color: #fff; font-size: 26px; line-height: 1; }

/* REVEAL */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .gallery img, .draw-grid img { transition: none; }
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-fig { aspect-ratio: 4 / 3; order: -1; }
  .hero-fig img { object-position: 50% 58%; }
  .project, .about-in, .draw-head, .skills-in, .tl-in { grid-template-columns: 1fr; }
  .p-head { position: static; }
  .about-in, .draw-head, .skills-in, .tl-in { gap: 20px; }
  .about-side { gap: 20px; }
  .about-photo { max-width: 240px; }
  .process { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 28px; }
  .skilllist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .nav-in { padding-top: 14px; padding-bottom: 14px; }
  .navlinks { gap: 16px; }
  .brand { font-size: 16px; letter-spacing: 1.5px; }
  .hero-fig { aspect-ratio: 1 / 1; }
  .g-ryzi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-grid2 { gap: 8px; }
  .gallery { gap: 8px; }
  .g-lamoda figure.f3 { grid-column: span 3; }
  .g-lamoda figure.f3:nth-of-type(3) { grid-column: span 6; aspect-ratio: 4 / 3; }
  .gallery figcaption { top: 8px; left: 10px; right: 8px; font-size: 9px; letter-spacing: .8px; line-height: 1.4; }
  .gallery figcaption.tag { top: 8px; left: 8px; right: auto; max-width: calc(100% - 16px); padding: 4px 8px; font-size: 8px; letter-spacing: .6px; line-height: 1.3; border-radius: 12px; }
  .g-lamoda figure.paper img { padding-top: 30px; }
  .g-lamoda figure.f3:nth-of-type(8) { grid-column: span 6; aspect-ratio: 4 / 3; }
  .g-lamoda figure.f2 { grid-column: span 6; }
  .draw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skilllist { grid-template-columns: 1fr; }
  .tl-row { grid-template-columns: 1fr; gap: 4px; padding: 18px 0; }
  .edu-list li { grid-template-columns: 1fr; gap: 2px; }
  .footer-in { align-items: flex-start; }
}
@media (max-width: 560px) {
  .hide-s { display: none; }
  .g-grid2:not(.g-usa) { grid-template-columns: 1fr; }
  .g-gren .wide { grid-column: auto; aspect-ratio: 4 / 3; }
}
