/* ==========================================================
   MikaelOS updates
   Loaded after scrapbook.css.
   All new CSS changes go here.
   ========================================================== */

/* Layout updates */
/* Typography updates */
.richtext p {
    margin-bottom: 1.2rem;
}

.richtext h2,
.richtext h3,
.richtext h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.richtext ul,
.richtext ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.richtext li {
    margin-bottom: 0.5rem;
}

.richtext blockquote {
    border-left: 3px solid #222;
    padding-left: 1rem;
    font-style: italic;
    margin: 1.5rem 0;
}

.richtext a {
    text-decoration: underline;
}


/* Home page updates */

/* ==========================================================
   Home intro: dramatic editorial hero
   ========================================================== */

.home-intro {
    position: relative;
    margin: 0 0 3.5rem;
    padding: clamp(2rem, 6vw, 4.5rem);
    overflow: visible;
    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #191715 0%, #2a2118 58%, #4a2a1f 100%) !important;
    color: #f8f1df;
    border: 1px solid rgba(255, 248, 225, 0.16);
    box-shadow:
        0 24px 60px rgba(20, 10, 4, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.home-intro::before {
    content: "";
    position: absolute;
    inset: 0.85rem -0.85rem -0.85rem 0.85rem;
    z-index: -1;
    background: #d9c49d;
    border: 1px solid rgba(40, 25, 10, 0.14);
    transform: rotate(1.1deg);
    box-shadow: 0 16px 34px rgba(40, 25, 10, 0.18);
}

.home-intro::after {
    content: "FIELD NOTE";
    position: absolute;
    top: 1.2rem;
    right: 1.3rem;
    color: rgba(248, 241, 223, 0.45);
    border: 1px solid rgba(248, 241, 223, 0.28);
    padding: 0.35rem 0.55rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    transform: rotate(5deg);
}

.home-intro .meta-label {
    color: #d7b56d;
    margin-bottom: 1.25rem;
}

.home-intro h2 {
    max-width: 11ch;
    margin: 0 0 1.35rem;
    color: #fff8e8;
    font-size: clamp(3.4rem, 13vw, 7.5rem);
    line-height: 0.82;
    letter-spacing: -0.08em;
}

.home-intro .richtext {
    max-width: 46rem;
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
    line-height: 1.55;
    color: #efe3c8;
}

.home-intro .richtext p {
    margin-bottom: 1rem;
}

.home-intro-link {
    margin-top: 2rem;
}

.home-intro-link a {
    display: inline-block;
    color: #191715;
    background: #d7b56d;
    padding: 0.8rem 1rem;
    text-decoration: none;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.22);
}

.home-intro-link a:hover {
    transform: translateY(-1px);
}

/* Mobile tuning */
@media (max-width: 768px) {
    .home-intro {
        margin-top: 0.5rem;
        margin-bottom: 2.5rem;
        padding: 2rem 1.35rem 1.65rem;
    }

    .home-intro h2 {
        max-width: 9ch;
        font-size: clamp(3.5rem, 18vw, 5.8rem);
    }

    .home-intro::after {
        top: 0.85rem;
        right: 0.85rem;
        font-size: 0.6rem;
    }
}

/* Search updates */
/* Creative updates */
.video-frame {
    width: 100%;
}

.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 1rem;
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Mobile updates */
/* ==========================================================
   Mobile navigation
   ========================================================== */

.mobile-nav-toggle {
    display: none;
}

@media (max-width: 768px) {

    .site-header {
        position: relative;
    }

    .mobile-nav-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 2rem;
        cursor: pointer;
        margin-top: 1rem;
        color: #222;
    }

    .nav {
        display: none;
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
        padding: 1rem;
        background: #f5f0e5;
        border: 1px solid rgba(0,0,0,.1);
        box-shadow: 4px 4px 0 rgba(0,0,0,.08);
    }

    .nav.nav-open {
        display: flex;
    }

    .nav a {
        display: block;
    }
}

/* ==========================================================
   Mobile paper drawer navigation
   ========================================================== */

.mobile-nav-toggle,
.mobile-nav-close,
.mobile-nav-header,
.mobile-nav-backdrop {
    display: none;
}

