
:root {
    --bg: #b45f06;
    --paper: #f4e1c1;
    --ink: #111;
    --accent: #ff6600;
    --yellow: #ffcc00;
}

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

/* === BODY === */
body {
    background: var(--bg);
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.06),
        rgba(255,255,255,0.06) 3px,
        transparent 3px,
        transparent 8px
    );
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
}

/* === HEADER === */
header {
    max-width: 1200px;
    margin: 30px auto;
    background: var(--yellow);
    border: 4px solid #000;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    width: 50px;
    height: 50px;
    border: 2px solid #000;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    max-width: 100%;
    max-height: 100%;
}

.brand h1 {
    font-family: "Comic Sans MS", Arial;
    font-size: 28px;
}

/* === NAV === */
nav a {
    margin-left: 20px;
    text-decoration: none;
    font-weight: bold;
    color: #000;
    background: #fff;
    padding: 4px 6px;
    border: 2px solid #000;
}

nav a:hover {
    background: var(--accent);
    color: #fff;
}

/* === MAIN === */
main {
    max-width: 1200px;
    margin: 30px auto 60px;
    padding: 0 20px;
}

/* === POSTS GRID === */
.posts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* === LINK === */
.post-link {
    text-decoration: none;
    color: inherit;
}

/* === POST === */
.post {
    background: var(--paper);
    border: 3px solid #000;
    box-shadow: 6px 6px 0 #000;
    transform: rotate(-1deg);
    transition: transform 0.15s;
}

.post:nth-child(2n) {
    transform: rotate(2deg);
}

.post:hover {
    transform: rotate(0deg) translateY(-4px);
}

/* === IMMAGINE === */
.post img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 3px solid #000;
}

/* === CONTENUTO === */
.post-content {
    padding: 15px;
}

.post-content h2 {
    font-size: 20px;
    margin-bottom: 10px;
    background: var(--accent);
    color: #fff;
    display: inline-block;
    padding: 4px 6px;
}

.post-content p {
    font-size: 14px;
    line-height: 1.5;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .posts {
        grid-template-columns: 1fr;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    nav a {
        margin-left: 0;
        margin-right: 10px;
    }
}