/* ===== Reset essencial ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ===== Base ===== */
html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.7;
    color: #2b2b2b;
    background-color: #f2efe9; /* papel */
}

/* ===== Página ===== */
main {
    max-width: 40rem;
    margin: 2rem auto;
    padding: 2.5rem 2rem;
    background-color: #fbfaf7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border-radius: 2px;
}

/* ===== Links (não azulão) ===== */
a {
    color: #5a4634; /* tinta */
    text-decoration: none;
    border-bottom: 1px solid rgba(90, 70, 52, 0.3);
}

a:hover {
    border-bottom-color: rgba(90, 70, 52, 0.8);
}

/* ===== Index: lista como cartões ===== */
ul {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

li {
    margin-bottom: 1.5rem;
}

li a {
    display: block;
    padding: 1.25rem 1.5rem;
    background-color: #ffffff;
    border-left: 3px solid #d8cfc4;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

li a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* ===== Post ===== */
article h1 {
    font-size: 2.2rem;
    font-weight: normal;
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

article p {
    margin: 1.2rem 0;
}

/* Metadados */
article time {
    font-size: 0.85rem;
    color: #777;
}

/* ===== Imagens ===== */
article img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
}

/* ===== Lista de posts ===== */
.post-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

/* Cartão */
.post-card {
    margin-bottom: 2rem;
}

.post-card a {
    display: block;
    background-color: #ffffff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
    border-left: 3px solid #d8cfc4;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

/* Capa */
.post-cover img {
    width: 100%;
    display: block;
}

/* Texto do cartão */
.post-meta {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.post-meta h2 {
    font-size: 1.3rem;
    font-weight: normal;
    margin: 0;
    flex: 1;
    max-width: 28rem;
    line-height: 1.35;
    hyphens: auto;
}

.post-meta time {
    font-size: 0.85rem;
    color: #777;
    white-space: nowrap;
}

/* =========================================================
   NAVEGAÇÃO (desktop + mobile, CSS only)
   ========================================================= */

.site-header {
    background-color: #fbfaf7;
    border-bottom: 1px solid #ddd6cc;
}

.nav {
    width: 100%;
}

.nav-inner {
    max-width: 40rem;
    margin: auto;
    padding: 1.2rem 2rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
    position: relative;
}

/* título */
.site-title {
    font-family: "Palatino Linotype", Georgia, serif;
    font-size: 1.4rem;
    letter-spacing: 0.05em;
    text-transform: lowercase;
    white-space: nowrap;
}

/* links desktop */
.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1rem;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    font-size: 0.9rem;
    border-bottom: none;
    opacity: 0.8;
    padding: 0 0.6rem; 
}

.nav-links a:hover {
    opacity: 1;
}

/* ===== Burger (CSS only) ===== */
.nav-toggle {
    display: none;
}

.nav-burger {
    display: none;
    font-size: 1.6rem;
    cursor: pointer;
    user-select: none;
    line-height: 1;
}

/* ===== Mobile ===== */
@media (max-width: 640px) {

    main {
        margin: 1rem;
        padding: 1.5rem;
    }

    /* título menor */
    .site-title {
        font-size: 1.25rem;
    }

    /* mostra burger */
    .nav-burger {
        display: block;
    }

    /* esconde menu */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fbfaf7;
        padding: 1.2rem 1.5rem;
        flex-direction: column;
        gap: 0.75rem;
        border-top: 1px solid #ddd6cc;
        z-index: 10;
    }

    /* abre menu */
    .nav-toggle:checked + .nav-burger + .site-title + .nav-links {
        display: flex;
    }

    /* Página do post */
    article h1 {
        font-size: 1.7rem;
        line-height: 1.3;
    }

    /* Index: quebra elegante */
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .post-meta h2 {
        font-size: 1.1rem;
    }

    .post-meta time {
        font-size: 0.75rem;
        opacity: 0.75;
    }
}
