/* FONT REGISTRATIONS */

@font-face {
    font-family: "Nectarine";
    src: url("assets/fonts/Nectarine DEMO.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Monument Extended";
    src: url("assets/fonts/MonumentExtended-Regular.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Monument Extended";
    src: url("assets/fonts/MonumentExtended-Ultrabold.otf") format("opentype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* ==================================================
   GAWONIIOS
   Author: Gawonii
   Main Stylesheet
   ================================================== */


/* ==================================================
   01. DESIGN TOKENS
   ================================================== */

:root {
    /* Colors */
    --color-background: #191918;
    --color-foreground: #f5f5dc;
    --color-surface: #fffbed;
    --color-accent: #307f73;
    --color-border: #b5ad91;
    --color-hover: #e6eddf;

    /* Typography */
    --font-heading: "Nectarine", sans-serif;
    --font-body: "Monument Extended", sans-serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Layout */
    --content-width: 1200px;
    --page-padding: clamp(12px, 3vw, 32px);
    --section-padding: clamp(16px, 3vw, 32px);
    --layout-gap: clamp(12px, 2vw, 24px);

    /* Border radii */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Animation */
    --transition-speed: 0.2s;
}


/* ==================================================
   02. FONT FACES
   ================================================== */





/* ==================================================
   03. RESET & BASE STYLES
   ================================================== */

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

body {
    margin: 0;
    min-width: 0;
    background-color: var(--color-background);
    color: var(--color-foreground);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-wrap: break-word;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

main {
    width: 100%;
    max-width: var(--content-width);
    margin-inline: auto;
    padding: var(--page-padding);
    padding-bottom: 48px;
}


/* ==================================================
   04. TYPOGRAPHY
   ================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.3;
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

h3 {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
}

p {
    line-height: 1.7;
}

strong,
b {
    font-weight: 800;
}


/* ==================================================
   05. HEADER
   ================================================== */

header {
    width: 100%;
}

header img {
    width: 100%;
    max-width: var(--content-width);
    margin-inline: auto;
}


/* ==================================================
   06. NAVIGATION
   ================================================== */

.main-navigation {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    max-width: var(--content-width);
    margin-inline: auto;
    padding: 12px var(--page-padding);
    gap: 8px clamp(8px, 2vw, 24px);
    background-color: var(--color-background);
}

.main-navigation a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 6px 10px;
    color: var(--color-foreground);
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2vw, 1.25rem);
    text-decoration: none;
    transition: opacity var(--transition-speed) ease;
}

.main-navigation a:hover {
    opacity: 0.75;
}

.main-navigation a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 6px;
}


/* ==================================================
   07. SHARED SECTION STYLES
   ================================================== */

.about-me,
.featured-writing,
.other-preoccupations,
.placeholder-page {
    min-width: 0;
    padding: var(--section-padding);
    background-color: var(--color-foreground);
    color: var(--color-background);
    border: 2px solid var(--color-background);
    border-radius: var(--radius-lg);
}

.featured-writing,
.other-preoccupations {
    margin-top: var(--layout-gap);
}

.about-me h1,
.featured-writing h2,
.other-preoccupations h2,
.placeholder-page h1 {
    margin-top: 0;
}


/* ==================================================
   08. ABOUT ME
   ================================================== */

.about-me {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr) minmax(0, 2fr);
    align-items: center;
    gap: var(--layout-gap);
}

.about-image,
.about-text {
    min-width: 0;
}

.about-image img {
    width: 100%;
    max-width: 360px;
    margin-inline: auto;
    border-radius: var(--radius-md);
}


/* ==================================================
   09. FEATURED WRITING
   ================================================== */

.book-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: var(--layout-gap);
    margin-top: var(--space-lg);
}

.book-card {
    min-width: 0;
}

.book-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.book-card h3 {
    margin-bottom: var(--space-xs);
    overflow-wrap: anywhere;
}

.book-card p {
    margin-top: 0;
    font-size: clamp(0.72rem, 1.2vw, 0.85rem);
    line-height: 1.6;
}


/* ==================================================
   10. PROJECTS
   ================================================== */

.other-preoccupations > p {
    margin-bottom: var(--space-lg);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--layout-gap);
}

.project-card {
    display: block;
    min-width: 0;
    padding: clamp(12px, 2vw, 20px);
    background-color: var(--color-surface);
    color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition:
        background-color var(--transition-speed) ease,
        border-color var(--transition-speed) ease;
}

.project-card h3 {
    margin-top: 0;
    margin-bottom: var(--space-sm);
    overflow-wrap: anywhere;
}

.project-card p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.6;
}

.project-card:hover,
.project-card:focus-visible {
    background-color: var(--color-hover);
    border-color: var(--color-accent);
}


/* ==================================================
   11. SECTION LINKS
   ================================================== */

.writing-link,
.projects-link {
    display: inline-block;
    margin-top: var(--space-lg);
    color: var(--color-accent);
    font-weight: 800;
    text-decoration: none;
}

.writing-link:hover,
.writing-link:focus-visible,
.projects-link:hover,
.projects-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 4px;
}


/* ==================================================
   12. PLACEHOLDER PAGES
   ================================================== */

