/* Midnight - A Free Design by Bryant Smith (bryantsmith.com)
   Every colour, space and font on the page is set in this one file.
   The design uses a deliberately small palette: five colours, reused
   again and again. Look for the section headings below to change things. */


/* ---- BODY: the night sky the page sits on ---- */

body {
    background-color: #0a0e15;
    background-image:
        radial-gradient(1px 1px at 12% 18%, #2b3648, transparent),
        radial-gradient(1px 1px at 78% 12%, #2b3648, transparent),
        radial-gradient(1px 1px at 34% 62%, #232d3d, transparent),
        radial-gradient(1px 1px at 88% 74%, #2b3648, transparent),
        radial-gradient(2px 2px at 60% 38%, #1b2534, transparent),
        linear-gradient(180deg, #0c111b 0%, #070a10 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #c6cdd9;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 16px;
    line-height: 1.75;
    padding: 48px 16px;
    text-align: center;
}

* {
    margin: 0;
    padding: 0;
}

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


/* ---- PAGE: the dark sheet itself ---- */

#page {
    background: #121a26;
    background-image: linear-gradient(180deg, #15202f 0%, #121a26 260px);
    border: 1px solid #243040;
    border-top: 4px solid #5aa9e6;
    border-radius: 4px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    margin: 0 auto;
    max-width: 800px;
    padding: 64px 72px 48px 72px;
    text-align: left;
}


/* ---- MASTHEAD: the title and tagline at the very top ---- */

#masthead {
    border-bottom: 1px solid #243040;
    margin-bottom: 40px;
    padding-bottom: 24px;
}

#masthead h1 {
    color: #eef2f8;
    font-size: 46px;
    font-weight: normal;
    letter-spacing: -0.5px;
    line-height: 1.05;
}

#masthead .tagline {
    color: #9aa4b5;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    margin-top: 12px;
    text-transform: uppercase;
}


/* ---- MENU: the row of links under the title ---- */

#menu {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    margin-top: 26px;
    text-transform: uppercase;
}

#menu a,
#menu a:visited {
    border-bottom: 2px solid transparent;
    color: #9aa4b5;
    margin-right: 22px;
    padding-bottom: 3px;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

#menu a:hover,
#menu a:focus-visible {
    border-bottom: 2px solid #5aa9e6;
    color: #8cc6f2;
}


/* ---- TEXT: paragraphs, links and headings in the body ---- */

#content p {
    margin-bottom: 20px;
}

#content a,
#content a:visited {
    border-bottom: 1px solid #2c4a66;
    color: #5aa9e6;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

#content a:hover,
#content a:focus-visible {
    border-bottom-color: #8cc6f2;
    color: #8cc6f2;
}

.lead {
    color: #d7dee9;
    font-size: 20px;
    line-height: 1.7;
}

.lead::first-letter {
    color: #5aa9e6;
    float: left;
    font-size: 3.3em;
    line-height: 0.84;
    padding: 6px 10px 0 0;
}

h2 {
    border-bottom: 1px solid #243040;
    color: #eef2f8;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2.5px;
    margin: 48px 0 20px 0;
    padding-bottom: 10px;
    text-transform: uppercase;
}

h2::before {
    background: #5aa9e6;
    content: "";
    display: inline-block;
    height: 3px;
    margin-right: 10px;
    vertical-align: middle;
    width: 22px;
}


/* ---- QUOTE: the indented passage with a blue bar ---- */

blockquote {
    border-left: 3px solid #5aa9e6;
    color: #9aa4b5;
    font-size: 19px;
    font-style: italic;
    margin: 32px 0;
    padding: 4px 0 4px 24px;
}

blockquote p {
    margin: 0;
}


/* ---- ENTRIES: the dated list of writing ---- */

.entries {
    list-style: none;
}

.entries li {
    border-bottom: 1px solid #1e2734;
    padding: 14px 0;
}

.entries li:last-child {
    border-bottom: none;
}

.entries .date {
    color: #7f8a9c;
    display: inline-block;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    width: 140px;
}

.entries a {
    font-size: 18px;
}


/* ---- PALETTE: the swatch list that shows the five colours ---- */

.palette {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    list-style: none;
    margin: 8px 0 4px 0;
}

.palette li {
    align-items: center;
    color: #9aa4b5;
    display: flex;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.palette .chip {
    border: 1px solid #2b3648;
    border-radius: 50%;
    display: inline-block;
    height: 16px;
    margin-right: 8px;
    width: 16px;
}

.palette .hex {
    color: #6f7a8c;
    margin-left: 6px;
}

.chip-night { background: #0a0e15; }
.chip-sheet { background: #121a26; }
.chip-edge  { background: #243040; }
.chip-text  { background: #c6cdd9; }
.chip-blue  { background: #5aa9e6; }


/* ---- NOTE: the tinted "how to use" box ---- */

.note {
    background: #16202f;
    border: 1px solid #243040;
    border-left: 3px solid #5aa9e6;
    border-radius: 4px;
    margin: 40px 0 8px 0;
    padding: 22px 26px;
}

.note h3 {
    color: #eef2f8;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.note p:last-child {
    margin-bottom: 0;
}


/* ---- FOCUS & SELECTION: keep the blue visible for keyboards ---- */

a:focus-visible {
    outline: 2px solid #5aa9e6;
    outline-offset: 3px;
}

::selection {
    background: #5aa9e6;
    color: #0a0e15;
}


/* ---- FOOTER: the required credit link ---- */

#footer {
    border-top: 1px solid #243040;
    color: #7f8a9c;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    margin-top: 56px;
    padding-top: 22px;
    text-align: center;
    text-transform: uppercase;
}

#footer a,
#footer a:visited {
    border-bottom: none;
    color: #9aa4b5;
    text-decoration: none;
}

#footer a:hover,
#footer a:focus-visible {
    color: #5aa9e6;
}


/* ---- SMALL SCREENS: pull in the padding on phones ---- */

@media (max-width: 640px) {
    body {
        padding: 24px 12px;
    }

    #page {
        padding: 40px 26px 32px 26px;
    }

    #masthead h1 {
        font-size: 34px;
    }

    .lead {
        font-size: 18px;
    }

    #menu a {
        margin-right: 16px;
    }

    .entries .date {
        display: block;
        margin-bottom: 4px;
        width: auto;
    }
}


/* ---- PRINT: swap the dark page for clean ink on paper ---- */

@media print {
    body {
        background: #ffffff;
        color: #222222;
        padding: 0;
    }

    #page {
        background: #ffffff;
        border: none;
        box-shadow: none;
        max-width: 100%;
        padding: 0;
    }

    #menu {
        display: none;
    }

    #footer {
        color: #666666;
    }
}
