/* andybridson.com — shared design system ("Ab" identity) */

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

:root {
    --ink:    #1a1918;
    --rust:   #c84b18;
    --ground: #f0ebe3;
    --muted:  #7a746c;
    --border: #ddd7ce;
    --code-bg: rgba(26, 25, 24, 0.05);
}

html { font-size: 16px; }

body {
    background: var(--ground);
    color: var(--ink);
    font-family: 'Inter', -apple-system, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: inherit; text-decoration: none; }

/* ── NAV ── */
.nav {
    border-bottom: 1px solid var(--border);
}

.nav__inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2.5rem;
}

.nav__brand {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
}
.nav__brand span { color: var(--rust); }

.nav__toggle {
    display: none;
    background: none;
    border: none;
    color: var(--ink);
    cursor: pointer;
    padding: 0.25rem;
}

.nav__list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
}
.nav__list a { color: var(--muted); transition: color 0.15s; }
.nav__list a:hover,
.nav__list a.is-current { color: var(--ink); }

/* ── LAYOUT PRIMITIVES ── */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

.section { padding: 3.5rem 0; }
.section .container { padding: 0 2.5rem; }

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0 2.5rem;
}

.eyebrow,
.section__label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rust);
    margin-bottom: 1.75rem;
}

.h-display {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.95;
}
.h-display em { font-style: normal; color: var(--rust); }

.lead {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--muted);
    max-width: 460px;
    line-height: 1.6;
    margin-top: 1.25rem;
}

/* ── PAGE HEADER (Writing hub / About) ── */
.page-header {
    padding-top: 4rem;
    padding-bottom: 1rem;
}

/* ── HERO (home) ── */
.hero {
    padding: 5rem 2.5rem 4rem;
    max-width: 900px;
    margin: 0 auto;
}

.hero__name {
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.92;
    margin-bottom: 1.75rem;
}
.hero__name em { font-style: normal; color: var(--rust); }

.hero__sub {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--muted);
    max-width: 460px;
    line-height: 1.6;
    margin-bottom: 2.25rem;
}

.hero__links { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.btn {
    display: inline-block;
    padding: 0.65rem 1.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-radius: 2px;
    transition: opacity 0.15s;
}
.btn:hover { opacity: 0.75; }
.btn--primary { background: var(--ink); color: var(--ground); }
.btn--ghost { border: 1.5px solid var(--border); color: var(--muted); }

/* ── POSTS GRID (home teaser) ── */
.posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.post {
    background: var(--ground);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: background 0.15s;
}
.post:hover { background: #e8e2da; }

.post__tag {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rust);
}

.post__title {
    font-size: 0.975rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.post__date {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: auto;
    padding-top: 0.25rem;
}

.posts__more { margin-top: 1.25rem; font-size: 0.82rem; color: var(--muted); }
.posts__more a { color: var(--rust); font-weight: 600; }
.posts__more a:hover { text-decoration: underline; text-underline-offset: 3px; }

.link-accent { color: var(--rust); font-weight: 600; }

.lead--inline { margin-top: 0; max-width: 60ch; }

/* ── STREAM / POST LIST (Writing hub) ── */
.stream + .stream { margin-top: 3rem; }

.stream__label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rust);
    margin-bottom: 1.25rem;
}

.post-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}

.post-list__item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.5rem 1.75rem;
    transition: background 0.15s;
}
.post-list__item + .post-list__item { border-top: 1px solid var(--border); }
.post-list__item:hover { background: #e8e2da; }

.post-list__title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.post-list__dek {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.55;
    max-width: 60ch;
}

.post-list__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.post-list__empty {
    padding: 1.75rem;
    color: var(--muted);
    font-size: 0.9rem;
    border: 1px dashed var(--border);
}

/* ── ABOUT ── */
.about {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3.5rem;
    align-items: start;
}

.about__mark {
    font-size: clamp(4rem, 12vw, 7.5rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 0.85;
    user-select: none;
}
.about__mark span { color: var(--rust); }

.about__body p { font-size: 0.975rem; line-height: 1.7; color: var(--muted); }
.about__body p + p { margin-top: 0.9em; }

/* ── ARTICLE (blog post body) ── */
.article {
    flex: 1;
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(2.4rem, 6vw, 4rem) 2.5rem clamp(2.5rem, 6vw, 4rem);
}

.article__back {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 1.75rem;
}
.article__back:hover { color: var(--ink); }

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0 0 1.4rem;
}

.post-title {
    font-size: clamp(1.95rem, 4.6vw, 2.7rem);
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin: 0 0 1rem;
}

.dek {
    font-size: clamp(1.1rem, 2.2vw, 1.25rem);
    font-weight: 400;
    color: var(--muted);
    line-height: 1.4;
    letter-spacing: -0.01em;
    margin: 0 0 2.4rem;
}

.article h2 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.022em;
    line-height: 1.25;
    margin: 2.6rem 0 1rem;
}

.article p { margin: 0 0 1.4rem; line-height: 1.62; }

.article ul { margin: 0 0 1.4rem; padding-left: 1.4rem; }
.article li { margin-bottom: 0.4rem; }

.article a { color: var(--rust); text-decoration: none; }
.article a:hover { text-decoration: underline; text-underline-offset: 4px; }

.article code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.92em;
    background: var(--code-bg);
    padding: 0.12em 0.36em;
    border-radius: 5px;
}

.article pre {
    background: var(--code-bg);
    padding: 1rem 1.2rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.86rem;
    line-height: 1.5;
    margin: 0 0 1.6rem;
    -webkit-overflow-scrolling: touch;
}

.article pre code {
    background: transparent;
    padding: 0;
    font-size: inherit;
    border-radius: 0;
}

.post-end {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 2.6rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--border);
}
.post-end a { color: var(--muted); }
.post-end a:hover { color: var(--ink); text-decoration: none; }

/* ── FOOTER ── */
.footer {
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.footer__inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.75rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--muted);
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.footer__links { display: flex; gap: 1.25rem; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--ink); }

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
    .nav__toggle { display: block; }
    .nav__list {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: var(--ground);
        border-bottom: 1px solid var(--border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.2s ease;
    }
    .nav__list.is-open { max-height: 240px; }
    .nav__list li { width: 100%; }
    .nav__list a { display: block; padding: 0.9rem 2.5rem; width: 100%; }
    .nav { position: relative; }
}

@media (max-width: 600px) {
    .nav__inner { padding: 1.25rem; }
    .hero { padding: 3rem 1.25rem 2.5rem; }
    .container { padding: 0 1.25rem; }
    .section .container { padding: 0 1.25rem; }
    hr { margin: 0 1.25rem; }
    .about { grid-template-columns: 1fr; gap: 1.5rem; }
    .footer__inner { padding: 1.5rem 1.25rem; }
    .article { padding: 2.75rem 1.25rem; }
}
