/* Fontes locais */
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/SpaceGrotesk-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Temas */
:root,
html[data-theme="light"] {
  --bg: #f3f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e5e7eb;
  --text: #111827;
  --text-2: #6b7280;
  --purple: #9f58fa;
  --purple-dark: #6d3dd1;
  --purple-light: #c4a9ff;
  --blue: #4b96dc;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #059669;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.06), 0 8px 24px rgba(17, 24, 39, 0.04);
  --focus: 0 0 0 3px rgba(159, 88, 250, 0.35);
}

html[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #151516;
  --surface-2: #1a1a1a;
  --border: #2a2a2a;
  --text: #ffffff;
  --text-2: #9ca3af;
  --purple: #9f58fa;
  --purple-dark: #6d3dd1;
  --purple-light: #c4a9ff;
  --blue: #4b96dc;
  --danger: #f87171;
  --danger-bg: #2a1515;
  --success: #34d399;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
  --focus: 0 0 0 3px rgba(159, 88, 250, 0.45);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(159, 88, 250, 0.12), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(75, 150, 220, 0.08), transparent 50%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.brand-name,
.page-title,
.post-title,
.logo-text {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

code, pre, kbd, .code-block, .md-editor textarea {
  font-family: "Geist Mono", ui-monospace, monospace;
}

a {
  color: var(--purple);
  text-decoration: none;
}
a:hover {
  color: var(--purple-light);
}

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

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner,
.footer-inner,
.site-main {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  min-width: 0;
}
.brand-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(42vw, 14rem);
}
.brand:hover {
  color: var(--text);
}
.brand-mark {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--purple);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--purple) 22%, transparent);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  color: var(--text-2);
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: var(--surface-2);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.35rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
}
.theme-toggle:hover {
  border-color: var(--purple);
}
.theme-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.theme-toggle svg {
  width: 1rem;
  height: 1rem;
}
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: inline-flex; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: inline-flex; }

.site-main {
  flex: 1;
  padding: 1.5rem 0 3.5rem;
  max-width: 100%;
  overflow-x: clip;
}

.site-footer {
  margin-top: auto;
  background: #0d0b10;
  color: #c4c4c8;
  border-top: none;
  padding: 1.75rem 0;
  font-size: 0.9rem;
}
html[data-theme="light"] .site-footer {
  background: #111018;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.footer-copy {
  margin: 0;
  line-height: 1.5;
}
.footer-copy strong {
  color: #fff;
  font-weight: 700;
}
.footer-made {
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  color: #a8a8b0;
  font-size: 0.86rem;
  line-height: 1.4;
}
.footer-made-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  color: #c4c4c8;
}
.footer-cookies {
  appearance: none;
  border: none;
  background: transparent;
  color: #c4c4c8;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-cookies:hover {
  color: #fff;
}

