/* Indie Music Blog
   Minimal, old-web (y2k) look on a modern base: beveled buttons, window
   panels, a starfield header and a hit counter, with responsive layout,
   dark mode, readable type and reduced-motion support. No web fonts. */

:root {
    --paper: #fbfaf6;
    --panel: #ffffff;
    --ink: #151515;
    --muted: #5c5c68;
    --rule: #151515;
    --soft-rule: #d6d3c8;
    --link: #0000ee;
    --visited: #551a8b;
    --accent: #e6007e;
    --highlight: #ffff66;
    --face: #dedbd2;
    --bevel-light: #ffffff;
    --bevel-dark: #7a776e;
    --titlebar: linear-gradient(90deg, #0a246a, #3a6ea5 60%, #a6caf0);
    --titlebar-ink: #ffffff;
    --night: #0b0b1e;
    --night-ink: #e9e7f5;
    --success: #d7f5d7;
    --info: #e6eeff;
    --danger: #f8d7d7;
    --danger-ink: #b00000;

    --font-body: Verdana, Geneva, Tahoma, sans-serif;
    --font-head: "Times New Roman", Times, Georgia, serif;
    --font-mono: "Courier New", Courier, ui-monospace, monospace;

    --measure: 46rem;
    --gutter: 16px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --paper: #0e0e1c;
        --panel: #16162b;
        --ink: #ecebf5;
        --muted: #a5a3bb;
        --rule: #4a4870;
        --soft-rule: #2c2b48;
        --link: #8db8ff;
        --visited: #c7a2ff;
        --accent: #ff4fb3;
        --highlight: #5b4a00;
        --face: #2a2945;
        --bevel-light: #4d4b75;
        --bevel-dark: #06060f;
        --titlebar: linear-gradient(90deg, #2a1660, #6b3fc2 60%, #c08bff);
        --success: #173a1e;
        --info: #1b2547;
        --danger: #4a1c22;
        --danger-ink: #ff9a9a;
        color-scheme: dark;
    }
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
}

::selection {
    background: var(--highlight);
}

img {
    max-width: 100%;
    height: auto;
}

.wrapper {
    width: 100%;
    max-width: var(--measure);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    left: var(--gutter);
    top: 8px;
    z-index: 10;
    background: var(--panel);
    color: var(--ink);
    padding: 0.5rem 1rem;
    border: 2px solid var(--rule);
}

/* Type */

h1, h2, h3, h4 {
    font-family: var(--font-head);
    line-height: 1.15;
    margin: 2rem 0 0.75rem;
}

h1 {
    font-size: clamp(2rem, 6vw, 2.75rem);
    letter-spacing: -0.01em;
}

h2 {
    font-size: 1.6rem;
}

h3 {
    font-size: 1.3rem;
}

p, ul, ol {
    margin: 0 0 1rem;
}

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

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

a:hover {
    color: var(--accent);
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px dotted var(--accent);
    outline-offset: 2px;
}

.center {
    text-align: center;
}

.lede {
    font-size: 1.1rem;
}

.mono, .eyebrow {
    font-family: var(--font-mono);
}

.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

hr, .rule {
    border: 0;
    border-top: 1px dashed var(--soft-rule);
    margin: 2rem 0;
}

/* Header: starfield band with a chrome title */

.site-header {
    background: #0b0b1e url(/static/images/pixelated-star-background-e09dbw6zvuyp420b.gif) center / 250px repeat;
    color: #fff;
    text-align: center;
    padding: 2.25rem 0 1.75rem;
    border-bottom: 3px double #c0c0c0;
}

.site-title {
    display: inline-block;
    font-family: var(--font-head);
    font-weight: bold;
    font-style: italic;
    font-size: clamp(2.2rem, 9vw, 3.6rem);
    line-height: 1;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: #e8e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #d9dbe6 38%, #7d8296 50%, #eef0f7 62%, #a7abbd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 10px rgba(160, 140, 255, 0.45));
}

.site-title:visited, .site-title:hover {
    color: #e8e8f0;
}

.site-tagline {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    margin: 0.75rem 0 0;
    color: #c9c4ff;
}

/* Nav: a row of beveled buttons */

.site-nav {
    background: var(--face);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem 0;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
}

/* Ticker */

.ticker {
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px solid var(--rule);
    background: var(--panel);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 0.3rem 0;
}

.ticker-track {
    display: inline-flex;
    gap: 2.5rem;
    padding-left: 100%;
    animation: ticker 40s linear infinite;
}

.ticker-track span::first-letter {
    color: var(--accent);
}

@keyframes ticker {
    to { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
    .ticker-track {
        animation: none;
        padding-left: var(--gutter);
    }
}

main {
    padding: 1rem 0 3rem;
    min-height: 60vh;
}

/* Buttons: classic bevel */

button, .btn, .button, input[type="submit"] {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.2;
    color: var(--ink);
    background: var(--face);
    border: 0;
    padding: 0.45rem 0.9rem;
    text-decoration: none;
    cursor: pointer;
    box-shadow:
        inset -1px -1px 0 var(--bevel-dark),
        inset 1px 1px 0 var(--bevel-light),
        inset -2px -2px 0 color-mix(in srgb, var(--bevel-dark) 55%, transparent),
        inset 2px 2px 0 color-mix(in srgb, var(--bevel-light) 70%, transparent);
}

.btn:visited, .button:visited {
    color: var(--ink);
}

button:hover, .btn:hover, .button:hover {
    color: var(--ink);
    background: color-mix(in srgb, var(--face) 85%, var(--panel));
}

button:active, .btn:active, .button:active {
    box-shadow:
        inset 1px 1px 0 var(--bevel-dark),
        inset -1px -1px 0 var(--bevel-light);
    padding: calc(0.45rem + 1px) calc(0.9rem - 1px) calc(0.45rem - 1px) calc(0.9rem + 1px);
}

button:disabled {
    opacity: 0.55;
    cursor: default;
}

.btn-primary, button[type="submit"].btn-primary, #form-submit-button {
    font-weight: bold;
}

#form-submit-button {
    display: block;
    width: 100%;
    font-size: 1rem;
    padding: 0.7rem 1rem;
    margin-top: 0.5rem;
}

