/* ============================================
   Base — Fonts, Reset, Typography
   ============================================ */

/* Fonts are handled by Ghost Brand editor via ghost_head */

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

html {
    font-size: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
}

/* Headlines */
h1, h2, h3 {
    font-family: var(--font-headline);
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-text);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    letter-spacing: -0.01em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    margin-top: 3rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1.25rem;
}

/* Links */
a {
    color: var(--color-terracotta);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-sienna);
}

/* Content links within post bodies */
.post-content a {
    border-bottom: 1px solid rgba(184, 74, 40, 0.25);
    transition: color var(--transition-base), border-color var(--transition-base);
}

.post-content a:hover {
    border-bottom-color: var(--color-sienna);
}

/* Lists */
ul, ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

li {
    margin-bottom: 0.35rem;
}

/* Blockquotes */
blockquote {
    border-left: 3px solid var(--color-sandstone);
    padding-left: 1.25rem;
    margin: 2rem 0;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Horizontal rules */
hr {
    border: none;
    border-top: 1px solid var(--color-border-strong);
    margin: 3rem 0;
}

/* Selection */
::selection {
    background: rgba(184, 74, 40, 0.15);
    color: var(--color-text);
}

/* Focus visible for keyboard nav */
:focus-visible {
    outline: 2px solid var(--color-terracotta);
    outline-offset: 3px;
}

/* Images (rare, but handle gracefully) */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Code blocks if Ghost editor uses them */
code {
    font-size: 0.9em;
    background: var(--color-bg-elevated);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: var(--color-sandstone);
}

pre {
    background: var(--color-bg-elevated);
    padding: 1.25rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

pre code {
    background: none;
    padding: 0;
}