/* Hero estilo capa */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem 3rem;
  align-items: start;
  margin-bottom: 1.75rem;
  padding: 1rem 0 0;
}
.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
  color: var(--text-2);
  font-size: 0.92rem;
}
.hero-tagline::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--purple);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--purple) 20%, transparent);
}
.hero-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
}
.hero-subtitle {
  margin: 0.75rem 0 0;
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.45;
  max-width: 36rem;
}
.hero-rule {
  width: min(220px, 60%);
  height: 3px;
  margin: 1.1rem 0 1.25rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff6b4a, #9f58fa, #4b96dc);
}
.hero-bio {
  margin: 0;
  color: var(--text-2);
  font-size: 1.02rem;
  line-height: 1.65;
  max-width: 36rem;
}
.hero-cta {
  margin: 1.85rem 0 0;
}
.hero-cta-btn {
  display: inline-flex;
  align-items: stretch;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--purple) 55%, var(--border));
  border-radius: 0.55rem;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  overflow: hidden;
  transition:
    background-color 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease;
}
.hero-cta-btn-label {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.15rem;
  min-width: 0;
}
.hero-cta-btn-sep {
  width: 1px;
  align-self: stretch;
  background: color-mix(in srgb, var(--purple) 40%, var(--border));
  flex-shrink: 0;
  transition: background-color 0.22s ease;
}
.hero-cta-btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.95rem;
  color: var(--purple);
  transition: transform 0.22s ease, color 0.22s ease;
}
.hero-cta-btn:hover {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}
.hero-cta-btn:hover .hero-cta-btn-sep {
  background: color-mix(in srgb, #fff 35%, transparent);
}
.hero-cta-btn:hover .hero-cta-btn-arrow {
  color: #fff;
  transform: translateX(3px);
}
.editorial-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-family: inherit;
  line-height: 1.4;
  text-decoration: none;
  max-width: 100%;
  transition: color 0.2s ease;
}
.editorial-link-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.editorial-link:hover .editorial-link-arrow {
  transform: translateX(0.28em);
}
.editorial-link-secondary {
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 0.28em;
  text-decoration-thickness: 1px;
  white-space: nowrap;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.editorial-link-secondary:hover {
  color: var(--purple);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--purple) 45%, transparent);
}
.hero-bio.prose p {
  margin: 0 0 0.85em;
  color: var(--text-2);
  font-size: inherit;
  line-height: inherit;
}
.hero-bio.prose p:last-child {
  margin-bottom: 0;
}
.hero-bio.prose a {
  color: var(--text);
}
.hero-bio.prose strong {
  color: var(--text);
  font-weight: 600;
}
.hero-bio.prose em {
  font-style: italic;
}
.hero-bio.prose h2,
.hero-bio.prose h3 {
  margin: 0.9em 0 0.4em;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  letter-spacing: -0.02em;
}
.hero-bio.prose h2 {
  font-size: 1.35rem;
}
.hero-bio.prose h3 {
  font-size: 1.15rem;
}
.hero-bio.prose h2:first-child,
.hero-bio.prose h3:first-child {
  margin-top: 0;
}
.hero-bio.prose blockquote {
  margin: 0.75em 0;
  padding: 0.15em 0 0.15em 0.9em;
  border-left: 3px solid var(--purple);
  color: var(--text-2);
}
.hero-bio.prose hr {
  margin: 1em 0;
  border: none;
  border-top: 1px solid var(--border);
}
.hero-bio.prose code {
  font-family: "Geist Mono", monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 0.3em;
  background: var(--surface-2);
}
.hero-bio.prose s {
  text-decoration: line-through;
  opacity: 0.85;
}
.hero-bio.prose ul,
.hero-bio.prose ol {
  margin: 0 0 0.85em;
  padding-left: 1.2rem;
}
.settings-page .form.wide {
  max-width: none;
}
.settings-page .bio-md-editor .toolbar {
  margin-bottom: 0.5rem;
}
.settings-page #set-bio {
  min-height: 280px;
  font-family: "Geist Mono", monospace;
  font-size: 0.9rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.hero-social {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  margin-top: 2.15rem;
  width: 100%;
  max-width: 100%;
}
.hero-aside {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(320px, 100%);
}
.hero-aside .hero-avatar-wrap {
  justify-self: auto;
  width: 100%;
}
.social-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  box-shadow: var(--shadow);
  max-width: 100%;
  min-width: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.social-pill span {
  overflow-wrap: anywhere;
}
.social-pill:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--purple) 45%, var(--border));
  background: color-mix(in srgb, var(--purple) 10%, var(--surface));
}
.social-pill-text {
  cursor: default;
}
.social-pill-text:hover {
  border-color: var(--border);
  background: var(--surface);
}
.social-pill svg,
.social-brand-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}
.social-pill svg {
  color: var(--purple);
}
.social-pill .social-brand-icon {
  color: var(--purple);
}
.hero-avatar-wrap {
  justify-self: end;
  width: min(320px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, #ff6b4a, #9f58fa, #4b96dc);
  box-shadow: var(--shadow);
}
.hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  display: block;
  border: 4px solid var(--bg);
}
.hero-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid var(--bg);
  background:
    radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--purple-light) 40%, transparent), transparent 50%),
    var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--purple);
}
.posts-section-title {
  margin: 0 0 1.25rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
}
.home-recent {
  margin-top: 0.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
}
.home-recent-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.45rem 1.25rem;
  margin: 0 0 1.1rem;
}
.home-recent .posts-section-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}
.home-recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.home-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0 0.95rem;
  align-items: start;
  padding: 0.65rem 0.15rem;
  color: inherit;
}
.home-item.no-cover {
  grid-template-columns: minmax(0, 1fr);
}
.home-item-cover {
  display: block;
  width: 88px;
  height: 66px;
  border-radius: 0.45rem;
  overflow: hidden;
  background: var(--surface-2);
  flex-shrink: 0;
}
.home-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-item-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.home-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.15rem;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--text-2);
  text-transform: uppercase;
}
.home-item-cat {
  color: var(--purple);
  font-weight: 600;
}
.home-item-sep {
  margin: 0 0.3rem;
  color: var(--border);
  text-transform: none;
}
.home-item-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.home-item-title a {
  color: inherit;
  text-decoration: none;
}
.home-item-title a:hover {
  color: var(--purple);
}
.home-item-summary {
  margin: 0;
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-item-summary a {
  color: inherit;
  text-decoration: none;
}
.home-item-summary a:hover {
  color: var(--text);
}
@media (max-width: 560px) {
  .home-recent-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
  .home-item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0 0.75rem;
  }
  .home-item-cover {
    width: 72px;
    height: 54px;
  }
  .home-item-title {
    font-size: 1rem;
  }
}
.section-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}
.featured-section {
  margin: 0 0 2.5rem;
}
.about-page {
  width: 100%;
  max-width: 100%;
}
.about-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem 3rem;
  align-items: start;
  margin: 0 0 2rem;
  padding: 0.5rem 0 0;
}
.about-hero-copy {
  min-width: 0;
}
.about-hero-aside {
  justify-self: end;
  width: min(320px, 100%);
}
.about-page-title {
  margin: 0;
}
.about-avatar-wrap {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, #ff6b4a, #9f58fa, #4b96dc);
  box-shadow: var(--shadow);
}
.about-avatar,
.about-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--surface);
}
.about-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--text);
}
.about-education {
  margin-top: 1rem;
  width: 100%;
  text-align: center;
}
.about-education p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.88rem;
  line-height: 1.45;
  font-weight: 500;
}
.about-education p + p {
  margin-top: 0.2rem;
}
.about-subtitle {
  margin: 0.75rem 0 0;
  color: var(--text-2);
  font-size: 1.05rem;
  line-height: 1.45;
  max-width: 36rem;
}
.about-rule {
  width: min(220px, 60%);
  height: 3px;
  margin: 1.1rem 0 1.25rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff6b4a, #9f58fa, #4b96dc);
}
.about-bio {
  margin: 0;
  max-width: 36rem;
  color: var(--text-2);
  font-size: 1.02rem;
  line-height: 1.65;
}
.about-bio.empty-hint {
  color: var(--text-2);
}
.about-bio.prose p {
  margin: 0 0 0.85em;
  color: var(--text-2);
  font-size: inherit;
  line-height: inherit;
}
.about-bio.prose li {
  color: var(--text-2);
}
.about-bio.prose strong {
  color: var(--text);
  font-weight: 700;
}
.about-bio.prose em {
  font-style: italic;
}
.about-bio.prose h2,
.about-bio.prose h3 {
  margin: 0.9em 0 0.4em;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  letter-spacing: -0.02em;
}
.about-bio.prose h2 {
  font-size: 1.35rem;
}
.about-bio.prose h3 {
  font-size: 1.15rem;
}
.about-bio.prose h2:first-child,
.about-bio.prose h3:first-child {
  margin-top: 0;
}
.about-bio.prose blockquote {
  margin: 0.75em 0;
  padding: 0.15em 0 0.15em 0.9em;
  border-left: 3px solid var(--purple);
  color: var(--text-2);
}
.about-bio.prose hr {
  margin: 1em 0;
  border: none;
  border-top: 1px solid var(--border);
}
.about-bio.prose ul,
.about-bio.prose ol {
  margin: 0 0 0.85em;
  padding-left: 1.2rem;
}
.about-find-me {
  margin: 0 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.about-find-title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}
