/* ─────────────────────────────────────────────
   leobenedictus.co.uk — shared stylesheet
   Literary Minimal design
───────────────────────────────────────────── */

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

:root {
    --bg:     #faf9f6;
    --ink:    #1c1c1a;
    --mid:    #6b6b65;
    --rule:   #d8d5cc;
    --font:   'EB Garamond', Georgia, serif;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 20px;
    line-height: 1.65;
}

a { color: var(--ink); }

/* ── NAV ── */
nav {
    border-bottom: 1px solid var(--rule);
    padding: 0 5vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 100;
}

.nav-name {
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

.nav-links > li { position: relative; }

.nav-links a {
    color: var(--mid);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    transition: color 0.15s;
}

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

/* Books dropdown */
.nav-dropdown-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font);
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    color: var(--mid);
    cursor: pointer;
    transition: color 0.15s;
}

.nav-dropdown-btn:hover { color: var(--ink); }

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg);
    border: 1px solid var(--rule);
    min-width: 180px;
    padding: 12px 0 6px;
    z-index: 200;
}

.nav-links li:hover .nav-dropdown-menu { display: block; }

.nav-dropdown-menu a {
    display: block;
    padding: 9px 18px;
    font-size: 0.9rem;
    color: var(--mid);
    text-decoration: none;
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    color: var(--ink);
    background: rgba(0,0,0,0.03);
}

/* ── PAGE WRAPPER ── */
.page {
    max-width: 660px;
    margin: 0 auto;
    padding: 0 5vw;
}

/* ── HERO ── */
.hero {
    padding: 72px 0 0;
    text-align: center;
}

.hero-photo {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    margin-bottom: 28px;
    filter: grayscale(15%);
}

.hero h1 {
    font-size: 2.3rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-bottom: 10px;
}

.hero-tagline {
    color: var(--mid);
    font-style: italic;
    font-size: 1.15rem;
    margin-bottom: 56px;
}

/* ── SUBSTACK BLOCK ── */
.substack-block {
    border: 1px solid var(--rule);
    padding: 34px 38px;
    margin-bottom: 72px;
    text-align: center;
}

.substack-block h2 {
    font-size: 1.55rem;
    font-weight: 400;
    margin-bottom: 8px;
}

.substack-block .tagline {
    color: var(--mid);
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 26px;
}

/* latest post */
.latest-post {
    text-align: left;
    border-top: 1px solid var(--rule);
    padding-top: 18px;
    margin-bottom: 26px;
}

.latest-post-label {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mid);
    margin-bottom: 7px;
}

.latest-post-title {
    display: block;
    font-style: italic;
    font-size: 1.02rem;
    margin-bottom: 5px;
    color: var(--ink);
    text-decoration: none;
}

.latest-post-title:hover { text-decoration: underline; }

.latest-post-excerpt {
    font-size: 0.87rem;
    color: var(--mid);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* subscribe form */
.subscribe-form {
    display: flex;
    margin-bottom: 16px;
}

.subscribe-form input[type="email"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--rule);
    border-right: none;
    font-family: var(--font);
    font-size: 0.95rem;
    background: var(--bg);
    color: var(--ink);
    outline: none;
    border-radius: 0;
    -webkit-appearance: none;
}

.subscribe-form input[type="email"]:focus {
    border-color: var(--ink);
}

.subscribe-form button {
    padding: 10px 20px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--bg);
    font-family: var(--font);
    font-size: 0.95rem;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: opacity 0.15s;
    border-radius: 0;
}

.subscribe-form button:hover { opacity: 0.72; }

.substack-link {
    font-size: 0.84rem;
    color: var(--mid);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.substack-link:hover {
    color: var(--ink);
    text-decoration: underline;
}

/* ── SECTION ── */
.section {
    margin-bottom: 72px;
}

.section-rule {
    border: none;
    border-top: 1px solid var(--rule);
    margin-bottom: 36px;
}

.section-label {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mid);
    margin-bottom: 22px;
}

/* ── BODY TEXT ── */
.prose p {
    margin-bottom: 1em;
}

.prose a {
    color: var(--ink);
    text-decoration-color: var(--rule);
    text-underline-offset: 3px;
}

.prose a:hover { text-decoration-color: var(--ink); }

/* ── BOOKS GRID ── */
.books-grid {
    display: flex;
    gap: 40px;
}

.book-link {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: var(--ink);
}

.book-link img {
    width: 100%;
    max-width: 120px;
    box-shadow: 4px 6px 18px rgba(0,0,0,0.14);
    margin-bottom: 12px;
    transition: transform 0.2s;
}

.book-link:hover img { transform: translateY(-3px); }

.book-title {
    font-style: italic;
    font-size: 0.98rem;
    margin-bottom: 3px;
}

.book-year {
    font-size: 0.82rem;
    color: var(--mid);
}

/* ── BOOK PAGE ── */
.book-hero {
    padding: 64px 0 0;
    text-align: center;
}

.book-hero h1 {
    font-size: 2rem;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 6px;
}

.book-hero .book-meta {
    color: var(--mid);
    font-size: 0.92rem;
    margin-bottom: 40px;
}

.book-covers {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

.book-covers a img {
    height: 180px;
    width: auto;
    box-shadow: 4px 6px 20px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.book-covers a:hover img { transform: translateY(-3px); }

/* Reviews */
.reviews-intro {
    font-style: italic;
    color: var(--mid);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.review {
    padding: 20px 0;
    border-top: 1px solid var(--rule);
}

.review:last-child { border-bottom: 1px solid var(--rule); }

.review-text {
    font-size: 0.97rem;
    margin-bottom: 7px;
    line-height: 1.6;
}

.review-source {
    font-size: 0.82rem;
    color: var(--mid);
}

.review-source a {
    color: var(--mid);
    text-underline-offset: 2px;
}

.review-source a:hover { color: var(--ink); }

/* ── TOOLS PAGE ── */
.tools-placeholder {
    padding: 72px 0;
    text-align: center;
}

.tools-placeholder h1 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 16px;
}

.tools-placeholder p {
    color: var(--mid);
    font-style: italic;
    max-width: 420px;
    margin: 0 auto;
}

/* ── FOOTER ── */
footer {
    border-top: 1px solid var(--rule);
    text-align: center;
    padding: 28px 5vw;
    font-size: 0.84rem;
    color: var(--mid);
    margin-top: 48px;
}

footer a { color: var(--mid); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* ── RESPONSIVE ── */
@media (max-width: 560px) {
    .hero h1 { font-size: 1.85rem; }
    .nav-links { gap: 1.5rem; }
    .substack-block { padding: 26px 22px; }
    .books-grid { gap: 24px; }
    .book-covers a img { height: 140px; }
}

@media (max-width: 420px) {
    .books-grid { justify-content: center; }
}
