/* ══════════════════════════════════════════
   blog.css
   ══════════════════════════════════════════ */

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

:root {
    --white: #ffffff;
    --ink: #111010;
    --ink-faint: #c0bbb0;
    --ink-mid: #7a756a;
    --dot-off: #e8e4dc;
    --dot-on: #8a7f6f;
    --bar-height: 44px;
}

html,
body {
    height: 100%;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    color: var(--ink);
    font-family: "EB Garamond", Georgia, serif;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 180px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

/* ── NAV ── */
.nav-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: var(--bar-height);
    background-color: var(--white);
}

.nav-right {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-logo,
.nav-link {
    font-family: "DM Mono", monospace;
    font-size: 0.6rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    color: var(--ink-mid);
    text-decoration: none;
    transition: color 0.2s ease;
}
.nav-logo:hover,
.nav-link:hover,
.nav-link.active {
    color: var(--ink);
}

/* ── PAGE ── */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-content {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 3.5rem 2rem 5rem;
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

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

.page-eyebrow {
    font-family: "DM Mono", monospace;
    font-size: 0.55rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 0.5rem;
}

.page-title {
    font-family: "EB Garamond", Georgia, serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    font-style: italic;
    color: var(--ink);
    line-height: 1.1;
}

.section-rule {
    width: 32px;
    height: 1px;
    background: var(--dot-off);
    margin-bottom: 3rem;
}

/* ── LISTA ── */
.posts-list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

/* ── CARD ── */
.post-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0 2.5rem;
    padding: 2.25rem 0;
    /* border-top removido — substituído por .post-rule só sob a descrição */
    transition: opacity 0.2s ease;
}

.post-card:hover {
    opacity: 0.72;
}

/* Traço fino que aparece apenas por baixo do excerpt (descrição),
   antes do "Read more" — separa visualmente os posts de forma mais cirúrgica */
.post-rule {
    width: 100%; /* Ocupa a largura da coluna do corpo do post */
    height: 1px;
    background: var(--dot-off); /* Mesma cor das bordas dos cards de project */
    margin-top: 0.9rem; /* Espaço entre o texto do excerpt e o traço */
    margin-bottom: 0.5rem; /* Espaço entre o traço e o "Read more" */
}

/* ── ASIDE (data + tag) ── */
.post-side {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.2rem;
}

.post-date {
    font-family: "DM Mono", monospace;
    font-size: 0.52rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--ink-faint);
    white-space: nowrap;
}

.post-tag {
    display: inline-block;
    font-family: "DM Mono", monospace;
    font-size: 0.48rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--dot-on);
    border: 1px solid var(--dot-off);
    border-radius: 2px;
    padding: 0.2rem 0.45rem;
    width: fit-content;
}

/* ── BODY ── */
.post-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.post-title {
    font-family: "EB Garamond", Georgia, serif;
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 400;
    font-style: italic;
    color: var(--ink);
    line-height: 1.25;
}

.post-title em {
    font-style: normal;
    font-weight: 500;
}

.post-excerpt {
    font-family: "EB Garamond", Georgia, serif;
    font-size: 1.05rem;
    color: var(--ink-mid);
    line-height: 1.7;
}

.post-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.25rem;
    font-family: "DM Mono", monospace;
    font-size: 0.52rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--ink-mid);
    text-decoration: none;
    transition:
        color 0.2s ease,
        gap 0.2s ease;
}

.post-link:hover {
    color: var(--ink);
    gap: 0.7rem;
}
.post-link i {
    font-size: 0.48rem;
}

/* ── CABEÇALHO DA PÁGINA ── */
/* Título à esquerda · seta no extremo direito — idêntico ao project.css */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Empurra a seta para o extremo direito */
    margin-bottom: 2rem;
}

/* Contentor do título + traço — alinha os dois verticalmente como coluna */
.page-title-group {
    display: flex;
    flex-direction: column; /* Título em cima, traço por baixo */
    gap: 0.6rem; /* Espaço entre o texto e o traço */
}

/* Título "Blog" */
.page-title {
    font-family: "EB Garamond", Georgia, serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    font-style: italic;
    color: var(--ink-mid);
    line-height: 1.1;
}

/* Traço decorativo pequeno sob o título — igual ao quote-rule do main */
.title-rule {
    width: 32px; /* Comprimento curto — subtil e elegante */
    height: 1px; /* Fininho */
    background: var(--ink-faint); /* Cor muito suave */
}

/* Seta ← no extremo direito do cabeçalho */
.back-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--ink-faint);
    text-decoration: none;
    opacity: 0.6;
    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}
.back-arrow:hover {
    color: var(--ink-mid);
    opacity: 1;
}

/* Remove a linha superior do primeiro post — o cabeçalho já serve de separador */
.posts-list li:first-child .post-card {
    border-top: none;
}

/* ── FOOTER ── */
.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: var(--bar-height);
    margin-top: 0; /* Sem espaço extra — padding do último post já chega */
    padding-bottom: 1.5rem; /* Espaço abaixo do footer, como no main */
    background-color: var(--white);
}

/* Modifier: footer só com copyright — centra o único filho */
.footer--minimal {
    justify-content: center;
}

.footer-center {
    font-family: "DM Mono", monospace;
    font-size: 0.55rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    color: var(--ink-mid);
    white-space: nowrap;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.footer-sep {
    font-family: "DM Mono", monospace;
    font-size: 0.6rem;
    color: var(--ink-faint);
    user-select: none;
}

.footer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-mid);
    font-size: 0.8rem;
    text-decoration: none;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}
.footer-icon:hover {
    opacity: 1;
}
.footer-icon svg {
    width: 13px;
    height: 13px;
    fill: var(--ink-mid);
}

/* ── RESPONSIVE ── */
@media (max-width: 560px) {
    .post-card {
        grid-template-columns: 1fr;
        gap: 0.75rem 0;
    }
    .post-side {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }
    .footer-center {
        display: none;
    }
    .nav-right {
        gap: 1.2rem;
    }
}
