:root {
    --bg: #f4efe6;
    --ink: #111111;
    --paper: #fffdf8;
    --line: #c7c0b4;
    --accent: #ff5c1a;
    --accent-alt: #1e6eff;
    --mint: #daf6df;
    --sky: #dceeff;
    --butter: #fff0bf;
    --rose: #ffd9d0;
    --lavender: #ece3ff;
    --aqua: #d8fbff;
    --muted: #5f5a52;
}

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

html {
    font-size: 16px;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 14%, rgba(255, 92, 26, 0.14) 0, rgba(255, 92, 26, 0) 34%),
        radial-gradient(circle at 86% 88%, rgba(30, 110, 255, 0.13) 0, rgba(30, 110, 255, 0) 30%),
        radial-gradient(circle at 52% 8%, rgba(171, 111, 255, 0.13) 0, rgba(171, 111, 255, 0) 24%),
        radial-gradient(circle at 90% 10%, rgba(255, 200, 0, 0.14) 0, rgba(255, 200, 0, 0) 26%),
        linear-gradient(90deg, rgba(17, 17, 17, 0.02) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(rgba(17, 17, 17, 0.02) 1px, transparent 1px) 0 0 / 24px 24px,
        var(--bg);
    font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.55;
}

a {
    color: inherit;
}

a:hover {
    color: var(--accent);
}

.site-wrap {
    width: min(1080px, calc(100% - 2.5rem));
    margin: 1.5rem auto 2rem;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1.5rem;
    margin-bottom: 1rem;
    border: 3px solid var(--ink);
    background: linear-gradient(90deg, var(--paper) 0%, var(--paper) 62%, var(--sky) 62%, var(--sky) 82%, var(--lavender) 82%);
    padding: 1.2rem;
    box-shadow: 8px 8px 0 var(--ink);
}

.brand {
    text-decoration: none;
    display: inline-flex;
    flex-direction: column;
}

.brand-mark {
    font-size: clamp(1.6rem, 2.8vw, 2.3rem);
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
}

.brand-mark:hover {
    color: var(--ink);
}

.brand-sub {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    text-transform: none;
    letter-spacing: 0.03em;
    color: var(--muted);
    margin-top: 0.3rem;
}

.brand-sub-link {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.nav-list li a {
    display: inline-block;
    border: 2px solid var(--ink);
    background: var(--butter);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.35rem 0.65rem;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.nav-list li:nth-child(2) a {
    background: var(--aqua);
}

.nav-list li:nth-child(3) a {
    background: var(--rose);
}

.nav-list li.active a {
    background: var(--ink);
    color: var(--paper);
    box-shadow: 4px 4px 0 var(--accent);
    transform: translate(-1px, -1px);
}

.nav-list li a:hover {
    box-shadow: 3px 3px 0 var(--ink);
    transform: translate(-1px, -1px);
}

.page-shell {
    display: grid;
    gap: 1rem;
}

.panel {
    border: 3px solid var(--ink);
    background: var(--paper);
    padding: 1.35rem;
    box-shadow: 8px 8px 0 var(--ink);
}

.hero-block {
    position: relative;
    overflow: hidden;
}

.hero-block::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, transparent 54%, rgba(255, 92, 26, 0.18) 54%, rgba(255, 92, 26, 0.18) 70%, transparent 70%);
    pointer-events: none;
}

.hero-block > * {
    position: relative;
    z-index: 1;
}

.kicker {
    margin: 0 0 0.4rem;
    font-family: "IBM Plex Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.72rem;
    color: var(--muted);
}

.hero-title {
    margin: 0;
    line-height: 0.95;
    font-size: clamp(2.2rem, 7vw, 5rem);
    max-width: 11ch;
}

.hero-copy {
    max-width: 42ch;
    margin: 1rem 0 0;
    font-size: 1.05rem;
}

