/*
 * ======================================
 * RESETS
 * ======================================
 */
 
/* Use a sane box sizing model */
*,
::after,
::before {
    box-sizing: border-box;
}
/* Undo all the margins and make sure text doesn't overflow */
* {
    margin: 0;
    overflow-wrap: break-word;
    hyphens: auto;
}
/* Set up smooth scrolling */
html:focus-within {
    scroll-behavior: smooth;
}
/* Adding this for now just in case I want to use percentage-based heights */
html,
body {
    height: 100%;
}
/* Set up the default body styles */
body {
    font-size: 1.25rem;
    line-height: 1.5;
    min-width: 320px;
    /* min-height: 100vh; restore this if I remove the percentage height, above */
}
/* Make images and other media easier to work with */
canvas,
img,
picture,
svg,
video {
    display: block;
    max-width: 100%;
}
/* Allow form controls to inherit font properties */
button,
input,
select,
textarea {
    font: inherit;
}
/* Respect users that prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    
    /* Turn off smooth scrolling */
    html:focus-within {
        scroll-behavior: auto;
    }
    
    /* Turn off all animations and transitions */
    *,
    ::after,
    ::before {
        animation-duration: 0.01ms;
        animation-iteration-count: 1;
        transition-duration: 0.01ms;
        scroll-behavior: auto;
    }
}
/*
 * ======================================
 * FONTS
 * ======================================
 */
