@font-face {
    font-family: "Monda";
    src: url('/assets/fonts/monda-400.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Monda";
    src: url('/assets/fonts/monda-700.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

/* light mode */
:root {
    --bg: #f9f9f9;
    --bg-alt: #eeeeee;
    --fg: #1c1c1c;
    --date-fg: #727272;
    --link: #005faf;
    --link-hover: #0087d7;
    --accent-brown: #af875f;
    --accent-cyan: #128e8e;
    --max-width: 70ch;
}

/* dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1c1c1c;
        --bg-alt: #161616;
        --fg: #c7c7c7;
        --date-fg: #808080;
        --link: #87afd7;
        --link-hover: #94c7fa;
        --accent-cyan: #87afaf;
        --accent-brown: #af875f;
    }
}

html {
    font-family: "Monda", system-ui, -apple-system, sans-serif;
    scroll-behavior: smooth;
    box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

*,
*::before,
*::after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

body {
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.8;
    background-color: var(--bg);
    color: var(--fg);
    margin: 0;
}

:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
}

p {
    margin-bottom: 1.5rem;
    max-width: var(--max-width);
}

:where(h1, h2, h3) {
    color: var(--accent-cyan);
    font-weight: 700;
    line-height: 1.4;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.2rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.7rem;
}


.post-feed {
    display: grid;
    place-items: center;
    margin: 1rem;
    gap: 1rem;
    height: 20vh;
}

.post-item {
    display: flex;
    grid-template-columns: max-content 1fr;
    gap: 1rem;
    max-width: 50ch;
    align-items: baseline;
}

.post-feed-date {
    color: var(--date-fg);
    text-align: right;
    font-size: 1rem;
    white-space: nowrap;
}

.post-link {
    text-decoration: none;
    text-align: left;
}

.post-link:hover,
.post-link:focus {
    color: var(--link-hover);
    text-decoration: underline;
}

blockquote {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-style: italic;
    margin: 2rem 0;
    padding-left: 1.5rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    border-radius: 10px;
    border-left: 6px solid var(--accent-cyan);
    color: var(--fg);
    background: var(--bg-alt);
}

/* General list resets */
ul,
ol {
    list-style: none;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

li {
    position: relative;
    margin-bottom: 0.75rem;
}

ul>li::before {
    content: "-";
    position: absolute;
    left: -1.25rem;
}

ol {
    list-style: decimal;
}

code,
pre {
    font-family: ui-monospace, monospace;
    font-size: 0.9em;
    background-color: var(--bg-alt);
    border-radius: 4px;
}

code {
    padding: 0.2rem 0.4rem;
}

pre {
    border: 1px solid var(--bg-alt);
    tab-size: 4;
    padding: 1rem;
    overflow-x: auto;
    line-height: 1.5;
    margin: 2rem 0;
}

::selection {
    background-color: var(--accent-cyan);
    color: var(--bg);
}

.wrap {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

.center {
    display: grid;
    place-items: center;
    padding: 1rem;
    text-align: center;
}

header {
    background-color: var(--bg-alt);
    width: 100%;
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
    flex-wrap: wrap;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--link-hover);
    text-decoration: underline;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    padding-right: 1rem;
}

.logo {
    padding-left: 1rem;
}

.contact-info {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 0.5rem;
    row-gap: 0.5rem;
}

.contact-info dt {
    font-weight: 400;
}

.contact-info dd {
    margin: 0;
}