/* ===========================================================
   alvaro-garden theme
   Dark-first, terminal green accent, editorial dev aesthetic.
   =========================================================== */

/* ---------- Tokens ---------- */
:root,
[data-theme="dark"] {
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #18181b;

    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --text-disabled: #52525b;

    --accent: #7ee787;
    --accent-hover: #5dc46a;
    --accent-dim: #3fa054;
    --accent-soft: rgba(126, 231, 135, 0.08);

    --border-subtle: #27272a;
    --border-default: #3f3f46;
    --border-focus: var(--accent);

    --sans: 'Inter', system-ui, -apple-system, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    --container: 880px;
    --reading: 880px;
    --caderno-reading: 720px;
}

[data-theme="light"] {
    --bg-primary: #fafafa;
    --bg-secondary: #f4f4f5;
    --bg-tertiary: #e4e4e7;

    --text-primary: #0a0a0b;
    --text-secondary: #3f3f46;
    --text-muted: #52525b;
    --text-disabled: #a1a1aa;

    --accent: #3fa054;
    --accent-hover: #2d7a3e;
    --accent-dim: #1f5a2b;
    --accent-soft: rgba(63, 160, 84, 0.08);

    --border-subtle: #e4e4e7;
    --border-default: #d4d4d8;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "ss01", "cv11";
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
    width: 100%;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; }
img { max-width: 100%; height: auto; }

::selection { background: var(--accent-soft); color: var(--text-primary); }

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

/* ---------- Container / page ---------- */
.page-container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px 96px;
}

@media (max-width: 640px) {
    .page-container { padding: 0 20px 64px; }
}

/* ---------- Header ---------- */
.site-header {
    width: 100%;
    border-bottom: none;
}

.site-header-inner {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 28px 32px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    font-family: var(--mono);
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 400;
    letter-spacing: -0.005em;
    white-space: nowrap;
    transition: color .15s ease;
}
.site-logo .tilde {
    color: var(--text-muted);
    margin-right: 6px;
    transition: color .15s ease;
}
.site-logo:hover .tilde { color: var(--accent); }

/* Breadcrumb suffix shown only on caderno section */
.site-logo .crumb-suffix { display: none; }
html[data-section="caderno"] .site-logo .crumb-suffix { display: inline; }
.site-logo .crumb-sep {
    color: var(--text-disabled);
    margin: 0 6px;
}
.site-logo .crumb-current {
    color: var(--text-muted);
}

.site-nav {
    display: flex;
    gap: 18px;
    align-items: center;
}

.nav-link {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 0 2px;
    border-bottom: 1px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}
.nav-link:hover { color: var(--text-primary); }

/* Active state via data-section on <html> */
html[data-section="blog"] .nav-link[data-nav="blog"],
html[data-section="caderno"] .nav-link[data-nav="caderno"],
html[data-section="projetos"] .nav-link[data-nav="projetos"],
html[data-section="sobre"] .nav-link[data-nav="sobre"] {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}

/* Theme toggle */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: color .15s ease, background .15s ease;
    margin-left: 6px;
}
.theme-toggle:hover {
    color: var(--accent);
    background: var(--bg-secondary);
}
.theme-toggle svg { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

@media (max-width: 640px) {
    .site-header-inner { padding: 20px 20px 14px; gap: 16px; flex-wrap: wrap; }
    .site-nav { gap: 14px; }
    .nav-link { font-size: 12px; }
}

/* ---------- Tagline ---------- */
.tagline {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text-muted);
    padding: 6px 0 48px;
    letter-spacing: -0.005em;
}
.tagline .dot {
    color: var(--text-disabled);
    margin: 0 8px;
}

/* ---------- Blog feed (home + tag + author) ---------- */
.blog-feed { display: flex; flex-direction: column; }

