/* ---------- Tokens (tirados da referência) ---------- */
:root {
  --bg: #0d0f12;
  --bg-2: #161b22;
  --panel: #1a2029;
  --line: rgba(255, 255, 255, .14);
  --text: #f2f4f7;
  --muted: #9aa3ae;
  --accent: #2f86c6;
  --accent-dark: #1d5f8f;
  --gutter: clamp(16px, 6vw, 96px);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --font: "Montserrat", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--accent); color: #fff; padding: 10px 14px; border-radius: 4px; }
.skip:focus { top: 16px; }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 22px var(--gutter); transition: background .3s, padding .3s; }
.nav.is-scrolled { background: rgba(13, 15, 18, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding-block: 14px; }
.nav__links { display: flex; gap: clamp(18px, 3vw, 40px); font-size: .82rem; font-weight: 500; }
.nav__links a { color: var(--text); opacity: .85; transition: color .2s, opacity .2s; padding-block: 6px; }
.nav__links a:hover { opacity: 1; }
.nav__links a.is-active { color: var(--accent); opacity: 1; }
.nav__phone { display: flex; align-items: center; gap: 6px; font-size: .74rem; color: var(--text); opacity: .85; }
.nav__phone:hover { opacity: 1; }
.nav__phone svg { width: 15px; height: 15px; }

/* ---------- Painéis ---------- */
.panel { position: relative; min-height: 100svh; padding: 110px var(--gutter) 80px; isolation: isolate; overflow: hidden; }
.title {
  position: relative; display: inline-block;
  font-size: clamp(1.4rem, 2.2vw, 1.75rem); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; line-height: 1.1;
  padding-bottom: 8px; margin-bottom: 14px;
}
.title::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); }
.title--sm { font-size: .82rem; font-weight: 700; letter-spacing: .06em; padding-bottom: 6px; margin-bottom: 22px; }
.title--sm::after { height: 1.5px; }

.fs-btn { position: absolute; right: var(--gutter); bottom: 28px; width: 34px; height: 34px; display: grid; place-items: center; color: var(--text); opacity: .8; border-radius: 4px; transition: opacity .2s, background .2s; z-index: 2; }
.fs-btn:hover { opacity: 1; background: rgba(255,255,255,.08); }
.fs-btn svg { width: 15px; height: 15px; }

/* ---------- Botões (vazados, como na referência) ---------- */
.hero__actions { display: flex; flex-wrap: wrap; gap: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; min-width: 128px; padding: 0 26px; border: 1.5px solid rgba(255,255,255,.85); border-radius: 999px; font-size: .82rem; font-weight: 500; transition: background .2s, color .2s, border-color .2s, transform .15s var(--ease-out); }
.btn:hover { background: #fff; color: var(--bg); }
.btn:active { transform: scale(.97); }
.btn--solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--solid:hover { background: #fff; border-color: #fff; }

/* ---------- 1. Início ---------- */
.hero { display: flex; align-items: center; background: #08090b; }
.hero__text { position: relative; z-index: 2; max-width: 560px; margin: -8vh 0 0 clamp(0px, 3.5vw, 64px); }
.hero__name { line-height: .95; margin-bottom: 8px; text-transform: uppercase; }
.hero__first { display: block; font-weight: 400; font-size: clamp(2rem, 3.9vw, 3.6rem); letter-spacing: .01em; }
.hero__last { display: block; font-weight: 800; font-size: clamp(2.7rem, 5.6vw, 5.2rem); letter-spacing: .005em; }
.hero__role { font-size: clamp(.85rem, 1.45vw, 1.3rem); letter-spacing: .24em; font-weight: 400; margin-bottom: clamp(26px, 3.4vw, 44px); }
.hero .btn { min-height: 30px; min-width: 116px; padding: 0 22px; font-size: .78rem; font-weight: 500; border-width: 1.5px; }
.about__cv { margin-top: 26px; }
.icons { grid-template-columns: repeat(auto-fill, 56px) !important; }
.icons li { text-align: center; }

.social { position: absolute; left: var(--gutter); bottom: 26px; display: flex; gap: 2px; z-index: 2; }
.social a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 4px; opacity: .9; transition: opacity .2s, color .2s; }
.social a:hover { opacity: 1; color: var(--accent); }
.social svg { width: 16px; height: 16px; }

/* Foto de fundo, igual à referência */
.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("https://images.unsplash.com/photo-1510519138101-570d1dca3d66?w=2000&q=75&auto=format&fit=crop") 70% 55% / cover no-repeat, #0b0c0e;
  transform: scale(1.06); }
.hero__bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(5,6,8,.55) 0%, rgba(5,6,8,.25) 40%, transparent 65%), linear-gradient(0deg, rgba(5,6,8,.45), transparent 30%); }