/* Window panels */

.window {
    background: var(--panel);
    border: 1px solid var(--rule);
    box-shadow: 4px 4px 0 var(--rule);
    margin: 2rem 0;
}

.window-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: var(--titlebar);
    color: var(--titlebar-ink);
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 0.85rem;
    padding: 0.3rem 0.5rem;
}

.window-title h2, .window-title h3 {
    font: inherit;
    margin: 0;
}

.window-controls {
    display: flex;
    gap: 3px;
}

.window-controls span {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 14px;
    font-size: 10px;
    line-height: 1;
    color: #000;
    background: #dedbd2;
    box-shadow: inset -1px -1px 0 #7a776e, inset 1px 1px 0 #fff;
}

.window-body {
    padding: 1rem 1.25rem;
}

.window-body > :last-child {
    margin-bottom: 0;
}

/* Forms */

label {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="file"], textarea, select {
    display: block;
    width: 100%;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: var(--panel);
    border: 0;
    padding: 0.55rem 0.65rem;
    margin-top: 0.3rem;
    box-shadow:
        inset 1px 1px 0 var(--bevel-dark),
        inset -1px -1px 0 var(--bevel-light),
        inset 2px 2px 0 color-mix(in srgb, var(--bevel-dark) 45%, transparent);
}

textarea {
    min-height: 9rem;
    resize: vertical;
}

input.is-danger, textarea.is-danger, input[aria-invalid="true"] {
    box-shadow: inset 0 0 0 2px var(--danger-ink);
}

.help.is-danger, .field-error, .form-error-text {
    color: var(--danger-ink);
    font-size: 0.85rem;
    margin: -0.6rem 0 1rem;
}

/* Honeypot field: hidden from people, visible to naive bots */
.bt {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.disclaimer-text {
    display: block;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--muted);
    margin-top: 0.75rem;
    font-style: italic;
}

.notification {
    border: 1px solid var(--rule);
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
}

.notification p:last-child {
    margin-bottom: 0;
}

.notification.is-success { background: var(--success); }
.notification.is-info { background: var(--info); }
.notification.is-danger { background: var(--danger); }

.is-hidden {
    display: none !important;
}

/* Home */

.intro {
    margin-top: 1.5rem;
}

.intro h1 {
    margin-top: 0.25rem;
}

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

.columns .window {
    margin: 1rem 0;
}

.checklist {
    list-style: none;
    padding: 0;
}

.checklist li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.checklist li::before {
    content: "\2605";
    position: absolute;
    left: 0;
    color: var(--accent);
}

details {
    border-top: 1px dashed var(--soft-rule);
    padding: 0.75rem 0;
}

details:last-of-type {
    border-bottom: 1px dashed var(--soft-rule);
}

summary {
    cursor: pointer;
    font-weight: bold;
}

summary::marker {
    color: var(--accent);
}

details > p {
    margin: 0.75rem 0 0;
}

/* Post lists */

.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-preview {
    padding: 1.25rem 0;
    border-bottom: 1px dashed var(--soft-rule);
}

.post-preview:first-child {
    padding-top: 0.5rem;
}

.post-preview.has-cover {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 1.25rem;
    align-items: start;
}

.post-preview .thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border: 1px solid var(--rule);
    box-shadow: 3px 3px 0 var(--rule);
}

.post-preview h2, .post-preview h3 {
    margin: 0 0 0.25rem;
    font-size: 1.45rem;
}