.blog-card {
    padding: 22px 0;
    display: block;
    border-bottom: 1px solid var(--border-subtle);
    transition: opacity .15s ease;
}
.blog-card:first-child { padding-top: 8px; }
.blog-card:last-child { border-bottom: 0; }
.blog-card:hover .blog-card-title { color: var(--accent); }

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.meta-date {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent);
}
.meta-dot {
    color: var(--text-disabled);
    font-family: var(--mono);
    font-size: 12px;
}
.tag-pill {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 2px 8px;
    border-radius: 4px;
}

.blog-card-title {
    font-family: var(--sans);
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: -0.015em;
    margin: 0 0 8px;
    transition: color .15s ease;
    text-wrap: balance;
}
.blog-card-excerpt {
    font-family: var(--sans);
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
    text-wrap: pretty;
}

/* ---------- Pagination ---------- */
.pagination {
    padding: 56px 0 0;
    display: flex;
    justify-content: space-between;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
}
.pagination a { color: var(--text-muted); transition: color .15s ease; }
.pagination a:hover { color: var(--accent); }
.pagination .sep { color: var(--text-disabled); }
.pagination .disabled { color: var(--text-disabled); }

/* ---------- Post (blog single) ---------- */
.post-article {
    max-width: var(--reading);
    margin: 0 auto;
    padding: 0 32px 24px;
}

@media (max-width: 640px) {
    .post-article { padding: 0 20px 16px; }
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-top: 24px;
}
.post-meta .reading-time {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text-muted);
}

.post-title {
    font-family: var(--sans);
    font-weight: 500;
    font-size: 34px;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin: 0 0 16px;
    text-wrap: balance;
}

.post-subtitle {
    font-family: var(--sans);
    font-size: 18px;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0 0 40px;
    font-weight: 400;
    text-wrap: pretty;
}

.post-feature-image {
    margin: 32px 0;
}
.post-feature-image img {
    display: block;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}
.post-feature-image figcaption {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
    text-align: center;
}

/* ---------- Post body: longform typography ---------- */
.post-body {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text-secondary);
}
.post-body > * + * { margin-top: 1.5em; }
.post-body p {
    margin: 0 0 1.5em;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    word-break: break-word;
    text-wrap: pretty;
}
.post-body p:last-child { margin-bottom: 0; }

.post-body h2 {
    font-family: var(--sans);
    font-weight: 500;
    font-size: 24px;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 48px 0 20px;
    text-wrap: balance;
}
.post-body h3 {
    font-family: var(--sans);
    font-weight: 500;
    font-size: 19px;
    line-height: 1.35;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin: 32px 0 14px;
    text-wrap: balance;
}
.post-body h4 {
    font-family: var(--sans);
    font-weight: 500;
    font-size: 16px;
    color: var(--text-primary);
    margin: 28px 0 10px;
}

.post-body a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(126, 231, 135, 0.35);
    transition: border-color .15s ease;
}
.post-body a:hover {
    border-bottom-color: var(--accent);
}

.post-body strong {
    color: var(--text-primary);
    font-weight: 500;
}
.post-body em { font-style: italic; }

.post-body ul, .post-body ol {
    margin: 0 0 1.5em;
    padding-left: 24px;
    color: var(--text-secondary);
}
.post-body li { margin-bottom: 7px; }
.post-body li::marker { color: var(--text-muted); }

.post-body blockquote {
    margin: 32px 0;
    padding: 4px 0 4px 20px;
    border-left: 3px solid var(--accent);
    color: var(--text-muted);
    font-style: normal;
}
.post-body blockquote p { margin-bottom: 1em; }
.post-body blockquote p:last-child { margin-bottom: 0; }

.post-body code {
    font-family: var(--mono);
    font-size: 0.88em;
    background: var(--bg-tertiary);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
}
.post-body pre {
    font-family: var(--mono);
    font-size: 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 28px 0;
    line-height: 1.6;
}
.post-body pre code {
    background: transparent;
    padding: 0;
    font-size: inherit;
    color: var(--text-secondary);
    border-radius: 0;
}

.post-body img,
.post-body video {
    display: block;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    margin: 28px 0;
}

