@import url("pygments.css");

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --text: #1f2328;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #c2185b;
  --accent-soft: #fce4ec;
  --link: #0b5fca;
  --code-bg: #f6f8fa;
  --max: 760px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #16181d; --bg-soft: #1d2027; --text: #e6e6e6; --muted: #9aa0aa; --border: #2c313a;
  --accent: #f06292; --accent-soft: #3a1f2b; --link: #6cb6ff; --code-bg: #272822;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16181d; --bg-soft: #1d2027; --text: #e6e6e6; --muted: #9aa0aa; --border: #2c313a;
    --accent: #f06292; --accent-soft: #3a1f2b; --link: #6cb6ff; --code-bg: #272822;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.7 var(--font);
  display: flex; flex-direction: column; min-height: 100vh;
}
main.wrap { flex: 1; padding-top: 2.5rem; padding-bottom: 3rem; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; width: 100%; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 1.25rem; color: var(--text); letter-spacing: -.02em; }
.brand::before { content: "✦ "; color: var(--accent); }
.brand:hover { text-decoration: none; color: var(--accent); }
.nav { display: flex; align-items: center; gap: 1.1rem; font-size: .95rem; flex-wrap: wrap; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }
.theme-toggle { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: 6px; cursor: pointer; padding: 0 .5rem; font-size: 1rem; line-height: 1.8; }
.theme-toggle:hover { color: var(--text); }

/* Lista */
.intro { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px dashed var(--border); }
.intro p { margin: 0; }
.page-title { font-size: 1.8rem; letter-spacing: -.02em; margin: 0 0 1.5rem; }
.post-item { padding: 1.4rem 0; border-bottom: 1px solid var(--border); }
.post-item:last-of-type { border-bottom: 0; }
.post-item-title { margin: .2rem 0 .3rem; font-size: 1.45rem; line-height: 1.3; letter-spacing: -.015em; }
.post-item-title a { color: var(--text); }
.post-item-title a:hover { color: var(--accent); text-decoration: none; }
.post-item-excerpt { margin: 0; color: var(--muted); }
.post-meta { font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.sep { opacity: .6; }
.tag { color: var(--accent); font-size: .85rem; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: .6rem; }
.tag-cloud .tag { background: var(--accent-soft); padding: .2rem .7rem; border-radius: 999px; }
.tag-cloud small { color: var(--muted); }
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; font-size: .95rem; }
.empty { color: var(--muted); }

/* Arquivo */
.archive-year h2 { font-size: 1.3rem; margin: 1.5rem 0 .5rem; color: var(--accent); }
.archive-list { list-style: none; padding: 0; margin: 0; }
.archive-list li { padding: .3rem 0; display: flex; gap: 1rem; }
.archive-list time { color: var(--muted); font-family: var(--mono); font-size: .85rem; min-width: 3.2rem; padding-top: .15rem; }

/* Post */
.post-header { margin-bottom: 2rem; }
.post-title { font-size: 2.3rem; line-height: 1.2; letter-spacing: -.025em; margin: 0 0 .6rem; }
.notice { background: var(--accent-soft); color: var(--accent); padding: .6rem 1rem; border-radius: 6px; margin-bottom: 1.5rem; font-size: .9rem; }
.post-footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

.content { font-family: var(--serif); font-size: 1.12rem; overflow-wrap: break-word; }
.content h1, .content h2, .content h3, .content h4 { font-family: var(--font); line-height: 1.3; letter-spacing: -.015em; margin: 2.2rem 0 .8rem; }
.content h2 { font-size: 1.6rem; border-bottom: 1px solid var(--border); padding-bottom: .3rem; }
.content h3 { font-size: 1.3rem; }
.content a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.content .anchor { opacity: 0; margin-left: .4rem; color: var(--muted); text-decoration: none; font-size: .8em; }
.content h2:hover .anchor, .content h3:hover .anchor, .content h4:hover .anchor { opacity: 1; }
.content img { max-width: 100%; height: auto; border-radius: 6px; display: block; margin: 1.5rem auto; }
.content blockquote { margin: 1.5rem 0; padding: .2rem 1.2rem; border-left: 4px solid var(--accent); color: var(--muted); background: var(--bg-soft); border-radius: 0 6px 6px 0; }
.content hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.content table { border-collapse: collapse; width: 100%; font-family: var(--font); font-size: .95rem; display: block; overflow-x: auto; }
.content th, .content td { border: 1px solid var(--border); padding: .45rem .7rem; text-align: left; }
.content th { background: var(--bg-soft); }
.content code { font-family: var(--mono); font-size: .86em; background: var(--code-bg); padding: .12em .35em; border-radius: 4px; }
.content pre { font-family: var(--mono); font-size: .88rem; line-height: 1.55; overflow-x: auto; padding: 1rem 1.1rem; border-radius: 8px; border: 1px solid var(--border); margin: 1.5rem 0; }
.content pre code { background: none; padding: 0; font-size: inherit; }
.content .highlight { border-radius: 8px; }
.content .highlight pre { background: inherit; }
.content .toc { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: .8rem 1.2rem; font-family: var(--font); font-size: .95rem; }
.content .toc ul { margin: .2rem 0; padding-left: 1.2rem; }
.content .footnote { font-size: .9rem; color: var(--muted); }

/* Vídeo */
.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 1.8rem 0; border-radius: 8px; overflow: hidden; background: #000; }
.video-embed iframe, .video-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-file { aspect-ratio: auto; }
.video-file video { position: static; height: auto; display: block; }

/* 404 */
.not-found { text-align: center; padding: 4rem 0; }
.not-found h1 { font-size: 5rem; margin: 0; color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; padding: 1.2rem 0; }
.site-footer p { margin: 0; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .post-title { font-size: 1.8rem; }
  .post-item-title { font-size: 1.25rem; }
  .content { font-size: 1.05rem; }
  .header-inner { padding-top: .5rem; padding-bottom: .5rem; }
}
