/*
Theme Name: rsanches
Theme URI: https://ricardo-sanches.local
Author: Ricardo Sanches
Description: Tema pessoal minimalista com estética de documento Markdown renderizado. Suporte nativo a modo claro/escuro e foco em tipografia técnica.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rsanches
*/

:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

    --fg: #1a1a1a;
    --fg-muted: #666;
    --fg-subtle: #999;
    --bg: #fdfdfd;
    --bg-soft: #f5f5f5;
    --border: #e5e5e5;
    --accent: #0a0a0a;
    --code-bg: #f5f5f5;
    --quote-border: #d0d0d0;

    --measure: 42rem;
    --leading: 1.65;
    --space: 1rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --fg: #e8e8e8;
        --fg-muted: #a0a0a0;
        --fg-subtle: #6a6a6a;
        --bg: #161616;
        --bg-soft: #1f1f1f;
        --border: #2a2a2a;
        --accent: #fafafa;
        --code-bg: #1f1f1f;
        --quote-border: #3a3a3a;
    }
}

* {
    box-sizing: border-box;
}

html {
    font-size: 17px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    line-height: var(--leading);
    color: var(--fg);
    background: var(--bg);
    font-feature-settings: "kern", "liga", "calt";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wrap {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 3rem 1.25rem 6rem;
}

.site-header {
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.site-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}

.site-title a,
.site-title a:hover {
    color: var(--fg);
    text-decoration: none;
    border-bottom: none;
}

.site-nav {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--fg-muted);
}

.site-nav a {
    color: var(--fg-muted);
    margin-right: 1rem;
}

.site-nav a:hover {
    color: var(--fg);
}

.site-footer {
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--fg-subtle);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

a {
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: border-color 120ms ease;
}

a:hover {
    border-bottom-color: var(--fg);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    margin: 2.25rem 0 1rem;
    letter-spacing: -0.015em;
    color: var(--fg);
}

h1 { font-size: 1.75rem; margin-top: 0; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
h5, h6 { font-size: 0.9rem; color: var(--fg-muted); }

p {
    margin: 0 0 1rem;
}

ul, ol {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
}

li { margin-bottom: 0.25rem; }

blockquote {
    margin: 1.5rem 0;
    padding: 0.25rem 1rem;
    border-left: 3px solid var(--quote-border);
    color: var(--fg-muted);
}

blockquote p:last-child { margin-bottom: 0; }

code, kbd, samp {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--code-bg);
    padding: 0.125em 0.35em;
    border-radius: 3px;
}

pre {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.5;
    background: var(--code-bg);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

th, td {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

th { font-weight: 600; }

img, video {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
}

.meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--fg-subtle);
}

.post-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.post-list li {
    display: flex;
    gap: 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--border);
    align-items: baseline;
}

.post-list .meta {
    flex-shrink: 0;
    width: 6.5rem;
}

.post-list a {
    border-bottom: none;
}

.post-list a:hover {
    border-bottom: 1px solid var(--fg);
}

.section {
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fg-subtle);
    margin: 0 0 1rem;
    font-weight: 600;
}

.featured {
    margin-bottom: 3rem;
}

.featured h2 {
    margin-top: 0.5rem;
    font-size: 1.6rem;
}

.featured h2 a {
    border-bottom: none;
}

.topic-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.topic-list a {
    border-bottom: none;
    color: var(--fg-muted);
}

.topic-list a:hover { color: var(--fg); }

.topic-group {
    margin-bottom: 2.5rem;
}

.topic-group h2 {
    font-size: 1.1rem;
    margin: 0 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.entry-header {
    margin-bottom: 2rem;
}

.entry-header .meta {
    margin-bottom: 0.5rem;
}

.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }

.pagination {
    margin-top: 3rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    color: var(--fg-muted);
}

.pagination a { color: var(--fg-muted); border-bottom: none; }
.pagination a:hover { color: var(--fg); }
