/* Darkroom Notes - a free dark photography journal template
   by Bryant Smith (bryantsmith.com)
   Every colour and space on the page is gathered here. Use the section
   headings below to find the thing you would like to change. */


/* ---- COLOUR PALETTE ----
   Change a colour once here and the whole page follows. */

:root {
    --bg:        #0f0f11;   /* near-black page background */
    --panel:     #17171a;   /* slightly lifted panels */
    --line:      #2a2a2e;   /* hairline borders */
    --text:      #d8d4cd;   /* main body text */
    --bright:    #f4f1ea;   /* headings */
    --muted:     #8f8a82;   /* small gray metadata labels */
    --meta:      #a8a29a;   /* small gray metadata values */
    --amber:     #d6a44c;   /* safelight accent */
    --amber-dim: #8a6a2f;   /* quiet accent */
}


/* ---- BODY: the "room" the journal sits in ---- */

body {
    background: var(--bg);
    color: var(--text);
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
    padding: 56px 24px 0 24px;
    -webkit-font-smoothing: antialiased;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


/* ---- PAGE: the centred shell that holds everything ---- */

#page {
    margin: 0 auto;
    max-width: 960px;
}


/* ---- MASTHEAD: title, tagline and menu ---- */

#masthead {
    border-bottom: 1px solid var(--line);
    padding-bottom: 28px;
}

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

/* the glowing "safelight" dot beside the title */
#masthead h1::before {
    background: var(--amber);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(214, 164, 76, 0.65);
    content: "";
    display: inline-block;
    height: 12px;
    margin-right: 16px;
    vertical-align: middle;
    width: 12px;
}

#masthead .tagline {
    color: var(--muted);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    margin-top: 14px;
    text-transform: uppercase;
}


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

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

#menu a,
#menu a:visited {
    border-bottom: 1px solid transparent;
    color: var(--muted);
    margin-right: 24px;
    padding-bottom: 4px;
    text-decoration: none;
    transition: color 0.18s ease, border-color 0.18s ease;
}

#menu a:hover,
#menu a:focus {
    border-bottom-color: var(--amber);
    color: var(--amber);
}


/* ---- INTRO: the short opening passage ---- */

#intro {
    max-width: 640px;
    padding: 56px 0 8px 0;
}

#intro .lead {
    color: var(--text);
    font-size: 21px;
    line-height: 1.6;
}

/* the dropped capital letter that opens the journal */
#intro .lead::first-letter {
    color: var(--amber);
    float: left;
    font-size: 3.2em;
    line-height: 0.82;
    padding: 6px 12px 0 0;
}

#intro p + p {
    color: var(--muted);
    font-size: 15px;
    margin-top: 20px;
}


/* ---- ENTRIES: the diptych rows ----
   Each .entry is a flex row pairing a large .photo with a narrow
   .caption. Plain English: the picture takes about two thirds of the
   width and the notes take the rest. */

#entries {
    padding: 40px 0 8px 0;
}

.entry {
    align-items: center;
    display: flex;
    margin-bottom: 88px;
}

.entry:last-child {
    margin-bottom: 40px;
}

/* the alternating rhythm: even rows swap the photo to the other side */
.entry:nth-child(even) {
    flex-direction: row-reverse;
}

.entry:nth-child(even) .caption {
    padding: 12px 44px 12px 0;
    text-align: right;
}


/* ---- PHOTOS: placeholder gradients ----
   These panels are only CSS gradients, so the template needs no image
   files at all. To use your own photograph, replace a gradient below
   with:
       background-image: url("your-photo.jpg");
       background-size: cover;
       background-position: center;
   and the panel will fill with your picture. */

.photo {
    -webkit-box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    aspect-ratio: 4 / 3;
    background-color: #1c1c1f;
    border: 1px solid var(--line);
    border-radius: 2px;
    flex: 0 0 62%;
    overflow: hidden;
    position: relative;
}

.photo::after {
    background-image: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.035) 0px,
        rgba(255, 255, 255, 0.035) 1px,
        transparent 1px,
        transparent 3px
    );
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.photo--fog {
    background-image:
        radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0) 46%),
        linear-gradient(160deg, #5c6a77 0%, #2c353f 48%, #12161b 100%);
}

