/* Van en Van: static archive stylesheet */

:root {
    --bg: #faf7f2;
    --surface: #ffffff;
    --text: #2b2622;
    --muted: #7a6f66;
    --rule: #e7dfd3;
    --accent: #b4492f;
    --accent-ink: #ffffff;
    --shadow: 0 1px 2px rgba(60, 40, 20, .08), 0 8px 24px rgba(60, 40, 20, .08);
    --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --display: "Fraunces", Georgia, "Times New Roman", serif;
    --ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --measure: 46rem;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #171512;
    --surface: #201d19;
    --text: #e9e3da;
    --muted: #a0968b;
    --rule: #34302a;
    --accent: #e8926f;
    --accent-ink: #1a1410;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #171512;
        --surface: #201d19;
        --text: #e9e3da;
        --muted: #a0968b;
        --rule: #34302a;
        --accent: #e8926f;
        --accent-ink: #1a1410;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
        color-scheme: dark;
    }
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--serif);
    font-size: 1.1875rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 { font-family: var(--display); line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- Site header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--rule);
}
.site-header-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: .7rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.wordmark { text-decoration: none; color: var(--text); display: flex; flex-direction: column; line-height: 1.15; }
.wordmark:hover { text-decoration: none; }
.wordmark-name { font-family: var(--display); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.02em; }
.wordmark-tag { font-family: var(--ui); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: .15rem; }

