@font-face {
  font-family: "Satoshi";
  src: url("/fonts/Satoshi-Variable.ttf") format("truetype");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("/fonts/Satoshi-VariableItalic.ttf") format("truetype");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #f7f5f0;
  --surface: #fffdf8;
  --ink: #25221d;
  --muted: #8b8377;

  --accent: #a36058;
  --accent-deep: #7e4a44;

  --rose: #ecd3cd;
  --sage: #dde3d3;
  --powder: #d8e0e6;
  --butter: #f2e5c4;
  --lilac: #ded6e6;

  --shadow:
    0 16px 32px rgba(37, 34, 29, 0.1),
    0 4px 10px rgba(37, 34, 29, 0.05);
}

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

html {
  scroll-padding-top: 5rem;
  overflow-x: clip;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Satoshi", "Trebuchet MS", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(45rem 30rem at 88% -10%, rgba(242, 229, 196, 0.28), transparent),
    radial-gradient(42rem 30rem at -8% 32%, rgba(216, 224, 230, 0.4), transparent),
    radial-gradient(46rem 32rem at 40% -14%, rgba(222, 214, 230, 0.28), transparent);
}

h1,
h2,
h3 {
  text-wrap: balance;
  margin: 0;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s cubic-bezier(0.2, 0, 0, 1);
}

a:hover {
  color: var(--accent-deep);
}

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

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

.container {
  max-width: 70rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
  transform: translateY(-200%);
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.skip-link:focus {
  transform: none;
}

.post-title a,
.work-title a {
  color: inherit;
  text-decoration: none;
}

/* Cabeçalho */

.site-header {
  padding-block: 1.75rem;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 0.25rem;
}

.site-header nav a {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s cubic-bezier(0.2, 0, 0, 1),
    background-color 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.site-header nav a:hover {
  color: var(--ink);
  background-color: var(--rose);
}

/* Movimento de entrada */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.section-title,
.bio-inner h2,
.back-link,
.bio-figure,
.post-title,
.post-date {
  animation: rise 0.55s cubic-bezier(0.2, 0, 0, 1) both;
}

.post-title,
.post-date,
.bio-figure {
  animation-delay: 0.08s;
}

.post-list li {
  animation: rise 0.5s cubic-bezier(0.2, 0, 0, 1) both;
}

.post-list li:nth-child(4n + 2) { animation-delay: 0.07s; }
.post-list li:nth-child(4n + 3) { animation-delay: 0.14s; }
.post-list li:nth-child(4n + 4) { animation-delay: 0.21s; }
.post-list li:nth-child(4n + 5) { animation-delay: 0.28s; }

/* Galeria */

.gallery-section {
  padding-block: clamp(2.5rem, 6vh, 4rem) clamp(3rem, 8vh, 5rem);
}

.section-title,
.bio-inner h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.gallery {
  columns: 21rem;
  column-gap: 2.25rem;
  margin-top: 2rem;
}

.obra {
  break-inside: avoid;
  margin: 0 0 2.5rem;
  animation: rise 0.55s cubic-bezier(0.2, 0, 0, 1) both;
}

.obra:nth-child(6n + 2) { animation-delay: 0.07s; }
.obra:nth-child(6n + 3) { animation-delay: 0.14s; }
.obra:nth-child(6n + 4) { animation-delay: 0.21s; }
.obra:nth-child(6n + 5) { animation-delay: 0.28s; }
.obra:nth-child(6n + 6) { animation-delay: 0.35s; }

.obra-link {
  display: block;
}

.obra-link img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  outline: 1px solid rgba(0, 0, 0, 0.1);
  outline-offset: -1px;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1),
    box-shadow 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.obra:hover .obra-link img {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.obra-caption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 0.65rem;
}

.obra-name {
  font-weight: 500;
  transition: color 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.obra:hover .obra-name {
  color: var(--accent);
}

.obra-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Sobre */

.bio-section {
  background: var(--sage);
  padding-block: clamp(3.5rem, 9vh, 5.5rem);
  margin-top: 2rem;
}

.bio-grid {
  display: grid;
  grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.bio-figure {
  margin: 0;
}

.bio-figure img {
  display: block;
  width: 100%;
  max-width: 13rem;
  aspect-ratio: 1;
  border-radius: 999px;
  outline: 1px solid rgba(0, 0, 0, 0.1);
  outline-offset: -1px;
}

.bio-inner {
  max-width: 40rem;
}

@media (max-width: 40rem) {
  .bio-grid {
    grid-template-columns: 1fr;
  }

  .bio-figure img {
    max-width: 10rem;
  }
}

.bio-inner p:last-child {
  margin-bottom: 0;
}

/* Página da obra */

.work-page {
  padding-block: clamp(2.5rem, 6vh, 4rem) 0;
}

.back-link {
  display: inline-block;
  min-height: 40px;
  padding: 0.5rem 1rem 0.5rem 0;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.back-link:hover {
  color: var(--accent);
}

.work-figure {
  margin: 1rem 0 0;
  cursor: zoom-in;
  animation: rise 0.55s cubic-bezier(0.2, 0, 0, 1) both;
}

.work-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  outline: 1px solid rgba(0, 0, 0, 0.1);
  outline-offset: -1px;
}

.work-figure.expanded {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  cursor: zoom-out;
}

.work-figure.expanded img {
  border-radius: 0;
  outline: none;
}

.work-card {
  max-width: 34rem;
  margin: 2.25rem 0 3.5rem;
  background: var(--surface);
  border-radius: 16px;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  box-shadow:
    0 2px 6px rgba(37, 34, 29, 0.03),
    0 12px 28px rgba(37, 34, 29, 0.04);
  outline: 1px solid rgba(0, 0, 0, 0.07);
  outline-offset: -1px;
  animation: rise 0.55s 0.08s cubic-bezier(0.2, 0, 0, 1) both;
}

.work-card .work-title {
  font-size: 1.4rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.01em;
}

.work-tombstone {
  color: var(--muted);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  margin: 0.35em 0 0;
}

.work-description {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.work-description p {
  font-size: 1rem;
}

/* Escritos */

.blog-page .container {
  padding-block: 0 clamp(4rem, 10vh, 6rem);
}

.page-intro {
  color: var(--muted);
  margin: 0.5rem 0 2rem;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 46rem;
}

.post-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding-block: 1.1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.post-list li:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.post-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.post-link:hover {
  color: var(--accent);
}

.post-date {
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.post-author {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.3em 0 0;
}

.post-author a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.post-author a:hover {
  color: var(--accent);
}

.post-inner {
  max-width: 42rem;
  padding-bottom: clamp(4rem, 10vh, 6rem);
}

.post-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-top: 1rem;
}

.post-content {
  margin-top: 2rem;
}

.post-content h2 {
  font-size: 1.3rem;
  margin: 2em 0 0.5em;
}

.post-content p:last-child {
  margin-bottom: 0;
}

/* Rodapé */

.site-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-block: 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  flex-wrap: wrap;
}

.site-footer p {
  margin: 0;
}

.footer-instagram {
  color: var(--muted);
}

/* 404 */

.not-found {
  padding-block: 6rem 8rem;
  text-align: center;
}

.not-found-title {
  font-size: 5rem;
  font-style: italic;
  color: var(--accent);
}

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

  .obra,
  .obra-link img,
  .obra-name,
  .section-title,
  .bio-inner h2,
  .bio-figure,
  .back-link,
  .work-figure,
  .work-card,
  .post-title,
  .post-date,
  .post-list li,
  .post-link,
  .skip-link {
    animation: none;
    transition: none;
  }
}
