/* Slow Ink Pro — dark editorial sidebar layout */

:root {
    --color-bg: #141418;
    --color-bg-raised: #1e1e24;
    --color-bg-soft: #26262e;
    --color-surface: #1a1a20;
    --color-border: #3d3d48;
    --color-border-soft: #2d2d36;
    --color-text: #f2f0eb;
    --color-text-muted: #b8b4aa;
    --color-accent: #d4a574;
    --color-accent-hover: #e8c08f;
    --color-accent-soft: rgba(212, 165, 116, 0.16);
    --color-focus: #e8b86d;
    --color-error: #e07a7a;
    --color-success: #7ab88a;
    --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
    --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
    --sidebar-width: 17.5rem;
    --content-max: 42rem;
    --wide-max: 56rem;
    --space-xs: 0.5rem;
    --space-sm: 0.875rem;
    --space-md: 1.25rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4.5rem;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-soft: 0 16px 48px rgba(0, 0, 0, 0.45);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 0 1px rgba(212, 165, 116, 0.08);
    --transition: 220ms ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--color-text);
    background: var(--color-bg);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(212, 165, 116, 0.06), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(212, 165, 116, 0.04), transparent);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-md);
    z-index: 1000;
    padding: var(--space-xs) var(--space-md);
    background: var(--color-accent);
    color: var(--color-bg);
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    top: var(--space-md);
}

/* Site shell — sidebar + main */

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: var(--space-lg) var(--space-md);
    background: linear-gradient(180deg, var(--color-surface) 0%, #151519 100%);
    border-right: 1px solid var(--color-border-soft);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    z-index: 100;
}

.sidebar-top {
    margin-bottom: var(--space-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    color: var(--color-bg);
    background: linear-gradient(135deg, var(--color-accent) 0%, #b8894f 100%);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(212, 165, 116, 0.3);
}

img.logo-mark {
    display: block;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: var(--radius-sm);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.sidebar-tagline {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--color-text-muted);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    margin-bottom: var(--space-md);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 1.25rem;
    height: 2px;
    margin: 0 auto;
    background: var(--color-text);
    transition: transform var(--transition), opacity var(--transition);
}

.primary-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.nav-link {
    display: block;
    padding: 0.55rem 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    border-radius: var(--radius-sm);
    border-left: 2px solid transparent;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.nav-link:hover {
    color: var(--color-text);
    background: var(--color-bg-soft);
}

.nav-link[aria-current="page"] {
    color: var(--color-accent);
    background: var(--color-accent-soft);
    border-left-color: var(--color-accent);
}

.sidebar-contact {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border-soft);
}

.sidebar-label {
    margin: 0 0 var(--space-xs);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.sidebar-contact address {
    font-style: normal;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.sidebar-contact address p {
    margin: 0 0 0.35rem;
}

.sidebar-contact a {
    color: var(--color-text-muted);
}

.sidebar-contact a:hover {
    color: var(--color-accent);
}

.site-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Page layout */

.page {
    flex: 1;
    padding: var(--space-xl) var(--space-lg) var(--space-2xl);
}

.page-inner {
    max-width: var(--content-max);
    margin: 0 auto;
}

.page-inner--wide {
    max-width: var(--wide-max);
}

.page-header {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border-soft);
}

.page-title {
    margin: 0 0 var(--space-sm);
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--color-text);
}

.page-lead {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-text-muted);
    max-width: 38rem;
}

/* Page hero banners */

.page-hero {
    margin: 0 0 var(--space-xl);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-border-soft);
}

.page-hero--compact img {
    aspect-ratio: 26 / 9;
}

.page-hero img {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    display: block;
}

.page-hero-caption {
    margin: 0;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.8125rem;
    font-style: italic;
    color: var(--color-text-muted);
    background: var(--color-bg-raised);
    border-top: 1px solid var(--color-border-soft);
}

/* Content split (about page) */

.content-split {
    display: grid;
    grid-template-columns: 1fr 16rem;
    gap: var(--space-xl);
    align-items: start;
}

