/* Wiliam Bonetti - portfolio
   Direcao: portfolio de desenvolvedor, linguagem tecnica sobria, um unico acento (laranja queimado).
   Formas: containers 14px, botoes e chips em pill. Tema: automatico (prefers-color-scheme) com alternancia manual. */

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #e8eaee;
  --text: #111318;
  --muted: #4a515e;
  --line: #d6d9df;
  --line-strong: #b4b9c3;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --accent-soft: #fbe3d6;
  --shadow: 27 42 65;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --r: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: 16px;
  --nav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0e11;
    --surface: #14171c;
    --surface-2: #1b1f26;
    --text: #e9ebef;
    --muted: #9ba3b0;
    --line: #262b33;
    --line-strong: #3a414c;
    --accent: #ff8a4c;
    --accent-ink: #1a0d04;
    --accent-soft: #2a1b12;
    --shadow: 0 0 0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0e11;
  --surface: #14171c;
  --surface-2: #1b1f26;
  --text: #e9ebef;
  --muted: #9ba3b0;
  --line: #262b33;
  --line-strong: #3a414c;
  --accent: #ff8a4c;
  --accent-ink: #1a0d04;
  --accent-soft: #2a1b12;
  --shadow: 0 0 0;
  color-scheme: dark;
}
@media (min-width: 768px) {
  :root { --gutter: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1200px, 100% - var(--gutter) * 2); margin-inline: auto; }
.ic { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 1.5rem; }
.brand { font-weight: 650; letter-spacing: -0.02em; font-size: 1.05rem; margin-right: auto; white-space: nowrap; }
.brand span { color: var(--accent); }
.nav-links { display: none; gap: 1.75rem; font-size: 0.95rem; color: var(--muted); }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--text); }
@media (min-width: 720px) { .nav-links { display: flex; } }
.theme-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 999px; background: transparent;
  color: var(--text); cursor: pointer; transition: transform .2s var(--ease), background .2s;
}
.theme-btn:hover { background: var(--surface-2); }
.theme-btn:active { transform: scale(0.94); }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  height: 46px; padding: 0 1.3rem; border-radius: 999px;
  font: 600 0.97rem/1 var(--sans); white-space: nowrap; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 40px; padding: 0 1.05rem; font-size: 0.9rem; }

/* ---------- Type ---------- */
.eyebrow {
  font: 500 0.78rem/1.2 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
h1 {
  font-size: clamp(2.7rem, 5.6vw, 4.7rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 650;
}
h1 .accent { color: var(--accent); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 650; max-width: 20ch; }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 620; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.25rem); color: var(--muted); max-width: 46ch; line-height: 1.55; }
.section-sub { color: var(--muted); max-width: 60ch; margin-top: 1rem; }
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section-head { margin-bottom: clamp(2rem, 4vw, 3.5rem); }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.38rem 0.8rem;
  border-radius: 999px; border: 1px solid var(--line-strong); font: 500 0.82rem/1.2 var(--mono); color: var(--text);
  background: transparent;
}
.chip .ic { width: 1rem; height: 1rem; }

/* ---------- Frames (screenshots) ---------- */
.frame {
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface);
  box-shadow: 0 30px 50px -28px rgb(var(--shadow) / 0.45), 0 2px 6px rgb(var(--shadow) / 0.08);
}
.frame-bar {
  padding: 0.55rem 1rem; border-bottom: 1px solid var(--line); background: var(--surface-2);
  font: 500 0.75rem/1.2 var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.frame img { width: 100%; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); }
