@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500&display=swap");

/* ─── Palette ─────────────────────────────────────────────────────────────── */

:root {
    --bg: #0b0d0f;
    --bg-surface: #101316;
    --border: #1a1f26;
    --fg: #c9d1da;
    --fg-muted: #454d58;
    --fg-body: #8a96a8;
    --fg-dim: #2a3040;
    --accent: #3dd68c;
    --accent-faint: rgba(61, 214, 140, 0.07);
    --font-mono:
        "JetBrains Mono", "Fira Code", "Cascadia Code", ui-monospace,
        "Courier New", monospace;
    --max-width: 68rem;
}

/* ─── Container ───────────────────────────────────────────────────────────── */

.container {
    max-width: var(--max-width);
    margin: 1rem auto;
    padding: 0 1rem;
    width: 100%;
}

/* ─── Base overrides ──────────────────────────────────────────────────────── */

html {
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--font-mono);
    font-size: 17px;
    font-weight: 300;
}

body {
    line-height: 1.75;
}

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

:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 3px;
}

/* ─── Header ──────────────────────────────────────────────────────────────── */

/* Custom elements: transparent to layout so inner elements participate normally */
site-header,
site-footer {
    display: contents;
}

header {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}

header h1 {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    color: var(--accent);
    display: inline-flex;
    align-items: baseline;
    gap: 0.4ch;
}

/* terminal prompt prefix */
header h1::before {
    content: ">";
    color: var(--fg-muted);
    font-weight: 300;
}

/* blinking cursor */
header h1::after {
    content: "_";
    color: var(--accent);
    animation: blink 1.1s step-start infinite;
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* ─── Back nav (subpages) ─────────────────────────────────────────────────── */

.header-back {
    margin-bottom: 1rem;
}

.header-back a {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--fg-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.5ch;
    transition: color 0.15s ease;
}

.header-back a:hover {
    color: var(--accent);
    text-decoration: none;
}

/* ─── Main ────────────────────────────────────────────────────────────────── */

main {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
}

/* ─── Typography ──────────────────────────────────────────────────────────── */

p {
    font-size: 0.9rem;
    line-height: 1.85;
    color: var(--fg-body);
    max-width: 62ch;
}

h2 {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--fg-muted);
    margin-bottom: 1.25rem;
}

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

h3 {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--fg);
}

/* ─── Sections ────────────────────────────────────────────────────────────── */

section {
    margin-top: 3.5rem;
    padding-top: 0;
}

/* ─── Project list ───────────────────────────────────────────────────────── */

ul {
    list-style: none;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

ul li {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

ul li a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--fg);
    letter-spacing: 0.04em;
    transition: color 0.15s ease;
}

ul li a::before {
    content: "→  ";
    color: var(--fg-dim);
    font-weight: 300;
    transition: color 0.15s ease;
}

ul li a:hover {
    color: var(--accent);
    text-decoration: none;
}

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

ul li strong {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--fg);
    letter-spacing: 0.04em;
}

ul li strong::before {
    content: "→  ";
    color: var(--fg-dim);
    font-weight: 300;
}

ul li p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--fg-muted);
    padding-left: 2ch;
}

/* ─── Links ───────────────────────────────────────────────────────────────── */

a {
    color: var(--fg-muted);
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

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

/* ─── Code ────────────────────────────────────────────────────────────────── */

code,
pre {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 2px;
}

code {
    padding: 0.1em 0.4em;
    color: var(--accent);
}

pre {
    padding: 1.25rem;
    overflow-x: auto;
    line-height: 1.65;
}

pre code {
    background: none;
    border: none;
    padding: 0;
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */

footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

footer small {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--fg-dim);
}

/* ─── Meta text (effective dates, etc.) ───────────────────────────────────── */

.meta {
    font-size: 0.78rem;
    color: var(--fg-muted);
    margin-bottom: 1rem;
}

/* ─── Scrollbar (Webkit) ──────────────────────────────────────────────────── */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--fg-muted);
}