.content-aside {
    position: sticky;
    top: var(--space-lg);
}

.aside-image {
    margin: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border-soft);
}

.aside-image img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.aside-image figcaption {
    padding: var(--space-sm);
    font-size: 0.75rem;
    font-style: italic;
    color: var(--color-text-muted);
    background: var(--color-bg-raised);
    line-height: 1.5;
}

.page-meta {
    margin-top: var(--space-md);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

/* Typography */

.prose h2 {
    margin: var(--space-xl) 0 var(--space-md);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
}

.prose h3 {
    margin: var(--space-lg) 0 var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text);
}

.prose p {
    margin: 0 0 var(--space-md);
}

.prose ul,
.prose ol {
    margin: 0 0 var(--space-md);
    padding-left: 1.4rem;
}

.prose li {
    margin-bottom: 0.4rem;
}

.prose blockquote {
    margin: var(--space-lg) 0;
    padding: var(--space-md) var(--space-lg);
    border-left: 3px solid var(--color-accent);
    background: var(--color-bg-raised);
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.125rem;
    color: var(--color-text-muted);
}

.prose hr {
    margin: var(--space-xl) 0;
    border: none;
    border-top: 1px solid var(--color-border-soft);
}

/* Homepage — split intro + timeline */

.home-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
    align-items: start;
}

.intro-text {
    padding-right: var(--space-md);
}

.intro-label {
    display: inline-block;
    margin-bottom: var(--space-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.intro-heading {
    margin: 0 0 var(--space-md);
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3.5vw, 2.375rem);
    font-weight: 600;
    line-height: 1.25;
}

.intro-aside {
    position: relative;
}

.intro-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-border-soft);
    transition: transform var(--transition), box-shadow var(--transition);
}

.intro-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.5);
}

.intro-image img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.intro-caption {
    margin: var(--space-sm) 0 0;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Writing timeline */

.timeline-section {
    max-width: var(--wide-max);
}

.timeline-heading {
    margin: 0 0 var(--space-lg);
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.timeline-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--color-border-soft);
}

.writing-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.writing-timeline::before {
    content: "";
    position: absolute;
    left: 5.5rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 1px;
    background: var(--color-border);
}

.timeline-item {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: var(--space-lg);
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--color-border-soft);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-date {
    text-align: right;
    padding-top: 0.15rem;
}

.timeline-date time {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.timeline-date .timeline-year {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    font-weight: 400;
    margin-top: 0.15rem;
}

.timeline-body {
    position: relative;
    padding-left: var(--space-md);
}

.timeline-body::before {
    content: "";
    position: absolute;
    left: calc(-1 * var(--space-lg) - 3px);
    top: 0.55rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-bg);
}

