:root {
  --bg: #ffffff;
  --surface: #f6f8fa;
  --text: #2c3b4d;
  --muted: rgba(44, 59, 77, 0.68);
  --border: rgba(44, 59, 77, 0.14);
  --accent: #a35139;
  --accent-soft: rgba(163, 81, 57, 0.1);
  --ok: #1d7a4a;
  --shadow: 0 1px 2px rgba(20, 30, 45, 0.06), 0 8px 24px rgba(20, 30, 45, 0.06);
  --radius: 14px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1520;
    --surface: #151e2b;
    --text: #d9e1ea;
    --muted: rgba(217, 225, 234, 0.66);
    --border: rgba(217, 225, 234, 0.16);
    --accent: #e39a7e;
    --accent-soft: rgba(227, 154, 126, 0.14);
    --ok: #5ac98a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 800px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font-weight: 700; text-decoration: none; letter-spacing: -0.02em; }
.brand span { color: var(--accent); }
.topbar nav { display: flex; align-items: center; gap: 18px; font-size: 13px; }
.topbar nav a { text-decoration: none; color: var(--muted); }
.topbar nav a:hover { color: var(--accent); }

.lang { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang button {
  font: inherit; font-size: 12px; font-weight: 600;
  background: transparent; color: var(--muted);
  border: 0; padding: 4px 11px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--bg); }

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; }
.avatar {
  position: relative; width: 220px; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden;
  background: linear-gradient(145deg, var(--accent-soft), var(--surface));
  border: 1px solid var(--border); box-shadow: var(--shadow);
  display: grid; place-items: center;
}
.avatar .initials { font-size: 84px; font-weight: 700; color: var(--accent); letter-spacing: -0.04em; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero h1 { margin: 0 0 6px; font-size: 34px; line-height: 1.15; letter-spacing: -0.03em; }
.hero .role { margin: 0 0 16px; color: var(--accent); font-weight: 600; }
.hero .pitch { margin: 0 0 20px; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); }

.links { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-block; text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn.primary:hover { color: var(--bg); filter: brightness(1.08); }

/* ---------- seções ---------- */
section { padding: 44px 0; }
h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.02em; }
.sub { margin: 0 0 26px; color: var(--muted); font-size: 14px; }
mark { background: var(--accent-soft); color: var(--accent); padding: 0 4px; border-radius: 4px; font-weight: 600; }

.about p { margin: 0 0 14px; max-width: 64ch; }

/* ---------- stack ---------- */
.stack { display: grid; gap: 14px; }
.stack-row { display: grid; grid-template-columns: 130px 1fr; gap: 14px; align-items: baseline; }
.stack-row dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.stack-row dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12.5px; padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
}
.chip.hi { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---------- timeline de projetos ---------- */
.timeline { display: grid; gap: 56px; }
.entry { display: grid; grid-template-columns: 150px 1fr; gap: 28px; }
.entry-side { text-align: right; padding-top: 2px; }
.entry-side .name { margin: 0; font-weight: 700; font-size: 17px; }
.entry-side .when { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.entry-main { position: relative; padding-left: 28px; border-left: 2px solid var(--border); min-width: 0; }
.entry-main::before {
  content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--bg);
}
.entry.featured .entry-main { border-left-color: var(--accent); }
.badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 999px; margin-bottom: 6px;
}
.entry-main h3 { margin: 0 0 4px; font-size: 19px; letter-spacing: -0.02em; }
.entry-main .tagline { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.problem { margin: 0 0 16px; }

.carousel { position: relative; margin: 0 0 20px; }
.track {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 2px 2px 12px; scrollbar-width: thin;
}
.track a { flex: 0 0 auto; scroll-snap-align: start; display: block; border-radius: 10px; }
.track img {
  display: block; height: 240px; width: auto; max-width: 100%;
  border-radius: 10px; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface);
}
.car-btn {
  position: absolute; top: 50%; transform: translateY(-60%); z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit; font-size: 16px; cursor: pointer; box-shadow: var(--shadow);
}
.car-btn:hover { color: var(--accent); border-color: var(--accent); }
.car-btn.prev { left: -10px; }
.car-btn.next { right: -10px; }

