:root {
  --bg: #ffffff;
  --bg-soft: #f6f6f4;
  --ink: #111111;
  --text: #3a3a3a;
  --muted: #8a8a8a;
  --line: #ebebeb;
  --green: #0a9447;
  --yellow: #ffcf1f;
  --blue: #1a3d8f;
  --radius: 16px;
  --maxw: 1080px;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -0.02em; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: calc(var(--maxw) + 48px); margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 12px; left: 50%; z-index: 20; transform: translateX(-50%);
  display: flex; align-items: center; gap: 40px;
  padding: 6px 6px 6px 6px; border-radius: 999px; white-space: nowrap;
  background: rgba(255,255,255,.75); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 8px 28px -12px rgba(0,0,0,.2);
}
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; line-height: 1; color: var(--ink); letter-spacing: -0.01em; }
.logo__mark {
  width: 32px; height: 32px; display: grid; place-items: center; flex: none; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: 0;
}
.nav__links { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.nav__links a { padding: 8px 12px; border-radius: 999px; color: var(--text); transition: background .2s, color .2s; }
.nav__links a:hover, .nav__links a.active { background: var(--bg-soft); color: var(--ink); }
.nav__links .nav__cta { background: var(--ink); color: #fff; }
.nav__links .nav__cta:hover { background: #333; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; font: 500 15px/1 "Inter", sans-serif; cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); background: #2a2a2a; }
.btn--line { background: transparent; color: var(--ink); border-color: #d6d6d6; }
.btn--line:hover { background: var(--bg-soft); border-color: #bdbdbd; }
.btn--wa { background: #1fa855; border-color: #1fa855; }
.btn--wa:hover { background: #178e47; }

/* ---------- Hero ---------- */
.hero { padding-top: 168px; padding-bottom: 24px; }
.hero h1 { font-size: clamp(40px, 6.4vw, 72px); font-weight: 600; line-height: 1.05; letter-spacing: -0.035em; max-width: 900px; }
.hero__lead { max-width: 700px; margin: 26px 0 0; font-size: clamp(17px, 1.9vw, 20px); line-height: 1.6; color: var(--text); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 36px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts svg { color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding-top: 120px; }
.section h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 600; letter-spacing: -0.03em; margin-bottom: 40px; }

.card { padding: 26px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.card h3 { font-size: 18px; font-weight: 600; line-height: 1.3; }
.card p { margin: 10px 0 0; color: var(--text); font-size: 15px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 48px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats > div { padding: 28px 24px 28px 0; }
.stats > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.stats dt { font-size: 44px; white-space: nowrap; font-weight: 600; letter-spacing: -0.04em; color: var(--ink); line-height: 1; }
.stats dd { margin: 10px 0 0; font-size: 14px; color: var(--muted); }

/* Stack */
.stacks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stack__head { display: flex; align-items: center; gap: 12px; }
.stack__ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: #fff; }
.stack__ic svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.ic--ios { background: var(--ink); }
.ic--flutter { background: #0468d7; }
.ic--video { background: #e5484d; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.tags span { padding: 5px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--text); }
.tags--sm { margin-top: 14px; }
.tags--sm span { background: var(--bg-soft); font-size: 12px; }

/* Experience */
.jobs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.job { padding: 28px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr; }
.job__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.job h3 { font-size: 19px; font-weight: 600; }
.job__date { flex: none; font-size: 13px; color: var(--muted); }
.job__co { margin: 4px 0 0; font-size: 15px; color: var(--green); font-weight: 500; }
.job ul { margin: 12px 0 0; padding-left: 18px; color: var(--text); font-size: 15px; }
.job li { margin: 4px 0; }
.job li::marker { color: #c4c4c4; }

/* Highlights */
.shipped { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.shot h3 { margin-top: 18px; font-size: 19px; font-weight: 600; }
.shot > p { margin: 6px 0 0; font-size: 15px; color: var(--text); }

.media {
  position: relative; aspect-ratio: 4 / 3.7; border-radius: var(--radius); overflow: hidden;
  display: grid; place-items: center; border: 1px solid var(--line);
}

/* Contact */
.contact {
  padding: 56px; border-radius: 24px; background: var(--ink); color: #d8d8d8; position: relative; overflow: hidden;
}
.contact::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,207,31,.35), rgba(10,148,71,.25) 45%, transparent 70%);
  pointer-events: none;
}
.contact h2 { color: #fff; margin-bottom: 16px; }
.contact__lead { max-width: 620px; margin: 0 0 32px; font-size: 17px; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
.contact .btn { background: #fff; color: var(--ink); border-color: #fff; }
.contact .btn:hover { background: #ececec; }
.contact .btn--wa { background: #1fa855; border-color: #1fa855; color: #fff; }
.contact .btn--wa:hover { background: #178e47; }
.contact .btn--line { background: transparent; color: #fff; border-color: #444; }
.contact .btn--line:hover { background: #1f1f1f; border-color: #666; }

/* Last section breathing room (no footer) */
#contact { padding-bottom: 96px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .stacks, .shipped { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav { gap: 16px; }
  .nav__links a:not(.nav__cta) { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 120px; }
  .hero__cta .btn { flex: 1 1 auto; }
  .section { padding-top: 88px; }
  .section h2 { margin-bottom: 28px; }
  .stacks, .shipped { grid-template-columns: 1fr; }
  .card { padding: 22px; }
  .stats dt { font-size: 34px; }
  .stats > div { padding: 22px 12px 22px 0; }
  .stats > div + div { padding-left: 12px; }
  .job__head { flex-direction: column; gap: 2px; }
  .contact { padding: 36px 22px; border-radius: 20px; }
  .contact__actions .btn { width: 100%; }
}
.stack__ic svg.stroke { fill: none; stroke: currentColor; stroke-width: 2; }

/* About: heading left, prose right */
.about { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; align-items: start; }
.about h2 { margin-bottom: 0; }
.about__text p { margin: 0 0 18px; font-size: 18px; line-height: 1.65; color: var(--text); }
.about__text p:last-child { margin-bottom: 0; }
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; gap: 20px; }
  .about__text p { font-size: 16.5px; }
}

/* Tools + AI row under the stack cards */
.tools-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.ic--tools { background: #6b6b6b; }
.ic--ai { background: #7c3aed; }
@media (max-width: 640px) {
  .tools-row { grid-template-columns: 1fr; }
}

/* Platforms line under the company in Track record */
.job__pl { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.job ul { max-width: 860px; }

/* Telegram button in Let's talk */
.contact .btn--tg { background: #229ed9; border-color: #229ed9; color: #fff; }
.contact .btn--tg:hover { background: #1c8bc0; }

/* No-JS fallback for the email */
.email-plain { align-self: center; color: #fff; font-size: 15px; }

/* ---------- Highlights: clickable cards ---------- */
a.shot { display: block; color: inherit; border-radius: var(--radius); }
a.shot .media { transition: transform .3s ease, box-shadow .3s ease; }
a.shot:hover .media { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(0,0,0,.35); }
.shot__more { display: inline-flex; gap: 6px; margin-top: 14px; font-size: 14px; font-weight: 500; color: var(--ink); }
.shot__more span { transition: transform .2s; }
a.shot:hover .shot__more span { transform: translateX(3px); }

/* ---------- Details dialog ---------- */
.detail {
  width: min(880px, calc(100% - 32px)); max-height: calc(100% - 48px); padding: 0;
  border: 0; border-radius: 22px; background: var(--bg); color: var(--text);
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.45);
}
.detail::backdrop { background: rgba(17,17,17,.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.detail[open] { animation: detail-in .25s ease; }
@keyframes detail-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
html.detail-open { overflow: hidden; }
.detail__box { position: relative; max-height: calc(100vh - 48px); overflow-y: auto; }
.detail__close {
  position: sticky; top: 14px; float: right; margin: 14px 14px -54px 0; z-index: 2;
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,.9); color: var(--ink); cursor: pointer;
}
.detail__close:hover { background: #fff; border-color: #cfcfcf; }
.detail__close svg { width: 18px; height: 18px; }
.detail__media .media { aspect-ratio: 16 / 8; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.detail__body { padding: 32px 40px 40px; }
.detail__title { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; }
.detail__meta { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 8px 32px; margin: 18px 0 0; }
.detail__meta dt { font-size: 12px; color: var(--muted); }
.detail__meta dd { margin: 2px 0 0; font-size: 14px; color: var(--ink); font-weight: 500; }
.detail__intro { margin: 24px 0 0; font-size: 17px; line-height: 1.65; }
.detail__groups { display: grid; grid-template-columns: 180px 1fr; gap: 0 32px; margin-top: 8px; }
.detail__groups h4 { margin: 22px 0 0; font-size: 15px; line-height: 1.6; color: var(--ink); }
.detail__groups ul { margin: 22px 0 0; padding-left: 18px; font-size: 15px; }
.detail__groups li { margin: 4px 0; }
.detail__groups li::marker { color: #c4c4c4; }
.detail .tags { margin-top: 28px; }

@media (max-width: 640px) {
  .detail { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border-radius: 0; }
  .detail__box { max-height: 100vh; height: 100%; }
  .detail__media .media { aspect-ratio: 4 / 3; }
  .detail__body { padding: 24px 18px 40px; }
  .detail__title { font-size: 28px; }
  .detail__meta { grid-template-columns: 1fr 1fr; gap: 12px 20px; }
  .detail__groups { grid-template-columns: 1fr; }
  .detail__groups ul { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .detail[open] { animation: none; }
}

/* Details: store links and screenshot gallery */
.detail--no-media .detail__body { padding-top: 40px; }
.detail__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px 0 12px;
  border-radius: 12px; background: var(--ink); color: #fff; transition: background .2s, transform .15s;
}
.store:hover { background: #2a2a2a; transform: translateY(-1px); }
.store svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.store span { display: flex; flex-direction: column; font-size: 15px; font-weight: 600; line-height: 1.1; }
.store small { font-size: 10.5px; font-weight: 400; opacity: .8; }
.store--web { background: #fff; color: var(--ink); border: 1px solid #d6d6d6; }
.store--web:hover { background: var(--bg-soft); }
.store--web svg { fill: none; stroke: currentColor; stroke-width: 1.8; }

.detail__gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 26px 0 6px; }
.detail__gallery figure { margin: 0; }
.detail__gallery img { display: block; width: 100%; height: auto; border-radius: 14px; background: #2a2440; }
.detail__gallery figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.4; }
@media (max-width: 640px) {
  .detail--no-media .detail__body { padding-top: 64px; }
  .detail__gallery {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%;
    overflow-x: auto; scroll-snap-type: x mandatory; margin-left: -18px; margin-right: -18px; padding: 0 18px 6px;
  }
  .detail__gallery figure { scroll-snap-align: start; }
}

/* Card with real app screenshots */
.media--shots {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; place-items: stretch;
  padding: 14px 14px 0; background: linear-gradient(180deg, #17151f, #5b5291); border-color: transparent;
}
.media--shots img {
  width: 100%; height: 100%; object-fit: cover; object-position: top; display: block;
  border-radius: 10px 10px 0 0;
}

/* Card with a single photo / screenshot crop */
.media--photo { background: #000; border-color: transparent; }
.media--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }

/* Details: wide screenshot boards stacked */
.detail__wide { display: grid; gap: 18px; margin: 26px 0 6px; }
.detail__wide figure { margin: 0; }
.detail__wide img { display: block; width: 100%; height: auto; border-radius: 14px; background: #000; }
.detail__wide figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.4; }

/* Card with iPhone Duo screenshots: open (inner screen) behind, closed (outer screen) in front */
.media--duo { display: block; background: linear-gradient(160deg, #eef5ef, #c9ddcd); border-color: transparent; }
.media--duo img { position: absolute; display: block; height: auto; background: #fff; border: 5px solid #1a1a1a; box-shadow: 0 24px 44px -24px rgba(0,0,0,.45); }
.media--duo .duo-open { left: 7%; top: 9%; width: 76%; border-radius: 14px; }
.media--duo .duo-closed { right: 6%; bottom: -4%; width: 32%; border-radius: 16px; }
.detail__gallery--duo { grid-template-columns: repeat(2, 1fr); max-width: 66%; }
.detail__gallery--duo img { border: 1px solid var(--line); background: #fff; }
.detail__wide img[src*="conjugar"] { border: 1px solid var(--line); background: #fff; }
@media (max-width: 640px) { .detail__gallery--duo { max-width: none; overflow: visible; margin: 26px 0 6px; padding: 0; } }