/* Entrada: a foto aproxima devagar e o texto aparece */
.hero__text > *, .social { opacity: 0; }
.is-ready .hero__bg { animation: settle 2.4s var(--ease-out) forwards; }
.is-ready .hero__text > * { animation: rise .9s var(--ease-out) .3s forwards; }
.is-ready .hero__text > :nth-child(2) { animation-delay: .42s; }
.is-ready .hero__text > :nth-child(3) { animation-delay: .52s; }
.is-ready .social { animation: fade .8s .8s forwards; }
@keyframes settle { to { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }

/* ---------- 2. Sobre ---------- */
.about { display: flex; align-items: center; background: #030304; }
.about__photo { position: absolute; top: 0; bottom: 0; right: 0; width: 56%; z-index: -1; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.about__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #030304 0%, rgba(3,3,4,.4) 25%, transparent 50%), linear-gradient(0deg, #030304 0%, transparent 25%); }
.about__text { max-width: 400px; margin-left: clamp(0px, 5vw, 80px); }
.about__mail { display: block; width: fit-content; font-size: .78rem; margin-bottom: 52px; opacity: .9; }
.about__mail:hover { color: var(--accent); opacity: 1; }
.about__text p { font-size: .86rem; line-height: 1.55; margin-bottom: 4px; max-width: 46ch; }
.about__text p + p { margin-top: 10px; }
.about__place { position: absolute; left: calc(var(--gutter) + clamp(0px, 5vw, 80px)); bottom: 32px; display: flex; flex-direction: column; align-items: center; font-size: .76rem; line-height: 1.3; padding: 0 44px; }
.about__place::before, .about__place::after { content: ""; position: absolute; bottom: 7px; width: 30px; height: 1.5px; background: var(--accent); }
.about__place::before { left: 0; } .about__place::after { right: 0; }

/* ---------- 3. Currículo ---------- */
.resume { display: grid; grid-template-columns: 1fr 1.05fr .9fr; gap: clamp(28px, 4.5vw, 72px); align-content: center; background: #1b222b; }
.resume__bg { position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 40% 30% at 55% 8%, rgba(160, 175, 195, .22), transparent 70%),
    radial-gradient(ellipse 30% 40% at 72% 30%, rgba(0,0,0,.5), transparent 70%),
    linear-gradient(160deg, #222b36 0%, #161c24 60%, #0f141a 100%);
  filter: blur(2px);
}
.resume__col > .title--sm:not(:first-child) { margin-top: 34px; }

.skills { display: grid; gap: 16px; }
.skills li { display: grid; grid-template-columns: 22px 6.6rem 1fr; align-items: center; gap: 12px; font-size: .74rem; }
.skills--plain { gap: 12px; }
.skills--plain li { grid-template-columns: 7.6rem 1fr; }
.skills__icon { width: 22px; height: 22px; display: grid; place-items: center; border: 1.2px solid rgba(255,255,255,.75); border-radius: 3px; font-size: .58rem; font-weight: 700; }
.skills__bar { position: relative; height: 1px; background: rgba(255,255,255,.35); }
.skills__bar::before { content: ""; position: absolute; left: 0; top: -.5px; height: 2px; width: 100%; background: #fff; transform-origin: left; transform: scaleX(0); transition: transform 1.1s var(--ease-out); }
.skills__bar::after { content: ""; position: absolute; top: 50%; left: calc(var(--v) * 100%); width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #1b222b; border: 1.5px solid #fff; box-shadow: 0 0 0 2px #1b222b; opacity: 0; transition: opacity .3s .7s; }
.is-in .skills__bar::before { transform: scaleX(var(--v)); }
.is-in .skills__bar::after { opacity: 1; }
.plain { font-size: .74rem; }

.timeline { position: relative; display: grid; gap: 22px; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 1.5px; background: var(--accent); opacity: .7; }
.timeline li { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: center; }
.timeline__when { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; text-align: center; background: var(--accent-dark); font-size: .52rem; line-height: 1.15; font-weight: 600; box-shadow: 0 0 0 3px #1b222b; }
.timeline li:first-child .timeline__when { background: var(--accent); }
.timeline strong { display: block; font-size: .76rem; font-weight: 700; text-transform: uppercase; line-height: 1.3; }
.timeline span:not(.timeline__when) { display: block; font-size: .74rem; color: #cfd5dc; }
.edu { display: grid; gap: 12px; }
.edu strong { display: block; font-size: .78rem; font-weight: 700; }
.edu span { display: block; font-size: .74rem; color: #cfd5dc; }

.lines { display: grid; gap: 10px; font-size: .74rem; }
.icons { display: grid; grid-template-columns: repeat(4, 56px); gap: 10px; }
.icons li { display: grid; justify-items: center; gap: 6px; font-size: .62rem; }
.icons svg { width: 30px; height: 30px; padding: 6px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.8); }

/* ---------- 4. Portfólio ---------- */
.work { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(32px, 5vw, 80px); background: linear-gradient(180deg, #0d0f12, #11161d); }
.work__name { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; text-transform: uppercase; line-height: 1; margin: 22px 0 6px; }
.work__kind { font-size: .78rem; color: var(--accent); letter-spacing: .08em; margin-bottom: 20px; }
.work__text > p:not(.work__kind) { font-size: .88rem; max-width: 52ch; margin-bottom: 16px; }
.features { display: grid; gap: 8px; margin-bottom: 22px; }
.features li { position: relative; padding-left: 22px; font-size: .82rem; color: #cfd5dc; max-width: 56ch; }
.features li::before { content: ""; position: absolute; left: 0; top: .62em; width: 12px; height: 1.5px; background: var(--accent); }
.stack { display: flex; flex-wrap: wrap; gap: 8px; }
.stack li { font-size: .7rem; font-weight: 500; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; }

.app { display: grid; grid-template-columns: 54px 1fr; background: #0e131a; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; overflow: hidden; box-shadow: 0 0 120px rgba(47,134,198,.14), 0 40px 80px -30px #000; font-size: 11px; }
.app__side { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px 0; background: #0a0e13; border-right: 1px solid rgba(255,255,255,.06); }
.app__side b { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--accent); font-size: .78rem; margin-bottom: 8px; }
.app__side i { width: 18px; height: 18px; border-radius: 5px; background: #1a222d; }
.app__side i.on { background: rgba(47,134,198,.45); }
.app__main { padding: 18px; display: grid; gap: 14px; }
.app__top { display: flex; justify-content: space-between; align-items: center; }
.app__top span { font-weight: 700; font-size: 1.15em; }
.app__top em { font-style: normal; color: var(--muted); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; }
.app__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.app__kpis div { background: #141b24; border: 1px solid rgba(255,255,255,.05); border-radius: 8px; padding: 10px 12px; }
.app__kpis small { display: block; color: var(--muted); font-size: .9em; }
.app__kpis strong { font-size: 1.25em; font-weight: 700; }
.app__kpis .warn { color: #e8a054; }
.app__chart { height: 110px; background: #141b24; border-radius: 8px; padding: 10px 0 0; overflow: hidden; }
.app__chart svg { width: 100%; height: 100%; display: block; }
.app__rows { display: grid; gap: 6px; }
.app__rows li { display: grid; grid-template-columns: 1fr auto 72px; gap: 12px; align-items: center; padding: 8px 12px; background: #121820; border-radius: 6px; }
.app__rows em { font-style: normal; text-align: center; padding: 2px 0; border-radius: 999px; background: rgba(255,255,255,.07); color: #cfd5dc; }
.app__rows em.ok { background: rgba(74, 180, 120, .16); color: #7fd3a1; }
.app__rows em.late { background: rgba(232, 160, 84, .16); color: #eeb176; }

.work__cta { margin-top: 26px; }

/* ---------- Outros projetos ---------- */
.more { padding: 40px var(--gutter) 110px; background: #11161d; }
.more__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; margin-bottom: 30px; }
.more__head .title { margin-bottom: 0; }
.more__head p { font-size: .82rem; color: var(--muted); }
.sites { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px); }
.site { display: flex; flex-direction: column; }
.site__shot { display: block; border-radius: 8px; overflow: hidden; background: #0a0d11; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 60px -30px #000; transition: border-color .25s, transform .35s var(--ease-out); }
.site__bar { display: flex; align-items: center; gap: 5px; padding: 8px 12px; background: #0e131a; border-bottom: 1px solid rgba(255,255,255,.06); }
.site__bar i { width: 7px; height: 7px; border-radius: 50%; background: #2a3441; flex: none; }
.site__bar em { font-style: normal; margin-left: 8px; font-size: .64rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site__shot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform .6s var(--ease-out); }
@media (hover: hover) {
  .site__shot:hover { border-color: rgba(47,134,198,.6); transform: translateY(-4px); }
  .site__shot:hover img { transform: scale(1.03); }
}
.site__body { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; flex: 1; }
.site__body h3 { font-size: 1.05rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.site__body p { font-size: .82rem; color: #cfd5dc; max-width: 46ch; }
.site__link { margin-top: auto; padding-top: 6px; align-self: flex-start; font-size: .8rem; font-weight: 600; border-bottom: 1.5px solid var(--accent); transition: color .2s; }
.site__link:hover { color: var(--accent); }
.site__ph { display: grid; place-content: center; justify-items: center; gap: 6px; aspect-ratio: 16 / 10; color: #e9dcc8; text-align: center;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, rgba(196, 160, 110, .22), transparent 70%), linear-gradient(160deg, #2a2420, #14110f); transition: transform .6s var(--ease-out); }
.site__ph svg { width: 64px; height: 40px; margin-bottom: 6px; opacity: .85; }
.site__ph strong { font-size: 1.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.site__ph small { font-size: .72rem; letter-spacing: .2em; opacity: .7; }
@media (hover: hover) { .site__shot:hover .site__ph { transform: scale(1.03); } }
@media (min-width: 1281px) { .sites { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1280px) { .sites { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .sites { grid-template-columns: 1fr; gap: 44px; } }

/* ---------- Rodapé ---------- */
.foot { display: grid; justify-items: center; gap: 22px; padding: 80px var(--gutter) 36px; text-align: center; border-top: 1px solid rgba(255,255,255,.06); }
.foot p { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.foot small { margin-top: 40px; color: var(--muted); font-size: .72rem; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .resume { grid-template-columns: 1fr 1fr; }
  .resume__col:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; column-gap: 56px; }
  .resume__col:last-child > .title--sm { margin-top: 0 !important; grid-row: 1; }
  .resume__col:last-child > ul { grid-row: 2; }
}
@media (max-width: 900px) {
  .hero { align-items: flex-start; padding-top: 130px; }
  .hero__bg { background-position: 66% 50%; }
  .hero__text { margin: 4vh 0 0; }
  .hero__bg::after { background: linear-gradient(180deg, rgba(5,6,8,.75) 0%, rgba(5,6,8,.35) 50%, rgba(5,6,8,.6) 100%); }
  .about { flex-direction: column; justify-content: flex-end; align-items: stretch; padding-top: 0; padding-bottom: 96px; }
  .about__photo { position: relative; width: auto; margin: 0 calc(-1 * var(--gutter)); height: 62svh; z-index: 0; }
  .about__photo::after { background: linear-gradient(0deg, #030304 0%, transparent 35%), linear-gradient(180deg, #030304 0%, transparent 20%); }
  .about__text { margin: -40px 0 0; position: relative; max-width: none; }
  .about__mail { margin-bottom: 26px; }
  .about__place { left: var(--gutter); }
  .resume { grid-template-columns: 1fr; padding-bottom: 96px; }
  .resume__col:last-child { display: block; }
  .resume__col:last-child > .title--sm:not(:first-child) { margin-top: 34px !important; }
  .work { grid-template-columns: 1fr; padding-bottom: 96px; }
}
@media (max-width: 560px) {
  .nav { padding-block: 16px; }
  .nav__links { gap: 16px; font-size: .78rem; }
  .nav__phone span { display: none; }
  .hero__role { letter-spacing: .2em; }
  .btn { min-width: 0; }
  .skills li { grid-template-columns: 22px 6.2rem 1fr; }
  .skills--plain li { grid-template-columns: 6.2rem 1fr; }
  .app { grid-template-columns: 1fr; }
  .app__side { display: none; }
  .app__kpis strong { font-size: 1.05em; }
  .app__rows li { grid-template-columns: 1fr auto 64px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
