/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    /* The original site asked for 'Poiret+One' (an invalid name), so browsers fell back
       to their default serif font, Times New Roman. Use that explicitly. */
    font-family: "Times New Roman", Times, serif;
    font-size: large;
    line-height: 1.538;
    color: #434343;
    background: #fff;
}

a { color: #000; text-decoration: none; }
a:hover, a:focus-visible { color: purple; }

img { max-width: 100%; height: auto; }

h1, h2, h3 { font-weight: normal; }

.small-caps { font-variant: small-caps; }
.text-center { text-align: center; }

/* ---------- Layout: menu on the left, content on the right ----------
   Mirrors the original Orchard theme: a centred 960px page with a 360px menu column
   and a 600px content column, 60px of (empty) header space above, 12px column padding. */
.page {
    display: grid;
    grid-template-columns: 360px 600px;
    width: 960px;
    margin: 0 auto;
    padding: 60px 0 40px;
}

.site-nav { padding: 12px; align-self: start; }
.site-nav > * { width: 305px; }
.site-name { margin-top: 40px; }
.content { padding: 12px; min-width: 0; }

.site-name {
    font-size: 48px;
    line-height: 1.2;
    width: 280px;
}
.site-name hr { border: 0; border-top: 1px solid #999; margin: 0.4rem 0 0; }

.menu {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    text-align: right;
    font-size: 20px;
    width: 280px;
}
.menu li { margin: 0.15rem 0; }
/* Current page: same colour as the other items and not clickable, like the original. */
.menu a[aria-current="page"] { color: #000; pointer-events: none; cursor: default; }

/* Home page: name and menu sit lower, beside the large painting (as on the original site) */
.home .site-name { margin-top: 200px; }
.home .hero { display: block; margin-left: -20px; }

/* ---------- Text pages (Books, Poetry, Reflections, Biography) ---------- */
.text-page ul { list-style: none; padding-left: 1.5rem; }
.book-list li { font-style: italic; }

.portrait { float: left; width: 200px; margin: 0.4rem 15px 0.5rem 0; }

.reflections h2 { font-size: 1.5rem; }

/* Poetry: each poem keeps its original markup from the old site */
#poetry > div { margin-bottom: 2.5rem; }
.poetryHeader { height: 40px; }

/* Books */
.book { display: flow-root; margin-bottom: 1.75rem; font-style: italic; }
.book img { float: left; padding-right: 15px; border: none; }
.book p { margin: 0.25rem 0 0; }

/* Press coverage: two-column grid of article thumbnails */
.press {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 260px));
    gap: 30px;
}
.press img { width: 260px; transition: opacity 0.2s; }
.press a:hover img { opacity: 0.8; }

/* ---------- Art Work ---------- */
.artwork { margin-left: 60px; }
.artwork h2 { font-size: 20px; margin: 0 0 1rem; }
.artwork h3 { font-size: 15px; margin: 0 0 1rem; }
.artwork-row { display: flex; justify-content: space-between; gap: 3rem; flex-wrap: wrap; margin-top: 3rem; max-width: 640px; }
.gallery-group { margin-bottom: 1rem; }

.gallery-cover {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.gallery-cover img { display: block; transition: opacity 0.2s, transform 0.2s; }
.gallery-cover:hover img, .gallery-cover:focus-visible img { opacity: 0.85; transform: scale(1.02); }

/* ---------- Lightbox ---------- */
.lightbox {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.94);
    color: #eee;
}
.lightbox[open] {
    display: grid;
    grid-template-columns: 64px 1fr 64px;
    grid-template-rows: 1fr auto;
    align-items: center;
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.94); }

.lightbox figure {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding-top: 40px;
}
.lb-image { max-height: calc(100vh - 220px); max-width: 100%; object-fit: contain; }
.lb-caption { margin-top: 0.75rem; font-size: 1.25rem; text-align: center; min-height: 1.6em; }

.lightbox button {
    background: none;
    border: 0;
    color: #ddd;
    cursor: pointer;
    font-size: 3rem;
    line-height: 1;
}
.lightbox button:hover, .lightbox button:focus-visible { color: #fff; }
.lb-prev { grid-column: 1; grid-row: 1; }
.lb-next { grid-column: 3; grid-row: 1; }
.lb-close { position: absolute; top: 8px; right: 16px; font-size: 2.5rem !important; }
.lb-counter { position: absolute; top: 16px; left: 20px; font-size: 1rem; color: #aaa; }

.lb-thumbs {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 10px;
    justify-content: safe center;
}
.lb-thumbs img {
    height: 70px;
    width: auto;
    max-width: none;
    opacity: 0.5;
    cursor: pointer;
    border: 2px solid transparent;
}
.lb-thumbs img.active { opacity: 1; border-color: #fff; }
.lb-thumbs img:hover { opacity: 0.9; }

/* ---------- Small screens: menu on top ---------- */
@media (max-width: 980px) {
    .page { grid-template-columns: 1fr; width: auto; gap: 1.5rem; padding: 20px 16px; }
    .site-nav { padding: 0; }
    .site-nav > * { width: auto; }
    .site-name, .home .site-name { margin-top: 0; font-size: 36px; width: auto; }
    .menu { text-align: left; width: auto; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
    .home .hero { margin-left: 0; }
    .artwork { margin-left: 0; }
    .press { grid-template-columns: minmax(0, 260px); }
    .book img { max-width: 120px; }
    .lightbox[open] { grid-template-columns: 40px 1fr 40px; }
    .lb-thumbs img { height: 50px; }
}
