/* ==========================================================================
   Portfólio — Caetano Guisso
   Organização: tokens → base → layout → componentes → páginas → utilitários
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #07060f;
  --bg-purple: #0f0c29; /* roxo escuro da identidade original */
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(94, 231, 231, 0.4);
  --text: #f1f1f6;
  --muted: #b4b4c7;
  --accent: #5ee7e7;
  --accent-bright: #7df9ff;
  --accent-ink: #04201f; /* texto sobre fundo ciano */

  --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Google Sans Flex", "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 68.75rem; /* 1100px */
  --narrow: 44rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --radius: 14px;
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  background: #000;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--header-h);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(60rem 28rem at 12% -4%, rgba(94, 231, 231, 0.07), transparent 65%),
    radial-gradient(120% 90% at 50% 0%, var(--bg-purple) 0%, #060512 55%, #000 100%);
  background-repeat: no-repeat;
  overflow-x: clip; /* sem rolagem horizontal, sem criar contexto de rolagem */
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
  overflow-wrap: break-word;
}

p {
  margin: 0;
  overflow-wrap: break-word;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

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

::selection {
  background: rgba(94, 231, 231, 0.3);
}

/* Barra de rolagem discreta (identidade ciano) */
html {
  scrollbar-color: rgba(94, 231, 231, 0.55) #0a0818;
  scrollbar-width: thin;
}

/* ---------- Layout ---------- */
.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.container-narrow {
  width: min(var(--narrow), 100% - 2 * var(--gutter));
}

.section {
  padding-block: clamp(2.25rem, 6vw, 4.5rem);
}

.section-tight {
  padding-block: clamp(1.5rem, 4vw, 2.5rem);
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10001;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: none;
}

/* ---------- Cabeçalho / navbar ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(7, 6, 15, 0.88);
  border-bottom: 1px solid var(--border);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header {
    background: rgba(7, 6, 15, 0.55);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
  }
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-nav {
  margin-left: auto;
}
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.85rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.35rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.site-nav a[aria-current="page"] {
  color: var(--text);
}
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}
@media (hover: hover) {
  .site-nav a:hover {
    color: var(--text);
    background: var(--surface);
  }
  .site-nav a:hover::after {
    transform: scaleX(1);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Seletor de idioma PT | EN (links reais — funciona sem JavaScript) */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.lang-switch a,
.lang-switch .lang-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2rem;
  padding: 0 0.6rem;
  border-radius: 999px;
}
.lang-switch a {
  color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}
.lang-switch .lang-current {
  background: var(--accent);
  color: var(--accent-ink);
}
@media (hover: hover) {
  .lang-switch a:hover {
    color: var(--text);
    background: var(--surface-hover);
  }
}

/* Botão do menu mobile (só aparece com JS e em telas estreitas) */
.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle-bars {
  position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before {
  top: -6px;
}
.nav-toggle-bars::after {
  top: 6px;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 760px) {
  .header-inner {
    gap: 0.75rem;
  }
  .brand {
    margin-right: auto;
  }
  .site-nav {
    margin-left: 0;
    order: 3;
  }
  /* Sem JS: o menu continua visível, em linha abaixo do logo. Com JS: painel recolhível. */
  html:not(.js) .site-header {
    height: auto;
    padding-block: 0.5rem;
  }
  html:not(.js) .header-inner {
    flex-wrap: wrap;
  }
  html:not(.js) .site-nav {
    width: 100%;
  }
  .js .nav-toggle {
    display: inline-flex;
  }
  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.5rem var(--gutter) 1rem;
    background: rgba(7, 6, 15, 0.97);
    border-bottom: 1px solid var(--border);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0s linear 0.2s;
  }
  .js .site-header.nav-open .site-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .site-nav a {
    min-height: 3rem;
    padding-inline: 0.5rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    font-size: 1.05rem;
  }
  .site-nav a::after {
    left: 0.5rem;
    right: auto;
    width: 2rem;
    bottom: 0.45rem;
  }
}

/* Celulares muito estreitos (320px): compacta logo, idioma e botão do menu */
@media (max-width: 400px) {
  .header-inner {
    gap: 0.5rem;
  }
  .header-actions {
    gap: 0.4rem;
    flex: none;
  }
  .brand {
    font-size: 1rem;
  }
  .lang-switch a,
  .lang-switch .lang-current {
    min-width: 2rem;
    padding: 0 0.4rem;
  }
}

