/* Geist (variável, auto-hospedada) */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: oklch(98.6% 0.003 250);
  --surface: oklch(100% 0 0);
  --tint: oklch(96.4% 0.006 250);
  --ink: oklch(21% 0.02 255);
  --ink-2: oklch(38% 0.018 255);
  --muted: oklch(48% 0.016 255);
  --line: oklch(90% 0.008 255);
  --line-strong: oklch(82% 0.01 255);
  --accent: oklch(50% 0.18 258);
  --accent-ink: oklch(42% 0.17 258);
  --accent-soft: oklch(94.5% 0.03 258);

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  scrollbar-color: var(--line-strong) var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01";
}

::selection {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
  font-weight: 650;
}

p {
  margin: 0;
  text-wrap: pretty;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.ico {
  width: 1.1em;
  height: 1.1em;
  flex: none;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--surface);
  border-radius: 6px;
  z-index: 20;
}

.skip:focus {
  top: 12px;
}

/* Barra superior */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
}

.topbar__name {
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.topbar nav {
  display: flex;
  gap: clamp(12px, 3vw, 28px);
}

.topbar nav a {
  color: var(--ink-2);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s;
}

.topbar nav a:hover {
  color: var(--ink);
}

/* Apresentação */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
  padding-block: clamp(40px, 7vw, 88px) clamp(40px, 5vw, 56px);
}

.hero h1 {
  font-size: clamp(2.75rem, 7vw, 4.75rem);
  letter-spacing: -0.035em;
  line-height: 1;
  font-weight: 700;
}

.hero__role {
  margin-top: 18px;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--ink-2);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.hero__pitch {
  margin-top: 22px;
  max-width: 58ch;
  color: var(--ink-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 550;
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.btn:hover {
  border-color: var(--ink-2);
}

.btn--primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

.btn--primary:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  margin: 40px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.facts dt {
  font-size: 0.8125rem;
  color: var(--muted);
}

.facts dd {
  margin: 2px 0 0;
  font-size: 0.9375rem;
  font-weight: 550;
}

.hero__photo {
  margin: 0;
  width: clamp(200px, 24vw, 300px);
}

.hero__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 14px;
  background: var(--tint);
}

/* Seções */
.section {
  padding-block: clamp(64px, 9vw, 120px);
}

#projetos {
  padding-top: clamp(32px, 4vw, 48px);
}

.section--tint {
  background: var(--tint);
  border-block: 1px solid var(--line);
}

.section--rule {
  border-top: 1px solid var(--line);
}

.section__head {
  margin-bottom: clamp(32px, 5vw, 56px);
  max-width: 62ch;
}

.section h2,
.contact h2 {
  font-size: clamp(1.875rem, 4vw, 2.625rem);
  letter-spacing: -0.03em;
}

.section__head p {
  margin-top: 12px;
  color: var(--muted);
}

/* Projetos */
.project {
  padding-block: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--line);
}

.project:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.project__meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.875rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 10px 1px 8px;
  border: 1px solid oklch(85% 0.07 75);
  border-radius: 999px;
  background: oklch(97% 0.035 85);
  color: oklch(45% 0.1 65);
  font-size: 0.8125rem;
  font-weight: 550;
  letter-spacing: 0;
  line-height: 1.6;
  vertical-align: middle;
  margin-left: 10px;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: oklch(70% 0.15 70);
}

.project__meta span + span::before {
  content: "·";
  margin-right: 14px;
  color: var(--line-strong);
}

.project h3 {
  font-size: clamp(1.75rem, 3.4vw, 2.25rem);
  letter-spacing: -0.03em;
}

.project__lede {
  margin-top: 12px;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--ink);
  max-width: 52ch;
}

.project__points {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  max-width: 64ch;
  color: var(--ink-2);
}

.project__points li {
  position: relative;
  padding-left: 22px;
}

.project__points li + li {
  margin-top: 10px;
}

