:root {
    color-scheme: light;
    font-family: Arial, sans-serif;
    color: #303a38;
    background: #f6f3ee;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    --ink: #303a38;
    --muted: #7a817c;
    --accent: #537a6a;
    --line: #e7e4dd;
    --paper: #fffefa;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 32px;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
}

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

.site-layout {
    width: min(1240px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    background: var(--paper);
    box-shadow: 0 0 60px rgb(48 58 56 / 5%);
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 520px;
    padding: 38px 24px 28px;
    border-right: 1px solid var(--line);
    background: #fbfaf7;
}

.site-brand {
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    text-decoration: none;
}

.site-brand span {
    color: var(--accent);
}

.sidebar-caption {
    margin: 8px 0 38px;
    color: var(--muted);
    font-size: 0.82rem;
}

.post-navigation {
    display: grid;
    gap: 10px;
}

.post-link {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    padding: 13px 10px;
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    transition: background-color 160ms ease;
}

.post-link:hover,
.post-link:focus-visible {
    background: #efeee8;
}

.post-number {
    padding-top: 2px;
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.post-link-copy {
    display: grid;
    gap: 6px;
}

.post-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.post-link time {
    color: var(--muted);
    font-size: 0.73rem;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.88rem;
    font-style: italic;
}

.main-content {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    padding: 68px clamp(28px, 7vw, 86px) 56px;
}

.page-heading {
    margin-bottom: 44px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
}

h1 {
    font-size: clamp(2rem, 4vw, 3.1rem);
    letter-spacing: -0.045em;
    line-height: 1.12;
}

.page-intro {
    margin: 15px 0 0;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.7;
}

.post {
    scroll-margin-top: 32px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 0.76rem;
}

.post-meta span {
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.post-meta time {
    padding-left: 12px;
    border-left: 1px solid #d7d4cc;
}

.letter {
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.letter p,
.section-intro,
.contact-section p,
.contact-section address {
    color: #4d5652;
    font-size: 0.98rem;
    line-height: 1.85;
}

.letter p {
    margin: 0 0 18px;
}

.letter p:last-child {
    margin-bottom: 0;
}

.letter .letter-greeting,
.letter .letter-signoff {
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
    font-weight: 700;
}

.photos-post {
    margin-top: 56px;
    padding-top: 36px;
    border-top: 1px solid var(--line);
}

.photos-post h2,
.contact-section h2 {
    font-size: 1.75rem;
    letter-spacing: -0.025em;
}

.section-intro {
    margin: 10px 0 20px;
    color: var(--muted);
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    gap: 16px;
}

.photo-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fafbf8;
    object-position: top;
}

.photo-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 180ms ease;
}

.photo-link:hover img,
.photo-link:focus-visible img {
    transform: scale(1.04);
}

.photo-link:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.photo-lightbox {
    position: fixed;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 56px 24px 24px;
    border: 0;
    background: rgb(19 23 21 / 94%);
    overflow: hidden;
}

.photo-lightbox[open] {
    display: grid;
    place-items: center;
}

.photo-lightbox::backdrop {
    background: rgb(19 23 21 / 88%);
}

.lightbox-image {
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 80px);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 55%);
    border-radius: 50%;
    background: rgb(255 255 255 / 12%);
    color: white;
    font-size: 1.8rem;
    line-height: 1;
}

.lightbox-close:hover {
    background: rgb(255 255 255 / 24%);
}

.contact-section {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--line);
}

.contact-section h2 {
    margin-bottom: 18px;
}

.contact-section p {
    margin: 8px 0;
}

.contact-section address {
    margin: 8px 0;
    font-style: normal;
}

.contact-section a {
    text-decoration-color: #c6d5cc;
    text-underline-offset: 3px;
}

@media (max-width: 760px) {
    .site-layout {
        display: block;
    }

    .sidebar {
        position: static;
        height: auto;
        min-height: 0;
        padding: 22px 24px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .sidebar-caption {
        margin-bottom: 16px;
    }

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

    .post-link {
        padding: 10px 6px;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        padding: 42px 24px;
    }
}

@media (max-width: 420px) {
    .post-navigation {
        grid-template-columns: 1fr;
    }

    .post-link {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .main-content {
        padding-right: 18px;
        padding-left: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