/* ---------- Rótulos de seção (identidade: ciano, espaçado) ---------- */
.eyebrow {
  display: block;
  margin-bottom: 1.75rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "― ";
}
.eyebrow::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  margin-top: 0.6rem;
  background: var(--accent);
  opacity: 0.8;
}
.eyebrow-sm {
  margin-bottom: 1rem;
  font-size: 0.75rem;
}
.eyebrow-sm::after {
  display: none;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  padding: 0.55rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 0.95rem/1.2 var(--font-body);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease), color 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-ghost,
.btn-small:not(.btn-primary) {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}
.btn-small {
  min-height: 2.5rem;
  padding: 0.4rem 1.05rem;
  font-size: 0.88rem;
}
@media (hover: hover) {
  .btn-primary:hover {
    background: var(--accent-bright);
    transform: translateY(-1px);
  }
  .btn-ghost:hover,
  .btn-small:not(.btn-primary):hover {
    border-color: var(--border-accent);
    background: var(--surface-hover);
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(1.5rem, 4vw, 3rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}
.hero-title {
  display: flex;
  flex-direction: column;
  font-size: clamp(2rem, 1.2rem + 3.4vw, 3.4rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.hero-greeting {
  font-size: 0.6em;
  font-weight: 500;
  color: var(--muted);
}
.accent {
  color: var(--accent);
}
.lead {
  max-width: 34rem;
  margin-top: 1.5rem;
  font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.18rem);
  color: var(--muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}
.hero-photo {
  margin: 0;
  justify-self: center;
  width: min(100%, 21.25rem);
}
.hero-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 40% 25%;
  border-radius: 50%;
  box-shadow: 0 0 58px rgba(94, 231, 231, 0.35), 0 0 90px rgba(94, 231, 231, 0.18);
}
/* Para colocar a foto à esquerda do texto no desktop: .hero-photo { order: -1; } e inverter as colunas do .hero-grid */

@media (max-width: 820px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }
  .hero-photo {
    order: -1;
    width: min(60vw, 15rem);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy,
  .hero-photo {
    animation: rise 0.6s var(--ease) both;
  }
  .hero-photo {
    animation-delay: 0.1s;
  }
  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
  }
}

/* ---------- Sobre ---------- */
.about-text {
  max-width: 40rem; /* largura de leitura confortável, alinhada à esquerda do mesmo container */
  display: grid;
  gap: 1.1rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.section-text {
  max-width: 40rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
}

/* ---------- Habilidades ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 1000px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .skills-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.skill-card {
  padding: 1.25rem;
}
.skill-title {
  margin-bottom: 1rem;
  font-size: 1.05rem;
  font-weight: 600;
}
.skill-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.6rem;
}
.skill-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 5.25rem;
  padding: 0.6rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.25;
}
.skill-list img {
  width: 1.9rem;
  height: 1.9rem;
}
.icon-invert {
  filter: invert(1);
}

/* ---------- Cabeçalho de páginas internas ---------- */
.page-head {
  padding-block: clamp(2.25rem, 6vw, 4rem) 0.5rem;
}
.page-title {
  font-size: clamp(2rem, 1.3rem + 2.8vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.page-title-long {
  max-width: 22ch;
  font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.6rem);
  color: var(--accent);
}
.page-intro {
  max-width: 42rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.05rem;
}
.muted {
  color: var(--muted);
  font-weight: 400;
}
.empty {
  padding: 2rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), background-color 0.25s;
}
@media (hover: hover) {
  .card:hover {
    border-color: var(--border-accent);
    background: var(--surface-hover);
  }
  .project-card:hover,
  .post-card:hover,
  .bot-card:hover {
    transform: translateY(-3px);
  }
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: stretch;
}
.card-grid-bots {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17.5rem), 1fr));
}
.card-media {
  aspect-ratio: 16 / 9;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.35rem;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.card-meta:empty {
  display: none;
}
.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
}
.card-text {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.5rem;
}
/* Card inteiro clicável (blog) sem aninhar links */
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.card-link:focus-visible {
  outline: none;
}
.card:has(.card-link:focus-visible) {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}
.card-more {
  margin-top: auto;
  padding-top: 0.25rem;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.status-available {
  color: var(--accent-bright);
  border-color: var(--border-accent);
}
.status-in-development {
  color: #c9c3ff;
  border-color: rgba(201, 195, 255, 0.4);
}
.status-demo,
.status-on-request {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.28);
}