.timeline-category {
    display: inline-block;
    margin-bottom: 0.35rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.timeline-title {
    margin: 0 0 var(--space-xs);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.35;
}

.timeline-title a {
    color: var(--color-text);
    text-decoration: none;
}

.timeline-title a:hover {
    color: var(--color-accent);
}

.timeline-excerpt {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    line-height: 1.65;
}

.timeline-read {
    display: inline-block;
    margin-top: var(--space-sm);
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Entry cards (notes, essays, etc.) */

.entry-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.entry-item {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--color-border-soft);
}

.entry-item:first-child {
    padding-top: 0;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.entry-title {
    margin: 0 0 var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
}

.entry-title a {
    color: var(--color-text);
    text-decoration: none;
}

.entry-title a:hover {
    color: var(--color-accent);
}

.entry-excerpt {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.75;
}

/* Entry cards with images (notes) */

.entry-list--cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.entry-card {
    display: grid;
    grid-template-columns: 11rem 1fr;
    gap: var(--space-lg);
    padding: var(--space-lg) !important;
    background: var(--color-bg-raised);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.entry-card:hover {
    border-color: rgba(212, 165, 116, 0.25);
    box-shadow: var(--shadow-card);
}

.entry-card .entry-image {
    margin: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.entry-card .entry-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.entry-card .entry-body {
    min-width: 0;
}

.entry-card .entry-excerpt {
    overflow: visible;
    text-overflow: unset;
    display: block;
    -webkit-line-clamp: unset;
}

/* Featured essays with hero images */

.entry-list--featured {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.entry-featured {
    padding: 0 !important;
    border: none !important;
    background: var(--color-bg-raised);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border-soft) !important;
    box-shadow: var(--shadow-soft);
}

.entry-featured-image {
    margin: 0;
}

.entry-featured-image img {
    width: 100%;
    aspect-ratio: 21 / 9;
    object-fit: cover;
    display: block;
}

.entry-featured-body {
    padding: var(--space-lg) var(--space-xl) var(--space-xl);
}

.entry-featured .entry-title {
    font-size: 1.625rem;
}

.entry-featured .entry-excerpt {
    overflow: visible;
}

.entry-featured .entry-excerpt p {
    color: var(--color-text-muted);
}

/* Dispatch cards */

.entry-list--dispatches {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.dispatch-card {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: var(--space-xl);
    align-items: start;
    padding: var(--space-lg) !important;
    background: var(--color-bg-raised);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-soft) !important;
    box-shadow: var(--shadow-glow);
}

.dispatch-card--reverse {
    grid-template-columns: 1.1fr 1fr;
}

.dispatch-card--reverse .dispatch-image {
    order: 2;
}

.dispatch-image {
    margin: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.dispatch-image img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
}

.dispatch-body {
    min-width: 0;
}

.dispatch-body .entry-excerpt p {
    color: var(--color-text-muted);
}

/* Sketches with images */

.sketch-grid {
    display: grid;
    gap: var(--space-xl);
}

.sketch-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-lg);
    align-items: start;
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border-soft);
}

.sketch-card:nth-child(even) {
    grid-template-columns: 1.2fr 1fr;
}

.sketch-card:nth-child(even) .sketch-image {
    order: 2;
}

.sketch-image {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border-soft);
}

.sketch-image img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.sketch-body h2 {
    margin: 0 0 var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
}

.sketch-body p {
    margin: 0 0 var(--space-sm);
    color: var(--color-text-muted);
}

.sketch-body p:last-child {
    margin-bottom: 0;
}

/* Archive by month */

/* Archive */

.archive-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
}

.archive-month {
    margin-bottom: 0;
    padding: var(--space-lg);
    background: var(--color-bg-raised);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-soft);
    box-shadow: var(--shadow-glow);
}

.archive-month-title {
    margin: 0 0 var(--space-md);
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 0.04em;
}

.archive-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.archive-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-md);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border-soft);
    font-size: 0.9375rem;
}

.archive-list a {
    color: var(--color-text);
    text-decoration: none;
}

.archive-list a:hover {
    color: var(--color-accent);
}

.archive-type {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Contact */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.contact-details address {
    font-style: normal;
    margin-bottom: var(--space-lg);
}

.contact-details address p {
    margin: 0 0 0.4rem;
}

.contact-details h2 {
    margin: 0 0 var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
}

/* Forms */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-field .req {
    color: var(--color-accent);
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-bg-raised);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition);
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--color-accent);
    outline: none;
    box-shadow: 0 0 0 2px var(--color-accent-soft);
}

.form-field textarea {
    resize: vertical;
    min-height: 8rem;
}

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, #b8894f 100%);
    color: var(--color-bg);
    box-shadow: 0 2px 12px rgba(212, 165, 116, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-accent-hover) 0%, var(--color-accent) 100%);
    box-shadow: 0 4px 16px rgba(212, 165, 116, 0.35);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.form-alert {
    padding: var(--space-md);
    background: rgba(224, 122, 122, 0.12);
    border: 1px solid var(--color-error);
    border-radius: var(--radius-sm);
    color: var(--color-error);
}