.bullets { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 10px; }
.bullets li { position: relative; padding-left: 20px; font-size: 14px; }
.bullets li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }

.arch {
  margin: 0 0 16px; padding: 10px 14px; font-size: 13px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.arch strong { color: var(--text); }
.metrics { margin: 0 0 14px; font-size: 13px; font-weight: 600; color: var(--ok); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.entry-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- como eu trabalho ---------- */
.method { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.method li { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: 14px; }
.method strong { display: block; margin-bottom: 4px; color: var(--accent); }

/* ---------- contato / rodapé ---------- */
.contact-card {
  padding: 26px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
}
.contact-card p { margin: 0 0 18px; max-width: 60ch; }
footer { padding: 28px 0 48px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }

/* ---------- responsivo ---------- */
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 40px; }
  .avatar { width: 150px; }
  .avatar .initials { font-size: 60px; }
  .hero h1 { font-size: 28px; }
  .topbar nav a.hide-sm { display: none; }
  .stack-row { grid-template-columns: 1fr; gap: 6px; }
  .entry { grid-template-columns: 1fr; gap: 10px; }
  .entry-side { text-align: left; padding-left: 30px; }
  .entry-side .name { display: none; }
  .entry-main { padding-left: 20px; margin-left: 5px; }
  .track img { height: 190px; }
  .car-btn.prev { left: -6px; }
  .car-btn.next { right: -6px; }
  .method { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.problem strong, .arch strong { color: var(--accent); }
.problem strong::after, .arch strong::after { content: ":"; }

/* ---------- visualizador de imagens (lightbox) ---------- */
.track a { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; margin: 0; padding: 0; border: 0;
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  background: rgba(8, 12, 18, 0.95); color: #fff;
}
.lightbox:not([open]) { display: none; }
.lightbox::backdrop { background: rgba(8, 12, 18, 0.95); }
.lb-stage {
  width: 100%; height: 100%; overflow: auto; display: flex;
  align-items: center; justify-content: center; padding: 64px 16px 20px;
}
.lb-stage img {
  display: block; max-width: 100%; max-height: calc(100vh - 84px); object-fit: contain;
  border-radius: 10px; background: var(--surface); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.lb-stage.tall { align-items: flex-start; }
.lb-stage.tall img { width: min(100%, 900px); max-height: none; height: auto; }
.lb-close {
  position: fixed; top: 12px; right: 12px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4); background: rgba(8, 12, 18, 0.85); color: #fff;
  font: inherit; font-size: 28px; line-height: 1; cursor: pointer;
}
.lb-close:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.lb-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
body:has(.lightbox[open]) { overflow: hidden; }

/* navegacao entre imagens no visualizador */
.lb-count {
  position: fixed; top: 20px; left: 16px; z-index: 2;
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: rgba(255, 255, 255, 0.85);
}
.lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4); background: rgba(8, 12, 18, 0.85); color: #fff;
  font: inherit; font-size: 30px; line-height: 1; padding-bottom: 4px; cursor: pointer;
}
.lb-nav.prev { left: 12px; }
.lb-nav.next { right: 12px; }
.lb-nav:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
.lb-nav:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lb-nav:disabled { opacity: 0.25; cursor: default; }
.lightbox .lb-stage { padding-left: 76px; padding-right: 76px; }

@media (max-width: 720px) {
  .lb-nav { top: auto; bottom: 18px; transform: none; width: 44px; height: 44px; }
  .lb-nav.prev { left: calc(50% - 56px); }
  .lb-nav.next { right: calc(50% - 56px); }
  .lightbox .lb-stage { padding: 64px 12px 84px; }
  .lb-stage img { max-height: calc(100vh - 160px); }
}