.social-admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.social-admin-empty {
  margin: 0;
}
.social-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-2);
}
.social-admin-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
  min-width: 0;
}
.social-admin-fields .field {
  margin: 0;
}
.social-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: flex-start;
}
@media (max-width: 800px) {
  .about-hero {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .about-hero-aside {
    justify-self: center;
    width: min(220px, 70vw);
    order: -1;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .about-education {
    text-align: center;
  }
  .about-find-me {
    text-align: center;
  }
  .about-find-me .social-pill-list {
    justify-content: center;
  }
}
@media (max-width: 640px) {
  .social-admin-row {
    grid-template-columns: 1fr;
  }
}
.posts-section {
  margin-bottom: 2rem;
}
.home-recent.posts-section {
  margin-bottom: 1.5rem;
}
.listing-header .nav-back {
  margin: 0 0 0.85rem;
}
.nav-back {
  margin: 0 0 1rem;
}
.nav-back a {
  display: inline-flex;
  align-items: center;
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.nav-back a:hover {
  color: var(--text);
}

.category-chips,
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.25rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.chip:hover,
.chip.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--purple) 50%, var(--border));
  background: color-mix(in srgb, var(--purple) 10%, var(--surface));
}
.chip-sm {
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
}
.post-category-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--purple);
}
.post-category-link {
  font-weight: 600;
  color: var(--purple);
  text-decoration: none;
}
.post-category-link:hover {
  text-decoration: underline;
}
.post-tags {
  margin: 0 0 1rem;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.7fr);
  gap: 1.5rem;
  align-items: start;
}
.editor-section-title {
  margin: 0 0 0.85rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
}
.editor-side {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--surface-2);
}
.tag-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
  min-height: 0.5rem;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem 0.2rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--purple) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--purple) 30%, var(--border));
  font-size: 0.82rem;
  color: var(--text);
}
.tag-chip-remove {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.15rem;
}
.tag-chip-remove:hover {
  color: var(--danger);
}
.admin-table code {
  font-family: "Geist Mono", monospace;
  font-size: 0.82rem;
  color: var(--text-2);
}

