:root {
    --background: #292522;
    --text: #c9c2bd;
    --heading: #f0ece9;
    --muted: #8f8883;
    --muted-strong: #aaa29d;
    --border: #514b47;
    --field: #2d2926;
    --button: #5b5652;
    --button-text: #f2efed;
    --content-width: 610px;
    --serif: Georgia, Cambria, "Times New Roman", serif;
    --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--background); }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.66;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration-color: #99918c;
    text-underline-offset: 2px;
    transition: color .18s ease, text-decoration-color .18s ease;
}
a:hover { color: var(--heading); text-decoration-color: var(--heading); }

.site-shell {
    width: min(930px, calc(100% - 48px));
    margin: 0 auto;
    padding: 64px 0 76px;
    display: grid;
    grid-template-columns: 120px minmax(0, var(--content-width));
    column-gap: 0;
    justify-content: center;
    align-items: start;
}

.site-rail {
    position: sticky;
    top: 48px;
    min-height: 160px;
    padding-top: 0;
}

.profile-link {
    display: inline-flex;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    text-decoration: none;
    background: #1c1917;
}
.profile-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-placeholder {
    width: 100%; height: 100%; display: grid; place-items: center;
    color: var(--heading); font: 700 18px/1 var(--sans);
}

.side-nav {
    margin-top: 42px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 600;
}
.side-nav a {
    color: #817a76;
    text-decoration: none;
    line-height: 1.65;
}
.side-nav a:hover, .side-nav a.active { color: var(--heading); }
.side-nav .admin-shortcut { margin-top: 14px; font-size: 12px; color: #b69c78; }

.site-main { width: 100%; min-width: 0; }
.home-head { margin: 0 0 38px; }
.home-head h1,
.page-head h1 {
    margin: 0;
    color: var(--heading);
    font-family: var(--sans);
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
}
.home-intro { margin-top: 40px; }
.home-intro p { margin: 0; }

.page-head { margin: 0 0 42px; }
.page-head p {
    margin: 1px 0 0;
    color: var(--muted-strong);
    font-family: var(--sans);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 600;
}

.content-section {
    position: relative;
    margin: 0 0 42px;
    padding-right: 0;
}
.content-section > h2 {
    margin: 0 0 22px;
    color: var(--heading);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
}
.content-section p { margin: 0 0 22px; }
.content-section ul { margin: 0 0 22px; padding-left: 31px; }
.content-section li { padding-left: 3px; margin-bottom: 8px; }
.content-section li::marker { color: #625b57; }

.home-section { margin-bottom: 44px; }
.home-section + .home-section { margin-top: 36px; }

.section-label {
    position: absolute;
    right: -64px;
    top: 0;
    color: #9b938e;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: .02em;
}

.portfolio-group { margin-bottom: 52px; }
.portfolio-entry { margin-bottom: 45px; }
.portfolio-entry:last-child { margin-bottom: 0; }
.entry-title {
    margin: 0 0 20px;
    color: var(--heading);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
}
.entry-title .secondary { color: #aaa29d; font-weight: 600; }
.entry-title a { text-decoration: none; }
.entry-body p { margin: 0; }
.entry-body p + p { margin-top: 17px; }
.entry-meta { color: var(--muted); font-style: italic; }
.empty-state { color: var(--muted); }

.posts-list { margin-top: 0; }
.post-row {
    position: relative;
    min-height: 146px;
    margin-bottom: 28px;
    padding: 0 84px 0 0;
}
.post-row:last-child { margin-bottom: 0; }
.post-title {
    margin: 0 0 18px;
    color: var(--heading);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.45;
    font-weight: 700;
}
.post-title a { text-decoration: none; }
.post-summary {
    margin: 0;
    max-width: 100%;
    min-height: calc(1.66em * 2);
}
.post-date {
    position: absolute;
    right: 0;
    top: 3px;
    color: #9f9792;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
}

.letter-copy { margin-bottom: 58px; }
.letter-copy p { margin: 0 0 25px; }
.subscribe-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: stretch;
    margin: 0 0 62px;
}
.input-wrap { position: relative; }
.input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #a29a95;
    font-family: var(--sans);
    font-size: 15px;
}
.subscribe-form input {
    width: 100%;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
    padding: 0 14px 0 40px;
    background: var(--field);
    color: var(--heading);
    font: 13px/1 var(--sans);
}
.subscribe-form input:focus { border-color: #77706b; }
.subscribe-form button {
    height: 38px;
    border: 0;
    border-radius: 5px;
    padding: 0 16px;
    background: var(--button);
    color: var(--button-text);
    font: 700 13px/1 var(--serif);
    cursor: pointer;
}
.subscribe-form button:hover { background: #68625e; }
.form-message {
    margin: -37px 0 42px;
    color: #b9b2ad;
    font-size: 14px;
}
.form-message.error { color: #d5a9a3; }

.article { position: relative; }
.article-title {
    margin: 0 0 8px;
    color: var(--heading);
    font-family: var(--sans);
    font-size: 24px;
    line-height: 1.25;
}
.article-meta {
    margin-bottom: 36px;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 13px;
}
.article-image { width: 100%; height: auto; display: block; margin: 0 0 34px; }
.article-body { font-family: var(--serif); font-size: 17px; line-height: 1.72; }
.article-body p { margin: 0 0 24px; }
.article-back { display: inline-block; margin-top: 22px; font-family: var(--sans); font-size: 13px; }

.site-footer {
    margin-top: 86px;
    color: #b0a9a4;
    font-family: var(--sans);
    font-size: 12px;
    line-height: 1.35;
}
.site-footer p { margin: 19px 0 0; }
.footer-copy p { margin: 0; }
.site-footer a { font-weight: 700; }

@media (max-width: 820px) {
    .site-shell {
        width: min(760px, calc(100% - 36px));
        grid-template-columns: 108px minmax(0, 610px);
        justify-content: center;
        padding-top: 46px;
    }
    .section-label { right: -42px; }
}

@media (max-width: 640px) {
    body { font-size: 15px; line-height: 1.64; }
    .site-shell {
        width: calc(100% - 32px);
        display: block;
        padding: 30px 0 50px;
    }
    .site-rail {
        position: static;
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 34px;
    }
    .profile-link { width: 43px; height: 43px; }
    .side-nav {
        margin: 0;
        flex-direction: row;
        align-items: center;
        gap: 15px;
        font-size: 13px;
    }
    .side-nav .admin-shortcut { display: none; }
    .home-head, .page-head { margin-bottom: 38px; }
    .home-intro { margin-top: 24px; }
    .page-head p { font-size: 18px; }
    .content-section { margin-bottom: 42px; }
    .section-label {
        position: static;
        display: block;
        margin: 0 0 16px;
        writing-mode: horizontal-tb;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: .08em;
    }
    .post-row {
        min-height: 132px;
        margin-bottom: 30px;
        padding-right: 48px;
    }
    .post-title { margin-bottom: 13px; font-size: 15px; }
    .post-summary { min-height: calc(1.64em * 2); }
    .post-date {
        position: absolute;
        right: 2px;
        top: 2px;
        display: block;
        margin: 0;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        font-size: 13px;
        text-transform: none;
        letter-spacing: .02em;
    }
    .subscribe-form { grid-template-columns: 1fr; }
    .subscribe-form button { width: 100%; }
    .site-footer { margin-top: 64px; }
}

@media (max-width: 390px) {
    .site-shell { width: calc(100% - 24px); }
    .side-nav { gap: 11px; font-size: 12px; }
    .post-row { padding-right: 42px; }
}