.site-nav { display: flex; align-items: center; gap: 1.25rem; font-family: var(--ui); font-size: .9rem; }
.site-nav a { color: var(--text); text-decoration: none; font-weight: 500; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--accent); text-decoration: none; }
#theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.1rem; height: 2.1rem; padding: 0;
    background: transparent; color: var(--text);
    border: 1px solid var(--rule); border-radius: 50%; cursor: pointer;
}
#theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Post header ---------- */
.post-header { text-align: center; padding: 3.5rem 1.25rem 1.5rem; max-width: 52rem; margin: 0 auto; }
.post-header h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin: 0 0 .75rem; }
.post-meta { font-family: var(--ui); font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.post-meta p { margin: 0; }
.post-meta small { font-size: inherit; }
.post-header::after { content: ""; display: block; width: 3rem; height: 3px; background: var(--accent); margin: 1.75rem auto 0; border-radius: 2px; }

/* ---------- Layout ---------- */
.layout { max-width: 72rem; margin: 0 auto; padding: 1rem 1.25rem 4rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; }
main { min-width: 0; }
main > article, main > .comments-area, main > #comments, main > .post-tags { max-width: var(--measure); margin-left: auto; margin-right: auto; }

@media (min-width: 1150px) {
    .layout { grid-template-columns: minmax(0, 1fr) 17rem; gap: 4rem; }
    .sidebar { position: sticky; top: 5.5rem; align-self: start; max-height: calc(100vh - 7rem); overflow-y: auto; }
}

/* ---------- Article body ---------- */
article p, article ul, article ol, article blockquote { margin: 0 0 1.35em; }
article h2 { font-size: 1.7rem; margin: 2.2em 0 .6em; }
article h3 { font-size: 1.35rem; margin: 1.8em 0 .5em; }
article ul, article ol { padding-left: 1.4em; }
article li { margin-bottom: .35em; }
article blockquote { margin-left: 0; padding: .2em 0 .2em 1.25rem; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }
article hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
article table { width: 100%; border-collapse: collapse; font-size: .95em; margin: 0 0 1.5em; display: block; overflow-x: auto; }
article th, article td { padding: .5rem .75rem; border-bottom: 1px solid var(--rule); text-align: left; }
article iframe, article video { max-width: 100%; border-radius: 8px; }
article p:empty { display: none; }

/* Photos fill the text column */
article img { border-radius: 6px; display: block; margin: 0 auto; box-shadow: var(--shadow); }
article img.photo { width: 100%; }
article a:has(> img) { display: block; text-decoration: none; }
article p:has(> a > img), article p:has(> img) { margin: 2rem 0; text-align: center; }
article p > a:has(> img) { margin-bottom: 1.5rem; }
article p > a:has(> img):last-child { margin-bottom: 0; }
article p > br { display: none; }
article p > img.emoji, article img.emoji, article img[src*="smilies"], article img[width="16"], article img[width="15"] {
    display: inline; box-shadow: none; border-radius: 0; margin: 0; vertical-align: middle;
}
article figure { margin: 2.25rem 0; text-align: center; }
article figcaption, article .wp-caption-text {
    font-size: .92rem; line-height: 1.5; color: var(--muted);
    margin-top: .7rem; font-style: italic; text-align: center;
}
article img.alignleft, article img.alignright { float: none; }

/* Embedded maps */
.postmap { margin: 2rem 0 !important; }
.postmap img { display: inline-block !important; border-radius: 10px; }
.postmap small { font-family: var(--ui); color: var(--muted); font-size: .78rem; margin-top: .5rem; }
.postmap a { display: inline-block !important; }

/* ---------- Tags ---------- */
.post-tags { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-family: var(--ui); font-size: .85rem; color: var(--muted); }
.post-tags small { font-size: inherit; }

/* ---------- Comments ---------- */
#comments { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--rule); font-size: 1rem; }
#comments .comments-title { font-family: var(--display); font-size: 1.4rem; margin: 0 0 1.5rem; font-weight: 700; }
#comments .bs-heading-bor-bt { border: 0; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list .children { list-style: none; margin: 1rem 0 0 1.25rem; padding-left: 1.25rem; border-left: 2px solid var(--rule); }
.comment-body { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.comment-meta { font-family: var(--ui); font-size: .82rem; color: var(--muted); margin-bottom: .6rem; }
.comment-meta a { color: var(--muted); text-decoration: none; }
.comment-meta a:hover { color: var(--accent); }
.comment-author { display: inline; }
.comment-author .fn { font-weight: 600; color: var(--text); font-style: normal; }
.comment-author .says { display: none; }
.comment-metadata { display: inline; margin-left: .6rem; }
.comment-author img.avatar { display: none; }   /* skip third-party gravatar requests */
.comment-content p { margin: 0 0 .7em; }
.comment-content p:last-child { margin-bottom: 0; }
.comment-content img { box-shadow: none; }

/* ---------- Sidebar / archives ---------- */
.sidebar { font-family: var(--ui); font-size: .9rem; padding: 0 0 0 0; }
.sidebar h2 { font-family: var(--ui); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--rule); font-weight: 600; }
.archive-year { border-bottom: 1px solid var(--rule); }
.archive-year > summary { cursor: pointer; padding: .65rem 0; font-weight: 600; font-size: .95rem; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.archive-year > summary::-webkit-details-marker { display: none; }
.archive-year > summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.1rem; }
.archive-year[open] > summary::after { content: "\2212"; }
.archive-year .count { color: var(--muted); font-weight: 400; margin-left: .4rem; font-size: .8rem; }
.archive-list { list-style: none; margin: 0 0 .9rem; padding: 0; }
.archive-list li { margin: 0; }
.archive-list a { display: block; padding: .22rem 0; color: var(--text); text-decoration: none; line-height: 1.35; }
.archive-list a:hover { color: var(--accent); }

/* ---------- Homepage ---------- */
body.home .post-header { display: none; }
body.home .layout { grid-template-columns: minmax(0, 1fr); }
body.home .sidebar { display: none; }
body.home main > * { max-width: none; }

.hero { text-align: center; max-width: 46rem; margin: 3.5rem auto 3rem; padding: 0 .5rem; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 0 0 .5rem; }
.hero .hero-sub { font-family: var(--ui); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--accent); margin: 0 0 1.5rem; font-weight: 600; }
.hero p { color: var(--muted); font-size: 1.1rem; margin: 0 0 1em; }