@media (max-width: 768px) {
    .site-header {
        position: relative;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 3rem;
        height: 3rem;
        flex: 0 0 auto;
        margin-top: 0.2rem;
        background: #191715;
        color: #f8f1df;
        border: 1px solid rgba(25, 23, 21, 0.8);
        box-shadow:
            0 6px 14px rgba(40, 25, 10, 0.18),
            inset 0 1px 0 rgba(255, 255, 255, 0.12);
        font-family: "IBM Plex Mono", monospace;
        font-size: 1.6rem;
        line-height: 1;
        cursor: pointer;
    }

    .mobile-nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 80;
        background:
            radial-gradient(circle at 20% 15%, rgba(255, 248, 225, 0.12), transparent 34%),
            rgba(20, 16, 10, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    .mobile-nav-backdrop.nav-backdrop-open {
        opacity: 1;
        pointer-events: auto;
    }

    .nav {
        position: fixed;
        top: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        z-index: 90;
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        width: min(21rem, calc(100vw - 2rem));
        padding: 1.25rem;
        background:
            url('/static/img/paper-noise.svg?v=103'),
            linear-gradient(135deg, #fff8e8, #ead8b8);
        background-size: 220px 220px, cover;
        border: 1px solid rgba(60, 42, 24, 0.24);
        box-shadow:
            -12px 18px 40px rgba(20, 12, 5, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.35);
        transform: translateX(calc(100% + 1.5rem)) rotate(0.4deg);
        opacity: 0;
        pointer-events: none;
        transition:
            transform 220ms ease,
            opacity 180ms ease;
    }

    .nav.nav-open {
        transform: translateX(0) rotate(0.4deg);
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-nav-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1.25rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px dashed rgba(60, 42, 24, 0.24);
    }

    .mobile-nav-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        background: transparent;
        color: #241b12;
        border: 1px solid rgba(60, 42, 24, 0.28);
        font-family: "IBM Plex Mono", monospace;
        font-size: 1.35rem;
        line-height: 1;
        cursor: pointer;
    }

    .nav a {
        display: block;
        color: #241b12;
        text-decoration: none;
        border-bottom: 1px solid rgba(36, 27, 18, 0.28);
        padding: 0.9rem 0;
        font-family: "IBM Plex Mono", monospace;
        font-size: 0.95rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .nav a:hover {
        color: #8c2f2f;
        border-bottom-color: #8c2f2f;
    }

    body.mobile-nav-is-open {
        overflow: hidden;
    }
}

/* ==========================================================
   Home featured project: case file treatment
   ========================================================== */

.home-intro + .hero-project {
    margin-top: 1.25rem;
}

.hero-project-paper {
    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #fff8e8 0%, #ead8b8 100%) !important;
    border: 1px solid rgba(60, 42, 24, 0.18);
    box-shadow:
        0 20px 44px rgba(40, 25, 10, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.hero-project-paper::after {
    content: "CASE FILE";
    position: absolute;
    right: 1.4rem;
    top: 1.2rem;
    padding: 0.35rem 0.55rem;
    color: rgba(140, 47, 47, 0.62);
    border: 1px solid rgba(140, 47, 47, 0.42);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    transform: rotate(4deg);
}

.hero-project-meta {
    color: #8c2f2f;
    letter-spacing: 0.08em;
}

.hero-project-title {
    max-width: 9ch;
}

.hero-project-title a {
    color: #241b12;
    text-decoration: none;
}

.hero-project-dek {
    color: #493d2e;
}

.hero-project-links a {
    display: inline-block;
    border: 1px solid rgba(36, 27, 18, 0.32);
    padding: 0.65rem 0.8rem;
    background: rgba(255, 248, 232, 0.48);
    box-shadow: 3px 3px 0 rgba(40, 25, 10, 0.08);
}

.hero-project-links a:hover {
    transform: translateY(-1px);
}

.hero-polaroid.primary {
    transform: rotate(2.4deg);
}

.hero-polaroid.secondary {
    transform: rotate(-4.2deg);
}

@media (max-width: 768px) {
    .hero-project-paper {
        padding: 2rem 1.35rem;
    }

    .hero-project-paper::after {
        top: 0.9rem;
        right: 0.9rem;
        font-size: 0.6rem;
    }

    .hero-project-title {
        max-width: 10ch;
        font-size: clamp(3.4rem, 17vw, 5.6rem);
    }

    .hero-project-links {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .hero-project-links a {
        width: 100%;
    }
}

/* ==========================================================
   Home writing cards: archive card treatment
   ========================================================== */

.home-intro ~ .paper-row {
    margin-top: 4rem;
}

.paper-row .paper-card {
    border-top: 0.35rem solid rgba(140, 47, 47, 0.65);
    box-shadow:
        0 10px 24px rgba(40, 25, 10, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.paper-row .paper-card:nth-child(3n + 1) {
    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #fff8e8, #f0dfbd) !important;
}

.paper-row .paper-card:nth-child(3n + 2) {
    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #f7edcf, #e4d1a8) !important;
    transform: rotate(-0.6deg);
}

.paper-row .paper-card:nth-child(3n + 3) {
    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #f4ead6, #d9c7a7) !important;
    transform: rotate(0.7deg);
}

.paper-row .paper-card::after {
    content: "NOTE";
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    color: rgba(36, 27, 18, 0.24);
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    transform: rotate(-5deg);
}

.paper-row .card-kicker {
    color: #8c2f2f;
}

.paper-row .card-title {
    line-height: 1.05;
}

.paper-row .card-text {
    color: #4b4032;
}

@media (max-width: 768px) {
    .home-intro ~ .paper-row {
        margin-top: 2.5rem;
    }

    .paper-row .paper-card {
        min-height: auto;
        padding: 1.5rem 1.25rem 2.5rem;
    }

    .paper-row .paper-card,
    .paper-row .paper-card:nth-child(3n + 2),
    .paper-row .paper-card:nth-child(3n + 3) {
        transform: none;
    }

    .paper-row .card-title {
        font-size: 1.65rem;
    }
}

/* ==========================================================
   Home featured project: large case file layout
   ========================================================== */

.hero-project {
    position: relative;
    margin: 3rem 0 4.5rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #f4ead2, #dfc89f) !important;
    border: 1px solid rgba(60, 42, 24, 0.18);
    box-shadow:
        0 22px 52px rgba(40, 25, 10, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.hero-project::before {
    content: "";
    position: absolute;
    top: -0.8rem;
    right: 16%;
    width: 6.5rem;
    height: 1.35rem;
    background: rgba(190, 155, 95, 0.5);
    transform: rotate(2deg);
    z-index: 4;
}

.hero-project::after {
    content: "CASE FILE";
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: rgba(140, 47, 47, 0.64);
    border: 1px solid rgba(140, 47, 47, 0.45);
    padding: 0.35rem 0.6rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    transform: rotate(4deg);
    z-index: 5;
}

.hero-project-paper {
    background: transparent !important;
    border: 0;
    box-shadow: none;
    padding: clamp(1.5rem, 3vw, 2.25rem);
}

.hero-project-paper::before,
.hero-project-paper::after {
    display: none;
}

.hero-project-meta {
    color: #8c2f2f;
    letter-spacing: 0.1em;
}

.hero-project-title {
    max-width: 8ch;
    margin-bottom: 1rem;
}

.hero-project-title a {
    color: #1d1712;
    text-decoration: none;
}

.hero-project-dek {
    max-width: 34ch;
    color: #44372a;
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-project-links {
    margin-top: 1.5rem;
}

.hero-project-links a {
    display: inline-block;
    color: #f8f1df;
    background: #8c2f2f;
    border: 1px solid rgba(80, 20, 20, 0.5);
    padding: 0.7rem 0.85rem;
    text-decoration: none;
    box-shadow: 4px 4px 0 rgba(40, 25, 10, 0.14);
}

.hero-project-links a + a {
    background: transparent;
    color: #241b12;
    border-color: rgba(36, 27, 18, 0.36);
}

.hero-project-media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-polaroid.primary {
    width: min(100%, 28rem);
    transform: rotate(2.5deg);
}

.hero-polaroid.secondary {
    width: 72%;
    transform: rotate(-4deg);
}

@media (max-width: 768px) {
    .hero-project {
        padding: 1.15rem;
        margin: 2.25rem 0 3rem;
    }

    .hero-project::after {
        top: 1rem;
        right: 1rem;
        font-size: 0.6rem;
    }

    .hero-project-paper {
        padding: 1.25rem 0.25rem 1.5rem;
    }

    .hero-project-title {
        max-width: 9ch;
    }

    .hero-project-links {
        display: grid;
        gap: 0.7rem;
    }

    .hero-project-links a,
    .hero-project-links a + a {
        width: 100%;
        text-align: center;
    }

    .hero-project-media {
        margin-top: 1rem;
    }

    .hero-polaroid.primary,
    .hero-polaroid.secondary {
        width: 100%;
        transform: none !important;
    }
}

/* ==========================================================
   Daily quote: torn field note
   ========================================================== */

.daily-quote {
    position: relative;
    max-width: 42rem;
    margin: 5rem auto 3rem;
    padding: 2rem;
    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #fff8e8, #e9d6ae) !important;

    border: 1px solid rgba(60, 42, 24, 0.18);

    transform: rotate(-0.8deg);

    box-shadow:
        0 18px 36px rgba(40, 25, 10, 0.14);
}

.daily-quote::before {
    content: "";

    position: absolute;

    top: -0.7rem;
    left: 50%;

    width: 7rem;
    height: 1.4rem;

    background: rgba(190,155,95,.48);

    transform:
        translateX(-50%)
        rotate(-2deg);
}

.daily-quote::after {
    content: "FIELD NOTE";

    position: absolute;

    bottom: 1rem;
    right: 1rem;

    font-family: "IBM Plex Mono", monospace;
    font-size: .7rem;
    letter-spacing: .16em;

    color: rgba(36,27,18,.28);

    transform: rotate(-7deg);
}

.daily-quote .meta-label {
    color: #8c2f2f;
    margin-bottom: 1rem;
}

.quote-text {
    margin: 0;

    font-size: clamp(1.5rem, 4vw, 2.4rem);
    line-height: 1.25;

    color: #1d1712;

    border-left: 4px solid #8c2f2f;

    padding-left: 1rem;
}

.quote-label {
    margin-top: 1.5rem;

    color: #5a4d3f;

    font-family: "IBM Plex Mono", monospace;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .75rem;
}

/* ==========================================================
Daily quote as torn field-note strip
   ========================================================== */

.daily-quote {
    position: relative;
    max-width: 48rem;
    margin: 5rem auto 3.5rem;
    padding: 2rem 2.25rem 2.2rem 2.25rem;

    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #fff7e5 0%, #ead7b2 100%) !important;
    background-size: 260px 260px, cover !important;

    border: 0;
    border-left: 4px solid #8c2f2f;

    box-shadow:
        0 18px 38px rgba(40, 25, 10, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.38);

    transform: rotate(-0.8deg);
    overflow: visible;
}

/* tape */
.daily-quote::before {
    content: "";
    position: absolute;
    top: -0.75rem;
    right: 4rem;
    width: 5.5rem;
    height: 1.35rem;
    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(
            90deg,
            rgba(255, 245, 210, 0.34),
            rgba(184, 143, 78, 0.42),
            rgba(255, 245, 210, 0.24)
        );
    background-size: 220px 220px, cover;
    transform: rotate(8deg);
    box-shadow: 0 2px 5px rgba(40, 25, 10, 0.12);
}

/* faint botanical / artifact mark */
.daily-quote::after {
    content: "✶";
    position: absolute;
    right: 1.6rem;
    bottom: 1.2rem;
    color: rgba(45, 70, 52, 0.22);
    font-size: 4.4rem;
    line-height: 1;
    transform: rotate(-12deg);
}

.daily-quote .meta-label {
    color: #8c2f2f;
    letter-spacing: 0.12em;
    margin-bottom: 0.9rem;
}

.daily-quote .quote-text {
    position: relative;
    z-index: 2;
    margin: 0;
    padding-left: 1rem;
    border-left: 3px solid rgba(140, 47, 47, 0.75);

    color: #241b12;
    font-size: clamp(1.45rem, 3.8vw, 2.35rem);
    line-height: 1.22;
    letter-spacing: -0.03em;
}

.daily-quote .quote-label {
    position: relative;
    z-index: 2;
    margin-top: 1.5rem;

    color: #5f5242;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* fake torn lower edge */
.daily-quote {
    clip-path: polygon(
        0 0,
        100% 0,
        100% 92%,
        96% 94%,
        91% 92%,
        86% 95%,
        79% 93%,
        72% 96%,
        66% 93%,
        59% 95%,
        52% 92%,
        45% 95%,
        38% 93%,
        31% 96%,
        25% 93%,
        18% 95%,
        12% 92%,
        6% 95%,
        0 93%
    );
}

@media (max-width: 768px) {
    .daily-quote {
        max-width: none;
        margin: 3.5rem 0 2.5rem;
        padding: 1.6rem 1.3rem 1.9rem;
        transform: none;
    }

    .daily-quote::after {
        font-size: 3rem;
        right: 1rem;
        bottom: 1rem;
    }

    .daily-quote .quote-text {
        font-size: clamp(1.35rem, 7vw, 2rem);
    }
}

/* ==========================================================
   STEP 2 — Wider editorial home canvas
   ========================================================== */

@media (min-width: 1000px) {
    .page-shell {
        width: min(1120px, calc(100vw - 120px));
        margin-top: 2.5rem;
        margin-bottom: 2.5rem;
        padding: 3.5rem 4.5rem 4.5rem;
    }
}

/* Give homepage sections more poster-like scale */
@media (min-width: 1000px) {
    .home-intro {
        margin-left: -1rem;
        margin-right: -1rem;
        min-height: 520px;
    }

    .hero-project {
        margin-left: -2rem;
        margin-right: -2rem;
    }

    .paper-row {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
    }

    .daily-quote {
        max-width: none;
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

/* Large screens: reduce the brown empty margins */
@media (min-width: 1400px) {
    .page-shell {
        width: min(1240px, calc(100vw - 160px));
    }
}

/* ==========================================================
   Creative index: gallery wall / archive board
   ========================================================== */

.writing-detail > header.paper-block {
    position: relative;
    padding: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 3rem;

    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #191715 0%, #2a2118 62%, #4a2a1f 100%) !important;

    color: #f8f1df;
    border: 1px solid rgba(255, 248, 225, 0.16);

    box-shadow:
        0 22px 52px rgba(20, 10, 4, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.writing-detail > header.paper-block::after {
    content: "ARCHIVE";
    position: absolute;
    top: 1.2rem;
    right: 1.25rem;

    color: rgba(248, 241, 223, 0.42);
    border: 1px solid rgba(248, 241, 223, 0.28);
    padding: 0.35rem 0.55rem;

    font-family: "IBM Plex Mono", monospace;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;

    transform: rotate(5deg);
}

.writing-detail > header.paper-block .meta-label {
    color: #d7b56d;
}

.writing-detail > header.paper-block h1 {
    max-width: 10ch;
    margin: 0 0 1.25rem;

    color: #fff8e8;
    font-size: clamp(3rem, 8vw, 6.5rem);
    line-height: 0.86;
    letter-spacing: -0.075em;
}

.writing-detail > header.paper-block .post-dek {
    max-width: 44rem;
    color: #efe3c8;
    font-size: clamp(1rem, 2vw, 1.25rem);
}

/* collage becomes a stronger pinned gallery wall */

.creative-collage {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(1rem, 2.5vw, 2rem);
    margin: 0 0 4rem;
    padding: clamp(1rem, 3vw, 2rem);

    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #f4ead2, #dfc89f) !important;

    border: 1px solid rgba(60, 42, 24, 0.16);

    box-shadow:
        0 18px 42px rgba(40, 25, 10, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.creative-collage::before {
    content: "PINNED WORK";
    position: absolute;
}

.creative-collage-item {
    margin: 0;
    width: 100%;
    transform: rotate(-1.6deg);
}

.creative-collage-item:nth-child(2n) {
    transform: rotate(1.8deg);
}

.creative-collage-item:nth-child(3n) {
    transform: rotate(-2.4deg);
}

.creative-collage-item:nth-child(4n) {
    transform: rotate(1deg);
}

.creative-collage-item .media-caption a {
    color: #241b12;
    text-decoration: none;
}

.creative-collage-item:hover {
    transform: translateY(-3px) rotate(0deg);
}

/* creative project cards: same archive card system, but redder */

.writing-detail .paper-row .paper-card {
    border-top: 0.35rem solid rgba(140, 47, 47, 0.7);
}

.writing-detail .paper-row .card-kicker {
    color: #8c2f2f;
    letter-spacing: 0.1em;
}

.writing-detail .paper-row .paper-card::after {
    content: "WORK";
}

/* mobile */

@media (max-width: 768px) {
    .writing-detail > header.paper-block {
        padding: 2rem 1.35rem;
        margin-bottom: 2rem;
    }

    .writing-detail > header.paper-block h1 {
        font-size: clamp(3.4rem, 16vw, 5.3rem);
    }

    .creative-collage {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        padding: 1rem;
        margin-bottom: 2.75rem;
    }

    .creative-collage-item,
    .creative-collage-item:nth-child(2n),
    .creative-collage-item:nth-child(3n),
    .creative-collage-item:nth-child(4n) {
        transform: none;
    }
}

/* ==========================================================
   Projects index
   Technical project registry
   ========================================================== */

.list-page {
    position: relative;

    max-width: 72rem;
    margin: 0 auto;

    padding: 2rem 0 4rem;
}

.list-page::before {
    content: "PROJECT REGISTRY";

    display: block;

    margin-bottom: 2rem;

    color: #8c2f2f;

    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.page-title {
    margin-bottom: 3rem;

    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 0.9;
    letter-spacing: -0.08em;
}

.list-item {
    position: relative;

    padding: 1.75rem 0 2rem;

    border-top: 1px dashed rgba(80, 60, 40, 0.25);
}

.list-item:last-child {
    border-bottom: 1px dashed rgba(80, 60, 40, 0.25);
}

.list-item .meta {
    margin-bottom: 0.7rem;

    color: #8c2f2f;

    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.list-item h2 {
    margin: 0 0 0.7rem;

    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 0.95;
}

.list-item h2 a {
    color: #1f1812;
    text-decoration: none;
}

.list-item h2 a:hover {
    color: #8c2f2f;
}

.list-item p {
    max-width: 46rem;

    color: #4f4436;

    font-size: 1rem;
    line-height: 1.6;
}

.list-item::after {
    content: "OPEN →";

    position: absolute;

    right: 0;
    top: 2.1rem;

    color: rgba(140, 47, 47, 0.75);

    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

@media (max-width: 768px) {

    .page-title {
        margin-bottom: 2rem;
        font-size: clamp(2.8rem, 14vw, 4.5rem);
    }

    .list-item {
        padding: 1.35rem 0 1.6rem;
    }

    .list-item::after {
        position: static;
        display: block;
        margin-top: 1rem;
    }

    .list-item h2 {
        font-size: 2rem;
    }
}

/* ==========================================================
   Writing index: field notes archive
   ========================================================== */

.writing-index {
    max-width: 72rem;
    margin: 0 auto;
}

/* Header: dark editorial note */
.writing-index > header.paper-block {
    position: relative;
    padding: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 2.5rem;

    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #191715 0%, #2a2118 62%, #4a2a1f 100%) !important;

    color: #f8f1df;
    border: 1px solid rgba(255, 248, 225, 0.16);

    box-shadow:
        0 22px 52px rgba(20, 10, 4, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.writing-index > header.paper-block::after {
    content: "FIELD NOTES";
    position: absolute;
    top: 1.2rem;
    right: 1.25rem;

    color: rgba(248, 241, 223, 0.42);
    border: 1px solid rgba(248, 241, 223, 0.28);
    padding: 0.35rem 0.55rem;

    font-family: "IBM Plex Mono", monospace;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;

    transform: rotate(5deg);
}

.writing-index > header.paper-block .meta-label {
    color: #d7b56d;
}

.writing-index > header.paper-block h1 {
    max-width: 8ch;
    margin: 0 0 1.25rem;

    color: #fff8e8;
    font-size: clamp(3rem, 8vw, 6.5rem);
    line-height: 0.86;
    letter-spacing: -0.075em;
}

.writing-index > header.paper-block p:not(.meta-label) {
    max-width: 44rem;
    color: #efe3c8;
    font-size: clamp(1rem, 2vw, 1.2rem);
}

/* Posts become editorial field-note cards */
.writing-index > article.paper-block {
    position: relative;
    display: grid;
    grid-template-columns: minmax(8rem, 0.35fr) minmax(0, 1fr);
    gap: 1.5rem;

    margin-bottom: 1.15rem;
    padding: 1.5rem 1.75rem;

    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #fff8e8 0%, #ead8b8 100%) !important;

    border: 1px solid rgba(60, 42, 24, 0.16);
    border-left: 4px solid rgba(140, 47, 47, 0.78);

    box-shadow:
        0 10px 24px rgba(40, 25, 10, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.writing-index > article.paper-block:nth-of-type(2n) {
    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #f6e9c8 0%, #ddc49a 100%) !important;
}

.writing-index > article.paper-block::after {
    content: "READ →";
    position: absolute;
    right: 1.5rem;
    bottom: 1.25rem;

    color: rgba(140, 47, 47, 0.85);

    font-family: "IBM Plex Mono", monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.writing-index > article.paper-block > .meta-label {
    grid-column: 1;
    grid-row: 1 / span 3;

    margin: 0;
    color: #8c2f2f;
    font-size: 0.68rem;
    line-height: 1.5;
    letter-spacing: 0.1em;
}

.writing-index > article.paper-block h2 {
    grid-column: 2;
    margin: 0 0 0.75rem;

    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.writing-index > article.paper-block h2 a {
    color: #1d1712;
    text-decoration: none;
}

.writing-index > article.paper-block h2 a:hover {
    color: #8c2f2f;
}

.writing-index > article.paper-block .post-dek {
    grid-column: 2;
    max-width: 52rem;
    margin: 0;
    padding-right: 5rem;

    color: #4d4132;
    font-size: 0.98rem;
    line-height: 1.55;
}

.writing-index > article.paper-block .meta-label:last-child {
    grid-column: 2;
    margin-top: 1rem;
    color: rgba(36, 27, 18, 0.45);
}

/* Mobile */
@media (max-width: 768px) {
    .writing-index > header.paper-block {
        padding: 2rem 1.35rem;
        margin-bottom: 2rem;
    }

    .writing-index > header.paper-block h1 {
        font-size: clamp(3.4rem, 16vw, 5.3rem);
    }

    .writing-index > article.paper-block {
        display: block;
        padding: 1.4rem 1.25rem 2.7rem;
        margin-bottom: 1rem;
    }

    .writing-index > article.paper-block > .meta-label {
        display: block;
        margin-bottom: 0.8rem;
    }

    .writing-index > article.paper-block h2 {
        font-size: 1.8rem;
    }

    .writing-index > article.paper-block .post-dek {
        padding-right: 0;
    }

    .writing-index > article.paper-block::after {
        left: 1.25rem;
        right: auto;
        bottom: 1.1rem;
    }
}

/* ==========================================================
   About page: personal dossier / field file
   ========================================================== */

.project-layout:has(aside .media-frame.polaroid) {
    position: relative;
}

/* About header */
.project-layout article > header.paper-block {
    position: relative;
    padding: clamp(2rem, 4vw, 3rem);

    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #191715 0%, #2a2118 62%, #4a2a1f 100%) !important;

    color: #f8f1df;
    border: 1px solid rgba(255, 248, 225, 0.16);

    box-shadow:
        0 22px 52px rgba(20, 10, 4, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.project-layout article > header.paper-block::after {
    content: "DOSSIER";
    position: absolute;
    top: 1rem;
    right: 1rem;

    color: rgba(248, 241, 223, 0.42);
    border: 1px solid rgba(248, 241, 223, 0.28);
    padding: 0.35rem 0.55rem;

    font-family: "IBM Plex Mono", monospace;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.16em;

    transform: rotate(5deg);
}

.project-layout article > header.paper-block .meta-label {
    color: #d7b56d;
}

.project-layout article > header.paper-block h1 {
    margin: 0 0 1.25rem;

    color: #fff8e8;
    font-size: clamp(2.6rem, 6vw, 5.4rem);
    line-height: 0.9;
    letter-spacing: -0.075em;
}

.project-layout article > header.paper-block .post-dek {
    color: #efe3c8;
    max-width: 44rem;
}

/* About body as long typed report */
.project-layout article .section .paper-block {
    position: relative;
    padding: clamp(1.75rem, 4vw, 3rem);
    border-left: 4px solid rgba(140, 47, 47, 0.78);

    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #fff8e8 0%, #ead8b8 100%) !important;
}

.project-layout article .section .paper-block::after {
    display: none;
}

.project-layout article .section .paper-block p {
    max-width: 62ch;
}

/* Portrait as pinned ID photo */
.project-layout aside .media-frame.polaroid {
    transform: rotate(3deg);
    max-width: 15rem;
    margin-left: auto;
}

.project-layout aside .media-frame.polaroid::after {
    content: "ID / PROFILE";
    position: absolute;
    left: 1rem;
    bottom: 0.85rem;

    color: rgba(36, 27, 18, 0.45);

    font-family: "IBM Plex Mono", monospace;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

/* Mobile */
@media (max-width: 768px) {
    .project-layout article > header.paper-block {
        padding: 2rem 1.35rem;
    }

    .project-layout article > header.paper-block h1 {
        font-size: clamp(2.7rem, 13vw, 4.6rem);
    }

    .project-layout aside .media-frame.polaroid {
        max-width: 13rem;
        margin: 0 auto 2rem;
        transform: none;
    }

    .project-layout article .section .paper-block {
        padding: 1.6rem 1.25rem 2.6rem;
    }
}

/* ==========================================================
   ABOUT PAGE PORTRAIT ENHANCEMENT
   Only affects About page
   ========================================================== */

.project-layout aside .media-frame.polaroid {

    width: 100%;
    max-width: 22rem;

    margin-left: auto;
    margin-top: -3rem;

    transform: rotate(3deg);

    box-shadow:
        0 22px 48px rgba(40, 25, 10, 0.22),
        0 6px 12px rgba(40, 25, 10, 0.10);

    z-index: 10;
}

.project-layout aside {
    position: relative;
}

.project-layout aside .media-frame.polaroid img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {

    .project-layout aside .media-frame.polaroid {

        max-width: 16rem;

        margin-top: 0;
        margin-left: auto;
        margin-right: auto;

        transform: none;
    }

}

/* ==========================================================
   Post detail: editorial article treatment
   ========================================================== */

.writing-detail {
    max-width: 74rem;
    margin: 0 auto;
}

/* Post hero card */
.writing-detail > .hero-section {
    margin-bottom: 4rem;
}

.writing-detail > .hero-section .hero-section__content {
    position: relative;
    padding: clamp(2rem, 4vw, 3.25rem);

    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #191715 0%, #2a2118 62%, #4a2a1f 100%) !important;

    color: #f8f1df;
    border: 1px solid rgba(255, 248, 225, 0.16);

    box-shadow:
        0 24px 58px rgba(20, 10, 4, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.writing-detail > .hero-section .hero-section__content::after {
    content: "FIELD NOTE";
    position: absolute;
    top: 1rem;
    right: 1rem;

    color: rgba(248, 241, 223, 0.42);
    border: 1px solid rgba(248, 241, 223, 0.28);
    padding: 0.35rem 0.55rem;

    font-family: "IBM Plex Mono", monospace;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.16em;

    transform: rotate(5deg);
}

.writing-detail > .hero-section .meta-label {
    color: #d7b56d;
}

.writing-detail > .hero-section h1 {
    max-width: 14ch;
    margin: 0 0 1.25rem;

    color: #fff8e8;
    font-size: clamp(2.8rem, 6vw, 5.8rem);
    line-height: 0.88;
    letter-spacing: -0.075em;
}

.writing-detail > .hero-section .hero-dek,
.writing-detail > .hero-section .hero-copy {
    max-width: 44rem;
    color: #efe3c8;
    font-size: clamp(1rem, 2vw, 1.2rem);
}

/* Main post body as article manuscript */
.writing-detail > .paper-block.richtext {
    max-width: 58rem;
    margin: 0 auto 4rem;
    padding: clamp(2rem, 4vw, 3.25rem);

    border-left: 4px solid rgba(140, 47, 47, 0.78);

    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #fff8e8 0%, #ead8b8 100%) !important;
}

.writing-detail > .paper-block.richtext p {
    max-width: 68ch;
}

/* Content sections: more article-like spacing */
.writing-detail .content-section {
    margin: 4rem 0;
}

.writing-detail .content-section__header {
    margin-bottom: 1.5rem;
}

.writing-detail .content-section__header h2 {
    display: inline-block;
    margin: 0 0 0.5rem;
    padding-bottom: 0.2rem;

    border-bottom: 3px solid rgba(140, 47, 47, 0.7);

    font-size: clamp(1.7rem, 3vw, 2.5rem);
    line-height: 1;
}

/* Individual article blocks: less identical, more clipped pages */
.writing-detail .content-block .paper-block {
    max-width: 62rem;
    margin-left: auto;
    margin-right: auto;
    padding: clamp(1.8rem, 3vw, 2.75rem);
}

.writing-detail .content-block:nth-child(2n) .paper-block {
    transform: rotate(0.35deg);
}

.writing-detail .content-block:nth-child(3n) .paper-block {
    transform: rotate(-0.35deg);
}

/* Stronger headings inside article blocks */
.writing-detail .content-block .paper-block h2,
.writing-detail .content-block .paper-block h3 {
    margin-top: 0;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

/* Mobile */
@media (max-width: 768px) {
    .writing-detail > .hero-section {
        margin-bottom: 2.5rem;
    }

    .writing-detail > .hero-section .hero-section__content {
        padding: 2rem 1.35rem;
    }

    .writing-detail > .hero-section h1 {
        font-size: clamp(2.6rem, 13vw, 4.5rem);
    }

    .writing-detail > .paper-block.richtext {
        padding: 1.7rem 1.3rem;
        margin-bottom: 2.75rem;
    }

    .writing-detail .content-section {
        margin: 2.75rem 0;
    }

    .writing-detail .content-block .paper-block {
        padding: 1.6rem 1.25rem;
    }

    .writing-detail .content-block:nth-child(2n) .paper-block,
    .writing-detail .content-block:nth-child(3n) .paper-block {
        transform: none;
    }
}

.secondary-featured-projects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin: -2rem 0 4rem;
}

.secondary-featured-card {
    position: relative;
    padding: 1.75rem;
    background:
        url('/static/img/paper-noise.svg?v=103'),
        linear-gradient(135deg, #fff8e8 0%, #ead8b8 100%) !important;
    border: 1px solid rgba(60, 42, 24, 0.18);
    border-top: 0.35rem solid rgba(140, 47, 47, 0.72);
    box-shadow:
        0 12px 28px rgba(40, 25, 10, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.secondary-featured-card:nth-child(2) {
    transform: rotate(0.7deg);
}

.secondary-featured-card h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 0.95;
    letter-spacing: -0.055em;
}

.secondary-featured-card h2 a {
    color: #1d1712;
    text-decoration: none;
}

.secondary-featured-card p {
    color: #4d4132;
    line-height: 1.55;
}

.secondary-featured-link {
    display: inline-block;
    margin-top: 1rem;
    color: #8c2f2f;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    border-bottom: 1px solid #8c2f2f;
}

@media (max-width: 768px) {
    .secondary-featured-projects {
        grid-template-columns: 1fr;
        margin: -1rem 0 3rem;
    }

    .secondary-featured-card,
    .secondary-featured-card:nth-child(2) {
        transform: none;
    }
}

/* ==========================================================
   Home writing heading
   ========================================================== */

.home-writing-heading {
    position: relative;
    margin: 4rem 0 1.5rem;
    padding-left: 0.25rem;
}

.home-writing-heading .meta-label {
    color: #8c2f2f;
}

.home-writing-heading h2 {
    margin: 0;
    max-width: 12ch;

    font-size: clamp(2.4rem, 5vw, 4.4rem);
    line-height: 0.9;
    letter-spacing: -0.07em;
}

.home-writing-heading::after {
    content: "RECENT NOTES";
    position: absolute;
    right: 0;
    top: 0.5rem;

    color: rgba(140, 47, 47, 0.58);
    border: 1px solid rgba(140, 47, 47, 0.42);
    padding: 0.35rem 0.55rem;

    font-family: "IBM Plex Mono", monospace;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;

    transform: rotate(5deg);
}

/* ==========================================================
   Site footer
   ========================================================== */

.site-footer {
    position: relative;

    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(14rem, 0.7fr);
    gap: 2rem;

    margin-top: 5rem;
    padding: 2rem 0 0;

    border-top: 1px dashed rgba(60, 42, 24, 0.28);

    color: #4d4132;
}

.site-footer::before {
    content: "END OF FILE";
    position: absolute;
    top: -0.75rem;
    right: 0;

    background: #f3ead8;
    padding-left: 0.75rem;

    color: rgba(140, 47, 47, 0.65);

    font-family: "IBM Plex Mono", monospace;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.site-footer__intro p:not(.meta-label) {
    max-width: 52rem;
    margin: 0;

    font-size: 0.95rem;
    line-height: 1.6;
}

.site-footer__links {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.78rem;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.site-footer__links p {
    margin: 0 0 0.6rem;
}

.site-footer__links a {
    color: #241b12;
    text-decoration: none;
    border-bottom: 1px solid rgba(36, 27, 18, 0.45);
}

.site-footer__links a:hover {
    color: #8c2f2f;
    border-bottom-color: #8c2f2f;
}

@media (max-width: 768px) {
    .home-writing-heading {
        margin: 3rem 0 1.25rem;
    }

    .home-writing-heading h2 {
        max-width: 10ch;
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .home-writing-heading::after {
        position: static;
        display: inline-block;
        margin-top: 1rem;
        transform: rotate(3deg);
    }

    .site-footer {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        margin-top: 3.5rem;
    }

    .site-footer::before {
        right: auto;
        left: 0;
        padding-left: 0;
        padding-right: 0.75rem;
    }
}


/* Utility overrides */