.hero-links {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.hero-links a {
    text-decoration: none;
    border: 2px solid var(--ink);
    padding: 0.45rem 0.7rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    background: var(--rose);
    transition: background-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

.hero-links a:nth-child(2) {
    background: var(--aqua);
}

.hero-links a:hover {
    background: #f2e4dd;
    color: var(--ink);
    transform: translate(-1px, -1px);
}

.home-split {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 1rem;
}

.home-feed {
    background: linear-gradient(180deg, var(--sky) 0%, var(--paper) 58%);
}

.home-about {
    background: var(--paper);
    padding: 1.15rem 1.2rem 1.1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-about .hero-title {
    max-width: 14ch;
    font-size: clamp(1.35rem, 2.6vw, 2.1rem);
    line-height: 1.06;
    margin: 0 0 0.45rem;
}

.about-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
}

.home-about .page-content {
    max-width: 34ch;
}

.home-about .page-content p {
    font-size: 0.95rem;
    margin: 0 0 0.45rem;
}

.about-head {
    display: grid;
    grid-template-columns: 210px 1fr;
    align-items: start;
    gap: 1.05rem;
    margin-bottom: 0.45rem;
}

.profile-photo {
    width: 180px;
    aspect-ratio: 1 / 1;
    margin-right: 0;
    margin-bottom: 0.4rem;
    border: 3px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    background:
        linear-gradient(140deg, rgba(255, 92, 26, 0.22), rgba(30, 110, 255, 0.2)),
        url("/static/aldo_vincenti.jpeg");
    background-size: cover;
    background-position: center;
}

.home-about .hero-links {
    margin-top: 0.85rem;
}

.feed-link {
    display: inline-block;
    margin-top: 0.7rem;
    text-decoration: none;
    border: 2px solid var(--ink);
    padding: 0.35rem 0.6rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    background: var(--lavender);
}

.feed-link:hover {
    background: #e6def5;
    color: var(--ink);
}

.page-title,
.post-title,
h2,
h3 {
    margin: 0 0 0.6rem;
    line-height: 1.1;
}

.page-title,
.post-title {
    font-size: clamp(1.7rem, 4vw, 2.8rem);
}

.post-title-index {
    font-size: clamp(1.25rem, 2.2vw, 1.7rem);
}

.post-title-single {
    font-size: clamp(1.45rem, 2.8vw, 2rem);
}

.lead {
    margin: 0;
    color: var(--muted);
}

.page-content p {
    margin-top: 0.4rem;
    margin-bottom: 0.9rem;
}

.page-content p {
    max-width: 68ch;
}

.post-body p {
    width: 100%;
    max-width: none;
}

.post-body img,
.page-content img {
    display: block;
    max-width: 100%;
    height: auto;
}

.post-body figure,
.page-content figure {
    margin: 1rem 0 1.2rem;
}

.post-body figcaption,
.page-content figcaption {
    margin-top: 0.45rem;
    font-size: 0.92rem;
    color: var(--muted);
}

.page-content ul {
    margin: 0.4rem 0 1rem;
    padding-left: 1.2rem;
}

.post-body ul,
.post-body ol {
    margin: 0;
    padding-left: 1.2rem;
}

.post-list {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}

.post-list li {
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.5rem;
    padding-left: 0.45rem;
    border-left: 4px solid var(--accent);
}

.post-list li:nth-child(even) {
    border-left-color: var(--accent-alt);
}

.post-list li:nth-child(3n) {
    border-left-color: #9c5cff;
}

.post-list li:last-child {
    border-bottom: 0;
}

.post-list a {
    text-decoration: none;
    font-weight: 500;
}

.post-list span,
.post-list time {
    display: block;
    margin-top: 0.15rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.77rem;
    color: var(--muted);
}

.blog-post + .blog-post {
    margin-top: 1rem;
}

.blog-post {
    min-width: 0;
}

.blog-post-content {
    width: 100%;
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
}

.blog-post:nth-of-type(odd) {
    background: linear-gradient(0deg, var(--paper), var(--paper)) padding-box, linear-gradient(90deg, var(--accent), var(--accent-alt)) border-box;
    border: 3px solid transparent;
}

.blog-post:nth-of-type(even) {
    background: linear-gradient(0deg, #fffaf2, #fffaf2);
}

.blog-section {
    padding: 1.2rem 1.3rem;
}

.blog-section-head {
    border-bottom: 2px solid var(--ink);
    padding-bottom: 0.85rem;
    margin-bottom: 0.2rem;
}

.blog-section .lead {
    margin-bottom: 0;
}

.blog-section-list .blog-post-content {
    max-width: 70ch;
    margin-left: 0;
    margin-right: auto;
}

.blog-section .blog-post {
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0.95rem 0;
}

.blog-section .blog-post + .blog-post {
    margin-top: 0;
    border-top: 2px solid var(--ink);
    position: relative;
    padding-top: 1.25rem;
}

.blog-section .blog-post + .blog-post::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: 64px;
    border-top: 4px solid var(--accent);
}

.blog-section .blog-post:nth-of-type(odd),
.blog-section .blog-post:nth-of-type(even) {
    border: 0;
    background: transparent;
}

.blog-section .meta {
    margin-bottom: 0.55rem;
}

.blog-section .pagination {
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    border-top: 2px solid var(--ink);
}

.meta {
    margin: 0 0 1rem;
    color: var(--muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.post-disclaimer {
    margin: 0 0 0.85rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--line);
    border-left: 4px solid var(--muted);
    background: #f7f3ea;
    color: var(--muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.post-body {
    overflow-wrap: anywhere;
}

.post-body > * {
    min-width: 0;
}

.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote,
.post-body pre,
.post-body .highlight,
.post-body .codehilite {
    margin: 0 0 1rem;
}

.post-body h2,
.post-body h3,
.post-body h4 {
    margin: 1.15rem 0 0.65rem;
}

.post-body > :last-child {
    margin-bottom: 0;
}

.post-body pre {
    width: 100%;
    max-width: none;
    padding: 0.82rem 0.9rem;
    overflow-x: auto;
    border: 2px solid var(--ink);
    background: #f2ebdf;
    box-shadow: 4px 4px 0 rgba(17, 17, 17, 0.18);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.83rem;
    line-height: 1.45;
}

.post-body .highlight,
.post-body .codehilite {
    width: 100%;
    max-width: none;
    overflow-x: auto;
}

.post-body .highlight pre,
.post-body .codehilite pre {
    margin: 0;
}

.post-body pre + *,
.post-body .highlight + *,
.post-body .codehilite + * {
    margin-top: 1rem !important;
}

.post-body code {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.88em;
    background: #efe6d4;
    border: 1px solid #d8ccb7;
    padding: 0.08rem 0.28rem;
}

.post-body pre code {
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 1em;
}

.post-body-index {
    margin-bottom: 0.45rem;
    max-width: none;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-read-more {
    margin: 0;
}

.post-read-more a {
    text-decoration: none;
    border-bottom: 2px solid var(--ink);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.post-title a {
    text-decoration: none;
}

.post-title a:hover {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-decoration-color: var(--accent);
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.85rem;
}

.pagination a,
.back-link a {
    text-decoration: none;
    border-bottom: 2px solid var(--ink);
}

.pagination .disabled {
    opacity: 0.45;
}

.back-link {
    margin: 0;
}

.share-inline {
    margin: 1rem 0 0;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
}

.share-inline span {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.share-inline a {
    display: inline-block;
    text-decoration: none;
    border: 2px solid var(--ink);
    padding: 0.25rem 0.48rem;
    background: var(--butter);
    color: var(--ink);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: transform 0.12s ease;
}

.share-inline a.share-tone-x {
    background: #ece6dc;
    color: var(--ink);
}

.share-inline a.share-x-label {
    text-transform: none;
    letter-spacing: 0.02em;
}

.share-inline a.share-tone-1 { background: #f5e8bf; color: var(--ink); }
.share-inline a.share-tone-2 { background: #ddf4f6; color: var(--ink); }
.share-inline a.share-tone-3 { background: #f7ddd6; color: var(--ink); }
.share-inline a.share-tone-4 { background: #ede5f8; color: var(--ink); }
.share-inline a.share-tone-5 { background: #dff1e1; color: var(--ink); }
.share-inline a.share-tone-6 { background: #deebf8; color: var(--ink); }
.share-inline a.share-tone-7 { background: #f4c9b8; color: var(--ink); }
.share-inline a.share-tone-8 { background: #cfe0f6; color: var(--ink); }

.share-inline a:hover {
    filter: brightness(0.96);
    color: var(--ink);
    transform: translate(-1px, -1px);
}

.comments-panel {
    margin-top: 1rem;
}

.site-footer {
    margin-top: 1rem;
    border: 3px solid var(--ink);
    background: linear-gradient(90deg, var(--paper) 0%, var(--paper) 50%, var(--mint) 50%, var(--mint) 75%, var(--butter) 75%);
    padding: 0.75rem 1rem;
    box-shadow: 8px 8px 0 var(--ink);
}

.site-footer p {
    margin: 0;
    font-family: "IBM Plex Mono", monospace;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    color: var(--muted);
}

@media (max-width: 900px) {
    .home-split {
        grid-template-columns: 1fr;
    }

    .about-head {
        grid-template-columns: 175px 1fr;
        gap: 0.9rem;
        margin-bottom: 0.35rem;
    }

    .profile-photo {
        width: 150px;
    }
}

@media (max-width: 680px) {
    .site-wrap {
        width: calc(100% - 1.1rem);
        margin-top: 0.7rem;
    }

    .site-header {
        align-items: start;
        flex-direction: column;
    }

    .panel,
    .site-header,
    .site-footer {
        box-shadow: 5px 5px 0 var(--ink);
    }

    .about-head {
        grid-template-columns: 1fr;
    }

    .profile-photo {
        width: 120px;
    }
}