.hero .wrap { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: 5fr 7fr; gap: 2rem; } }
.hero-copy { display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.hero-visual { position: relative; aspect-ratio: 1 / 0.9; width: 100%; }
.hero-visual .frame { position: absolute; }
.hero-visual .a { top: 0; right: 0; width: 90%; }
.hero-visual .b { bottom: 0; left: 0; width: 72%; }

@media (prefers-reduced-motion: no-preference) {
  .hero [data-in] { opacity: 0; animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 110ms + 80ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  @supports (animation-timeline: scroll()) {
    /* profundidade: o print da frente sobe um pouco mais rapido que o do fundo enquanto a pagina rola */
    .hero-visual .b { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 70vh; }
    @keyframes drift { to { transform: translateY(-34px); } }
  }
}

/* ---------- Destaque (plataforma white-label) ---------- */
.feature { background: var(--surface); border-block: 1px solid var(--line); }
.feature-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) { .feature-grid { grid-template-columns: 5fr 7fr; gap: 5rem; } }
.feature-intro { display: flex; flex-direction: column; gap: 1.25rem; align-items: flex-start; }
.feature-intro .lead { max-width: 40ch; }
.private-note { font: 500 0.82rem/1.4 var(--mono); color: var(--muted); border-left: 2px solid var(--accent); padding-left: 0.85rem; max-width: 38ch; }
.feature-groups { display: grid; gap: 2rem 2.5rem; }
@media (min-width: 640px) { .feature-groups { grid-template-columns: 1fr 1fr; } }
.fg { border-top: 1px solid var(--line-strong); padding-top: 1.1rem; }
.fg h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.fg p { color: var(--muted); font-size: 0.98rem; }
.feature .chips { margin-top: 2.5rem; }

/* ---------- Projetos com print ---------- */
.case { display: grid; gap: 2rem; align-items: center; margin-bottom: clamp(3.5rem, 7vw, 6rem); }
@media (min-width: 960px) {
  .case-a { grid-template-columns: 8fr 4fr; gap: 3.5rem; }
  .case-b { grid-template-columns: 5fr 7fr; gap: 4rem; }
}
.case-text { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.case-text p { color: var(--muted); max-width: 48ch; }
.case-list { display: grid; gap: 0.55rem; color: var(--muted); font-size: 0.97rem; max-width: 48ch; }
.case-list li { padding-left: 1.1rem; position: relative; }
.case-list li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 0.4rem; height: 2px; background: var(--accent); }
.case-note { font: 500 0.78rem/1.4 var(--mono); color: var(--muted); }
.stack-pair { position: relative; }
.stack-pair .frame.front { position: relative; }
@media (min-width: 640px) {
  .stack-pair { padding-bottom: 14%; }
  .stack-pair .back { width: 88%; margin-left: auto; }
  .stack-pair .front { position: absolute; left: 0; bottom: 0; width: 70%; }
}
@media (max-width: 639px) { .stack-pair { display: grid; gap: 1rem; } }

.duo { display: grid; gap: 2rem; }
@media (min-width: 860px) { .duo { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }
.duo-card { display: flex; flex-direction: column; gap: 1.25rem; }
.duo-card .frame { transition: transform .5s var(--ease); }
.duo-card:hover .frame { transform: translateY(-4px); }
.duo-body { display: flex; flex-direction: column; gap: 0.8rem; align-items: flex-start; flex: 1; }
.duo-body p { color: var(--muted); }
.duo-body .btn { margin-top: auto; }

/* ---------- Mais trabalhos (bento) ---------- */
.bento { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .bento { grid-template-columns: repeat(6, 1fr); } }
.tile {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 1.6rem;
  display: flex; flex-direction: column; gap: 0.75rem; justify-content: space-between; min-height: 220px;
  transition: transform .4s var(--ease), border-color .2s;
}
.tile:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.tile h3 { font-size: 1.3rem; }
.tile p { color: var(--muted); font-size: 0.98rem; max-width: 52ch; }
.tile .chips { margin-top: 0.5rem; }
@media (min-width: 900px) {
  .t-4 { grid-column: span 4; }
  .t-2 { grid-column: span 2; }
  .t-6 { grid-column: span 6; }
}
.t-tint {
  background: linear-gradient(140deg, var(--accent-soft), var(--surface) 70%);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}
.t-dots {
  background-color: var(--surface);
  background-image: radial-gradient(color-mix(in srgb, var(--muted) 22%, transparent) 1px, transparent 1.2px);
  background-size: 16px 16px;
}
.tile h3 + p { margin-top: 0.55rem; }
.t-solid { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); min-height: 0; }
.t-solid p { color: color-mix(in srgb, var(--accent-ink) 82%, transparent); }
.t-solid .chip { border-color: color-mix(in srgb, var(--accent-ink) 45%, transparent); color: var(--accent-ink); }
.t-solid:hover { border-color: var(--accent); }
@media (min-width: 900px) { .t-solid { flex-direction: row; align-items: center; gap: 2.5rem; } .t-solid .tile-copy { flex: 1; } .t-solid .chips { margin: 0; justify-content: flex-end; max-width: 380px; } }

/* ---------- Stack ---------- */
.stack-grid { display: grid; gap: 2.5rem 3rem; }
@media (min-width: 900px) {
  .stack-grid { grid-template-columns: repeat(12, 1fr); }
  .sg-7 { grid-column: span 7; }
  .sg-5 { grid-column: span 5; }
}
.sg { border-top: 1px solid var(--line-strong); padding-top: 1.1rem; }
.sg h3 { font-size: 1.05rem; margin-bottom: 1rem; font-weight: 600; }
.sg .chip { font-family: var(--sans); font-weight: 500; font-size: 0.92rem; padding: 0.5rem 0.95rem; }
.sg .chip .ic { width: 1.15rem; height: 1.15rem; }

/* ---------- Sobre ---------- */
.about { background: var(--surface); border-block: 1px solid var(--line); }
.about-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) { .about-grid { grid-template-columns: 7fr 5fr; gap: 4rem; align-items: start; } }
.about-statement { font-size: clamp(1.45rem, 2.7vw, 2.15rem); line-height: 1.28; letter-spacing: -0.02em; font-weight: 500; max-width: 32ch; }
.about-statement .accent { color: var(--accent); }
.facts { display: grid; gap: 1.1rem; }
.facts div { border-top: 1px solid var(--line-strong); padding-top: 0.8rem; }
.facts dt { font: 500 0.75rem/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.3rem; }
.facts dd { font-size: 1.05rem; }

