/*
 * Long and Short
 * Site-specific typography and layout.
 *
 * Visual customization belongs here rather than in the Hugo theme.
 */

/* Google Fonts imports must precede ordinary CSS rules. */
@import url("https://fonts.googleapis.com/css2?family=Lora:wght@400;500;700&display=swap");


/* --------------------------------------------------
   Design values
   -------------------------------------------------- */

:root {
    --paper: #f8f6f1;
    --ink: #58140f;
    --accent: #2f4f4f;

    /* --doctype-color: #214B8F; */
    --doctype-color: #6C3BAA;

    --measure: 55ch;
    --reading-width: 35rem;

    --reading-font-size: .92rem;
    --reading-line-height: 1.25;
}

html,
body,
.container,
.single,
.single main,

.about-page,
.about-page main,
.about-article {
  background-color: var(--paper);
  color: var(--ink);
}

/* Align page content with the masthead. */

.container {
    padding-left: 0;
    padding-right: 0;
}

/* --------------------------------------------------
   Page
   -------------------------------------------------- */


body {
  font-family: "Lora", Georgia, serif;
  background: var(--paper);
  color: var(--ink);
}

/* --------------------------------------------------
   Typography
   -------------------------------------------------- */

/*
 * Common reading-page typography will go here after
 * we inspect an ordinary essay page.
 */


/* --------------------------------------------------
   Headings
   -------------------------------------------------- */


/* --------------------------------------------------
   Navigation
   -------------------------------------------------- */


/* --------------------------------------------------
   Links
   -------------------------------------------------- */


/* --------------------------------------------------
   Reading pages
   -------------------------------------------------- */

/*
 * Remove Hugo Prose's white card treatment from ordinary
 * essays, stories, reviews, notes, and other single pages.
 */
.single main {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

/*
 * Keep the title and publication information aligned with
 * the article text.
 */

.single .entry-topics {
    margin-bottom: 0;
}

.single .article-meta {
  max-width: var(--measure);
  margin: 0.5rem auto 1.25rem;
  text-align: left;
}

/*
 * Site-wide long-form reading typography.
 */
.single .article {
    max-width: var(--measure);
    margin: 0 auto 5rem;
    padding: 0;
    line-height: var(--reading-line-height);
}

/* Ordinary prose */
.single .article p,
.single .article li,
.single .article blockquote {
    font-size: var(--reading-font-size);
}

/* --------------------------------------------------
   About page
   -------------------------------------------------- */

.about-page main {
  max-width: 40rem;
}

.about-article {
  max-width: var(--measure);
  margin: 1rem auto 5rem;
  font-size: var(--reading-font-size);
  line-height: var(--reading-line-height);
}

.about-article > :first-child {
  margin-top: 0;
}


/* --------------------------------------------------
   Responsive adjustments
   -------------------------------------------------- */


/* --------------------------------------------------
   Dark mode
   -------------------------------------------------- */

/*
 * Hugo Prose supplies dark-mode styling. Override it so that
 * Long and Short retains its light paper-like presentation.
 */
@media (prefers-color-scheme: dark) {
  body {
    background: var(--page-background);
    color: var(--text-color);
    filter: none;
  }

  img {
    filter: none;
  }
}

/* Temporary diagnostic */

.single main,
.single .article,
.single .article-meta,
.about-page main,
.about-article {
  background: transparent;
  color: inherit;
}


/* Collection and taxonomy pages */

.collection-header {
    margin-bottom: 0.85rem;
}

.collection-header h1 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 24px;
    line-height: 1.15;
}

.collection-description > p {
    font-size: 0.80rem;
    line-height: 1.22;
    margin: 0 0 0.45rem;
}

.collection-description > :first-child {
    margin-top: 0;
}

.collection-description > :last-child {
    margin-bottom: 0;
}

/* Notes index: keep the introduction close to the chronological list. */

.notes-index .collection-header {
    margin-bottom: 3rem;
}

.notes-index .entry-list {
    margin-top: 0;
}

/* Lists of articles */

.entry-list {
    margin-top: 2.5rem;
}

.entry {
    margin: 0 0 3.5rem;
}

.entry-title {
    margin: 0 0 0.25rem;
    font-size: 1.3em;
    font-weight: 600;
    line-height: 1.25;
}

.entry-title a {
    color: var(--accent, darkslategray);
    text-decoration: none;
}

