/* Estilo do blog — baseado nas cores e tipografia do tema minima */

:root {
  --bg: #fdfdfd;
  --surface: #ffffff;
  --text: #111111;
  --muted: #828282;
  --border: #e8e8e8;
  --brand: #2a7ae2;
  --brand-soft: #eaf2fd;
  --header-top: #424242;
  --code-bg: #f5f5f5;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --radius: 8px;
  --max: 1100px;
  --gutter: 24px;
  --sidebar: 300px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181b;
    --surface: #1d2024;
    --text: #e6e6e6;
    --muted: #9a9ea5;
    --border: #2c3036;
    --brand: #6aa6f5;
    --brand-soft: #1e2b3d;
    --header-top: #6aa6f5;
    --code-bg: #24282d;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff; padding: 8px 12px; z-index: 10;
}
.skip-link:focus { left: 8px; top: 8px; }

.wrapper {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Cabeçalho ---------- */
.site-header {
  border-top: 5px solid var(--header-top);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky; top: 0; z-index: 5;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 60px; flex-wrap: wrap;
}
.site-title {
  font-size: 1.3rem; font-weight: 300; letter-spacing: -0.5px;
  color: var(--text);
}
.site-title:hover { text-decoration: none; color: var(--brand); }
.site-nav { display: flex; gap: 20px; }
.site-nav a { color: var(--text); font-size: .95rem; }
.site-nav a:hover { color: var(--brand); }

/* ---------- Layout com barra lateral ---------- */
.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar);
  gap: 48px;
  padding-top: 40px;
  padding-bottom: 48px;
}
.content { min-width: 0; }

/* ---------- Post ---------- */
.eyebrow {
  margin: 0 0 8px;
  font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand);
}
.post-header { margin-bottom: 28px; }
.post-title {
  margin: 0 0 8px;
  font-size: 2.3rem; line-height: 1.2; letter-spacing: -1px; font-weight: 600;
}
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--brand); text-decoration: none; }
.post-meta { margin: 0; color: var(--muted); font-size: .9rem; }

.tags { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-size: .8rem;
}
.tag small { opacity: .7; margin-left: 2px; }

.post-content { font-size: 1.08rem; line-height: 1.75; overflow-wrap: break-word; }
.post-content p { margin: 0 0 1.2em; }
.post-content h2, .post-content h3, .post-content h4 { margin: 1.8em 0 .6em; line-height: 1.3; }
.post-content h2 { font-size: 1.6rem; }
.post-content h3 { font-size: 1.3rem; }
.post-content blockquote {
  margin: 1.5em 0; padding: 4px 20px;
  border-left: 4px solid var(--border); color: var(--muted);
  font-family: var(--serif); font-style: italic; font-size: 1.1rem;
}
.post-content img { display: block; margin: 1.5em auto; border-radius: var(--radius); }
.post-content code {
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 5px; font-size: .9em;
}
.post-content pre {
  background: var(--code-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; overflow-x: auto;
}
.post-content pre code { border: 0; padding: 0; background: none; }
.post-content table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.post-content th, .post-content td { border: 1px solid var(--border); padding: 6px 10px; }

.post-footer { margin-top: 32px; }
.button {
  display: inline-block; padding: 9px 18px; border-radius: var(--radius);
  border: 1px solid var(--brand); color: var(--brand); font-weight: 500;
}
.button:hover { background: var(--brand); color: #fff; text-decoration: none; }

.post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border);
}
.post-nav a {
  display: block; padding: 12px 16px; border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
}
.post-nav a:hover { border-color: var(--brand); text-decoration: none; }
.post-nav small { display: block; color: var(--muted); }
.post-nav .next { text-align: right; grid-column: 2; }

.older-posts { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); }
.older-posts h2 { font-size: 1.4rem; margin: 0 0 16px; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 16px 0; border-bottom: 1px solid var(--border); }
.post-list .post-link { display: block; font-size: 1.25rem; font-weight: 500; }
.post-list p { margin: 6px 0 0; color: var(--muted); }

/* ---------- Barra lateral ---------- */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar > .widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  scroll-margin-top: 90px;
}
.widget-title {
  margin: 0 0 12px;
  font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.widget-title .count {
  background: var(--brand-soft); color: var(--brand);
  border-radius: 999px; padding: 0 8px; font-size: .75rem; letter-spacing: 0;
}
.widget p { margin: 0; font-size: .92rem; }
.muted { color: var(--muted); }

.widget-about { text-align: center; }
.widget-about .widget-title { justify-content: center; }
.widget-about p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.avatar {
  width: 96px; height: 96px; margin: 0 auto 12px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  font-size: 2rem; font-weight: 600; letter-spacing: 1px;
}
img.avatar {
  display: block; object-fit: cover;
  border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border);
}

/* ---------- Currículo ---------- */
.cv h2 {
  font-size: .85rem !important; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brand); border-bottom: 1px solid var(--border); padding-bottom: 6px;
}
.cv h3 { margin-bottom: .1em !important; font-size: 1.15rem !important; }
.cv h3 + p em { color: var(--muted); font-style: normal; font-size: .92rem; }
.cv ul { padding-left: 1.2em; }
.cv li { margin-bottom: .3em; }
.cv-actions { margin-top: 32px; }
@media print {
  .site-header, .sidebar, .site-footer, .cv-actions, .skip-link { display: none !important; }
  .layout { display: block; padding: 0; }
  body { background: #fff; color: #000; }
}

.social-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.social-list a {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 6px; color: var(--text); font-size: .95rem;
}
.social-list a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.social-list svg { width: 18px; height: 18px; flex: none; }

.sidebar-posts { list-style: none; margin: 0; padding: 0; }
.sidebar-posts li { padding: 10px 0 10px 12px; border-left: 2px solid var(--border); }
.sidebar-posts li + li { margin-top: 2px; }
.sidebar-posts a { display: block; color: var(--text); line-height: 1.35; font-size: .95rem; }
.sidebar-posts a:hover { color: var(--brand); text-decoration: none; }
.sidebar-posts time { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.sidebar-posts li.current { border-left-color: var(--brand); }
.sidebar-posts li.current a { color: var(--brand); font-weight: 600; }

/* ---------- Rodapé ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; padding-top: 20px; padding-bottom: 20px;
  color: var(--muted); font-size: .9rem;
}
.footer-inner p { margin: 0; }
.footer-inner .social-list { flex-direction: row; gap: 4px; }
.footer-inner .social-list span {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}
.footer-inner .social-list a { color: var(--muted); padding: 6px; }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  :root { --sidebar: 260px; }
  .layout { gap: 32px; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .layout { grid-template-columns: 1fr; padding-top: 24px; gap: 40px; }
  .sidebar { border-top: 1px solid var(--border); padding-top: 32px; }
  .header-inner { padding-top: 10px; padding-bottom: 10px; min-height: 0; }
  .site-title { font-size: 1.1rem; }
  .site-nav { gap: 16px; }
  .post-title { font-size: 1.75rem; letter-spacing: -.5px; }
  .post-content { font-size: 1.02rem; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { grid-column: 1; }
  .site-header { position: static; }
}
