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

:root {
    --color-bg: #F9F8F6;
    --color-text: #2C2825;
    --color-text-light: #5A534B;
    --color-muted: #8B8078;
    --color-link: #8B4513;
    --color-link-hover: #6B3410;
    --color-border: #ddd;
    --font-serif: Georgia, 'Times New Roman', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Courier New', monospace;
    --max-width: 800px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-serif);
    font-size: 17px;
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-bg);
    padding: 2rem;
}

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

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

/* Main container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Header */
header {
    margin-bottom: 0;
    padding-bottom: 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.header-text h1 {
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.header-text .tagline {
    color: var(--color-muted);
    font-size: 1rem;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.nav-links a {
    font-family: var(--font-sans);
    margin-right: 1.5rem;
    color: var(--color-text);
    font-size: 0.85rem;
}

.nav-links a:hover {
    color: var(--color-link);
}

.nav-social {
    display: flex;
    gap: 0.75rem;
}

.nav-social a {
    color: var(--color-text-light);
    display: flex;
    align-items: center;
}

.nav-social a:hover {
    color: var(--color-text);
}

.nav-social .support-link {
    background: var(--color-link);
    color: white !important;
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: var(--font-sans);
    gap: 0.35rem;
    transition: background 0.2s;
}

.nav-social .support-link:hover {
    background: #6B3410;
    color: white !important;
}

.nav-social .support-link svg {
    width: 14px;
    height: 14px;
}

/* About section */
.about-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.about-text {
    flex: 1;
}

.about-image {
    flex-shrink: 0;
    width: 150px;
}

.about-image img {
    width: 100%;
    height: auto;
}

/* Sections */
section {
    margin-bottom: 1rem;
    padding-top: 0.5rem;
}

section:first-of-type {
    padding-top: 0;
}

section h2 {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-muted);
    margin-bottom: 1rem;
}

section p {
    margin-bottom: 1rem;
}

/* Book sidebar - now inline */
.book-list {
    display: flex;
    gap: 1.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.book-item {
    text-align: center;
    width: 120px;
}

.book-item img {
    width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin-bottom: 0.5rem;
}

.book-item a {
    font-size: 0.85rem;
    display: block;
}

/* About images */
.about-images {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.about-images img {
    width: 150px;
    height: auto;
}

/* Random picture */
.random-picture {
    text-align: center;
    margin: 1.5rem 0;
}

.random-picture img {
    max-width: 100%;
    max-height: 400px;
    height: auto;
}

.new-picture-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--color-text);
    color: var(--color-bg);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.new-picture-btn:hover {
    background: #333;
}

/* Books section */
.book-entry {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    max-width: 80%;
}

.book-entry:last-child {
    border-bottom: none;
}

.book-cover {
    flex-shrink: 0;
}

.book-cover img {
    width: 100px;
    height: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-cover:hover img {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.book-info {
    flex: 1;
}

.book-entry h3 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.book-info p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.book-year {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.book-quote {
    font-style: italic;
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-top: 0.75rem;
}

.book-attribution {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* Video grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #f0f0f0;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Film list */
.film-list {
    margin: 1rem 0;
}

.film-entry {
    margin-bottom: 1rem;
}

.film-entry h3 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.film-entry p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* Writing list */
.writing-entry {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    max-width: 80%;
}

.writing-entry:last-child {
    border-bottom: none;
}

.writing-entry h3 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.writing-entry h3 a {
    color: var(--color-text);
    text-decoration: none;
}

.writing-entry h3 a:hover {
    color: var(--color-link);
}

.writing-entry p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.writing-entry.divider {
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

/* Listening list */
.listening-entry {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    max-width: 80%;
}

.listening-entry:last-child {
    border-bottom: none;
}

.listening-entry h3 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.listening-entry h3 a {
    color: var(--color-text);
    text-decoration: none;
}

.listening-entry h3 a:hover {
    color: var(--color-link);
}

.listening-entry p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* Contact form */
.contact-form {
    max-width: 400px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    font-family: var(--font-main);
    font-size: 1rem;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.submit-btn {
    padding: 0.5rem 1.5rem;
    background: var(--color-text);
    color: var(--color-bg);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.submit-btn:hover {
    background: #333;
}

.footer-image {
    margin-top: 2rem;
    max-width: 100%;
    height: auto;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
    color: var(--color-text-light);
}

footer a {
    color: var(--color-text);
}

/* Links section */
.links {
    margin: 1rem 0;
}

.links a {
    display: inline-block;
    margin-right: 1.5rem;
}

/* Christmas cards link */
.section-link {
    margin: 1rem 0;
}

/* Mobile */
@media (max-width: 600px) {
    body {
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-photo {
        width: 100px;
        height: 100px;
    }

    .header-text h1 {
        font-size: 1.5rem;
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .nav-links a {
        margin-right: 1rem;
        font-size: 0.85rem;
    }

    .about-content {
        flex-direction: column;
    }

    .about-image {
        order: -1;
        width: 100%;
        height: 150px;
    }

    .book-list {
        justify-content: center;
    }

    .about-images {
        justify-content: center;
    }

    .about-images img {
        width: 120px;
    }

    .book-entry {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .book-cover img {
        width: 80px;
    }
}