.post-body hr {
    border: 0;
    height: 1px;
    margin: 56px 0;
    background: none;
    text-align: center;
    overflow: visible;
}
.post-body hr::before {
    content: "· · ·";
    display: inline-block;
    font-family: var(--mono);
    font-size: 16px;
    color: var(--text-disabled);
    letter-spacing: 0.5em;
    padding-left: 0.5em;
}

.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 14px;
}
.post-body th, .post-body td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-subtle);
}
.post-body th {
    color: var(--text-primary);
    font-weight: 500;
    border-bottom-color: var(--border-default);
}

/* ---------- Ghost card elements (kg-*) ---------- */
.kg-card { margin: 28px 0; }
.kg-card img { border-radius: 8px; border: 1px solid var(--border-subtle); }

.kg-image-card figcaption,
.kg-gallery-card figcaption,
.kg-video-card figcaption,
.kg-embed-card figcaption,
.kg-bookmark-card + figcaption {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
    text-align: center;
}

.kg-width-wide { margin-left: -40px; margin-right: -40px; }
.kg-width-full { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
@media (max-width: 720px) {
    .kg-width-wide { margin-left: 0; margin-right: 0; }
    .kg-width-full { margin-left: -20px; margin-right: -20px; }
}

.kg-gallery-container { display: flex; flex-direction: column; gap: 8px; }
.kg-gallery-row { display: flex; gap: 8px; }
.kg-gallery-image { flex: 1; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }

.kg-bookmark-card {
    margin: 28px 0;
}
.kg-bookmark-container {
    display: flex;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: border-color .15s ease;
    min-height: 120px;
}
.kg-bookmark-container:hover { border-color: var(--border-default); }
.kg-bookmark-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.kg-bookmark-title {
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 6px;
}
.kg-bookmark-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}
.kg-bookmark-metadata {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}
.kg-bookmark-icon {
    width: 14px;
    height: 14px;
    border-radius: 2px;
}
.kg-bookmark-thumbnail {
    width: 180px;
    flex-shrink: 0;
}
.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
    border-radius: 0;
}
@media (max-width: 640px) {
    .kg-bookmark-container { flex-direction: column-reverse; }
    .kg-bookmark-thumbnail { width: 100%; height: 160px; }
}