.placeholder-page a {
    color: var(--color-accent);
    text-underline-offset: 4px;
}


/* ==================================================
   13. RESPONSIVE: TABLETS
   ================================================== */

@media (max-width: 900px) {
    .book-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


/* ==================================================
   14. RESPONSIVE: MOBILE
   ================================================== */

@media (max-width: 600px) {
    .about-me {
        grid-template-columns: minmax(0, 1fr);
    }

    .about-image img {
        max-width: 240px;
    }

    .about-text {
        font-size: 0.85rem;
    }

    .main-navigation {
        display: grid;
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
        gap: var(--space-xs);
    }

    .main-navigation a {
        padding: 8px 4px;
        text-align: center;
    }

    .project-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* ==================================================
   15. RESPONSIVE: NARROW MOBILE
   ================================================== */

@media (max-width: 340px) {
    .book-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .main-navigation {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .book-card img {
        max-width: 240px;
        margin-inline: auto;
    }
}


/* ==================================================
   16. ACCESSIBILITY
   ================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* END OF STYLESHEET */


/* BEGIN ACCESSIBILITY PATCH */

/* Skip-to-content link */

.skip-link {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 9999;
    padding: 12px 18px;
    background: #f5f5dc;
    color: #191918;
    border: 3px solid #191918;
    border-radius: 6px;
    font-weight: 800;
    text-decoration: underline;
    transform: translateY(calc(-100% - 24px));
}

.skip-link:focus {
    transform: translateY(0);
}

/* Visible keyboard focus */

:where(a, button, input, select, textarea,
       summary, [tabindex]):focus-visible {
    outline: 3px solid #191918;
    outline-offset: 3px;
    box-shadow: 0 0 0 3px #f5f5dc;
}

#main-content {
    scroll-margin-top: 16px;
}

/* Current navigation location */

.main-navigation a[aria-current="page"],
.main-navigation a[aria-current="location"] {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

/* Accessible touch targets */

.main-navigation a,
button,
input[type="submit"],
input[type="button"],
.writing-link,
.projects-link {
    min-height: 44px;
}

.writing-link,
.projects-link {
    display: inline-flex;
    align-items: center;
}

/* Links distinguishable without color alone */

main p a,
.placeholder-page a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Text resizing and wrapping */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

main,
section,
article,
nav {
    min-width: 0;
}

p,
li,
h1,
h2,
h3,
a {
    overflow-wrap: break-word;
}

input,
select,
textarea,
button {
    font: inherit;
    max-width: 100%;
}

/* Screen-reader-only utility */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Increased-contrast preferences */

@media (prefers-contrast: more) {
    a {
        text-decoration: underline;
    }

    .project-card {
        border: 2px solid currentColor;
    }

    .project-card:hover {
        outline: 2px solid currentColor;
    }
}

/* System-enforced high contrast */

@media (forced-colors: active) {
    :focus-visible {
        outline: 3px solid Highlight !important;
        box-shadow: none !important;
    }

    .project-card,
    .placeholder-page,
    .skip-link {
        border: 2px solid CanvasText;
    }

    .main-navigation a[aria-current] {
        text-decoration: underline;
    }
}

/* END ACCESSIBILITY PATCH */


/* BEGIN WRITING SECTION */

/* Shared literary containers */

.writing-page {
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap, 24px);
}

.literary-section {
    min-width: 0;
    padding: var(--section-padding, 24px);
    background: var(--color-foreground, #f5f5dc);
    color: var(--color-background, #191918);
    border: 2px solid var(--color-background, #191918);
    border-radius: var(--radius-lg, 12px);
    scroll-margin-top: 20px;
}

.literary-section h1,
.literary-section h2 {
    margin-top: 0;
}

.literary-section > p {
    max-width: 80ch;
}

.literary-section .project-grid {
    margin-top: 24px;
}

/* In-page navigation */

.writing-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    border-top: 1px solid var(--color-border, #b5ad91);
    margin-top: 24px;
    padding-top: 16px;
}

.writing-section-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--color-accent, #307f73);
    font-size: 0.8rem;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Bookshelf cards */

.literary-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.literary-cover-link {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.literary-cover-link:hover h3 {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.literary-card h3 {
    margin-top: 12px;
    margin-bottom: 6px;
}

.literary-card p {
    margin-bottom: 8px;
}

.literary-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--color-accent, #307f73);
    font-size: 0.8rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Temporary typographic fandom covers */

.fandom-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    aspect-ratio: 2 / 3;
    padding: clamp(10px, 2vw, 24px);
    border: 5px double #f5f5dc;
    border-radius: var(--radius-md, 8px);
    color: #f5f5dc;
    text-align: center;
}

.fandom-cover-title {
    font-family: var(--font-heading, serif);
    font-size: clamp(1.2rem, 3vw, 2.5rem);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.fandom-cover-label {
    font-size: clamp(0.5rem, 1vw, 0.7rem);
    letter-spacing: 0.08em;
}

.fandom-jaws {
    background: #28565b;
}

.fandom-godzilla {
    background: #465b40;
}

.fandom-star-wars {
    background: #514c68;
}

.fandom-marvel {
    background: #824b40;
}

/* Breadcrumb navigation */

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    padding: 4px 8px;
    font-size: 0.75rem;
}

.breadcrumbs a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Individual book profiles */

.book-profile {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr) minmax(0, 2fr);
    align-items: start;
    gap: var(--layout-gap, 24px);
}

.book-profile-cover img {
    width: 100%;
    max-width: 340px;
    margin-inline: auto;
    border-radius: var(--radius-md, 8px);
}

.book-profile-details {
    min-width: 0;
}

.book-byline {
    font-size: 0.85rem;
}

.book-details {
    border-top: 1px solid var(--color-border, #b5ad91);
    padding-top: 16px;
}

.book-details dt {
    font-weight: 800;
    font-size: 0.75rem;
    margin-top: 12px;
}

.book-details dd {
    margin: 4px 0 12px;
    font-size: 0.85rem;
}

/* Unpopulated content areas */

.writing-empty-state {
    background: var(--color-surface, #fffbed);
    border: 1px dashed var(--color-border, #b5ad91);
    border-radius: var(--radius-sm, 6px);
    padding: 16px;
    margin-top: 20px;
}

.writing-empty-state p {
    margin: 0;
    font-size: 0.85rem;
}

/* Footer */

.writing-footer {
    text-align: center;
    padding: 16px 24px 32px;
    font-size: 0.75rem;
}

/* Responsive adjustments */

@media (max-width: 600px) {

    .book-profile {
        grid-template-columns: minmax(0, 1fr);
    }

    .book-profile-cover img {
        max-width: 240px;
    }

    .writing-section-nav {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 4px 12px;
    }

    .literary-section {
        padding: 16px;
    }
}

@media (max-width: 340px) {

    .writing-section-nav {
        grid-template-columns: minmax(0, 1fr);
    }

    .fandom-cover {
        max-width: 240px;
        margin-inline: auto;
    }
}

/* END WRITING SECTION */

/* BEGIN WRITING RESPONSIVE */

/* ==================================================
   WRITING: FLUID LAYOUT
   ================================================== */

.writing-page {
    width: 100%;
    max-width: 1200px;
    min-width: 0;
    margin-inline: auto;
    gap: clamp(12px, 2vw, 28px);
}

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

.writing-page .literary-section {
    width: 100%;
    min-width: 0;
    padding: clamp(16px, 3vw, 36px);
    overflow-wrap: break-word;
}

.writing-page .literary-section > :last-child {
    margin-bottom: 0;
}


/* ==================================================
   WRITING: READABLE TYPOGRAPHY
   ================================================== */

.writing-page h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.2;
}

.writing-page h2 {
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    line-height: 1.25;
}

.writing-page h3 {
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    line-height: 1.4;
}

.writing-page .literary-section > p {
    max-width: 75ch;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    line-height: 1.85;
}

.writing-page p,
.writing-page dd,
.writing-page a {
    overflow-wrap: anywhere;
}


/* ==================================================
   WRITING: BOOKSHELVES
   ================================================== */

.writing-page .book-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: clamp(12px, 2vw, 24px);
    align-items: start;
}

.writing-page .literary-card {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.writing-page .literary-cover-link {
    width: 100%;
    min-width: 0;
}

.writing-page .literary-cover-link img,
.writing-page .fandom-cover {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 2 / 3;
}

.writing-page .literary-cover-link img {
    object-fit: contain;
    object-position: center;
}

.writing-page .literary-card h3 {
    margin: 12px 0 6px;
    overflow-wrap: anywhere;
}

.writing-page .literary-card p {
    font-size: clamp(0.75rem, 1vw, 0.85rem);
    line-height: 1.6;
}

.writing-page .literary-card .literary-link {
    margin-top: auto;
    font-size: 0.8rem;
    min-height: 44px;
}


/* ==================================================
   WRITING: FANFICTION COVERS
   ================================================== */

.writing-page .fandom-cover {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    container-type: inline-size;
    padding: clamp(10px, 1.5vw, 24px);
}

.writing-page .fandom-cover-title {
    max-width: 100%;
    font-size: clamp(1rem, 2vw, 2.4rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.writing-page .fandom-cover-label {
    max-width: 100%;
    font-size: clamp(0.5rem, 0.8vw, 0.7rem);
    line-height: 1.5;
    text-align: center;
}

@supports (font-size: 1cqi) {
    .writing-page .fandom-cover-title {
        font-size: clamp(1rem, 15cqi, 2.4rem);
    }

    .writing-page .fandom-cover-label {
        font-size: clamp(0.5rem, 5cqi, 0.7rem);
    }
}


/* ==================================================
   WRITING: SECTION NAVIGATION
   ================================================== */

.writing-page .writing-section-nav {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 8px 16px;
}

.writing-page .writing-section-nav a {
    min-width: 0;
    min-height: 44px;
    padding: 6px 0;
    line-height: 1.5;
}

.writing-page .breadcrumbs {
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    line-height: 1.8;
    overflow-wrap: anywhere;
}


/* ==================================================
   WRITING: CATEGORY CARDS
   ================================================== */

.writing-page .project-grid {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.writing-page #short-and-sweet .project-grid {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

.writing-page .project-card {
    min-width: 0;
    height: 100%;
    padding: clamp(12px, 2vw, 24px);
}


/* ==================================================
   WRITING: INDIVIDUAL BOOK PROFILES
   ================================================== */

.writing-page .book-profile {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr) minmax(0, 2fr);
    gap: clamp(20px, 4vw, 48px);
    align-items: start;
}

.writing-page .book-profile-cover {
    min-width: 0;
}

.writing-page .book-profile-cover img {
    width: 100%;
    max-width: 340px;
    height: auto;
    margin-inline: auto;
}

.writing-page .book-profile-details {
    min-width: 0;
}

.writing-page .book-details {
    display: grid;
    grid-template-columns:
        minmax(90px, 1fr) minmax(0, 2fr);
    gap: 12px;
    align-items: baseline;
}

.writing-page .book-details dt,
.writing-page .book-details dd {
    margin: 0;
}


/* ==================================================
   WRITING: FUTURE CONTENT
   ================================================== */

.writing-page table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.writing-page pre {
    max-width: 100%;
    overflow-x: auto;
}

.writing-page iframe,
.writing-page video {
    max-width: 100%;
}

.writing-page figure {
    max-width: 100%;
    margin-inline: 0;
}

.writing-page blockquote {
    margin-inline: 0;
    padding-left: clamp(12px, 2vw, 24px);
    border-left: 3px solid
        var(--color-accent, #307f73);
}


/* ==================================================
   WRITING: WIDESCREEN
   ================================================== */

@media (min-width: 1400px) {

    .writing-page .book-grid {
        gap: 28px;
    }

    .writing-page .literary-section {
        padding: 36px;
    }
}


/* ==================================================
   WRITING: TABLETS
   ================================================== */

@media (max-width: 900px) {

    .writing-page .book-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
        gap: 12px;
    }

    .writing-page .literary-card h3 {
        font-size: 1rem;
    }

    .writing-page .literary-card p {
        font-size: 0.75rem;
    }

    .writing-page .book-profile {
        grid-template-columns:
            minmax(0, 1fr) minmax(0, 1.5fr);
    }

    .writing-page .literary-section {
        padding: 24px;
    }
}


/* ==================================================
   WRITING: SMALL TABLETS & LANDSCAPE PHONES
   ================================================== */

@media (max-width: 720px) {

    .writing-page .book-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .writing-page #short-and-sweet .project-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .writing-page .writing-section-nav {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


/* ==================================================
   WRITING: MOBILE PHONES
   ================================================== */

@media (max-width: 600px) {

    .writing-page {
        padding-inline: 12px;
        gap: 14px;
    }

    .writing-page .literary-section {
        padding: 16px;
    }

    .writing-page .literary-section > p {
        font-size: 0.9rem;
        line-height: 1.8;
    }

    .writing-page .book-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .writing-page .project-grid,
    .writing-page #short-and-sweet .project-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .writing-page .book-profile {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .writing-page .book-profile-cover img {
        max-width: 240px;
    }

    .writing-page .book-profile-details h1 {
        text-align: center;
    }

    .writing-page .book-byline {
        text-align: center;
    }

    .writing-page .book-details {
        grid-template-columns:
            minmax(70px, 1fr) minmax(0, 2fr);
    }

    .writing-page .writing-link {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .writing-page .writing-empty-state {
        padding: 12px;
    }

    .writing-footer {
        padding: 12px 16px 24px;
    }
}


/* ==================================================
   WRITING: NARROW MOBILE
   ================================================== */

@media (max-width: 340px) {

    .writing-page {
        padding-inline: 8px;
    }

    .writing-page .literary-section {
        padding: 12px;
    }

    .writing-page .book-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .writing-page .literary-cover-link img,
    .writing-page .fandom-cover {
        max-width: 240px;
        margin-inline: auto;
    }

    .writing-page .writing-section-nav,
    .writing-page .book-details {
        grid-template-columns: minmax(0, 1fr);
    }

    .writing-page .book-details dd {
        margin-bottom: 8px;
    }
}


/* ==================================================
   WRITING: PRINT VIEW
   ================================================== */

@media print {

    body:has(.writing-page) {
        background: white;
        color: black;
    }

    body:has(.writing-page) header,
    body:has(.writing-page) .main-navigation,
    body:has(.writing-page) .skip-link,
    body:has(.writing-page) .writing-footer,
    .writing-page .writing-section-nav {
        display: none;
    }

    .writing-page {
        max-width: none;
        padding: 0;
        display: block;
    }

    .writing-page .literary-section {
        background: white;
        color: black;
        border: none;
        padding: 12px 0;
    }

    .writing-page .book-card,
    .writing-page .project-card,
    .writing-page .book-profile {
        break-inside: avoid;
    }

    .writing-page h1,
    .writing-page h2,
    .writing-page h3 {
        break-after: avoid;
    }

    .writing-page a {
        color: black;
    }
}

/* END WRITING RESPONSIVE */



/* BEGIN SERIES SYNOPSIS */

/* Series overview */

.writing-page .series-overview {
    max-width: 75ch;
}

.writing-page .series-synopsis p {
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    line-height: 1.85;
    overflow-wrap: break-word;
}

/* Reading order navigation */

.writing-page .series-reading-order {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid
        var(--color-border, #b5ad91);
}

.writing-page .series-reading-order h3 {
    margin-top: 0;
}

.writing-page .series-book-nav {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.writing-page .series-book-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px;
    background: var(--color-surface, #fffbed);
    color: var(--color-accent, #307f73);
    border: 1px solid
        var(--color-border, #b5ad91);
    border-radius: var(--radius-sm, 6px);
    text-align: center;
    text-decoration: none;
    font-size: 0.8rem;
    line-height: 1.5;
}

.writing-page .series-book-nav a:hover {
    background: var(--color-hover, #e6eddf);
    text-decoration: underline;
}

/* Individual book blurbs */

.writing-page .series-book {
    min-width: 0;
    padding: clamp(16px, 3vw, 28px);
    margin-top: 20px;
    background: var(--color-surface, #fffbed);
    border: 1px solid
        var(--color-border, #b5ad91);
    border-left: 4px solid
        var(--color-accent, #307f73);
    border-radius: var(--radius-md, 8px);
    scroll-margin-top: 20px;
}

.writing-page .series-book-number {
    display: block;
    margin-bottom: 8px;
    color: var(--color-accent, #307f73);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.writing-page .series-book h3 {
    font-family: var(--font-heading, serif);
    font-size: clamp(1.4rem, 3vw, 2rem);
    line-height: 1.3;
    margin: 0 0 16px;
}

.writing-page .series-book p {
    max-width: 75ch;
    margin-bottom: 0;
}

.writing-page .series-back-link {
    margin-top: 16px;
}

/* Tablet and mobile */

@media (max-width: 900px) {
    .writing-page .series-book-nav {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .writing-page .series-book {
        padding: 16px;
        margin-top: 14px;
    }

    .writing-page .series-synopsis p {
        font-size: 0.9rem;
        line-height: 1.8;
    }

    .writing-page .series-book-nav {
        gap: 8px;
    }

    .writing-page .series-book-nav a {
        padding: 10px;
        font-size: 0.75rem;
    }
}

@media (max-width: 340px) {
    .writing-page .series-book-nav {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Print view */

@media print {
    .writing-page .series-book-nav,
    .writing-page .series-back-link {
        display: none;
    }

    .writing-page .series-book {
        background: white;
        border: none;
        padding: 12px 0;
    }

    .writing-page .series-book-number {
        color: black;
    }
}

/* END SERIES SYNOPSIS */


/* BEGIN FANFICTION ARCHIVE */

.fanfiction-page {
    min-width: 0;
}

.fanfiction-page .fanfic-eyebrow {
    display: block;
    margin-bottom: 12px;
    color: var(--color-accent, #307f73);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.fanfiction-page .fanfic-work-card {
    min-width: 0;
    padding: clamp(16px, 3vw, 28px);
    margin-top: 16px;
    border: 1px solid
        var(--color-border, #b5ad91);
    border-left: 4px solid
        var(--color-accent, #307f73);
    background: var(--color-surface, #fffbed);
    border-radius: var(--radius-md, 8px);
}

.fanfiction-page .fanfic-work-card h3 {
    margin-top: 0;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.fanfiction-page .fanfic-work-card h3 a {
    color: var(--color-accent, #307f73);
    overflow-wrap: anywhere;
}

.fanfiction-page .fanfic-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 0.75rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.fanfiction-page .fanfic-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.fanfiction-page .fanfic-stats {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 20px 0;
    border-top: 1px solid
        var(--color-border, #b5ad91);
}

.fanfiction-page .fanfic-stats dt {
    font-size: 0.7rem;
    margin-bottom: 8px;
}

.fanfiction-page .fanfic-stats dd {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.fanfiction-page .fanfic-read-button {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 12px 20px;
    margin: 12px 0;
    background: #286b61;
    color: #ffffff;
    border-radius: var(--radius-sm, 6px);
    text-decoration: none;
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.5;
}

.fanfiction-page .fanfic-read-button:hover {
    background: #245e55;
    text-decoration: underline;
}

.fanfiction-page .fanfic-summary-dialogue {
    font-style: italic;
}

.fanfiction-page .fanfic-summary-divider {
    width: 60px;
    border: 0;
    border-top: 1px solid
        var(--color-border, #b5ad91);
    margin: 24px 0;
}

.fanfiction-page .fanfic-tag-group {
    margin: 20px 0;
}

.fanfiction-page .fanfic-tag-group h3 {
    margin: 0 0 10px;
    font-family: var(--font-body, sans-serif);
    font-size: 0.8rem;
    font-weight: 800;
}

.fanfiction-page .fanfic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fanfiction-page .fanfic-tag {
    display: inline-block;
    max-width: 100%;
    padding: 6px 10px;
    border: 1px solid #a59e86;
    border-radius: 4px;
    color: #303429;
    font-size: 0.72rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.fanfiction-page .tag-warning {
    background: #e8bca8;
}

.fanfiction-page .tag-fandom {
    background: #d9c5df;
}

.fanfiction-page .tag-relationship {
    background: #c5d6b1;
}

.fanfiction-page .tag-character {
    background: #e7d19b;
}

.fanfiction-page .tag-additional {
    background: #e0e5ca;
}

@media (max-width: 720px) {
    .fanfiction-page .fanfic-stats {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .fanfiction-page .fanfic-work-card {
        padding: 16px;
    }

    .fanfiction-page .fanfic-card-actions {
        flex-direction: column;
    }
}

@media (max-width: 340px) {
    .fanfiction-page .fanfic-stats {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media print {
    .fanfiction-page .fanfic-read-button,
    .fanfiction-page .fanfic-card-actions {
        display: none;
    }

    .fanfiction-page .fanfic-tag {
        background: transparent;
        color: black;
    }
}

/* END FANFICTION ARCHIVE */

/* BEGIN WRITING DESK */

.manuscript-card {
    margin-bottom: var(--layout-gap, 20px);
}

.manuscript-genre {
    font-size: 0.8rem !important;
    opacity: 0.8;
}

.manuscript-progress {
    border-top: 1px solid var(--color-border, #b5ad91);
    border-bottom: 1px solid var(--color-border, #b5ad91);
    padding: 18px 0;
    margin: 16px 0;
}

.manuscript-stage-label {
    font-size: 0.75rem !important;
    margin: 0 0 6px;
}

.manuscript-stage {
    font-family: var(--font-heading, sans-serif);
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    color: var(--color-accent, #307f73);
    margin: 0 0 16px;
}

.manuscript-progress-label {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.manuscript-progress-label span:last-child {
    color: var(--color-accent, #307f73);
}

.manuscript-progress progress {
    display: block;
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 12px;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    background: #dedfcd;
    color: var(--color-accent, #307f73);
}

.manuscript-progress progress::-webkit-progress-bar {
    background: #dedfcd;
    border-radius: 999px;
}

.manuscript-progress progress::-webkit-progress-value {
    background: var(--color-accent, #307f73);
    border-radius: 999px;
}

.manuscript-progress progress::-moz-progress-bar {
    background: var(--color-accent, #307f73);
    border-radius: 999px;
}

.manuscript-updated {
    font-size: 0.7rem !important;
    opacity: 0.8;
}

@media (max-width: 600px) {

    .manuscript-progress {
        padding: 14px 0;
    }

    .manuscript-progress-label {
        font-size: 0.72rem;
    }

}

/* END WRITING DESK */

/* BEGIN CODING PROJECTS */

.coding-page {
    min-width: 0;
}

.coding-page .fanfic-work-card {
    min-width: 0;
    margin-top: 16px;
    padding: clamp(16px, 3vw, 28px);
    background: var(--color-surface, #fffbed);
    border: 1px solid var(--color-border, #b5ad91);
    border-left: 4px solid var(--color-accent, #307f73);
    border-radius: var(--radius-md, 8px);
}

.coding-page .fanfic-work-card h3 {
    margin-top: 0;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.coding-page .fanfic-work-card h3 a {
    color: var(--color-accent, #307f73);
    overflow-wrap: anywhere;
}

.coding-page .fanfic-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 0.75rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.coding-page .fanfic-eyebrow {
    display: block;
    margin-bottom: 12px;
    color: var(--color-accent, #307f73);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.coding-page .coding-tagline {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: #286b61;
    line-height: 1.6;
}

.coding-page .coding-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--layout-gap, 20px);
    margin-top: 20px;
}

.coding-page .coding-feature-grid .fanfic-work-card {
    margin-top: 0;
}

.coding-page .coding-feature-grid h3 {
    color: var(--color-accent, #307f73);
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

.coding-page .coding-screenshot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--layout-gap, 20px);
}

.coding-page .coding-screenshot {
    min-width: 0;
    margin: 0;
    padding: 12px;
    background: var(--color-surface, #fffbed);
    border: 1px solid var(--color-border, #b5ad91);
    border-radius: var(--radius-md, 8px);
}

.coding-page .coding-screenshot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm, 6px);
}

.coding-page .coding-screenshot figcaption {
    margin-top: 12px;
    font-size: 0.75rem;
    line-height: 1.6;
}

.coding-page .coding-date,
.coding-page .coding-status {
    font-size: 0.75rem;
    line-height: 1.6;
}

.coding-page .fanfic-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.coding-page .fanfic-stats dt {
    font-size: 0.75rem;
    margin-bottom: 8px;
}

.coding-page .fanfic-stats dd {
    margin: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {

    .coding-page .coding-feature-grid,
    .coding-page .coding-screenshot-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .coding-page .fanfic-work-card {
        padding: 16px;
    }

}

@media (max-width: 340px) {

    .coding-page .fanfic-stats {
        grid-template-columns: minmax(0, 1fr);
    }

}

@media print {

    .coding-page .fanfic-work-card,
    .coding-page .coding-screenshot {
        break-inside: avoid;
    }

}

/* END CODING PROJECTS */

/* BEGIN SUPPORT PAGE */

.support-page {
    min-width: 0;
}

.support-page .support-card {
    min-width: 0;
    padding: clamp(18px, 4vw, 32px);
    margin-top: 16px;
    background: var(--color-surface, #fffbed);
    border: 1px solid var(--color-border, #b5ad91);
    border-left: 4px solid var(--color-accent, #307f73);
    border-radius: var(--radius-md, 8px);
}

.support-page .support-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.support-page .support-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: clamp(48px, 12vw, 80px);
    aspect-ratio: 1;
    padding: 12px;
    color: var(--color-accent, #307f73);
    background: #e6eddf;
    border-radius: var(--radius-md, 8px);
}

.support-page .support-icon svg {
    width: 100%;
    height: 100%;
}

.support-page .support-profile-details {
    min-width: 0;
}

.support-page .support-profile-details h3 {
    color: var(--color-accent, #307f73);
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin: 0 0 8px;
}

.support-page .support-profile-details p {
    font-size: 0.75rem;
    margin: 0;
    overflow-wrap: anywhere;
}

.support-page .support-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 14px 20px;
    margin-top: 24px;
    background: #286b61;
    color: #fffbed;
    border: 2px solid #286b61;
    border-radius: var(--radius-sm, 6px);
    text-align: center;
    text-decoration: none;
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    line-height: 1.6;
    transition: background 150ms ease;
}

.support-page .support-button:hover {
    background: #1e5149;
    color: #fffbed;
    border-color: #1e5149;
}

.support-page .support-button:focus-visible {
    outline: 3px solid #286b61;
    outline-offset: 4px;
}

.support-page .support-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 16px;
}

.support-page .support-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

@media (max-width: 600px) {

    .support-page .support-profile {
        gap: 14px;
    }

    .support-page .support-links {
        flex-direction: column;
        gap: 8px;
    }

    .support-page .support-card {
        padding: 16px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .support-page .support-button {
        transition: none;
    }

}

@media print {

    .support-page .support-card {
        break-inside: avoid;
    }

    .support-page .support-button {
        background: transparent;
        color: #000;
        border: 1px solid #000;
    }

}

/* END SUPPORT PAGE */

/* BEGIN CONTACT PAGE */

.contact-page {
    min-width: 0;
}

.contact-page .fanfic-work-card {
    min-width: 0;
    margin-top: 16px;
    padding: clamp(16px, 3vw, 28px);
    background: var(--color-surface, #fffbed);
    border: 1px solid var(--color-border, #b5ad91);
    border-left: 4px solid var(--color-accent, #307f73);
    border-radius: var(--radius-md, 8px);
}

.contact-page .fanfic-work-card h3 {
    margin-top: 0;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
}

.contact-page .fanfic-work-card h3 a {
    color: var(--color-accent, #307f73);
    overflow-wrap: anywhere;
}

.contact-page .fanfic-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 16px;
    font-size: 0.75rem;
    line-height: 1.6;
}

.contact-page .contact-email-card h2 {
    margin-top: 0;
    color: #286b61;
}

.contact-page .contact-email {
    display: block;
    margin: 16px 0;
    color: #286b61;
    font-size: clamp(0.72rem, 2vw, 0.95rem);
    overflow-wrap: anywhere;
}

.contact-page .contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.contact-page .contact-button,
.contact-page .contact-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    font: inherit;
    font-size: 0.75rem;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
}

.contact-page .contact-button {
    background: #286b61;
    color: #fffbed;
    border: 1px solid #286b61;
}

.contact-page .contact-copy {
    background: transparent;
    color: #286b61;
    border: 1px solid #286b61;
}

.contact-page .contact-button:hover {
    background: #1e5149;
    color: #fffbed;
}

.contact-page .contact-copy:hover {
    background: #e6eddf;
}

/* Plain social media links */

.contact-page .social-link-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.contact-page .social-link-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
    padding: 4px 0;
}

.contact-page .social-text-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #286b61;
    font: inherit;
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

.contact-page .social-text-link:hover {
    color: #191918;
}

.contact-page .social-handle {
    font-size: 0.75rem;
    overflow-wrap: anywhere;
    min-width: 0;
}

.contact-page .social-copy-label {
    font-size: 0.65rem;
    opacity: 0.75;
}

/* Community cards */

.contact-page .community-card .literary-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

/* Clipboard notification */

.contact-page .contact-copy-status {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: max-content;
    max-width: calc(100vw - 32px);
    padding: 14px 20px;
    background: #286b61;
    color: #fffbed;
    border-radius: var(--radius-md, 8px);
    font-size: 0.75rem;
    line-height: 1.5;
    text-align: center;
    overflow-wrap: anywhere;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease;
}

.contact-page .contact-copy-status.visible {
    opacity: 1;
}

.contact-page button:focus-visible,
.contact-page a:focus-visible {
    outline: 3px solid #286b61;
    outline-offset: 4px;
}

/* Responsive layout */

@media (max-width: 600px) {

    .contact-page .contact-actions {
        flex-direction: column;
    }

    .contact-page .contact-button,
    .contact-page .contact-copy {
        width: 100%;
    }

    .contact-page .fanfic-work-card {
        padding: 16px;
    }

    .contact-page .social-link-row {
        gap: 4px 12px;
    }

    .contact-page .social-text-link {
        font-size: 0.8rem;
    }

    .contact-page .social-handle {
        font-size: 0.7rem;
    }

}

@media (prefers-reduced-motion: reduce) {

    .contact-page .contact-copy-status {
        transition: none;
    }

}

@media print {

    .contact-page .contact-copy,
    .contact-page .contact-copy-status {
        display: none;
    }

    .contact-page .fanfic-work-card {
        break-inside: avoid;
    }

}

/* END CONTACT PAGE */

/* BEGIN BLOG ARCHIVE */

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

/* Post cards */

.blog-page .blog-post-card {
    min-width: 0;
    padding: clamp(16px, 3vw, 28px);
    margin-top: 16px;
    background: var(--color-surface, #fffbed);
    border: 1px solid var(--color-border, #b5ad91);
    border-left: 4px solid var(--color-accent, #307f73);
    border-radius: var(--radius-md, 8px);
}

.blog-page .blog-post-card h3 {
    margin-top: 0;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.blog-page .blog-post-card h3 a {
    color: #286b61;
    overflow-wrap: anywhere;
}

.blog-page .blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    margin: 12px 0 18px;
    font-size: 0.72rem;
    line-height: 1.7;
}

.blog-page .blog-count {
    font-size: 0.75rem;
}

/* Individual articles */

.blog-page .blog-eyebrow {
    display: block;
    margin-bottom: 12px;
    color: #286b61;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.6;
}

.blog-page .blog-article-header {
    padding-bottom: 24px;
    margin-bottom: 28px;
    border-bottom: 1px solid
        var(--color-border, #b5ad91);
}

.blog-page .blog-article-header h1 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: clamp(2rem, 5vw, 3.5rem);
    overflow-wrap: anywhere;
}

.blog-page .blog-byline {
    font-size: 0.85rem;
    margin: 12px 0;
}

.blog-page .blog-updated {
    font-size: 0.7rem;
}

.blog-page .blog-article-body {
    width: 100%;
    max-width: 75ch;
    margin: 0 auto;
}

.blog-page .blog-article-body p {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    line-height: 1.95;
    margin: 0 0 1.5em;
    overflow-wrap: anywhere;
}

.blog-page .blog-article-body p:last-child {
    margin-bottom: 0;
}

.blog-page .blog-article-footer {
    padding-top: 20px;
    margin-top: 28px;
    border-top: 1px solid
        var(--color-border, #b5ad91);
}

/* Tags */

.blog-page .blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.blog-page .blog-tag {
    padding: 6px 10px;
    background: #e6eddf;
    border: 1px solid #a59e86;
    border-radius: 4px;
    color: #191918;
    font-size: 0.65rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Category and archive links */

.blog-page .blog-category-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.blog-page .blog-category-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 6px 0;
    border-bottom: 1px solid
        var(--color-border, #b5ad91);
}

.blog-page .blog-category-row:last-child {
    border-bottom: 0;
}

.blog-page .blog-category-row a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #286b61;
    text-decoration: underline;
}

.blog-page .blog-category-row span {
    font-size: 0.75rem;
}

/* Author links */

.blog-page .blog-author-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 16px;
}

.blog-page .literary-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

/* Previous and next posts */

.blog-page .blog-post-navigation {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.blog-page .blog-navigation-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 20px;
    background: var(--color-surface, #fffbed);
    border: 1px solid var(--color-border, #b5ad91);
    border-radius: var(--radius-md, 8px);
    color: #286b61;
    overflow-wrap: anywhere;
}

.blog-page .blog-navigation-card span {
    font-size: 0.7rem;
    color: #191918;
}

.blog-page .blog-navigation-card:hover {
    background: #e6eddf;
}

/* Responsive layout */

@media (max-width: 600px) {

    .blog-page .blog-post-card {
        padding: 16px;
    }

    .blog-page .blog-article-header {
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .blog-page .blog-article-body p {
        line-height: 1.85;
    }

    .blog-page .blog-post-meta {
        gap: 4px 12px;
        font-size: 0.68rem;
    }

    .blog-page .blog-post-navigation {
        grid-template-columns: minmax(0, 1fr);
    }

    .blog-page .blog-author-links {
        flex-direction: column;
        gap: 8px;
    }

}

/* Print styling */

@media print {

    .blog-page .blog-article {
        background: white;
        color: black;
        border: 0;
    }

    .blog-page .blog-article-body {
        max-width: none;
    }

    .blog-page .blog-tag {
        background: transparent;
    }

    .blog-page .blog-post-navigation,
    .blog-page .blog-author-links {
        display: none;
    }

}

/* END BLOG ARCHIVE */

/* BEGIN DEPLOYMENT STYLING */

.error-page .error-section {
    text-align: center;
    padding: clamp(24px, 6vw, 64px);
}

.error-page .error-code {
    margin: 0 0 16px;
    color: #286b61;
    font-family: var(--font-heading, sans-serif);
    font-size: clamp(4rem, 15vw, 8rem);
    line-height: 1;
}

.error-page h1 {
    overflow-wrap: anywhere;
}

.error-page .error-section p {
    margin-left: auto;
    margin-right: auto;
    max-width: 65ch;
}

.error-page .error-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 24px;
    margin-top: 28px;
}

.error-page .error-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

@media (max-width: 600px) {

    .error-page .error-links {
        flex-direction: column;
        align-items: center;
    }

}

/* END DEPLOYMENT STYLING */