.photo--sand {
    background-image:
        radial-gradient(circle at 72% 22%, rgba(255, 238, 201, 0.40), rgba(255, 238, 201, 0) 52%),
        linear-gradient(200deg, #c8a468 0%, #8a6a3c 42%, #2a2016 100%);
}

.photo--window {
    background-image:
        radial-gradient(circle at 58% 62%, rgba(126, 182, 150, 0.42), rgba(126, 182, 150, 0) 46%),
        linear-gradient(180deg, #101d1a 0%, #0a1310 100%);
}

.photo--red {
    background-image:
        radial-gradient(circle at 26% 72%, rgba(226, 104, 48, 0.55), rgba(226, 104, 48, 0) 56%),
        linear-gradient(160deg, #3a1510 0%, #160807 100%);
}


/* ---- CAPTIONS: the narrow notes panel beside each photo ---- */

.caption {
    display: flex;
    flex: 0 0 38%;
    flex-direction: column;
    justify-content: center;
    padding: 12px 0 12px 44px;
}

.caption .index {
    color: var(--amber);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.caption h2 {
    color: var(--bright);
    font-size: 27px;
    font-weight: normal;
    line-height: 1.25;
}

.caption h2 a,
.caption h2 a:visited {
    border-bottom: 1px solid transparent;
    color: inherit;
    text-decoration: none;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.caption h2 a:hover,
.caption h2 a:focus {
    border-bottom-color: var(--amber-dim);
    color: var(--amber);
}

.caption .datum {
    color: var(--muted);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    letter-spacing: 1.5px;
    margin-top: 12px;
    text-transform: uppercase;
}

/* the small gray metadata lines */
.caption .meta {
    border-top: 1px solid var(--line);
    list-style: none;
    margin-top: 20px;
    padding-top: 16px;
}

.caption .meta li {
    align-items: baseline;
    color: var(--meta);
    display: flex;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.9;
}

.caption .meta li span {
    color: var(--muted);
    flex: 0 0 92px;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* on the flipped rows, put the label on the outer (right) edge */
.entry:nth-child(even) .meta li {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

.entry:nth-child(even) .meta li span {
    text-align: right;
}

.caption .note {
    color: var(--text);
    font-size: 15px;
    margin-top: 20px;
}


/* ---- HOW-TO NOTE: the friendly explanation near the footer ---- */

.howto {
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 3px solid var(--amber);
    border-radius: 2px;
    margin: 24px 0 8px 0;
    padding: 28px 32px;
}

.howto h2 {
    color: var(--bright);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.howto p {
    color: var(--muted);
    font-size: 14px;
    margin-top: 12px;
}

.howto code {
    color: var(--amber);
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
}


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

#footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    letter-spacing: 1.5px;
    margin-top: 72px;
    padding: 26px 0 40px 0;
    text-align: center;
    text-transform: uppercase;
}

#footer a,
#footer a:visited {
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    text-decoration: none;
    transition: color 0.18s ease, border-color 0.18s ease;
}

#footer a:hover,
#footer a:focus {
    border-bottom-color: var(--amber);
    color: var(--amber);
}


/* ---- SMALL SCREENS: stack the diptych into one column ---- */

@media (max-width: 640px) {
    body {
        padding: 32px 18px 0 18px;
    }

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

    #masthead h1::before {
        height: 9px;
        margin-right: 12px;
        width: 9px;
    }

    #intro {
        padding-top: 40px;
    }

    #intro .lead {
        font-size: 18px;
    }

    .entry,
    .entry:nth-child(even) {
        display: block;
        margin-bottom: 56px;
    }

    .photo {
        aspect-ratio: 4 / 3;
        margin-bottom: 20px;
    }

    .caption,
    .entry:nth-child(even) .caption {
        padding: 0;
        text-align: left;
    }

    .caption h2 {
        font-size: 23px;
    }

    .howto {
        padding: 22px 22px;
    }

    #menu a {
        display: inline-block;
        margin-bottom: 10px;
    }
}


/* ---- PRINT: drop the dark room for paper ---- */

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

    #masthead h1,
    .caption h2,
    .howto h2 {
        color: #000000;
    }

    #masthead h1::before,
    .photo::after,
    #menu {
        display: none;
    }

    .entry {
        display: block;
    }

    .photo {
        aspect-ratio: 4 / 3;
        margin-bottom: 16px;
    }

    .caption,
    .entry:nth-child(even) .caption {
        padding: 0;
        text-align: left;
    }
}