@font-face {
    font-family: 'source_sans_proitalic';
    src: url('fonts/sourcesanspro-italic-webfont.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'source_sans_prolight';
    src: url('fonts/sourcesanspro-light-webfont.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'source_sans_probold';
    src: url('fonts/sourcesanspro-bold-webfont.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'source_sans_proregular';
    src: url('fonts/sourcesanspro-regular-webfont.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}
/*
 * ======================================
 * CUSTOM PROPERTIES
 * ======================================
 */
 
 :root {
    --font-family-light: source_sans_prolight, Helvetica, Arial, sans-serif;
    --font-family-regular: source_sans_proregular, Helvetica, Arial, sans-serif;
    --font-family-italic: source_sans_proitalic, Helvetica, Arial, sans-serif;
    --font-family-bold: source_sans_probold, Helvetica, Arial, sans-serif;
    --color-darker: hsl(0deg 0% 20%);
    --color-dark: hsl(0deg 0% 50%);
    --color-light: hsl(0deg 0% 90%);
    --color-lighter: hsl(0deg 0% 100%);
    --color-accent-lighter: hsl(208deg 56% 80%);
    --color-accent: hsl(208deg 56% 62%);
    --color-accent-darker: hsl(208deg 80% 20%);
}  
body {
    font-family: var(--font-family-regular);
    background: var(--color-lighter);
}
 
 /*
  * ======================================
  * LAYOUT
  * ======================================
  */
main {
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas: 
     "header"
     "nav"
     "content"
     "footer";
    height: 100dvh;
}
header {
    grid-area: header;
    position: sticky;
    top: 0;
}
.main-nav-wrapper {
    grid-area: nav;
    display: flex;
    justify-content: center;
}
.main-nav {
    display: flex;
    justify-content: space-between;
}
article {
    grid-area: content;
    margin: 0.5rem 0 1rem 0;
    padding: 0 0.5rem;    
}
.previous-next-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding: 0.5rem;
}
.previous-next-nav,
.previous-next-nav > a {
    font-family: var(--font-family-light);
    color: var(--color-accent);
    letter-spacing: 0.1rem;
}
footer {
    grid-area: footer;
    color: var(--color-darker);
    font-size: 65%;
    margin-top: 0.5rem;
    padding: 0.5rem;
    text-align: center;
    text-transform: uppercase; 
}   
/*
 * ======================================
 * HEADER
 * ======================================
 */
header {
    background: var(--color-accent);
    color: var(--color-darker);
    padding: 0 0.5rem;
}
.content-header {
  background-color: var(--color-accent);
}
.word-spy-logo {
    float: left;
    height: clamp(40px, 6vw, 80px);
}
.site-title {
    font-family: var(--font-family-light);
    font-weight: normal;
    font-style: normal;
    font-size: 3rem;
    font-variant: small-caps;
    letter-spacing: 0.08rem;
    color: var(--color-light);
}
.content-title {
    font-family: var(--font-family-light);
    text-align: center;
    margin-top: 0rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.page-title {
    font-family: var(--font-family-light);
    font-weight: normal;
    font-style: normal;
    font-size: 2rem;
    font-variant: small-caps;
    text-align:center;
    margin-top: 0.5rem;
    letter-spacing: 0.08rem;
    color: var(--color-light);
    display: none;
}
/*
 * ======================================
 * MAIN NAV
 * ======================================
 */
.main-nav-wrapper {
    background: var(--color-light);
}
.main-nav {
    padding: 0.25rem 0.5rem 0 0;    
    width: 100%;
}
.nav-browse-button {
    background: var(--color-accent-lighter);
    border: none; 
    border-radius: 5px;
    color: var(--color-darker);
    margin-left: 1rem;
    background: var(--color-accent-lighter);
}
.nav-browse-dropdown-contents {
    background: var(--color-light);
    border-radius: 4px;
    left: 0;
    margin-left: 0.25rem;
    max-height: 200px;
    opacity: 0;
    overflow: auto;
    padding: 0.5rem;
    position: absolute;
    top: 112px;
    transition: opacity 0.5s ease-out;
    width: fit-content;  
}
.nav-browse-dropdown-contents.show {
    opacity: 1;   
}

/* Style the links of both dropdowns the same */
.nav-browse-dropdown-contents > a,
.nav-browse-dropdown-contents > a:visited,
.nav-search-dropdown-contents > a {
    display: block;
    border-radius: 5px;
    color: var(--color-accent-darker);
    padding: 0 8px;
    text-decoration: none;
}

.nav-browse-dropdown-contents > a:hover,
.nav-search-dropdown-contents > a:hover {
    background: var(--color-accent);
    color: var(--color-lighter);
}
.nav-search-form {
    align-items: center;
    margin: auto 0;
    padding-top: 2px;
}
.nav-search-text {
    background: var(--color-lighter);
    border: 1px solid var(--color-light);
    border-radius: 4px;
    box-shadow: inset 0 1px 3px #ddd;
    box-sizing: border-box;  
    color: var(--color-darker);
    display: inline-block;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    padding: 0.5em 0.6rem;
    vertical-align: middle;
    width: 10rem;
}
.nav-search-dropdown-contents {
    background: var(--color-light);
    border-radius: 8px;
    display: none;
    margin-left: 0.25rem;
    max-height: 200px;
    overflow: auto;
    padding: 0.5rem;
    position: absolute;
    width: fit-content;  
}
.nav-search-dropdown-contents.show {
    display: block;   
}
/*
 * ======================================
 * HOME PAGE
 * ======================================
 */
.site-subtitle {
     color: var(--color-darker);
     font-family: var(--font-family-light);
     font-size: clamp(1.25rem, 0.5rem + 1.6vw, 1.5rem);
     margin: 1rem 0 0 1rem;
 }
.coined-on-this-date {
    border-radius: 15px;
    background: var(--color-accent-lighter);
    padding: 1rem;
}
.coined-word {
     color: var(--color-darker);
     font-family: var(--font-family-light);
     font-size: clamp(1.25rem, .75rem + 4vw, 3.25rem);
     font-weight: bold;
 }
.coined-word-type {
     font-style: italic;
}
.coined-word-type,
.coined-word-definition {
    color: var(--color-darker);
    font-family: var(--font-family-light);
    font-size: clamp(1.25rem, 0.25rem + 4vw, 2rem);
}
.coined-word-link {
    margin: 1rem 0;
}
.coined-word-link > a,
.coined-word-link > a:visited {
    color: var(--color-accent-darker);
}
.quote-wrapper {
    display: grid;
    margin-block-start: 1rem;
    position: relative;
}
.quote-text::before {
    content: '"';
    font-family: cursive;
    font-size: clamp(5rem, 1rem + 8vw, 8rem);
    position: absolute;
    left: -32px;
    top: -64px;
    font-family: cursive;
    color: var(--color-light);
}
.quote-text,
.quote-source {
    color: var(--color-darker);
    font-size: clamp(1.25rem, 0.25rem + 4vw, 2rem);
    margin-inline: 2rem;
}
.quote-text {
    font-family: var(--font-family-italic);
}
.quote-author {
    text-transform: uppercase;
}
/*
 * ======================================
 * TAG-SPECIFIC TWEAKS
 * ======================================
 */
a,
a:visited {
    color: var(--color-accent);
    text-decoration: none;
}
a:hover,
a:focus {
    color: var(--color-accent);
    text-decoration: underline;
}
a:focus {
    outline: thin dotted;
    outline: 5px auto -webkit-focus-ring-color;
    outline-offset: -2px;
}
code {
    color: var(--color-darker);
    background-color: var(--color-light);
}
h2.heading {
    font-variant: all-small-caps;
    font-size: clamp(1.25em, 0.5rem + 4vw, 3.5rem);
    letter-spacing: 2px;
    margin-left: 1rem;
}
h2,
label {
    color: var(--color-darker);
}
textarea {
    width: 100%;
}
blockquote {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    margin-left: 0;
    padding-left: 0.5rem;
    border-left: 0.25em solid #ccc;
    color: var(--color-darker);
}
/*
 * ======================================
 * INDEX (ALPHA, TAG) PAGE STYLES
 * ======================================
 */ 
.index-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    margin-top: 1rem;
    margin-bottom: 1rem;
}
.index-header {
    font-size: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    color: var(--color-darker);
}
.index-letter,
.index-letter-selected {
    border: 0.05em solid #ccc;
    display: inline-block;
    font-size: clamp(1rem, 1rem + 0.5vw, 1.75rem);
    text-align: center;
    width: 3em;
}
.index-letter:hover,
.index-letter-selected a {
    color: #b22222;
}
/*
 * ======================================
 * MISCELLANEOUS STYLES
 * ======================================
 */ 
/* For inline lists of words & links, add a a leading non-breaking space (00a0), 
   a middot character (00B7), and a regular space (0020); skip the last child */
.inline-list-item:not(:last-child)::after {
    content: "\00a0\00B7\0020";
}
.page-header {
    font-size: 1.75rem;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    color: var(--color-darker);
}
.home-page-div {
    display: inline;
    width: 50%;
}
.latest-word {
    padding-left: 0.5rem; 
    padding-right: 0.5rem; 
    background-color:#f6f6f6;
    padding-top: 0.5rem;
    padding-bottom: 0rem;
}
.home-page-word {
    font-family: var(--font-family-bold);
    font-size: 1.25rem;
}
.content-header {
    font-family: var(--font-family-light);
    font-weight: normal;
    font-style: normal;
    font-size: 2rem;
    font-variant: small-caps;
    letter-spacing: 0.08rem;
    text-align: center;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    color: var(--color-dark);
}
.date-table {
    display: table;
    width: 100%;
}
.date-table div {
    display: table-row;
}
.date-table span {
    width: 50%;
    display: table-cell;
    text-align: right;
    padding-right: 0.5rem;
}
.date-table a {
    display: table-cell;
    text-align: left;
    padding-left: 0.5rem;
}
.add-separator::after {
    content: '\A0\B7';
}
.no-break {
    /* white-space: nowrap; */
}
.no-collapse {
    white-space: pre-wrap;
}
.bolded,
.headword {
    font-family: var(--font-family-bold);
    font-style: inherit;
}
.italic-headword {
    font-family: var(--font-family-bold);
    font-style: italic;
}
.bold-italic {
font-weight: bold;
    font-style: italic;
}
.italicized {
    font-family: var(--font-family-italic);
    color: var(--color-darker);
}
.strikethrough {
text-decoration:line-through;
}
.centered {
text-align: center;
}
.superscript {
font-size: small; 
vertical-align: super;
} 
.subscript {
font-size: small; 
vertical-align: sub;
}
.emphatic-text {
font-family: var(--font-family-bold);
font-size: 1.1rem;
color: hsl(208, 56%, 38%);
}

/* Responsive image  */
.img-wrapper img {
    max-width: 100%;
    display: block;
    height: auto;
}    
.img-float-left {
    float: left;
    padding-right: 1rem;
    padding-bottom: 1rem;
}
.img-float-right {
    float: right;
    padding-left: 1rem;
    padding-bottom: 1rem;
}
.img-no-float {
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.noseeum {
display: none;
}
.emphasis-text {
font-weight: bold;
color: red;
}
.see-more {
margin-top: -0.75rem;
margin-left: 2rem;
padding-top: 0;
padding-bottom: 1rem;
}
.text-toggle {
display: inline-block;
cursor: pointer;
}
/*
 * ======================================
 * SEARCH FORM & RESULTS
 * ======================================
 */
.search-form-text {
    padding-right: 1rem;
}
.recent-blog-post,
.search-result-wrapper {
padding-bottom: 1rem;
}
.search-result-word,
.search-result-word a,
.search-result-word a:visited {
    font-family: var(--font-family-bold);
    text-decoration: none;
    color: var(--color-accent);
}
.search-result-word a:hover {
text-decoration: underline;
}
.search-result-definition {
    /* line-height: 1.4; */
}
/*
 * ======================================
 * WORD PAGES (wordURL/index.html)
 * ======================================
 */
.word-headword {
    font-family: var(--font-family-light), var(--font-family-regular);
    font-size: clamp(1.5rem, 1rem + 3vw, 3rem);
    font-weight: bold;
    letter-spacing: 0.5vw;
    text-transform: uppercase;
}
.word-type {
    color: var(--color-darker);
    font-family: var(--font-family-light);
    font-style: italic;
}
.word-definition {
    color: var(--color-darker);
    font-family: var(--font-family-light);
    font-size: 2.5rem;
}
.CitationText, 
.note-citation,
.word-citation {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    padding-left: 0.5rem;
    border-left: 0.25em solid #ccc;
    color: var(--color-darker);
}
.word-citation-year {
    font-size: 1.75rem;
    color: var(--color-dark);
    margin-bottom: -0.75rem;
}
.word-meta-heading {
    font-size: 1.75rem;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    color: var(--color-darker);
}
.word-sub-heading {
    font-weight: normal;
    font-style: normal;
    margin-bottom: 0.25rem;
}
.word-meta-data {
    color: var(--color-darker);
}
.word-meta-data a {
    color: var(--color-accent);
    /* text-decoration: none; */
}
.word-meta-data a:hover {
    /* text-decoration: underline; */
}
.word-notes {
    margin-bottom: 1.25rem;
    color: var(--color-darker);
}
.word-dates {
    margin: 1rem 0;
}

@media (prefers-color-scheme: dark) {
   :root {
        --color-darker: hsl(0deg 0% 90%);
        --color-dark: hsl(0deg 0% 50%);
        --color-light: hsl(0deg 0% 20%);
        --color-lighter: hsl(0deg 0% 0%);
        --color-accent-lighter: hsl(208deg 80% 20%);
        --color-accent: hsl(208deg 56% 38%);
        --color-accent-darker: hsl(208deg 80% 80%);
   }
   a,
   a:visited,
   .word-meta-data a,
   .previous-next-nav > a {
       color: var(--color-accent-darker);
   }
   a:hover,
   a:focus {
       color: var(--color-accent-darker);
   }
   .nav-search-text::placeholder {
       color: var(--color-darker);
   }
}
/* 
 * ----------------------------------------
 * ENABLE GRID LARGER SCREENS
 * ----------------------------------------
 */
@media screen and (min-width: 40rem) {
    main {
        display: grid;
        grid-template-columns: 1fr 65ch 1fr;
        grid-template-rows: auto auto 1fr auto;
        grid-template-areas: 
           "header header header"
           "nav nav nav"
           ". content ."
           "footer footer footer";
        height: 100dvh;
    }
    header {
        grid-area: header;
    }
    .main-nav-wrapper {
        grid-area: nav;
    }
    .main-nav {
        width: 65ch;
    }
    .nav-browse-button {
        display: none;
    }
    .nav-browse-dropdown-contents {
        align-items: center;
        display: flex;
        justify-content: space-between;
        margin-left: 1rem;
        opacity: 1;
        padding-left: 0;
        position: static;
        width: 50%;
    }
    .nav-browse-dropdown-contents > a,
    .nav-browse-dropdown-contents > a:visited {
        color: var(--color-accent-darker);
    }
    .nav-browse-dropdown-contents > a:hover {
        background: var(--color-light);
        color: var(--color-accent-darker);
    }
    article {
        grid-area: content;
    }
    footer {
        grid-area: footer;
    }
    /* .index-tabs {
        flex-wrap: wrap;
        justify-content: space-between;
    } */
}