/* ==========================================================
   John Gantner — shared site styles (editorial)
   One stylesheet for every page, so a change here
   updates the whole site.
   ========================================================== */

:root {
    --ink: #111;
    --muted: #666;
    --rule: #111;
    --soft-rule: #c9c9c9;
    --bg: #fff;
    --serif: "Newsreader", Georgia, "Times New Roman", serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --measure: 760px;

    /* Body text font. For all-serif, set these to
       var(--serif) and 20px (and 18px in the mobile section). */
    --body-font: var(--sans);
    --body-size: 17.5px;

    /* Heading font (name, page titles, section headings, course titles).
       For sans serif headings: var(--sans) and normal. */
    --heading-font: var(--serif);
    --heading-style: italic;
    --accent: #0033a0;   /* UK blue, used for link hovers */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--body-font);
    font-size: var(--body-size);
    line-height: 1.7;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

img { max-width: 100%; }
.portrait img { display: block; }

.wrap {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Masthead ---------- */

.masthead {
    text-align: center;
    padding-top: 52px;
}
.kicker {
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted);
}
.masthead .title {
    display: block;
    font-family: var(--heading-font);
    font-weight: 400;
    font-size: 64px;
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin: 10px 0 18px;
    text-decoration: none;
}
.masthead .title:hover { text-decoration: none; }

.rules {
    border-top: 3px double var(--rule);
    border-bottom: 1px solid var(--rule);
}
.site-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    font-family: var(--sans);
    font-size: 12.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.site-nav a {
    text-decoration: none;
    padding: 12px 18px;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 4px;
}
.site-nav a[aria-current="page"] { font-weight: 600; }

/* ---------- Main ---------- */

main.wrap { padding-top: 44px; padding-bottom: 20px; }

p { margin: 0 0 1em; }

h1.page-title {
    font-family: var(--heading-font);
    font-weight: 400;
    font-size: 42px;
    line-height: 1.15;
    margin: 0 0 18px;
}

h2 {
    font-family: var(--heading-font);
    font-weight: 400;
    font-style: var(--heading-style);
    font-size: 28px;
    line-height: 1.3;
    margin: 48px 0 10px;
    padding-top: 14px;
    border-top: 1px solid var(--rule);
    clear: both;
}
main > section:first-child > h2:first-child { margin-top: 0; }

.small-caps {
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--muted);
}

/* ---------- Home: lede ---------- */

.portrait {
    float: right;
    width: 290px;
    margin: 6px 0 16px 30px;
}
.dropcap > p:first-of-type::first-letter {
    font-family: var(--heading-font);
    float: left;
    font-size: 78px;
    line-height: 0.8;
    padding: 8px 10px 0 0;
}

.links {
    font-family: var(--sans);
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin-top: 6px;
}
.links a { text-decoration: none; }
.links a:hover { text-decoration: underline; }
.links i { margin-right: 5px; }

/* ---------- Lists ---------- */

.cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 40px;
}

ul.dash, ol.dash {
    list-style: none;
    padding: 0;
    margin: 0;
}
.dash > li {
    padding: 8px 0;
    border-bottom: 1px dotted var(--soft-rule);
}
.dash > li:last-child { border-bottom: none; }
.dash .label {
    display: block;
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--muted);
}

/* Course / project entries */
.entry { padding: 14px 0 16px; }
.entry-title {
    font-family: var(--heading-font);
    font-size: 24px;
    font-weight: 500;
    line-height: 1.3;
    margin: 0;
}

/* ---------- Contact links: no underline, color on hover ---------- */

.contact-links a {
    text-decoration: none;
    transition: color 0.15s;
}
.contact-links a:hover { color: var(--accent); }
.social-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 24px;
}
.social-row i { margin-right: 6px; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 11px 18px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: #fff;
}
.btn:hover { background: #fff; color: var(--ink); text-decoration: none; }
.btn.ghost { background: #fff; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 22px; }

/* ---------- PDFs shown as plain pages (see pdf-view.js) ---------- */

.pdf-pages {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.pdf-pages canvas {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.pdf-status {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--muted);
    padding: 20px 0;
}

/* Collapsible syllabus (native <details>, no JavaScript needed) */
details.syllabus { margin-top: 8px; }
details.syllabus summary {
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
details.syllabus summary::-webkit-details-marker { display: none; }
details.syllabus summary::before {
    content: "+";
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ink);
    font-size: 13px;
    font-weight: 400;
}
details.syllabus[open] summary::before { content: "\2212"; }
details.syllabus .small-caps { margin: 12px 0 14px; }

/* ---------- Map (John's original Leaflet code; this only frames it) ---------- */

.map-frame { border: 1px solid var(--rule); margin-top: 8px; }
#map {
    height: 500px;
    width: 100%;
}

/* Kentucky-Themed Popup (original styles, unchanged) */
.kentucky-popup {
    background-color: #0033a0;
    color: white;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    max-width: 300px;
}
.kentucky-popup h3 {
    margin: 0;
    font-size: 14px;
    color: white;
}
.kentucky-popup p {
    margin: 4px 0;
}
.kentucky-popup a {
    color: white;
    text-decoration: none;
}
.kentucky-popup a:hover {
    text-decoration: underline;
}
.popup-image {
    width: 90px;
    height: auto;
    border-radius: 5px;
    margin-top: 10px;
}

/* ---------- Footer ---------- */

.site-footer {
    text-align: center;
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 56px 24px 40px;
}
.site-footer .rules {
    height: 5px;
    max-width: var(--measure);
    margin: 0 auto 18px;
    border-bottom-width: 0;
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
    body { font-size: 16.5px; }
    .masthead { padding-top: 36px; }
    .masthead .title { font-size: 44px; }
    .site-nav a { padding: 10px 10px; font-size: 11.5px; letter-spacing: 0.1em; }
    .portrait { float: none; width: 240px; margin: 0 auto 22px; text-align: center; }
    .cols { grid-template-columns: 1fr; }
    h1.page-title { font-size: 34px; }
    #map { height: 380px; }
}
