/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

* {
    box-sizing: border-box;
}

:root {
    --color-bg: #fff;
    --color-text: #252b35;
    --color-link: rgb(12, 130, 203);
    --color-link-visited: rgb(129, 74, 119);
    --color-box-shadow: rgb(219 178 56 / 60%);
    --color-footer: #f2f2ea;
    --color-input: #f1f1f1;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #18151c;
        --color-text: #b0acb5;
        --color-link: #168cd8;
        --color-link-visited: #a477b6;
        --color-box-shadow: rgb(228 65 196 / 40%);
        --color-footer: #1e1e1d;
        --color-input: #28232e;
    }
}

body {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    min-height: 97svh;
    max-width: 1200px;
    margin-inline: auto;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.6;
    
}

.site-title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 1.25rem;
    margin: 0;
}

.site-title>a {
    text-decoration: none;
    color: var(--color-text) !important;
}

.site-main {
    flex: 1;
}

header {
    margin-bottom: 2rem;
}

a {
    color: var(--color-link);
}

a:visited {
    color: var(--color-link-visited);
}

a[target="_blank"]:after {
    content: "[↗]";
    display: inline-block;
    margin-left: 0.25em;
    font-size: 0.6em;
    font-weight: bold;
    text-decoration: none;
    vertical-align: super;
}

h1,
h2,
h3 {
    font-size: 0.82rem;
    text-transform: uppercase;
}

hr {
    margin-block: 2rem;
    border-color: gray;
    border-style: dashed;
    width: 10ch;
}

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

figure {
    margin-block: 2rem;
    margin-inline: auto;
}

figure img {
    margin-inline: auto;
}

figcaption {
    margin-top: 0.25rem;
    text-align: center;
    color: gray;
}

/* FORMS */

input[type=submit] {
    width: 100%;
    padding: 0.5rem;
    border: none;
    margin-block: 1rem;
    background-color: #295d5e;
    text-transform: uppercase;
    color: #fff;
}

input[type=submit]:hover {
    cursor: pointer;
    background-color: #3c8183;
}

input[type=text] {
    margin-top: 0.25rem;
    width: 100%;
    background-color: var(--color-input);
    color: var(--color-text);
    border: none;
    outline: none;
    padding: 0.5rem;
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
    font-size: 1rem;
}

input[type=text]:focus-within {
    outline: 2px solid #295d5e;
}

textarea {
    margin-top: 0.25rem;
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    background-color: var(--color-input);
    color: var(--color-text);
    border: none;
    outline: none;
    padding: 0.5rem;
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
    font-size: 1rem;
    min-height: 5em;
    max-height: 10em;
}

textarea:focus-within {
    outline: 2px solid #295d5e;
}

.form-field {
    margin-bottom: 1rem;
}

/* LINK ELEMENTS */

.link {
    margin-block: 3rem;
}

.link__title {
    margin-block: 0;
}

.link__title a {
    text-decoration: none;
    color: var(--color-text) !important;
}

.link__url {
    margin-top: 0;
}

.link__meta {
    margin-top: 0;
}

.link__notes {
    margin-bottom: 2rem;
}

@media screen and (min-width: 600px) {
    body {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    header {
        margin-bottom: 4rem;
    }

    .two-columns {
        display: flex;
        gap: 4rem;
    }

    .link:first-of-type {
        margin-top: 0;
    }

    form {
        width: 40%;
    }

    input[type=text], textarea {
        font-size: 0.82rem;
    }

    textarea {
        max-height: 15em;
    }

}

@media screen and (min-width: 900px) {
    body {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .two-columns {
        display: flex;
        gap: 6rem;
    }
}