.post-preview h2 a, .post-preview h3 a {
    text-decoration: none;
}

.post-preview h2 a:hover, .post-preview h3 a:hover {
    text-decoration: underline;
}

.post-meta {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.empty-state {
    border: 1px dashed var(--soft-rule);
    padding: 1.25rem;
    text-align: center;
    color: var(--muted);
}

/* Articles */

article.post h1 {
    margin-bottom: 0.5rem;
}

article.post .post-body {
    font-size: 1.05rem;
}

article.post .post-body h2 {
    font-size: 1.5rem;
}

article.post blockquote {
    margin: 1.5rem 0;
    padding: 0.25rem 0 0.25rem 1.25rem;
    border-left: 4px solid var(--accent);
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-style: italic;
}

article.post ul, article.post ol {
    padding-left: 1.5rem;
}

article.post code {
    font-family: var(--font-mono);
    background: var(--face);
    padding: 0 0.25rem;
}

.post-sources {
    font-size: 0.85rem;
    margin-top: 2.5rem;
}

.post-sources h2 {
    font-size: 1.1rem;
}

.post-sources li {
    overflow-wrap: anywhere;
}

/* Post images */

.post-image {
    margin: 0 0 2rem;
}

.post-image img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--rule);
}

.post-image figcaption {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.4rem;
}

.post-image .image-caption {
    color: var(--ink);
}

.post-image figcaption a {
    color: inherit;
}

.post-image-inline {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.image-credit {
    font-size: 0.75rem;
    color: var(--muted);
}

/* Footer */

.site-footer {
    background: var(--night);
    color: var(--night-ink);
    padding: 2.5rem 0 2rem;
    border-top: 3px double #c0c0c0;
    font-size: 0.9rem;
}

.site-footer a, .site-footer a:visited {
    color: var(--night-ink);
}

.site-footer a:hover {
    color: #ff7fcb;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-title {
    font-family: var(--font-head);
    font-style: italic;
    font-weight: bold;
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

.footer-blurb {
    color: #b9b6d3;
}

.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
}

.footer-side {
    text-align: right;
}

.hit-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hit-digits {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: #000;
    border: 1px solid #555;
}

.hit-digits span {
    display: inline-block;
    min-width: 1.1em;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: #39ff14;
    background: linear-gradient(180deg, #1a1a1a 0%, #050505 50%, #1a1a1a 100%);
    text-shadow: 0 0 6px rgba(57, 255, 20, 0.6);
    padding: 0 2px;
}

.last-updated {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #b9b6d3;
    margin: 0.5rem 0;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 0.75rem;
}

/* 88x31-style buttons */
.badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 31px;
    overflow: hidden;
    font-family: var(--font-body);
    line-height: 1.05;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid #fff;
    outline: 1px solid #000;
}

.badge small {
    font-size: 7px;
    letter-spacing: 0.04em;
}

.badge b {
    font-size: 11px;
    letter-spacing: 0.02em;
}

.badge-go { background: linear-gradient(180deg, #00add8, #006b87); color: #fff; }
.badge-sqlite { background: linear-gradient(180deg, #e8e8e8, #9da3ad); color: #003b57; }
.badge-any { background: linear-gradient(180deg, #3c1361, #12002b); color: #ffde59; }

.social-links {
    list-style: none;
    padding: 1.25rem 0 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    border-top: 1px dashed #34325a;
}

.social-links svg {
    width: 24px;
    height: 24px;
    fill: var(--night-ink);
    display: block;
}

.social-links a:hover svg {
    fill: #ff7fcb;
}

.copyright {
    text-align: center;
    font-size: 0.75rem;
    color: #8e8bab;
    margin: 1.25rem 0 0;
}

/* Small screens */

@media (max-width: 640px) {
    body {
        font-size: 15px;
    }

    .site-header {
        padding: 1.75rem 0 1.4rem;
    }

    .site-tagline {
        font-size: 0.72rem;
        letter-spacing: 0.04em;
    }

    .columns, .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-side {
        text-align: left;
    }

    .badges {
        justify-content: flex-start;
    }

    .post-preview.has-cover {
        grid-template-columns: 5.5rem 1fr;
        gap: 1rem;
    }

    .post-preview h2, .post-preview h3 {
        font-size: 1.2rem;
    }

    .window {
        box-shadow: 3px 3px 0 var(--rule);
    }

    .window-body {
        padding: 0.9rem 1rem;
    }
}

.badge-any b {
    font-size: 9px;
}

/* Legal pages */
article.legal {
    margin-top: 1.5rem;
}

article.legal h1 {
    margin: 0.25rem 0 0.5rem;
}

article.legal h2 {
    font-size: 1.35rem;
    margin-top: 2.25rem;
}

article.legal ul {
    padding-left: 1.5rem;
}

article.legal li {
    margin-bottom: 0.5rem;
}