.kg-callout-card {
    margin: 28px 0;
    padding: 18px 20px;
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.kg-callout-emoji {
    font-size: 18px;
    line-height: 1;
    padding-top: 3px;
}
.kg-callout-text {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.kg-toggle-card {
    margin: 28px 0;
    padding: 18px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
}
.kg-toggle-heading {
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    cursor: pointer;
}
.kg-toggle-content {
    margin-top: 14px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.kg-button-card {
    margin: 28px 0;
    text-align: center;
}
.kg-btn {
    display: inline-block;
    padding: 10px 22px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s ease;
}
.kg-btn:hover {
    background: rgba(126, 231, 135, 0.15);
    border-bottom: 1px solid var(--accent) !important;
}

.kg-embed-card {
    margin: 28px 0;
    position: relative;
}
.kg-embed-card iframe {
    width: 100%;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
}

.kg-file-card {
    margin: 28px 0;
    padding: 18px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}
.kg-file-card:hover { border-color: var(--border-default); }
.kg-file-card-title {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}
.kg-file-card-metadata {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
}

/* ---------- Post tags block ---------- */
.post-tags-block {
    max-width: var(--reading);
    margin: 48px auto 0;
    padding: 0 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-chip {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 3px 10px;
    border-radius: 999px;
    transition: color .15s ease, background .15s ease;
}
.tag-chip:hover {
    color: var(--accent-hover);
    background: rgba(126, 231, 135, 0.15);
}

/* ---------- Post nav (prev/next) ---------- */
.post-nav {
    max-width: var(--reading);
    margin: 64px auto 0;
    padding: 48px 32px 0;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    gap: 24px;
    font-family: var(--mono);
    font-size: 12px;
}
.post-nav-prev, .post-nav-next { max-width: 48%; }
.post-nav-next { text-align: right; margin-left: auto; }
.post-nav a {
    color: var(--text-muted);
    display: block;
    line-height: 1.4;
    transition: color .15s ease;
}
.post-nav a:hover { color: var(--accent); }
.post-nav-label {
    display: block;
    color: var(--text-disabled);
    margin-bottom: 4px;
}
.post-nav-title {
    display: block;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--text-secondary);
}
.post-nav a:hover .post-nav-title { color: var(--text-primary); }

@media (max-width: 640px) {
    .post-nav { padding: 32px 20px 0; flex-direction: column; }
    .post-nav-next { text-align: left; margin-left: 0; }
    .post-nav-prev, .post-nav-next { max-width: 100%; }
    .post-tags-block { padding: 0 20px; }
}

/* ---------- Caderno feed ---------- */
.caderno-feed { display: flex; flex-direction: column; }

.caderno-entry {
    display: grid;
    grid-template-columns: 110px 1fr;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: opacity .15s ease;
}
.caderno-entry:first-child { padding-top: 10px; }
.caderno-entry:last-child { border-bottom: 0; }
.caderno-entry:hover .caderno-title { color: var(--accent); }

.caderno-date {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent);
    padding-top: 2px;
    white-space: nowrap;
}
.caderno-body { min-width: 0; }
.caderno-title {
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.4;
    letter-spacing: -0.01em;
    transition: color .15s ease;
    text-wrap: balance;
}
.caderno-excerpt {
    font-family: var(--sans);
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    max-width: 560px;
    text-wrap: pretty;
}

@media (max-width: 640px) {
    .caderno-entry { grid-template-columns: 80px 1fr; padding: 20px 0; }
    .caderno-title { font-size: 14px; }
    .caderno-excerpt { font-size: 13px; }
}

/* ---------- Series tags (bottom of caderno feed) ---------- */
.series-tags {
    padding: 48px 0 0;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    align-items: center;
}
.series-tags a {
    color: var(--text-muted);
    transition: color .15s ease;
}
.series-tags a:hover { color: var(--accent); }
.series-tags .count {
    color: var(--text-disabled);
    margin-right: 4px;
}
.series-tags .s-dot { color: var(--text-disabled); }

/* ---------- Caderno single ---------- */
.caderno-article {
    max-width: var(--caderno-reading);
    margin: 0 auto;
    padding: 24px 32px 24px;
}
@media (max-width: 640px) {
    .caderno-article { padding: 16px 20px; }
}

.back-crumb {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 40px;
    display: inline-block;
    transition: color .15s ease;
}
.back-crumb:hover { color: var(--accent); }

.caderno-single-date {
    font-family: var(--mono);
    font-size: 20px;
    color: var(--accent);
    margin-bottom: 10px;
    display: block;
}
.caderno-single-title {
    font-family: var(--sans);
    font-size: 24px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0 0 32px;
    text-wrap: balance;
}
.caderno-single-body { font-size: 16px; line-height: 1.7; }

.caderno-tags-block {
    max-width: var(--caderno-reading);
    margin: 48px auto 0;
    padding: 0;
}

/* ---------- Page (static / fallback) ---------- */
.page-article {
    max-width: var(--reading);
    margin: 0 auto;
    padding: 24px 32px 24px;
}
.page-title {
    font-family: var(--sans);
    font-weight: 500;
    font-size: 34px;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin: 0 0 40px;
    text-wrap: balance;
}
@media (max-width: 640px) {
    .page-article { padding: 16px 20px; }
    .page-title { font-size: 28px; }
}

/* ---------- Sobre ---------- */
.sobre-article {
    max-width: var(--reading);
    margin: 0 auto;
    padding: 0 32px 48px;
}
.sobre-article .tagline { padding-top: 8px; padding-bottom: 40px; }
.sobre-title {
    font-family: var(--sans);
    font-size: 34px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    margin: 0 0 48px;
    text-wrap: balance;
}
.sobre-body { font-size: 17px; line-height: 1.75; }
.sobre-body p strong { color: var(--text-primary); font-weight: 500; }

.contact-block {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--border-subtle);
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text-muted);
}
.contact-block a { color: var(--text-muted); transition: color .15s ease; }
.contact-block a:hover { color: var(--accent); }
.contact-block .c-sep { color: var(--text-disabled); margin: 0 10px; }