@media (max-width: 900px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 1.75rem;
  }
  .hero-aside {
    justify-self: center;
    align-items: center;
    width: min(220px, 70vw);
    order: -1;
  }
  .hero-aside .hero-avatar-wrap {
    width: 100%;
  }
  .hero-social {
    justify-content: center;
  }
  .site-footer .footer-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .site-footer .footer-meta {
    align-items: center;
  }
  .site-footer .footer-made {
    justify-content: center;
  }
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 90;
  width: min(920px, calc(100% - 1.5rem));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  padding: 1.1rem 1.25rem;
  border-radius: 1.35rem;
  background: #1a1520;
  color: #f3f3f5;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.cookie-banner[hidden] {
  display: none !important;
}
.cookie-banner-text {
  margin: 0;
  flex: 1 1 280px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #e8e6ec;
}
.cookie-banner-actions {
  display: flex;
  gap: 0.65rem;
  flex-shrink: 0;
}
.cookie-decline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  font-weight: 700;
}
.cookie-decline:hover {
  border-color: #fff;
}
.cookie-accept {
  background: var(--purple);
  border: 1px solid transparent;
  color: #fff;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  font-weight: 700;
}
.cookie-accept:hover {
  filter: brightness(1.08);
}

.page-header {
  margin-bottom: 1.75rem;
}
.page-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
}
.page-desc {
  margin: 0;
  color: var(--text-2);
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.posts-list-compact {
  gap: 0.85rem;
}

.post-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
@media (min-width: 720px) {
  .post-card.has-cover {
    grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  }
  .post-card-featured.has-cover {
    grid-template-columns: minmax(200px, 40%) minmax(0, 1fr);
  }
}
.post-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--purple) 45%, var(--border));
  color: inherit;
}
.post-card-cover {
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  overflow: hidden;
  min-height: 0;
  display: block;
  color: inherit;
}
@media (min-width: 720px) {
  .post-card.has-cover .post-card-cover {
    aspect-ratio: auto;
    align-self: stretch;
  }
}
.post-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-card-body {
  padding: 1.15rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}