.project__points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 8px;
  height: 1.5px;
  background: var(--accent);
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.stack li {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-weight: 550;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

/* GoLog: destaque com galeria */
.project--featured {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(32px, 4vw, 48px);
}

.project--featured .project__body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  grid-template-rows: auto auto auto 1fr;
  column-gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.project--featured .project__body > :is(h3, .project__meta, .project__lede) {
  grid-column: 1;
}

.project--featured .project__points {
  grid-column: 2;
  grid-row: 1 / -1;
  margin-top: 8px;
}

.project--featured .stack {
  grid-column: 1;
}

.gallery__stage {
  margin: 0;
}

.gallery__open {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 16 / 9;
}

.gallery__main {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.45s var(--ease-out), filter 0.45s var(--ease-out), transform 0.6s var(--ease-out);
}

.gallery__main.is-swapping {
  opacity: 0;
  filter: blur(6px);
  transform: scale(0.985);
  transition-duration: 0.12s;
}

.gallery__caption {
  margin-top: 10px;
  font-size: 0.875rem;
  color: var(--muted);
  min-height: 1.6em;
}

.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.gallery__thumbs button {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
  aspect-ratio: 4 / 3;
  opacity: 0.62;
  transition: opacity 0.2s, border-color 0.2s;
}

.gallery__thumbs button:hover {
  opacity: 1;
}

.gallery__thumbs button[aria-pressed="true"] {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.gallery__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.gallery--wide .gallery__open {
  aspect-ratio: 1862 / 940;
}

/* Regras do Gulositos em linha */
.rules--row .flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.rules--row .flow li {
  padding: 40px 0 0;
}

.rules--row .flow li:not(:last-child)::after {
  left: 28px;
  right: -24px;
  top: 13.5px;
  bottom: auto;
  width: auto;
  height: 1px;
}


/* Gulositos e EcoDrive */
.project--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.project--reverse .project__body {
  order: 2;
}

.rules {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.rules h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.flow {
  counter-reset: step;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.flow li {
  counter-increment: step;
  position: relative;
  display: grid;
  gap: 2px;
  padding: 0 0 22px 44px;
}

.flow li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  z-index: 1;
}

.flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13.5px;
  top: 28px;
  bottom: 0;
  width: 1px;
  background: var(--line-strong);
}

.flow li:last-child {
  padding-bottom: 0;
}

.flow li:last-child::before {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

.flow strong {
  font-weight: 600;
  line-height: 28px;
}

.flow span {
  font-size: 0.9375rem;
  color: var(--muted);
}


.eco-media {
  display: grid;
  gap: 14px;
}

.phones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.phones img {
  width: 100%;
  aspect-ratio: 1 / 2;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: var(--surface);
}

.eco-photos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.eco-photos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--tint);
}

.eco-photos img:first-child {
  object-position: 50% 70%;
}

.eco-caption {
  font-size: 0.875rem;
  color: var(--muted);
}

/* BI */
.bi {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px) clamp(24px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.carousel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.carousel__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__track:focus-visible {
  outline-offset: -2px;
}

.carousel__slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: start;
  aspect-ratio: 2 / 1;
  padding: 8px;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.carousel__bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 2px 14px;
  border-top: 1px solid var(--line);
}

.carousel__count {
  margin-right: auto;
  font-size: 0.8125rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.carousel__count b {
  color: var(--ink);
  font-weight: 600;
}

.carousel__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, opacity 0.2s;
}

.carousel__btn:hover:not(:disabled) {
  background: var(--tint);
  border-color: var(--line);
}

.carousel__btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.bi h3 {
  margin-top: 16px;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
}

.bi p {
  margin-top: 6px;
  font-size: 0.9375rem;
  color: var(--ink-2);
  max-width: 56ch;
}

.bi .bi__tools {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Experiência */
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 96px);
}

.two-col h2 {
  margin-bottom: 28px;
}

.entry + .entry {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.entry__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.entry h3 {
  font-size: 1.1875rem;
  letter-spacing: -0.015em;
}

.entry__date {
  flex: none;
  font-size: 0.875rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.entry__role {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.entry ul {
  margin: 16px 0 0;
  padding-left: 1.1em;
  color: var(--ink-2);
}

.entry li + li {
  margin-top: 8px;
}

.entry li::marker {
  color: var(--line-strong);
}

/* Stack */
.skills {
  margin: 0;
}

.skills > div {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 8px 32px;
  padding-block: 16px;
  border-top: 1px solid var(--line);
}

.skills > div:last-child {
  border-bottom: 1px solid var(--line);
}

.skills dt {
  font-weight: 600;
}

.skills dd {
  margin: 0;
  color: var(--ink-2);
}

/* Contato */
.contact {
  padding-block: clamp(72px, 10vw, 136px);
  background: var(--ink);
  color: oklch(92% 0.008 255);
}

.contact h2 {
  color: var(--surface);
}

.contact p {
  margin-top: 14px;
  max-width: 52ch;
  color: oklch(78% 0.012 255);
}

.contact__mail {
  display: inline-block;
  margin-top: 32px;
  color: var(--surface);
  font-size: clamp(1.25rem, 3.6vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  text-decoration: underline;
  text-decoration-color: oklch(55% 0.02 255);
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
  transition: text-decoration-color 0.2s;
}

.contact__mail:hover {
  text-decoration-color: oklch(72% 0.14 258);
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.contact__links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: oklch(88% 0.01 255);
  text-decoration: none;
}

.contact__links a:hover {
  color: var(--surface);
}

.contact :focus-visible {
  outline-color: oklch(80% 0.1 258);
}

.footer {
  padding-block: 24px;
  background: var(--ink);
  border-top: 1px solid oklch(30% 0.02 255);
  color: oklch(70% 0.012 255);
  font-size: 0.875rem;
}

/* Responsivo */
@media (max-width: 900px) {

  .project--featured .project__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .rules--row .flow {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .rules--row .flow li {
    padding: 0 0 22px 44px;
  }

  .rules--row .flow li:last-child {
    padding-bottom: 0;
  }

  .rules--row .flow li:not(:last-child)::after {
    left: 13.5px;
    right: auto;
    top: 28px;
    bottom: 0;
    width: 1px;
    height: auto;
  }

  .project--featured .project__body > * {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .project--split,
  .two-col {
    grid-template-columns: minmax(0, 1fr);
  }

  .project--reverse .project__body {
    order: 0;
  }

  .gallery__thumbs {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }

  .gallery__thumbs li {
    flex: 0 0 104px;
    scroll-snap-align: start;
  }
}

@media (max-width: 680px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 32px;
  }

  .hero__photo {
    order: -1;
    width: 112px;
  }

  .hero__photo img {
    aspect-ratio: 1;
    border-radius: 50%;
  }

  .topbar__name {
    display: none;
  }

  .topbar__inner {
    justify-content: center;
  }

  .bi {
    grid-template-columns: minmax(0, 1fr);
  }

  .skills > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .facts {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
