/* ============================================
   Jake Rose — Subpage Styles
   Shared styling for all content subpages.
   Inherits theme variables from style.css.
   ============================================ */

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

/* --- Theme Variables (same as main site) --- */
:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Source Serif 4', Georgia, serif;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg: #fafaf9;
    --bg-alt: #f0efed;
    --surface: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #5a5a58;
    --accent: #d97706;
    --accent-hover: #b45309;
    --border: #e5e5e3;
    --code-bg: #f0efed;
}

[data-theme="dark"] {
    --bg: #0f0f0f;
    --bg-alt: #171717;
    --surface: #1c1c1c;
    --text: #e8e8e6;
    --text-secondary: #9a9a97;
    --accent: #f59e0b;
    --accent-hover: #fbbf24;
    --border: #2a2a2a;
    --code-bg: #1c1c1c;
}

/* --- Global --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 17px;
    max-width: 42em;
    margin: 0 auto;
    padding: 48px 24px 80px;
    transition: background var(--transition), color var(--transition);
    -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-top: 2em;
    margin-bottom: 0.6em;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
}

h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent);
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

p {
    margin-bottom: 1em;
    color: var(--text-secondary);
}

strong {
    color: var(--text);
    font-weight: 600;
}

i, em {
    color: var(--text-secondary);
}

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

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

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

li {
    margin-bottom: 0.6em;
    color: var(--text-secondary);
}

li strong {
    color: var(--text);
}

li::marker {
    color: var(--accent);
    font-weight: 600;
}

ul ul, ol ul, ul ol, ol ol {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* --- Code --- */
code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.85em;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    color: var(--accent);
}

pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    overflow-x: auto;
    margin-bottom: 1em;
}

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

/* --- Blockquote --- */
blockquote {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-left: 16px;
    border-left: 3px solid var(--accent);
    margin: 1.5em 0;
}

/* --- Back link --- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 32px;
    transition: color var(--transition);
}

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

/* --- Responsive --- */
@media (max-width: 480px) {
    body {
        font-size: 16px;
        padding: 32px 16px 64px;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.2rem;
    }
}
