@import './agate.css';

/**
 * BASE RESET
 */
*, *::before, *::after {
    box-sizing: border-box;
}

img, svg, video {
    display: block;
    max-width: 100%;
}

.font-black { font-weight: 900; }
.font-bold  { font-weight: 700; }

/**
 * TYPOGRAPHY UTILITIES
 */
.text-xl       { font-size: 1.25rem; }
.text-5xl      { font-size: 3rem; }
.text-lg       { font-size: 1.125rem; }
.text-gray-800 { color: #1f2937; }

/**
 * SPACING UTILITIES
 */
.mt-16 { margin-top: 4rem; }
.mb-2  { margin-bottom: 0.5rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-8  { margin-bottom: 2rem; }
.m-0   { margin: 0; }
.p-0   { padding: 0; }
.pl-0  { padding-left: 0; }

/**
 * DISPLAY UTILITIES
 */
.inline-block { display: inline-block; }
.list-none    { list-style: none; margin-top: 0; }
.w-max        { width: max-content; }
.leading-8    { line-height: 2rem; }

body {
    display: grid;
    grid-template-columns: min(39rem, 100%);
    justify-content: center;
    min-height: 100vh;
    margin: 0 auto;
    background-color: white;
    color: #111827;
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 1.25rem;
}

.site_container {
    display: grid;
    justify-content: center;
    align-content: start;
    padding: 0 1rem;
    max-width: 39rem;
    width: 100%;
}

.home {
    align-content: center;
}

.header {
    column-gap: 1.5rem;
    display: grid;
    grid-template-columns: 3fr 1fr;
}

.intro_header {
    grid-column: 1 / span 2;
    margin-top: 1.05rem;
}

.links {
    display: grid;
    margin-top: 1.4rem;
}

.main {
    column-gap: 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
}

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.post-nav p:not(:first-child) {
    text-align: right;
}

@media all and (max-width: 565px) {
    .header, .main, .links {
        display: block;
    }
    .text-5xl {
        font-size: 2.25rem;
    }
}


/**
 * TYPOGRAPHY
 */

html { font-size: 100%; }
a { text-underline-offset: 3px; }
a:hover { color: #0033AA; }

p { margin: 1.5rem 0; }

h1, h2, h3, h4, h5 {
    margin: 0 0 1.5rem;
    font-weight: 400;
    line-height: 1.15;
}

h2:not(:first-child), h3:not(:first-child), h4:not(:first-child), h5:not(:first-child) {
    margin-top: 1.5rem;
}

h1 {
    margin-top: 0;
    font-size: 1.383em;
}

h2 {
    font-size: 1.296em;
    font-weight: 700;
}

h3 { font-size: 1.215em; }
h4 { font-size: 1.138em; }
h5 { font-size: 1.067em; }

.xlg  { font-size: 2.625rem; }
.lg   { font-size: 2.063rem; }
.md   { font-size: 1.625rem; }
.sm   { font-size: 1.25rem; }
.xsm  { font-size: 1rem; }

small, .text_small { font-size: 0.937em; }

ul {
    list-style: disc;
    padding-left: 2em;
}

blockquote {
    background: #f9f9f9;
    border-left: 10px solid #ccc;
    margin: 1.5em 0;
    padding: 0.5em 20px;
}

blockquote p {
    display: inline;
}

.reply {
    border: 3px solid #222;
    padding: 30px 20px;
    display: inline-block;
    box-shadow: 6px 6px 0 0 #222;
    transition: all .1s ease;
    color: #222;
    text-decoration: none;
}

.reply:hover {
    box-shadow: 2px 2px 0 0 #222;
    color: #222;
    transition: all .2s ease;
}

.post-footer {
    text-align: center;
    margin: 3rem 0;
}

.site-footer {
    max-width: 39rem;
    width: 100%;
    padding: 1.5rem 1rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.937em;
}

.site-footer nav {
    display: flex;
    gap: 1.5rem;
}

/**
 * IMAGES
 */

.gallery {
    display: grid;
    column-gap: .5rem;
    row-gap: .5rem;
}

.gallery-cols-1 { grid-template-columns: repeat(1, 1fr); }
.gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-cols-3,
.gallery-cols-4 { grid-template-columns: repeat(2, 1fr); }
.gallery-cols-5,
.gallery-cols-6 { grid-template-columns: repeat(3, 1fr); }

.gallery figure {
    max-width: 100%;
}

figcaption {
    text-align: center;
    margin: 0 auto 1.15em;
    background-color: #222;
    color: #fff;
    font-style: italic;
}

video.gif {
    max-width: 100%;
    margin: 1.5rem 0;
}

/**
 * CODE
 */

pre {
    background: #1f2227;
    color: #cfd0d1;
    overflow-x: auto;
    tab-size: 4;
    margin-bottom: 1.15rem;
    padding: 15px;
    white-space: pre-wrap;
}

pre code {
    display: block;
    overflow-x: auto;
    white-space: pre-wrap;
    font-size: .875rem;
}

code {
    background-color: #1f2227;
    color: #cfd0d1;
    padding: 4px 5px 6px;
    white-space: nowrap;
}

@media all and (max-width: 565px) {
    pre {
        padding: 5px;
    }
}
