:root {
    --bg-color: #ffffff;
    --text-primary: #111111;
    --text-secondary: #555555;
    --font-stack: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --gap: 20px;
    --col-width: 477px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-stack);
    margin: 0;
    padding: 30px 40px;
    box-sizing: border-box;
    overflow-y: scroll;
    /* Prevents layout jump when scrollbar appears */
}

header {
    position: fixed;
    top: 0;
    left: 0;
    padding: 30px 40px;
    box-sizing: border-box;
    z-index: 1000;
    width: 100%;
}

.mega-titulo {
    font-size: 82px;
    font-weight: 700;
    letter-spacing: -3.28px;
    line-height: 1;
    background-color: #ffffff;
    padding: 0 8px 0 8px;
    color: var(--text-primary);
    text-transform: none;
}

.metadata-link {
    background-color: white;
    padding: 10px;
}

.metadata a {
    color: var(--text-secondary);
    font-size: 16px;
    text-decoration: none;
    font-weight: 600;
}

.metadata a:hover {
    color: var(--text-primary);
}

/* Masonry Container */
.grid-container {
    position: relative;
    width: 100%;
    margin-top: 150px;
    /* Accounts for fixed header height */
}

.post {
    position: absolute;
    width: var(--col-width);
    background: transparent;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.post img {
    width: 100%;
    display: block;
    height: auto;
    background: #ccc;
    /* Placeholder while loading */
}

.post-meta {
    margin-top: 10px;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.post-meta a {
    color: var(--text-secondary);
    text-decoration: none;
}

.post-meta a.tag {
    color: var(--text-primary);
}

.post-meta a:hover {
    text-decoration: underline;
}

/* Floating Elements */
.fixed-ui {
    position: fixed;
    z-index: 100;
}

.fixed-ui a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 18px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.fixed-ui a:hover {
    opacity: 1;
}

.bottom-right {
    bottom: 30px;
    right: 40px;
}

.bottom-left {
    bottom: 30px;
    left: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- Responsive Layout --- */
@media (max-width: 768px) {
    body {
        padding: 0 10px;
        /* Remove horizontal padding */
    }

    header {
        padding: 20px 20px 15px 20px;
    }

    h1 {
        font-size: 50px;
        letter-spacing: -2px;
        margin-bottom: 5px;
    }

    .mega-titulo {
        font-size: 50px;
        padding: 0 4px 0 4px;
    }

    .metadata {
        line-height: 1.5;
    }

    .grid-container {
        margin-top: 130px;
        /* Accounts for smaller fixed header */
    }

    .bottom-right {
        right: 20px;
        bottom: 20px;
    }
}