/* Post listing pages: /blog/ and /drosophila/. */

* {
    box-sizing: border-box;
}

::selection {
    background: #f9e6e6;
}

::-moz-selection {
    background: #f9e6e6;
}

html {
    overflow-x: hidden;
    overflow-y: scroll;
}

body {
    margin: 0;
    padding: 0;
    background: #fff;
    font-family: "Alegreya", Georgia, "Times New Roman", serif;
    font-size: 17.6px;
    font-weight: 400;
    line-height: 1.5;
    font-optical-sizing: auto;
    font-variant-numeric: oldstyle-nums;
    font-feature-settings: "onum";
}

a {
    color: #434c5e;
    text-decoration: underline;
}

a:hover {
    color: #434c5e;
}

.container {
    width: min(100% - 48px, 620px);
    margin: 0 auto;
    padding: 120px 0 88px;
}

@media screen and (max-width: 640px) {
    .container {
        width: min(100% - 32px, 620px);
        padding: 64px 0 64px;
    }
}

.bio {
    max-width: none;
}

.bio__header {
    margin-bottom: 20px;
    font-weight: 400;
    font-size: 25.3px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: "Alegreya", Georgia, "Times New Roman", serif;
}

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

.bio__header a:hover {
    text-decoration: none;
}

.bio__header .home-otimes {
    color: #434c5e;
    font-size: 22px;
}

.bio__header .home-otimes:hover {
    color: #434c5e;
}

.bio__tabs {
    margin-bottom: 20px;
    font-style: italic;
}

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

.bio__tabs a:hover {
    color: #434c5e;
}

.content {
    width: 100%;
    max-width: none;
}

.page-title {
    font-weight: 500;
    font-size: 20px;
    margin-bottom: 10px;
    font-family: "Alegreya", Georgia, "Times New Roman", serif;
}

.page-desc {
    font-style: italic;
    margin-bottom: 30px;
}

.post-entry {
    margin-bottom: 25px;
}

.post-entry h3 {
    font-weight: 500;
    font-size: 17px;
    margin: 0 0 5px 0;
    font-family: "Alegreya", Georgia, "Times New Roman", serif;
}

.post-entry p {
    margin: 0;
    font-style: normal;
}

.post-entry a.read-more {
    text-decoration: none;
    color: gray;
    font-style: italic;
}

.post-entry a.read-more:hover {
    color: #434c5e;
}

.post-entry.hidden {
    display: none;
}

.tag-filters {
    margin-bottom: 25px;
    margin-top: -10px;
}

.tag-btn {
    font-family: inherit;
    font-size: 14px;
    font-style: italic;
    background: none;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 3px 12px;
    cursor: pointer;
    color: #999;
    transition: all 0.15s ease;
    margin-right: 4px;
}

.tag-btn:hover {
    background: #f5f5f5;
    color: #555;
}

.tag-btn.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* /drosophila/ daily log: one line per problem, date then title. */
.log {
    list-style: none;
    margin: 0;
    padding: 0;
}

.log .log-entry {
    display: flex;
    gap: 14px;
    align-items: baseline;
    margin: 0 0 9px;
}

.log .log-entry.hidden {
    display: none;
}

.log-entry time {
    flex: 0 0 3.4em;
    color: gray;
    font-size: 15px;
    font-variant-numeric: oldstyle-nums tabular-nums;
}

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

.log-entry a:hover {
    color: #434c5e;
    text-decoration: underline;
}

/* Light/dark toggle in the header. The palette and the saved choice come
   from /assets/reading-theme.css and /assets/reading-theme.js, so the
   listings and the posts share one setting. */
.header-tools {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--reading-icon);
    cursor: pointer;
}

.theme-toggle[hidden] {
    display: none;
}

.theme-toggle:hover {
    color: var(--reading-link);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--reading-link);
    outline-offset: -4px;
}

.theme-toggle svg {
    display: block;
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.theme-toggle .theme-sun,
html[data-theme="dark"] .theme-toggle .theme-moon {
    display: none;
}

html[data-theme="dark"] .theme-toggle .theme-sun {
    display: block;
}

/* Dark palette for the listing pages. */
html[data-theme="dark"] body {
    background: var(--reading-paper);
    color: var(--reading-ink);
}

html[data-theme="dark"] ::selection {
    background: #565046;
}

html[data-theme="dark"] a,
html[data-theme="dark"] .bio__header .home-otimes,
html[data-theme="dark"] .post-entry a.read-more:hover,
html[data-theme="dark"] .log-entry a:hover {
    color: var(--reading-link);
}

html[data-theme="dark"] .bio__header a:not(.home-otimes),
html[data-theme="dark"] .log-entry a {
    color: var(--reading-ink);
}

html[data-theme="dark"] .post-entry a.read-more,
html[data-theme="dark"] .log-entry time {
    color: var(--reading-secondary);
}

html[data-theme="dark"] .tag-btn {
    border-color: var(--reading-rule);
    color: var(--reading-secondary);
}

html[data-theme="dark"] .tag-btn:hover {
    background: var(--reading-hover);
    color: var(--reading-ink);
}

html[data-theme="dark"] .tag-btn.active {
    background: var(--reading-ink);
    border-color: var(--reading-ink);
    color: var(--reading-paper);
}