@media (max-width: 640px) {
    .sobre-article { padding: 0 20px 16px; }
    .sobre-title { font-size: 28px; }
}

/* ---------- Projetos ---------- */
.projetos-subtitle {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 40px;
    padding-top: 8px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
@media (max-width: 640px) {
    .project-grid { grid-template-columns: 1fr; gap: 16px; }
}

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 22px;
    transition: border-color .15s ease;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.project-card:hover { border-color: var(--border-default); }

.project-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.project-name {
    font-family: var(--sans);
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    transition: color .15s ease;
}
a.project-name:hover { color: var(--accent); }
.status-pill {
    font-family: var(--mono);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 9999px;
    white-space: nowrap;
}
.status-ativo {
    background: var(--accent-soft);
    color: var(--accent);
}
.status-experimental {
    background: rgba(161, 161, 170, 0.1);
    color: var(--text-secondary);
}
.status-arquivado {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 1px 7px;
}
.project-desc {
    font-family: var(--sans);
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.55;
    text-wrap: pretty;
}
.project-stack {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-muted);
}
.project-links {
    font-family: var(--mono);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 2px;
}
.project-links a {
    color: var(--accent);
    transition: color .15s ease;
}
.project-links a:hover { color: var(--accent-hover); }
.project-links .link-sep {
    color: var(--text-disabled);
    margin: 0 10px;
}

.project-empty {
    font-family: var(--mono);
    font-size: 14px;
    color: var(--text-muted);
    padding: 48px 0;
    text-align: center;
}

/* ---------- Projeto single (post-projeto.hbs) ---------- */
.projeto-article .post-meta {
    padding-top: 24px;
    margin-bottom: 32px;
}

.projeto-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}
.projeto-header .post-title {
    margin: 0;
    flex: 1;
}
.projeto-header .status-pill {
    margin-top: 16px;
    flex-shrink: 0;
}

.projeto-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 32px;
}
.stack-chip {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
}

/* ---------- Tag / Author archive headers ---------- */
.tag-header, .author-header {
    padding: 8px 0 40px;
}
.tag-title, .author-name {
    font-family: var(--sans);
    font-weight: 500;
    font-size: 28px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0 0 12px;
}
.tag-title {
    font-family: var(--mono);
    font-size: 22px;
}
.tag-description, .author-bio {
    font-family: var(--sans);
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
    max-width: 560px;
}
.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    margin-bottom: 12px;
    border: 1px solid var(--border-subtle);
}

/* ---------- Error page ---------- */
.error-page {
    text-align: center;
    padding-top: 80px;
}
.error-code {
    font-family: var(--mono);
    font-size: 96px;
    font-weight: 500;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 20px;
}
.error-message {
    font-family: var(--sans);
    font-size: 18px;
    color: var(--text-secondary);
    margin: 0 0 32px;
}
.error-back {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text-muted);
}
.error-back a {
    color: var(--text-muted);
    transition: color .15s ease;
}
.error-back a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
    width: 100%;
    border-top: 1px solid var(--border-subtle);
    margin-top: 48px;
}
.site-footer-inner {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 28px 32px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-disabled);
}
.footer-links a {
    color: var(--text-disabled);
    transition: color .15s ease;
}
.footer-links a:hover { color: var(--accent); }
.site-footer .f-sep { margin: 0 10px; color: var(--border-default); }

@media (max-width: 640px) {
    .site-footer-inner { padding: 20px 20px 28px; flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ---------- Utilities ---------- */
.muted { color: var(--text-muted); }
.disabled { color: var(--text-disabled); }
.mono { font-family: var(--mono); }
