/* Blog stylesheet for alexanderhoyle.com */

/* ---- Base ---- */
html {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.65;
    color: #2c2c2c;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0;
    padding: 0;
    background: #fafaf8;
}

/* ---- Layout ---- */
.blog-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* ---- Navigation ---- */
.blog-nav {
    text-align: center;
    padding: 1.5rem 0 0.5rem;
    font-size: 0.9rem;
}

.blog-nav a {
    color: #555;
    text-decoration: none;
    margin: 0 0.5rem;
}

.blog-nav a:hover {
    color: #1a5276;
}

/* ---- Header ---- */
.blog-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ddd;
}

.blog-header h1 {
    font-size: 2rem;
    line-height: 1.25;
    margin: 0 0 0.5rem;
    color: #1a1a1a;
    font-weight: 700;
}

.blog-header .date {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
}

/* ---- Prose ---- */
.blog-content p {
    margin: 0 0 1.25rem;
}

.blog-content a {
    color: #1a5276;
    text-decoration: underline;
    text-decoration-color: #b0c4d8;
    text-underline-offset: 2px;
}

.blog-content a:hover {
    text-decoration-color: #1a5276;
}

/* ---- Headings ---- */
.blog-content h2 {
    font-size: 1.45rem;
    margin: 2.5rem 0 1rem;
    color: #1a1a1a;
    font-weight: 700;
}

.blog-content h3 {
    font-size: 1.15rem;
    margin: 2rem 0 0.75rem;
    color: #333;
    font-weight: 600;
}

/* ---- TL;DR box ---- */
.tldr {
    background: #f0f4f7;
    border-left: 3px solid #1a5276;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    line-height: 1.55;
    border-radius: 0 4px 4px 0;
}

.tldr strong {
    color: #1a5276;
}

/* ---- Blockquote (for LLM prompts, etc.) ---- */
.blog-content blockquote {
    background: #f5f5f0;
    border-left: 3px solid #999;
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    font-size: 0.92rem;
    color: #444;
    border-radius: 0 4px 4px 0;
}

.blog-content blockquote p:last-child {
    margin-bottom: 0;
}

/* ---- Lists ---- */
.blog-content ul, .blog-content ol {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

/* ---- Figures & images ---- */
.blog-content figure {
    margin: 2rem 0;
    text-align: center;
}

.blog-content figure img,
.blog-content figure video {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.blog-content figcaption {
    font-size: 0.85rem;
    color: #777;
    margin-top: 0.5rem;
    font-style: italic;
    line-height: 1.4;
}

/* ---- Embedded slides (iframes) ---- */
.slide-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 2rem 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.slide-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ---- PDF embeds ---- */
.pdf-embed {
    width: 100%;
    height: 500px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 1.5rem 0;
}

/* ---- Clipart decorations ---- */
.clipart {
    display: block;
    margin: 2rem auto;
    max-width: 100px;
    opacity: 0.7;
}

.clipart-inline {
    display: inline-block;
    max-height: 60px;
    vertical-align: middle;
    opacity: 0.7;
    margin: 0 0.5rem;
}

/* ---- Footnotes ---- */
.footnote-ref {
    font-size: 0.75em;
    vertical-align: super;
    line-height: 0;
    text-decoration: none;
    color: #1a5276;
}

.footnotes {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
}

.footnotes ol {
    padding-left: 1.25rem;
}

.footnotes li {
    margin-bottom: 0.75rem;
}

.footnotes .back {
    text-decoration: none;
    color: #1a5276;
    margin-left: 0.25rem;
}

/* ---- Horizontal rule ---- */
.blog-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, red 20%, yellow 20%, yellow 36%, green 36%, green 60%, blue 60%, blue 100%);
    opacity: 0.4;
    margin: 2.5rem 0;
}

/* ---- Wide content (breaks out of narrow column) ---- */
.wide {
    margin-left: -10%;
    margin-right: -10%;
    max-width: 120%;
}

/* ---- Responsive ---- */
@media (max-width: 720px) {
    html {
        font-size: 16px;
    }

    .blog-container {
        padding: 1rem 1rem 3rem;
    }

    .blog-header h1 {
        font-size: 1.6rem;
    }

    .wide {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }

    .pdf-embed {
        height: 350px;
    }
}