.post-card-featured .post-card-body {
  padding: 1.35rem 1.45rem 1.5rem;
}
.post-card-title {
  margin: 0;
  font-size: 1.2rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.post-card-title a {
  color: inherit;
  text-decoration: none;
}
.post-card-title a:hover {
  color: var(--purple);
}
.post-card-featured .post-card-title {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
}
.post-card-summary {
  margin: 0;
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.55;
}
.post-card-summary-link {
  color: inherit;
  text-decoration: none;
}
.post-card-summary-link:hover {
  color: var(--text);
}
.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-2);
}
.post-card-meta .post-category-badge {
  text-decoration: none;
}
.post-card-meta .post-category-badge:hover {
  text-decoration: underline;
}
.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.archive-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.archive-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.archive-search-wrap {
  position: relative;
  flex: 1 1 16rem;
  min-width: 0;
}
.archive-search-wrap input[type="search"] {
  width: 100%;
  padding-right: 2.5rem;
}
.archive-search-wrap input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.archive-search-clear {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: none;
  border-radius: 0.45rem;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}
.archive-search-clear:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--purple) 12%, transparent);
}
.archive-search-clear[hidden] {
  display: none !important;
}
.archive-search-clear svg {
  width: 1rem;
  height: 1rem;
}
.archive-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.archive-filters .chip {
  cursor: pointer;
  appearance: none;
  font: inherit;
}
.archive-meta {
  margin: 0;
}
.archive-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0 0 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.archive-prefs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.archive-sort {
  appearance: none;
  font: inherit;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  padding: 0.4rem 2rem 0.4rem 0.7rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%),
    linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 14px) 55%, calc(100% - 9px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
  min-height: 2.15rem;
}
.archive-sort:focus {
  outline: 2px solid color-mix(in srgb, var(--purple) 45%, transparent);
  outline-offset: 1px;
}
.archive-view-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface);
  max-width: 100%;
}
.archive-view-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.4rem 0.7rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}
.archive-view-btn svg {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}
.archive-view-btn:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--purple) 12%, transparent);
}
.archive-view-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--purple) 55%, transparent);
  outline-offset: 1px;
}
.archive-view-btn.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--purple) 22%, var(--surface));
  font-weight: 600;
}
@media (max-width: 560px) {
  .archive-view-btn {
    padding: 0.4rem 0.55rem;
    font-size: 0.82rem;
  }
}

/* View: grade (padrão, 2 colunas desktop) */
.posts-list.view-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  width: 100%;
}
@media (min-width: 720px) {
  .posts-list.view-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.posts-list.view-grid .post-card,
.posts-list.view-grid .post-card.has-cover {
  grid-template-columns: 1fr;
  width: 100%;
  min-width: 0;
}
.posts-list.view-grid .post-card-cover {
  aspect-ratio: 16 / 10;
}
.posts-list.view-grid .post-card-title {
  font-size: 1.12rem;
}
.posts-list.view-grid .post-card-summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* View: lista (capa + conteúdo) */
.posts-list.view-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  width: 100%;
}
.posts-list.view-list .post-card {
  width: 100%;
  min-width: 0;
}
@media (max-width: 719px) {
  .posts-list.view-list .post-card.has-cover {
    grid-template-columns: 1fr;
  }
  .posts-list.view-list .post-card-cover {
    aspect-ratio: 16 / 9;
  }
}

