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

:root {
    --bg: #e8edf3;
    --surface: #f8fafc;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #cbd5e1;
    --accent: #0f766e;
    --accent-soft: #ccfbf1;
    --surface-hover: #e2e8f0;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --sans: "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.shell {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Top bar */
.top {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}

.top__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}

.brand {
    font-family: var(--serif);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.brand:hover {
    color: var(--accent);
    text-decoration: none;
}

.menu {
    display: flex;
    gap: 1.25rem;
    font-size: 0.875rem;
}

.menu a {
    color: var(--muted);
}

.menu a:hover {
    color: var(--ink);
}

/* Layout */
.layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2.5rem 0 4rem;
}

@media (max-width: 899px) {
    .shell {
        width: 80%;
        max-width: none;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (min-width: 900px) {
    .layout {
        grid-template-columns: minmax(0, 1fr) 280px;
        align-items: start;
    }
}

/* Masthead */
.mast {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 0.5rem;
}

.mast__kicker {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    display: inline-block;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.mast h1 {
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.03em;
    max-width: 18ch;
    margin-bottom: 1rem;
}

.mast__sub {
    color: var(--muted);
    font-size: 1.0625rem;
    max-width: 42ch;
}

/* Feed */
.feed__title {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.entry {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.5rem 1.5rem 1.25rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.entry:hover {
    border-color: var(--surface-hover);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.entry__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.8125rem;
    color: var(--muted);
    margin-bottom: 0.65rem;
}

.entry__tag {
    color: var(--accent);
    font-weight: 500;
}

.entry h2 {
    font-family: var(--serif);
    font-size: 1.375rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.entry h2 a {
    color: var(--ink);
}

.entry h2 a:hover {
    color: var(--accent);
    text-decoration: none;
}

.entry p {
    color: var(--muted);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.entry__more {
    font-size: 0.8125rem;
    font-weight: 500;
}

/* Full posts */
.article {
    scroll-margin-top: 5rem;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--line);
}

.article:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.article h2 {
    font-family: var(--serif);
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.25;
}

.article time {
    display: block;
    font-size: 0.8125rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.article p {
    margin-bottom: 1rem;
    max-width: 65ch;
}

.article__back {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--muted);
}

/* Sidebar */
.aside {
    position: sticky;
    top: 5rem;
}

.aside__box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.aside__box h3 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.aside__box p,
.aside__box li {
    font-size: 0.875rem;
    color: var(--muted);
}

.aside__box ul {
    list-style: none;
}

.aside__box li {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--line);
}

.aside__box li:last-child {
    border-bottom: none;
}

.aside__box a {
    color: var(--ink);
}

.profile {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.profile__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5eead4, var(--accent));
    flex-shrink: 0;
}

.profile__name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--ink);
}

.profile__role {
    font-size: 0.8125rem;
    color: var(--muted);
}

/* Footer */
.foot {
    border-top: 1px solid var(--line);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--muted);
    background: var(--surface);
}
