/* mosqqq.com cartoon gallery — minimal, mobile-friendly styling.
   Kept deliberately simple so it's easy to tweak by hand. */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: #1a1a1a;
    background: #fafafa;
    line-height: 1.4;
}

header, footer {
    padding: 1rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}
footer { border-top: 1px solid #e5e5e5; border-bottom: none; color: #888; }

h1 { margin: 0; font-size: 1.5rem; }

.category { padding: 1.5rem; }
.category h2 {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid #ddd;
    padding-bottom: .3rem;
}

.empty { color: #999; font-style: italic; }

/* Responsive grid: as many ~250px columns as fit, thumbnails auto-sized. */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

figure {
    margin: 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
}

figure img {
    display: block;
    width: 100%;
    height: auto;
}

figcaption {
    padding: .5rem .75rem;
    font-size: .85rem;
    color: #444;
    text-transform: capitalize;
}

/* Intro block (2026-07-20): David's welcome text + optional portrait
   (images/text/intro.txt + david.jpg), shown above the galleries. */
.intro {
    padding: 1.5rem;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}
.intro p { max-width: 55rem; }
.intro .portrait {
    float: right;
    width: 180px;
    height: auto;
    margin: 0 0 .75rem 1rem;
    border-radius: 6px;
}
.intro::after { content: ""; display: block; clear: both; }

/* Nav buttons (2026-07-20): the header links became real-looking buttons
   when the sections moved to their own pages. .current = the page you are
   on, tinted so the nav doubles as a "you are here" marker. */
/* 2026-07-22: flex row so the nav buttons stay left and the "click a cartoon"
   hint (.nav-hint) is pushed to the far right via margin-left:auto. flex-wrap
   lets the hint drop below the buttons on narrow / phone screens instead of
   overflowing. align-items:center vertically centres the hint with the taller
   buttons. */
.section-nav {
    margin-top: .75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.nav-hint {
    margin-left: auto;   /* shove to the right edge of the row */
    color: #666;
    font-size: .9rem;
    font-style: italic;
    /* match the buttons' bottom margin so a wrapped hint lines up */
    margin-bottom: .4rem;
}
.section-nav .navbtn {
    display: inline-block;
    padding: .45rem 1rem;
    margin: 0 .4rem .4rem 0;
    background: #f2f2f2;
    border: 1px solid #bbb;
    border-radius: 8px;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
}
.section-nav .navbtn:hover { background: #e2e9f5; border-color: #7a99c9; }
.section-nav .navbtn.current { background: #dce6f7; border-color: #5b7fb5; }

/* 2026-07-24: caption under the front-page portrait (david.*), set by David on
   /admin. Sits just under the floated portrait, right-aligned to match it. */
.intro .portrait-caption {
    float: right;
    clear: right;
    width: 180px;           /* same width as .portrait so it lines up under it */
    margin: -.5rem 0 .75rem 1rem;
    font-size: .85rem;
    font-style: italic;
    color: #555;
    text-align: center;
}