.entry-title a:hover,
.entry-title a:focus {
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.entry-date {
    margin-bottom: 0.85rem;
    font-size: 0.88em;
    opacity: 0.62;
}

.entry-summary {
    margin: 0;
}

.entry-summary > :first-child {
    margin-top: 0;
}

.entry-summary > :last-child {
    margin-bottom: 0;
}

.entry-topics {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9em;
    color: var(--accent, darkslategray);
}

.entry-topics a {
    color: var(--accent, darkslategray);
    text-decoration: none;
}

.entry-topics a:hover,
.entry-topics a:focus {
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.topic-separator {
    opacity: 0.5;
}

.topic-entry-list {
    margin-top: 0.75rem;
}

/* Index of all topics */

.topic-index {
    max-width: 24rem;
}

.topic-index {
    max-width: 24rem;
    margin: 0.35rem 0 0;
    padding: 0;
    list-style: none;
}

.topic-index li {
    margin: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}

.topic-index a {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.84rem;
    padding: 0.22rem 0;

    color: var(--accent);
    text-decoration: none;
}

.topic-index a:hover .topic-name,
.topic-index a:focus .topic-name {
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.topic-name {
    min-width: 0;
}

.topic-count {
    flex: 0 0 auto;
    font-size: 0.82em;
    color: inherit;
    opacity: 0.58;
}

.entry-topics {
    margin-top: 1rem;
    font-size: 0.9em;
    color: var(--accent, darkslategray);
}

.entry-topics a {
    color: inherit;
    text-decoration: none;
}

.entry-topics a:hover,
.entry-topics a:focus {
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.topic-separator {
    opacity: 0.45;
}

/* --------------------------------------------------
   Related articles
   -------------------------------------------------- */

.related {
    margin-top: 2.5rem;
    padding-top: 0.8rem;
    border-top: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
}

.related-label {
    margin: 0 0 0.9rem;
    font-size: 1.05em;
    font-weight: 500;
    text-transform: lowercase;
}

.related ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.related li {
    margin: 0 0 0.6rem;
}

.related a {
    color: var(--accent, darkslategray);
    text-decoration: none;
}

.related a:hover,
.related a:focus {
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

/* --------------------------------------------------
   Headings on individual documents
   -------------------------------------------------- */

/* Document title */

.single .article-meta h1 {
    margin-top: 0;
    margin-bottom: 1.25rem;
    font-size: 26px;
    line-height: 1.15;
}

.single .article-meta h1 .title {
    font-size: inherit;
    line-height: inherit;
}

/* Major divisions within the document */
.single .article h2 {
    font-size: 22px;
    line-height: 1.2;
}

/* Subdivisions within a major division */
.single .article h3 {
    font-size: 18px;
    line-height: 1.25;
}

/* --------------------------------------------------
   Document type and genre-specific titles
   -------------------------------------------------- */

.document-type {
    position: relative;
    left: 0.25rem;
    margin: 0 0 1.15rem;
    color: var(--doctype-color);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

/* Notes use a quieter title than long-form documents. */
.single.document-note .article-meta h1 {
    font-size: 24px;
    line-height: 1.18;
}

/* ==========================================================
   Masthead and main navigation
   ========================================================== */

.masthead {
    max-width: var(--measure);
    margin: 1.25rem auto 1.25rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--border-color);
}

.site-title {
    margin-bottom: 0.45rem;
}

.site-title a {
    color: #1D4E89;              /* Prussian Blue */
    font-size: 28px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: 0.01em;
    text-decoration: none;
}

/*
Reset presentation inherited from hugo-prose's original menu.
*/
.masthead .menu {
    position: static;
    width: auto;
    margin: 0;
    padding: 0;

    background: transparent;
    border: 0;
    box-shadow: none;
}

.masthead .menu ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.35rem;

    margin: 0;
    padding: 0;

    list-style: none;
}

.masthead .menu li {
    margin: 0;
    padding: 0;
}

.masthead .menu a {
    display: inline;
    padding: 0;

    color: var(--accent);
    background: transparent;

    font-size: 17px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
}

.masthead .menu a:hover {
    text-decoration: underline;
}

.masthead .menu a.active {
    font-weight: 700;
}

.single .article > * {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
}

/* Align collection and taxonomy pages with the masthead. */

/* Align collection and taxonomy pages with the masthead. */

.list main {
    width: 100%;
    max-width: var(--measure);
    margin-left: auto;
    margin-right: auto;
}

/* Collection-page introductory text */

.list .collection-description > p {
    font-size: 0.82rem;
    line-height: 1.35;
    margin-top: 0;
    margin-bottom: 0.7rem;
}

.list .collection-description > p:last-child {
    margin-bottom: 0;
}

.list .collection-header {
    margin-bottom: 1rem;
}

/* Archive */

.archive-list {
    margin-top: 0.75rem;
    row-gap: 0.35rem;
}

.archive-entry {
}
.archive-entry {
    display: grid;
    padding: 0.18rem 0;
    align-items: baseline;
    font-size: 0.80rem;
    line-height: 1.25;
    grid-template-columns: 6.8rem 4.8rem 1fr;
    column-gap: 0.6rem;
}

.archive-date,
.archive-doctype {
    white-space: nowrap;
}

.archive-doctype {
    text-transform: lowercase;
}

.archive-title {
    min-width: 0;
}

/* Archive, Masthead, list: narrow screens */

@media (max-width: 700px) {
    .masthead,
    .list main {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .archive-entry {
        grid-template-columns: 1fr;
        row-gap: 0.1rem;
        padding: 0.45rem 0;
    }

    .archive-date,
    .archive-doctype,
    .archive-title {
        grid-column: 1;
    }

    .archive-date {
        font-size: 0.9em;
        opacity: 0.68;
    }

    .archive-doctype {
        font-size: 0.9em;
    }

    .archive-title {
        margin-top: 0.05rem;
    }
}

/* Archive links */

.archive-title,
.archive-title:visited {
    color: #1D4E89; /* Prussian Blue */
    text-decoration: none;
}

.archive-title:hover,
.archive-title:focus {
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.section-entry-list {
    margin-top: 0.75rem;
}
