@import url("https://fonts.googleapis.com/css2?family=Cascadia+Code:ital,wght@0,200..700;1,200..700&display=swap");

:root {
    --gb-bg0_h: #1d2021;
    --gb-bg0: #282828;
    --gb-bg0_s: #32302f;
    --gb-bg1: #3c3836;
    --gb-bg2: #504945;
    --gb-bg3: #665c54;
    --gb-bg4: #7c6f64;

    --gb-gray: #928374;
    --gb-fg4: #a89984;
    --gb-fg3: #bdae93;
    --gb-fg2: #d5c4a1;
    --gb-fg1: #ebdbb2;
    --gb-fg0: #fbf1c7;

    --gb-red: #cc241d;
    --gb-green: #98971a;
    --gb-yellow: #d79921;
    --gb-blue: #458588;
    --gb-purple: #b16286;
    --gb-aqua: #689d6a;
    --gb-orange: #d65d0e;

    --gb-bright-gray: #928374;
    --gb-bright-red: #fb4934;
    --gb-bright-green: #b8bb26;
    --gb-bright-yellow: #fabd2f;
    --gb-bright-blue: #83a598;
    --gb-bright-purple: #d3869b;
    --gb-bright-aqua: #8ec07c;
    --gb-bright-orange: #fe8019;

    --bg: var(--gb-bg0_h);
    --bg-alt: var(--gb-bg0);
    --surface: var(--gb-bg0_s);
    --surface-alt: var(--gb-bg1);
    --surface-soft: var(--gb-bg2);
    --text: var(--gb-fg1);
    --text-muted: var(--gb-fg3);
    --accent: var(--gb-bright-yellow);
    --accent-alt: var(--gb-bright-blue);
    --border: var(--gb-bg3);
    --code-bg: var(--gb-bg0);
    --error: var(--gb-bright-red);
}

body[data-theme="gruvbox"] {
    --bg: #1d2021;
    --bg-alt: #282828;
    --surface: #32302f;
    --surface-alt: #3c3836;
    --surface-soft: #504945;
    --text: #ebdbb2;
    --text-muted: #bdae93;
    --accent: #fabd2f;
    --accent-alt: #83a598;
    --border: #665c54;
    --code-bg: #282828;
    --error: #fb4934;
}

body[data-theme="tokyo-night"] {
    --bg: #1a1b26;
    --bg-alt: #202331;
    --surface: #24283b;
    --surface-alt: #2a2f45;
    --surface-soft: #2f344d;
    --text: #c0caf5;
    --text-muted: #a9b1d6;
    --accent: #7aa2f7;
    --accent-alt: #9ece6a;
    --border: #3b4261;
    --code-bg: #1f2335;
    --error: #f7768e;
}

body[data-theme="catppuccin"] {
    --bg: #1e1e2e;
    --bg-alt: #232634;
    --surface: #313244;
    --surface-alt: #3a3d57;
    --surface-soft: #45475a;
    --text: #cdd6f4;
    --text-muted: #a6adc8;
    --accent: #f5c2e7;
    --accent-alt: #89b4fa;
    --border: #4f4f66;
    --code-bg: #232634;
    --error: #f38ba8;
}

body[data-theme="rose-pine"] {
    --bg: #191724;
    --bg-alt: #1f1d2e;
    --surface: #26233a;
    --surface-alt: #2f2b45;
    --surface-soft: #3a3552;
    --text: #e0def4;
    --text-muted: #908caa;
    --accent: #ebbcba;
    --accent-alt: #9ccfd8;
    --border: #403d52;
    --code-bg: #1f1d2e;
    --error: #eb6f92;
}

body[data-theme="dracula"] {
    --bg: #282a36;
    --bg-alt: #2f3140;
    --surface: #343746;
    --surface-alt: #3b3f52;
    --surface-soft: #44475a;
    --text: #f8f8f2;
    --text-muted: #bd93f9;
    --accent: #ff79c6;
    --accent-alt: #8be9fd;
    --border: #44475a;
    --code-bg: #2b2d3a;
    --error: #ff5555;
}

body[data-theme="one-dark"] {
    --bg: #282c34;
    --bg-alt: #2f333d;
    --surface: #313640;
    --surface-alt: #3a3f4b;
    --surface-soft: #3f4451;
    --text: #abb2bf;
    --text-muted: #8f96a3;
    --accent: #61afef;
    --accent-alt: #98c379;
    --border: #3e4451;
    --code-bg: #21252b;
    --error: #e06c75;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family:
        "Cascadia Code", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo,
        Consolas, monospace;
    font-size: 0.95rem;
    line-height: 1.5;
}

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

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

nav ul {
    list-style: none;
    padding: 0.45rem 0.8rem;
    margin: 0;
    display: flex;
    gap: 1.25rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
}

nav a {
    color: var(--text-muted);
    text-transform: lowercase;
    letter-spacing: 0.08em;
}

nav a[aria-current="page"] {
    color: var(--accent);
}

main {
    display: flex;
    flex-direction: column;
    gap: 2.4rem;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-weight: 500;
}

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

.prompt {
    display: inline-block;
    color: var(--accent-alt);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.terminal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.15rem 1.4rem;
}

.terminal-card + .terminal-card {
    margin-top: 1.1rem;
}

.stack-card {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    padding: 0.9rem 1rem;
}

.muted {
    color: var(--text-muted);
}

.section-lead {
    color: var(--text-muted);
    max-width: 40ch;
}

.grid {
    display: grid;
    gap: 1rem;
}

.meta-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tag-list {
    list-style: none;
    padding: 0;
    margin: 0.6rem 0 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    padding: 0.15rem 0.45rem;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.project-card .tag-list {
    margin-top: 0;
}

.project-link {
    margin-top: auto;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-card .project-actions {
    margin-top: auto;
}

.project-actions-top {
    margin-top: 0.75rem;
}

.project-article {
    margin-top: 1.25rem;
    display: grid;
    gap: 1rem;
}

.project-article h2,
.project-article h3 {
    margin: 1.6rem 0 0.6rem 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.95rem;
    color: var(--accent-alt);
}

.project-article p {
    margin: 0;
    color: var(--text-muted);
}

.project-article img {
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.project-article ul {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-muted);
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.project-back {
    margin-top: 1.1rem;
}

.work-range {
    margin: 0.15rem 0 0.6rem 0;
}

.work-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.code-block {
    background: var(--code-bg);
    border: 1px solid var(--border);
    padding: 0.9rem;
    margin-top: 0.9rem;
    white-space: pre-wrap;
}

.contact-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.contact-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.4rem;
}

.contact-card code {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 0.15rem 0.35rem;
}

footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
}

.theme-switcher {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-transform: lowercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.theme-switcher label {
    font-size: 0.72rem;
}

.theme-switcher select {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.2rem 0.35rem;
    font-family: inherit;
    font-size: 0.78rem;
    text-transform: lowercase;
}

@media (max-width: 720px) {
    .container {
        padding: 2.25rem 1.1rem 2.75rem 1.1rem;
        gap: 2rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .theme-switcher {
        margin-left: 0;
    }
}