.year-heading { font-family: var(--display); font-size: 2rem; margin: 3.5rem 0 1.25rem; padding-bottom: .6rem; border-bottom: 1px solid var(--rule); display: flex; align-items: baseline; justify-content: space-between; }
.year-heading span { font-family: var(--ui); font-size: .8rem; color: var(--muted); font-weight: 400; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card a { display: block; color: inherit; text-decoration: none; height: 100%; }
.card-img { aspect-ratio: 3 / 2; background: var(--rule); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; border-radius: 0; box-shadow: none; transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-img.empty { background: linear-gradient(135deg, var(--rule), color-mix(in srgb, var(--accent) 25%, var(--rule))); }
.card-body { padding: .9rem 1.1rem 1.1rem; }
.card-title { font-family: var(--display); font-size: 1.15rem; line-height: 1.25; margin: 0 0 .35rem; font-weight: 700; }
.card time { font-family: var(--ui); font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); text-align: center; padding: 2.5rem 1.25rem 3rem; font-family: var(--ui); font-size: .85rem; color: var(--muted); }
.site-footer p { margin: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
    body { font-size: 1.0625rem; }
    .site-header-inner { padding: .6rem 1rem; }
    .wordmark-tag { display: none; }
    .post-header { padding-top: 2.25rem; }
    .layout { padding-left: 1rem; padding-right: 1rem; }
    .comment-list .children { margin-left: .5rem; padding-left: .75rem; }
}

@media print {
    .site-header, .sidebar, #theme-toggle { display: none; }
}

/* ---------- Tag pages ---------- */
body.tag .layout { grid-template-columns: minmax(0, 1fr); }
body.tag .sidebar { display: none; }
body.tag main > * { max-width: none; }
.tag-intro { text-align: center; color: var(--muted); font-family: var(--ui); margin: 0 0 1rem; }
.post-tags a { color: var(--accent); }

/* ---------- Comments from the older WordPress theme (recovered pages) ---------- */
#comments-title { font-family: var(--display); font-size: 1.4rem; margin: 0 0 1.5rem; }
.commentlist { list-style: none; padding: 0; margin: 0; }
.commentlist .comment-body { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 1.1rem 1.25rem; margin-bottom: 1rem; }
.comment-avatar { display: none; }
.comment-content .comment-author { font-weight: 600; font-family: var(--ui); font-size: .9rem; display: inline; }
.comment-content .comment-meta { display: inline; margin-left: .6rem; font-family: var(--ui); font-size: .82rem; color: var(--muted); }
.comment-text { margin-top: .5rem; }
.comment-text p { margin: 0 0 .7em; }

/* ---------- Map page ---------- */
body.map .layout { grid-template-columns: minmax(0, 1fr); }
body.map .sidebar { display: none; }
body.map main > * { max-width: none; }
.map-intro { text-align: center; color: var(--muted); font-family: var(--ui); margin: 0 0 1.25rem; }
.tripmap { height: min(70vh, 620px); min-height: 360px; border-radius: 12px; border: 1px solid var(--rule); box-shadow: var(--shadow); z-index: 0; }
.tripmap .leaflet-popup-content { font-family: var(--serif); font-size: .95rem; line-height: 1.4; }
.tripmap a { color: var(--accent); }
.stop-list { list-style: none; margin: 0; padding: 0; columns: 3 18rem; column-gap: 2rem; font-family: var(--ui); font-size: .92rem; }
.stop-list li { break-inside: avoid; padding: .3rem 0; border-bottom: 1px solid var(--rule); }
.stop-list a { color: var(--text); text-decoration: none; }
.stop-list a:hover { color: var(--accent); }
.stop-list time { display: block; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* map popups follow the theme */
.tripmap .leaflet-popup-content-wrapper,
.tripmap .leaflet-popup-tip { background: var(--bg); color: var(--text); }
.tripmap .leaflet-container a.leaflet-popup-close-button { color: var(--text); }

/* dark map: darken the OpenStreetMap tiles instead of loading a second tile set */
:root[data-theme="dark"] .tripmap .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9) saturate(.6); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .tripmap .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.9) saturate(.6); }
}

/* post maps: light and dark renderings */
.postmap img.pm-dark { display: none !important; }
:root[data-theme="dark"] .postmap img.pm-light { display: none !important; }
:root[data-theme="dark"] .postmap img.pm-dark { display: inline-block !important; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .postmap img.pm-light { display: none !important; }
    :root:not([data-theme="light"]) .postmap img.pm-dark { display: inline-block !important; }
}