.form-alert ul {
    margin: 0;
    padding-left: 1.2rem;
}

.form-success {
    padding: var(--space-lg);
    background: rgba(122, 184, 138, 0.1);
    border: 1px solid var(--color-success);
    border-radius: var(--radius-md);
}

.form-success h2 {
    margin: 0 0 var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--color-success);
}

.form-success p {
    margin: 0;
    color: var(--color-text-muted);
}

/* Map */

.map-wrapper {
    position: relative;
    margin-top: var(--space-md);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border-soft);
    background: var(--color-bg-raised);
    box-shadow: var(--shadow-card);
}

.map-frame {
    display: block;
    width: 100%;
    height: 18rem;
    border: none;
}

/* Legal pages */

.legal-content h2 {
    margin-top: var(--space-xl);
}

.legal-content h3 {
    margin-top: var(--space-lg);
}

.legal-updated {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

/* 404 */

.error-page {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
}

.error-code {
    margin: 0;
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
}

.error-page h1 {
    margin: var(--space-md) 0;
    font-family: var(--font-display);
    font-size: 1.75rem;
}

.error-page p {
    color: var(--color-text-muted);
    max-width: 28rem;
    margin: 0 auto var(--space-lg);
}

/* Footer */

.site-footer {
    margin-top: auto;
    padding: var(--space-xl) var(--space-lg);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border-soft);
}

