/* Layout and typography modelled on the Twenty Twenty-Two theme with the
   site's own global styles: blue gradient, amber text, DM Sans, 660px content. */

@font-face { font-family: "DM Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/DMSans-Regular.8c79e8761369.ttf") format("truetype"); }
@font-face { font-family: "DM Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/DMSans-Italic.4f2f2cddd36e.ttf") format("truetype"); }
@font-face { font-family: "DM Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/DMSans-Bold.1af8ec25074f.ttf") format("truetype"); }
@font-face { font-family: "DM Sans"; font-weight: 700; font-style: italic; font-display: swap; src: url("../fonts/DMSans-BoldItalic.c7360048dc71.ttf") format("truetype"); }

:root {
    --text: #fcb900;
    --heading: #fcb900;
    --link: #8ed1fc;
    --link-hover: #fcf5ed;
    --foreground: #fcf5ed;
    --secondary: #3556a5;
    --tertiary: #374c80;
    --content-width: 660px;
    --wide-width: 1250px;
    --gutter: max(1rem, 4vw);
}

* { box-sizing: border-box; }

html { background: #033b59; }

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(rgb(75, 117, 225) 0%, rgb(3, 59, 89) 100%) fixed;
    color: var(--text);
    font: 1.125rem/1.6 "DM Sans", sans-serif;
}

a { color: var(--link); }
a:hover, a:focus { color: var(--link-hover); }

h1, h2, h3, h4 { color: var(--heading); font-weight: 700; line-height: 1.2; }

/* Header */
#header {
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 2rem var(--gutter) 0;
}
#branding { text-align: center; }
#branding img { max-width: 100%; height: auto; }
#site-title { font-size: 2.75rem; font-weight: 700; color: var(--foreground); }
#branding a { text-decoration: none; }

/* Main menu */
#access ul { list-style: none; margin: 0; padding: 0; }
#access > .menu { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 1.5rem; }
#access li { position: relative; }
#access a { display: block; padding: .5rem 0; color: var(--foreground); text-decoration: none; }
#access a:hover, #access .current > a { text-decoration: underline; }
#access ul ul {
    display: none;
    position: absolute;
    right: 0;
    z-index: 10;
    min-width: 200px;
    padding: .5rem 1rem;
    background: var(--tertiary);
}
#access li:hover > ul, #access li:focus-within > ul { display: block; }

/* Content */
#content {
    max-width: calc(var(--wide-width) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 2rem var(--gutter) 4rem;
}
#content > :not(.with-categories) { max-width: var(--content-width); margin-left: auto; margin-right: auto; }

/* The category list sits to the left of the centred content column,
   like the floated (alignleft) categories block in the old templates. */
.with-categories {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, var(--content-width)) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}
.content-column { grid-column: 2; }
.category-list { grid-column: 1; }
.category-list ul { margin: 0; padding-left: 1.5em; font-size: 1.75rem; line-height: 1.4; }

.page-title { font-size: clamp(2rem, 4vw, 2.25rem); margin: 0 0 2rem; }
.entry-title { margin: 0 0 1.5rem; }
.post .entry-title {
    font-size: clamp(2.75rem, 10vw, 5rem);
    text-align: center;
    margin-bottom: clamp(1rem, 8vw, 4rem);
    overflow-wrap: break-word;
}
.post-summary { margin-bottom: 7rem; }
.post-summary .entry-title { font-size: clamp(2.25rem, 4vw, 2.75rem); }
.post-summary .entry-title a { color: var(--heading); text-decoration: none; }
.post-summary .entry-title a:hover { color: var(--link-hover); }
.summary { display: flow-root; }
.summary p { margin-top: 0; }
.thumbnail img { float: right; width: 120px; height: 120px; margin: 0 0 1rem 1.5rem; border-radius: 4px; }

.entry-meta { font-size: 1rem; font-style: italic; }
.post .entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    margin-top: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--foreground);
}

/* Headings inside posts are small and uppercase, as in the site's global styles. */
.entry-content h2, .entry-content h3, .entry-content h4 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.pagination { display: flex; justify-content: space-between; gap: 1rem; font-size: 1rem; }

/* Images */
figure { margin: 0 0 1.5rem; }
figcaption { font-size: .875rem; text-align: center; margin-top: .5rem; }
figure img { display: block; max-width: 100%; height: auto; }
.alignleft { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }
.aligncenter img { margin: 0 auto; }
.alignfull img { width: 100%; }
.entry-content::after { content: ""; display: block; clear: both; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 1.5rem; }

.search-results { list-style: none; padding: 0; }

/* Footer */
#colophon {
    display: grid;
    grid-template-columns: 1fr minmax(0, var(--content-width)) 1fr;
    align-items: center;
    gap: 2rem;
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 4rem var(--gutter);
    color: var(--foreground);
    text-align: center;
}
.footer-text { grid-column: 2; }
.footer-image { grid-column: 3; }
.footer-image img { max-width: 100%; height: auto; }
#colophon form { margin-top: 1.5rem; }

input[type="search"], button {
    font: inherit;
    font-size: 1rem;
    padding: .4rem .75rem;
    border: 1px solid var(--foreground);
    border-radius: 4px;
}
input[type="search"] { background: rgba(255, 255, 255, .1); color: var(--foreground); }
button { background: var(--foreground); color: var(--tertiary); cursor: pointer; }

.screen-reader-text { position: absolute; left: -9999px; }

@media (max-width: 1100px) {
    .with-categories { grid-template-columns: minmax(0, var(--content-width)); justify-content: center; }
    .content-column, .category-list { grid-column: 1; }
    .category-list ul { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; padding: 0; list-style: none; font-size: 1.25rem; }
}

@media (max-width: 800px) {
    #access > .menu { justify-content: center; }
    #colophon { grid-template-columns: 1fr; }
    .footer-text, .footer-image { grid-column: 1; }
    .alignleft, .alignright { float: none; margin: 0 0 1.5rem; }
    #access ul ul { position: static; background: none; }
}