/* View: linha (arquivo editorial compacto) */
.posts-list.view-line {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  overflow: hidden;
  background: var(--surface);
}
.post-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 0.85rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}
.post-line.has-thumb {
  grid-template-columns: 52px minmax(0, 1fr);
}
.post-line:last-child {
  border-bottom: none;
}
.post-line:hover {
  background: color-mix(in srgb, var(--purple) 8%, transparent);
  color: inherit;
}
.post-line-thumb {
  display: block;
  width: 52px;
  height: 40px;
  border-radius: 0.35rem;
  overflow: hidden;
  background: var(--surface-2);
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.post-line-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-line-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.post-line-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--text-2);
}
.post-line-meta-main {
  min-width: 0;
  overflow-wrap: anywhere;
}
.post-line-read {
  flex-shrink: 0;
  white-space: nowrap;
}
.post-line-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.35;
  color: var(--text);
  overflow-wrap: anywhere;
}
.post-line:hover .post-line-title {
  color: var(--purple);
}
@media (max-width: 560px) {
  .archive-controls {
    align-items: stretch;
  }
  .archive-prefs {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }
  .post-line.has-thumb {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .post-line-thumb {
    width: 44px;
    height: 34px;
  }
  .post-line-title {
    font-size: 0.98rem;
  }
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 1rem;
  color: var(--text-2);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.posts-archive {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.posts-archive .page-header,
.posts-archive .archive-toolbar,
.posts-archive .archive-controls,
.posts-archive .posts-list,
.posts-archive .empty-state {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  max-width: 100%;
}
@media (min-width: 700px) {
  .article {
    padding: 2rem 2.25rem;
  }
}
.article-cover {
  margin: 0 0 1.5rem;
  border-radius: 0.85rem;
  overflow: hidden;
  aspect-ratio: 21 / 9;
  background: var(--surface-2);
}
@media (min-width: 700px) {
  .article-cover {
    margin: 0 0 1.75rem;
  }
}
.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  color: var(--text-2);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.article-meta .meta-sep {
  color: var(--border);
  user-select: none;
}
.article-title {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  overflow-wrap: anywhere;
}
.article-actions {
  margin: 0 0 1.25rem;
}
.article > .nav-back {
  margin: 0 0 1.15rem;
}

.post-pager {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 2.5rem 0 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
@media (min-width: 640px) {
  .post-pager {
    grid-template-columns: 1fr 1fr;
  }
}
.post-pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--surface-2);
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.post-pager-link:hover {
  border-color: color-mix(in srgb, var(--purple) 45%, var(--border));
  color: inherit;
}
.post-pager-link.next {
  text-align: right;
}
.post-pager-link.is-empty {
  visibility: hidden;
  pointer-events: none;
}
.post-pager-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-2);
}
.post-pager-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.related-posts {
  margin: 2rem 0 0;
}

.code-block-wrap {
  position: relative;
  margin: 0 0 1.25rem;
}
.code-block-wrap .code-block {
  margin: 0;
}
.code-copy-btn {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  border-radius: 0.45rem;
  padding: 0.25rem 0.55rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 1;
}
.code-copy-btn:hover,
.code-copy-btn:focus-visible {
  color: var(--text);
  border-color: var(--purple);
  outline: none;
}

.prose {
  overflow-wrap: anywhere;
  max-width: 100%;
}
.prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: "Space Grotesk", sans-serif;
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  overflow-wrap: anywhere;
}
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1em; }
.prose blockquote {
  margin: 0 0 1em;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--purple);
  background: var(--surface-2);
  color: var(--text-2);
  border-radius: 0 0.5rem 0.5rem 0;
}
.prose img {
  border-radius: 0.75rem;
  margin: 1rem 0;
  border: 1px solid var(--border);
  max-width: 100%;
  height: auto;
}
/* Legenda editorial: parágrafo em itálico logo após uma imagem */
.prose p:has(> img:only-child) {
  margin-bottom: 0.4rem;
}
.prose p:has(> img:only-child) + p:has(> em:only-child),
.prose p:has(> img:only-child) + p:has(> em:first-child:last-child) {
  margin-top: -0.15rem;
  margin-bottom: 1.35rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-2);
}
.prose p:has(> img:only-child) + p:has(> em:only-child) em,
.prose p:has(> img:only-child) + p:has(> em:first-child:last-child) em {
  font-style: italic;
}
.blog-bio {
  max-width: 36rem;
  font-size: 1.05rem;
  line-height: 1.55;
}
.post-author {
  color: var(--text);
  font-weight: 500;
}
.setup-panel.auth-shell,
.auth-shell.setup-panel {
  max-width: 480px;
}
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose code {
  font-family: "Geist Mono", monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  padding: 0.1em 0.35em;
}
.prose .code-block {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  margin: 0 0 1.25rem;
}
.prose .code-block code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.88rem;
}
.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
}
.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  margin: 1.25rem 0;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 420px;
}
.form.wide { max-width: none; }

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.field label {
  font-weight: 500;
  font-size: 0.92rem;
}
.field .hint {
  color: var(--text-2);
  font-size: 0.82rem;
}