.footer-inner {
    max-width: var(--wide-max);
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-name {
    margin: 0 0 var(--space-xs);
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
}

.footer-tagline {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    line-height: 1.55;
}

.footer-heading {
    margin: 0 0 var(--space-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.footer-contact address {
    font-style: normal;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.footer-contact address p {
    margin: 0 0 0.3rem;
}

.footer-links ul,
.footer-legal ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li,
.footer-legal li {
    margin-bottom: 0.35rem;
}

.footer-links a,
.footer-legal a {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    text-decoration: none;
}

.footer-links a:hover,
.footer-legal a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border-soft);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Cookie banner */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    padding: var(--space-md);
    background: var(--color-bg-raised);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
}

.cookie-inner {
    max-width: var(--wide-max);
    margin: 0 auto;
}

.cookie-banner h2 {
    margin: 0 0 var(--space-xs);
    font-family: var(--font-display);
    font-size: 1.125rem;
}

.cookie-banner p {
    margin: 0 0 var(--space-md);
    font-size: 0.9375rem;
    color: var(--color-text-muted);
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* Single post page */

.post-single {
    max-width: var(--wide-max);
}

.post-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--space-lg);
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.post-breadcrumb a {
    color: var(--color-text-muted);
    text-decoration: none;
}

.post-breadcrumb a:hover {
    color: var(--color-accent);
}

.post-breadcrumb span:last-child {
    color: var(--color-text);
}

.post-header {
    margin-bottom: var(--space-xl);
}

.post-kicker {
    margin: 0 0 var(--space-xs);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.post-single .post-title {
    margin: 0 0 var(--space-md);
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 600;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.post-hero {
    margin: 0 0 var(--space-xl);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border-soft);
    box-shadow: var(--shadow-soft);
}

.post-hero img {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    display: block;
}

.post-body {
    margin-bottom: var(--space-2xl);
    font-size: 1.1875rem;
}

.post-body p {
    margin: 0 0 1.35rem;
    color: var(--color-text);
    line-height: 1.85;
    font-size: inherit;
}

.post-body p:last-child {
    margin-bottom: 0;
}

.post-body em {
    color: var(--color-text-muted);
    font-style: italic;
}

.post-footer {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border-soft);
}

/* Clickable post cards */

.entry-card-link,
.sketch-card-link,
.dispatch-card-link {
    display: contents;
    color: inherit;
    text-decoration: none;
}

.entry-card:has(.entry-card-link),
.sketch-card:has(.sketch-card-link),
.dispatch-card:has(.dispatch-card-link) {
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.entry-card:has(.entry-card-link):hover {
    border-color: rgba(212, 165, 116, 0.35);
    box-shadow: var(--shadow-card);
    transform: translateY(-1px);
}

.sketch-card:has(.sketch-card-link):hover,
.dispatch-card:has(.dispatch-card-link):hover {
    border-color: rgba(212, 165, 116, 0.35);
    box-shadow: var(--shadow-card);
}

.entry-read-more,
.timeline-read {
    display: inline-block;
    margin-top: var(--space-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-accent);
    text-decoration: none;
}

.entry-featured .entry-read-more {
    margin-top: var(--space-md);
}

.entry-read-more:hover,
.timeline-read:hover {
    color: var(--color-accent-hover);
}

.entry-card .entry-title,
.sketch-card h2,
.dispatch-card .entry-title {
    color: var(--color-text);
}

.entry-featured .entry-title a {
    color: var(--color-text);
    text-decoration: none;
}

.entry-featured .entry-title a:hover {
    color: var(--color-accent);
}

/* Responsive */

@media (max-width: 960px) {
    .site-sidebar {
        position: sticky;
        top: 0;
        width: 100%;
        height: auto;
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "brand toggle"
            "nav nav";
        align-items: center;
        padding: var(--space-sm) var(--space-md);
        gap: 0;
        border-right: none;
        border-bottom: 1px solid var(--color-border-soft);
        z-index: 200;
    }

    .sidebar-top {
        grid-area: brand;
        flex: unset;
        margin-bottom: 0;
        min-width: 0;
    }

    .logo {
        margin-bottom: 0;
        gap: var(--space-xs);
    }

    .logo-text {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sidebar-tagline {
        display: none;
    }

    .nav-toggle {
        grid-area: toggle;
        display: flex;
        margin: 0;
        flex-shrink: 0;
    }

    .site-sidebar.nav-open .nav-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .site-sidebar.nav-open .nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    .site-sidebar.nav-open .nav-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .primary-nav {
        grid-area: nav;
        display: none;
        width: 100%;
        order: unset;
        flex: unset;
        flex-direction: column;
        gap: 4px;
        margin-top: var(--space-sm);
        padding: var(--space-sm);
        background: var(--color-bg-raised);
        border: 1px solid var(--color-border-soft);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-card);
        max-height: min(70vh, 22rem);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .primary-nav.is-open,
    .site-sidebar.nav-open .primary-nav {
        display: flex;
    }

    .nav-link {
        border-left: none;
        padding: 0.7rem 0.85rem;
    }

    .nav-link[aria-current="page"] {
        border-left: none;
    }

    .sidebar-contact {
        display: none;
    }

    .site-main {
        margin-left: 0;
    }

    body.nav-open {
        overflow: hidden;
    }

    .home-intro {
        grid-template-columns: 1fr;
    }

    .intro-text {
        padding-right: 0;
    }

    .intro-aside {
        max-width: 20rem;
    }

    .writing-timeline::before {
        left: 4rem;
    }

    .timeline-item {
        grid-template-columns: 4rem 1fr;
        gap: var(--space-md);
    }

    .sketch-card,
    .sketch-card:nth-child(even) {
        grid-template-columns: 1fr;
    }

    .sketch-card:nth-child(even) .sketch-image {
        order: 0;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .content-split {
        grid-template-columns: 1fr;
    }

    .content-aside {
        position: static;
        max-width: 20rem;
    }

    .entry-card {
        grid-template-columns: 1fr;
    }

    .dispatch-card,
    .dispatch-card--reverse {
        grid-template-columns: 1fr;
    }

    .dispatch-card--reverse .dispatch-image {
        order: 0;
    }

    .archive-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .page {
        padding: var(--space-lg) var(--space-md) var(--space-xl);
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .writing-timeline::before {
        display: none;
    }

    .timeline-date {
        text-align: left;
    }

    .timeline-body {
        padding-left: 0;
    }

    .timeline-body::before {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .archive-list li {
        flex-direction: column;
        gap: 0.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