/* Sobre - timeline */
.about-section { margin-top: 2rem; }
.about-section h3 {
  font-size: 1rem; font-weight: 600; margin-bottom: 1rem;
  padding-bottom: 0.6rem; border-bottom: 1px solid var(--line-strong);
}
.timeline { display: grid; gap: 1.25rem; }
.tl-item { display: grid; gap: 0.35rem; }
.tl-role { font-weight: 600; font-size: 1.05rem; }
.tl-company { color: var(--muted); font-size: 0.95rem; }
.tl-period { font: 500 0.78rem/1.3 var(--mono); color: var(--accent); }
.tl-desc { color: var(--muted); font-size: 0.95rem; margin-top: 0.25rem; max-width: 50ch; }
.tl-edu { font-weight: 500; }
.tl-sub { color: var(--muted); font-size: 0.95rem; }
.cert-list { display: grid; gap: 0.9rem; }
.cert-item { display: grid; gap: 0.2rem; }
.cert-name { font-weight: 500; font-size: 0.98rem; }
.cert-meta { font: 500 0.78rem/1.3 var(--mono); color: var(--muted); }

/* ---------- Contato ---------- */
.contact { text-align: left; }
.contact h2 { max-width: 16ch; font-size: clamp(2.3rem, 5.2vw, 4rem); }
.contact .lead { margin-top: 1.25rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; align-items: center; }
.contact-links { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2.5rem; color: var(--muted); }
.contact-links a { display: inline-flex; align-items: center; gap: 0.5rem; transition: color .2s; }
.contact-links a:hover { color: var(--accent); }

.footer { border-top: 1px solid var(--line); padding-block: 1.75rem; color: var(--muted); font-size: 0.9rem; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; }

/* ---------- Reveal ao rolar ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .js .reveal.in { opacity: 1; transform: none; }
}

@media (max-width: 719px) {
  .nav .wrap { gap: 0.75rem; }
  .brand { font-size: 1rem; }
}