input[type="text"],
input[type="password"],
input[type="url"],
input[type="search"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface-2);
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 1rem;
}
textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.55;
}
.md-editor textarea {
  font-family: "Geist Mono", monospace;
  font-size: 0.92rem;
  min-height: 320px;
  line-height: 1.55;
}
.md-editor-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.md-editor-header label {
  margin: 0;
}
.editor-metrics {
  font-size: 0.82rem;
  color: var(--text-2);
  white-space: nowrap;
}
.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
}
.toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}
.toolbar-group {
  display: inline-flex;
  gap: 0.25rem;
  flex-shrink: 0;
}
.toolbar-sep {
  width: 1px;
  align-self: stretch;
  background: var(--border);
  margin: 0 0.2rem;
  flex-shrink: 0;
}
.toolbar .btn {
  padding: 0.4rem 0.55rem;
  font-weight: 500;
  font-size: 0.82rem;
}
.editor-side {
  position: sticky;
  top: 4.5rem;
  align-self: start;
}
.editor-side-actions {
  margin-top: 0.75rem;
  flex-direction: column;
}
.editor-side-actions .btn {
  width: 100%;
}
.editor-side .cover-preview {
  max-width: 100%;
  max-height: 120px;
}
.editor-side .cover-preview img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}
.draft-banner {
  margin-bottom: 1rem;
}
.status-line.is-pending {
  color: var(--text-2);
}
.preview-box {
  margin-top: 0.75rem;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: 0.75rem;
  background: var(--surface-2);
  overflow: auto;
}

@media (max-width: 900px) {
  .editor-side {
    position: static;
  }
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-color: var(--purple);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid transparent;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn svg { width: 1rem; height: 1rem; }
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
}
.btn-secondary {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--purple);
}
.btn-danger {
  background: var(--danger-bg);
  border-color: color-mix(in srgb, var(--danger) 40%, var(--border));
  color: var(--danger);
}
.btn-danger:hover:not(:disabled) {
  border-color: var(--danger);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--text);
}
.btn-icon {
  padding: 0.55rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.toolbar .btn {
  padding: 0.4rem 0.55rem;
  font-weight: 500;
  font-size: 0.82rem;
}

.table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table th {
  color: var(--text-2);
  font-weight: 500;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-published {
  background: color-mix(in srgb, var(--success) 18%, transparent);
  color: var(--success);
}
.badge-draft {
  background: color-mix(in srgb, var(--text-2) 18%, transparent);
  color: var(--text-2);
}

.actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  font-size: 0.92rem;
}
.alert-error {
  background: var(--danger-bg);
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
  color: var(--danger);
}
.alert-success {
  background: color-mix(in srgb, var(--success) 12%, transparent);
  border-color: color-mix(in srgb, var(--success) 35%, var(--border));
  color: var(--success);
}
.alert-info {
  background: var(--surface-2);
  color: var(--text-2);
}

.status-line {
  font-size: 0.88rem;
  color: var(--text-2);
  min-height: 1.25rem;
}
.status-line.is-saving { color: var(--blue); }
.status-line.is-ok { color: var(--success); }
.status-line.is-error { color: var(--danger); }


.cover-preview {
  margin-top: 0.5rem;
  max-width: 280px;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  overflow: hidden;
}
.cover-preview img { width: 100%; }

.split-admin {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.admin-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: space-between;
  align-items: center;
}

.admin-subnav {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 70%, var(--bg));
}
.admin-subnav[hidden] {
  display: none !important;
}
.admin-subnav-inner {
  width: min(1080px, calc(100% - 2rem));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1rem;
  padding: 0.55rem 0;
}
.admin-subnav-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}
.admin-subnav-content {
  flex: 1 1 auto;
}
.admin-subnav-account {
  margin-left: auto;
  padding-left: 0.85rem;
  border-left: 1px solid var(--border);
  gap: 0.25rem 0.35rem;
}
.admin-subnav-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-right: 0.35rem;
}
.admin-subnav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border-radius: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border: 1px solid transparent;
}
.admin-subnav-link:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}
.admin-subnav-link.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--purple) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--purple) 35%, var(--border));
  font-weight: 600;
}
.admin-subnav-logout {
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .admin-subnav-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-subnav-account {
    margin-left: 0;
    padding-left: 0;
    padding-top: 0.35rem;
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 560px) {
  .admin-subnav-inner {
    width: min(960px, calc(100% - 1.25rem));
  }
  .admin-subnav-logout {
    width: 100%;
    justify-content: center;
  }
}

.admin-dashboard .admin-bar {
  margin-bottom: 1.25rem;
}
.admin-dash-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.15rem;
}
.admin-dash-stat {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.admin-dash-stat-num {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
}
.admin-dash-stat-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-2);
}
.admin-dash-notice {
  margin: 0 0 1.35rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 0.92rem;
}
.admin-dash-notice strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--text);
  font-size: 0.9rem;
}
.admin-dash-notice p {
  margin: 0 0 0.45rem;
}
.admin-dash-notice.is-ok {
  opacity: 0.9;
}
.admin-dash-recent-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0 0 0.75rem;
}
.admin-dash-recent-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  font-family: "Space Grotesk", sans-serif;
}
.admin-dash-all {
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}
.admin-dash-all:hover {
  color: var(--text);
}
.admin-dash-recent-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  overflow: hidden;
  background: var(--surface);
}
.admin-dash-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 0.85rem;
  align-items: center;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}
