/*
 * b30.in
 * Minimal / Indie Web / Terminal
 */

:root {
    color-scheme: light dark;

    --bg: #f3f1ea;
    --text: #1d1d1b;
    --muted: #77736b;
    --accent: #d79a00;
    --line: #d7d3c8;
    --selection: #d79a00;
    --content-width: 46rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #111210;
        --text: #e8e6df;
        --muted: #918e86;
        --accent: #e0aa22;
        --line: #343530;
        --selection: #d79a00;
    }
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 18px;
}

body {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 4rem 2rem 3rem;
    background: var(--bg);
    color: var(--text);
    font-family:
        ui-monospace,
        "SFMono-Regular",
        "SF Mono",
        Menlo,
        Monaco,
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 1rem;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
}

/* b30 HQ */
h1 {
    position: relative;
    margin: 0 0 3rem;
    font-size: clamp(3.4rem, 13vw, 7rem);
    font-weight: 800;
    line-height: .85;
    letter-spacing: -.09em;
}

h1::after {
    content: "_";
    margin-left: .04em;
    color: var(--accent);
    animation: cursor 1.2s steps(1) infinite;
}

@keyframes cursor {
    50% { opacity: 0; }
}

/* Intro */
h1 + p {
    margin: 0 0 4rem;
    color: var(--muted);
    font-size: 1.1rem;
}

h1 + p::before {
    content: "> ";
    color: var(--accent);
}

/* Sections */
h2 {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 3.5rem 0 1rem;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .14em;
    text-transform: uppercase;
}

h2::before {
    content: "#";
    color: var(--accent);
}

h2::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--line);
}

p {
    margin: 0 0 1.25rem;
}

i {
    color: var(--muted);
    font-style: normal;
}

/* Links */
a {
    color: var(--text);
    text-decoration-line: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: .22em;
    transition:
        color .15s ease,
        text-decoration-color .15s ease;
}

a:hover,
a:focus-visible {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

a:focus-visible {
    outline: 1px dashed var(--accent);
    outline-offset: .3rem;
}

/* Social + Kontakt */
ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

li {
    position: relative;
    padding: .28rem 0 .28rem 1.7rem;
}

li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* The final [with ❤ ...] line acts as a footer */
body > p:last-of-type {
    margin-top: 4.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.8;
}

body > p:last-of-type a {
    color: var(--muted);
    text-decoration-color: var(--line);
}

body > p:last-of-type a:hover,
body > p:last-of-type a:focus-visible {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

::selection {
    background: var(--selection);
    color: #111;
}

@media (max-width: 600px) {
    html {
        font-size: 16px;
    }

    body {
        padding: 2.5rem 1.25rem 2rem;
    }

    h1 {
        margin-bottom: 2rem;
    }

    h1 + p {
        margin-bottom: 3rem;
    }

    h2 {
        margin-top: 2.75rem;
    }

    li {
        overflow-wrap: anywhere;
    }
}

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

    h1::after {
        animation: none;
    }
}