.tag-list,
.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tag-list li {
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  background: rgba(94, 231, 231, 0.08);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 500;
}
.feature-list {
  flex-direction: column;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.feature-list li::before {
  content: "• ";
  color: var(--accent);
}

/* ---------- Filtros de projetos ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.75rem;
}
.chip {
  min-height: 2.5rem;
  padding: 0.35rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: 500 0.9rem/1.2 var(--font-body);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.chip[aria-pressed="true"] {
  border-color: var(--border-accent);
  background: rgba(94, 231, 231, 0.12);
  color: var(--accent-bright);
}
@media (hover: hover) {
  .chip:hover {
    color: var(--text);
    border-color: var(--border-accent);
  }
}

/* ---------- Bots ---------- */
.bot-card {
  padding: 1.35rem;
  gap: 0.9rem;
}
.bot-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.bot-head > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}
.bot-avatar {
  flex: none;
  width: 4rem;
  height: 4rem;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border);
}

/* ---------- Artigo ---------- */
.article {
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 500;
}
@media (hover: hover) {
  .back-link:hover {
    color: var(--accent-bright);
  }
}
.article-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-block: 1rem 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}
.article-title {
  font-size: clamp(1.9rem, 1.2rem + 3vw, 2.9rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.article-desc {
  color: var(--muted);
  font-size: 1.12rem;
}
.article-cover {
  margin: 0 0 2rem;
}
.article-cover img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.prose {
  font-size: 1.06rem;
  line-height: 1.8;
  color: #dcdce8;
  overflow-wrap: break-word;
}
.prose > * + * {
  margin-top: 1.25em;
}
.prose h2,
.prose h3,
.prose h4 {
  color: var(--text);
  margin-top: 2.2em;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.prose h2 {
  font-size: 1.65rem;
}
.prose h3 {
  font-size: 1.3rem;
}
.prose h4 {
  font-size: 1.1rem;
}
.prose h2 + *,
.prose h3 + *,
.prose h4 + * {
  margin-top: 0.8em;
}
.prose a {
  color: var(--accent-bright);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose ul,
.prose ol {
  padding-left: 1.4em;
}
.prose ul {
  list-style: disc;
}
.prose li + li {
  margin-top: 0.4em;
}
.prose li::marker {
  color: var(--accent);
}
.prose blockquote {
  margin-inline: 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.prose img {
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin-block: 2.5rem;
}
.prose code {
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font: 0.88em/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
.prose pre {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.45);
  overflow-x: auto;
  line-height: 1.6;
  font-size: 0.9rem;
  tab-size: 2;
}
.prose pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}
.table-wrap {
  overflow-x: auto;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.prose th,
.prose td {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  text-align: left;
}
.prose th {
  background: var(--surface);
}

.post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.post-nav-link.is-prev {
  grid-column: 2;
  text-align: right;
}
.post-nav-link.is-next {
  grid-column: 1;
}
.post-nav-label {
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.post-nav-title {
  font-weight: 500;
  overflow-wrap: anywhere;
}
@media (hover: hover) {
  .post-nav-link:hover {
    border-color: var(--border-accent);
  }
}
@media (max-width: 560px) {
  .post-nav {
    grid-template-columns: minmax(0, 1fr);
  }
  .post-nav-link.is-prev,
  .post-nav-link.is-next {
    grid-column: auto;
    text-align: left;
  }
}

/* ---------- Rodapé ---------- */
.site-footer {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-top: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid rgba(94, 231, 231, 0.18);
  background: rgba(0, 0, 0, 0.35);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
}
.footer-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
}
.footer-tagline {
  margin-top: 0.5rem;
  max-width: 24rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-links {
  display: grid;
  gap: 0.15rem;
}
.footer-links a {
  display: inline-block;
  padding-block: 0.3rem;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}
@media (hover: hover) {
  .footer-links a:hover {
    color: var(--accent);
  }
}
.footer-copy {
  margin-top: 2.5rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}
@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 420px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Utilitários ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover,
  .btn:hover {
    transform: none !important;
  }
}