.admin-dash-item.has-cover {
  grid-template-columns: 52px minmax(0, 1fr);
}
.admin-dash-item:last-child {
  border-bottom: none;
}
.admin-dash-item:hover {
  background: color-mix(in srgb, var(--purple) 8%, transparent);
  color: inherit;
}
.admin-dash-thumb {
  display: block;
  width: 52px;
  height: 40px;
  border-radius: 0.35rem;
  overflow: hidden;
  background: var(--surface-2);
}
.admin-dash-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-dash-item-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.admin-dash-item-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 650;
  font-size: 0.98rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
  color: var(--text);
}
.admin-dash-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  font-size: 0.78rem;
  color: var(--text-2);
}
.admin-dash-empty {
  margin-top: 0.5rem;
}
@media (max-width: 560px) {
  .admin-dash-stats {
    grid-template-columns: 1fr;
  }
}

.admin-attention {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-2);
}
.linkish {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  color: var(--purple);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.linkish:hover {
  color: var(--text);
}
.admin-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
}
.admin-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.admin-toolbar-filters select {
  min-width: 11rem;
  flex: 1 1 10rem;
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.filter-chips .chip {
  cursor: pointer;
  appearance: none;
  font: inherit;
}
.admin-list-meta {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--text-2);
}
.admin-post-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.admin-post-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--surface);
}
.admin-post-main {
  flex: 1 1 16rem;
  min-width: 0;
}
.admin-post-title {
  display: inline-block;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  line-height: 1.35;
}
.admin-post-title:hover {
  color: var(--purple);
}
.admin-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-2);
  align-items: center;
}
.admin-post-cat {
  font-weight: 500;
}
.admin-cover-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.admin-cover-flag svg {
  width: 0.9rem;
  height: 0.9rem;
}
.admin-post-actions {
  flex: 0 0 auto;
  align-self: center;
}

.toast-root {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(360px, calc(100% - 2rem));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  animation: toast-in 0.2s ease;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}
.toast-action {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 0.5rem;
  padding: 0.3rem 0.65rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.toast-action:hover {
  border-color: var(--purple);
}
.toast-error { border-color: color-mix(in srgb, var(--danger) 50%, var(--border)); }
.toast-success { border-color: color-mix(in srgb, var(--success) 50%, var(--border)); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.loading-state {
  color: var(--text-2);
  padding: 2rem 0;
  text-align: center;
}

.auth-shell {
  max-width: 420px;
  margin: 1rem auto 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 560px) {
  .theme-label { display: none; }
  .header-inner,
  .footer-inner,
  .site-main {
    width: min(960px, calc(100% - 1.25rem));
  }
  .site-main { padding-top: 1.35rem; }
  .admin-table .col-date { display: none; }
  .admin-bar .btn-label { display: none; }
  .admin-post-actions { width: 100%; }
}
