@font-face {
    font-family: 'Geist Sans';
    src: url('fonts/Geist-Regular.woff2') format('woff2');
    font-weight: 400;
}

@font-face {
    font-family: 'Geist Sans';
    src: url('fonts/Geist-Medium.woff2') format('woff2');
    font-weight: 500;
}

@font-face {
    font-family: 'Geist Sans';
    src: url('fonts/Geist-Bold.woff2') format('woff2');
    font-weight: 700;
}

@font-face {
    font-family: 'Geist Mono';
    src: url('fonts/GeistMono-Regular.woff2') format('woff2');
    font-weight: 400;
}

:root {
    --bg-color: #000;
    --text-color: #fff;
    --secondary-color: #888;
    --accent-color: #0af;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-color: #fff;
        --text-color: #111;
        --secondary-color: #666;
    }
}

body {
    font-family: 'Geist Sans', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    padding: 2rem;
    max-width: 800px;
    margin: auto;
    line-height: 1.6;
}

.shell-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.shell-prompt {
    display: flex;
    /* align-items: center; */
    justify-content: center;
    width: 100%;
    text-decoration: none;
    color: var(--accent-color);
    font-family: 'Geist Mono', monospace;
}

.shell-prompt pre {
    font-size: 0.4rem;
    line-height: 0.9;
    width: 40px;
    height: 40px;
    overflow: hidden;
}

header nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 2rem;
    padding: 0;
    margin-bottom: 1rem;
    list-style: none;
}

header nav a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

header nav a:hover {
    color: var(--secondary-color);
}

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

.dotted-line {
    border: none;
    border-bottom: 1px dotted var(--secondary-color);
    margin-top: 1rem;
}

h1 {
    font-size: 2rem;
}

.research a {
    color: inherit;
    text-decoration: underline;
}

footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    text-align: center;
    border-top: 1px dotted var(--secondary-color);
}

.socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.socials img {
    width: 1.8rem;
    transition: transform 0.2s ease;
    filter: invert(1);
}

@media (prefers-color-scheme: light) {
    .socials img {
        filter: invert(0);
    }
}

.socials img:hover {
    transform: translateY(-4px);
}

.github-contributions {
    margin-top: 3rem;
    text-align: center;
}

.github-contributions img {
    width: 100%;
    max-width: 720px;
    height: auto;
    margin-top: 1rem;
}
/* ---------------------------------------------------------------- *
 *  layout & rhythm
 * ---------------------------------------------------------------- */

main section {
    margin-bottom: 3rem;
}

.page-head {
    margin-bottom: 2rem;
}

.page-head h1 {
    margin-bottom: 0.2rem;
}

.subtitle,
.post-meta {
    color: var(--secondary-color);
    margin-top: 0;
}

.post-meta {
    font-family: 'Geist Mono', monospace;
    font-size: 0.85rem;
}

/* the small underlined lowercase section headings the site has always used */
.label {
    text-decoration: underline;
    margin-bottom: 0.8rem;
}

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

.note,
.colophon {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.more {
    font-family: 'Geist Mono', monospace;
    font-size: 0.85rem;
}

/* ---------------------------------------------------------------- *
 *  entries: projects, roles, posts, research outputs
 * ---------------------------------------------------------------- */

.entry-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.entry,
.role,
.project {
    padding: 1rem 0;
    border-bottom: 1px dotted var(--secondary-color);
}

.entry-list .entry:last-child {
    border-bottom: none;
}

.entry-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.2rem 1rem;
}

.entry-name {
    font-weight: 500;
}

.entry-name a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--secondary-color);
}

.entry-name a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.entry-period {
    font-family: 'Geist Mono', monospace;
    font-size: 0.8rem;
    color: var(--secondary-color);
    white-space: nowrap;
}

.entry-tagline {
    color: var(--secondary-color);
    margin: 0.3rem 0 0;
}

.entry-links {
    font-family: 'Geist Mono', monospace;
    font-size: 0.85rem;
    margin-top: 0.4rem;
}

ul.tight {
    padding-left: 1.1rem;
    margin: 0.6rem 0 0;
}

ul.tight li {
    margin-bottom: 0.3rem;
}

/* ---------------------------------------------------------------- *
 *  tags, stack, stats
 * ---------------------------------------------------------------- */

.tags {
    margin: 0.8rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tags span {
    font-family: 'Geist Mono', monospace;
    font-size: 0.72rem;
    color: var(--secondary-color);
    border: 1px dotted var(--secondary-color);
    border-radius: 2px;
    padding: 0.1rem 0.45rem;
}

.stack {
    margin: 0;
}

.stack dt {
    text-decoration: underline;
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-top: 1rem;
}

.stack dd {
    margin: 0.3rem 0 0;
}

.stats {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
    padding: 1rem 0;
    margin: 0.5rem 0;
    border-top: 1px dotted var(--secondary-color);
    border-bottom: 1px dotted var(--secondary-color);
}

.stats strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 500;
}

.stats span {
    font-family: 'Geist Mono', monospace;
    font-size: 0.75rem;
    color: var(--secondary-color);
}

/* ---------------------------------------------------------------- *
 *  post body
 * ---------------------------------------------------------------- */

.prose h2 {
    font-size: 1.25rem;
    margin-top: 2.2rem;
}

.prose h3 {
    font-size: 1.05rem;
    margin-top: 1.8rem;
}

.prose code {
    font-family: 'Geist Mono', monospace;
    font-size: 0.85em;
    border: 1px dotted var(--secondary-color);
    border-radius: 2px;
    padding: 0.05rem 0.3rem;
}

.prose pre {
    font-family: 'Geist Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    overflow-x: auto;
    padding: 1rem;
    border: 1px dotted var(--secondary-color);
    border-radius: 3px;
}

.prose pre code {
    border: none;
    padding: 0;
    font-size: inherit;
}

.prose blockquote {
    margin: 1.2rem 0;
    padding-left: 1rem;
    border-left: 2px dotted var(--secondary-color);
    color: var(--secondary-color);
}

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

.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 1.2rem 0;
    display: block;
    overflow-x: auto;
}

.prose th,
.prose td {
    text-align: left;
    padding: 0.45rem 0.8rem 0.45rem 0;
    border-bottom: 1px dotted var(--secondary-color);
}

.back-link {
    font-family: 'Geist Mono', monospace;
    font-size: 0.85rem;
}

/* ---------------------------------------------------------------- *
 *  misc
 * ---------------------------------------------------------------- */

.wakatime {
    width: auto;
    height: 40rem;
    margin: 0;
}

.wakatime embed {
    display: block;
}

/* the Hugging Face mark is full-colour, so leave it alone in both themes */
.socials .hf img {
    filter: none;
}

@media (max-width: 600px) {
    body {
        padding: 1.5rem 1rem;
    }

    h1 {
        font-size: 1.6rem;
    }

    header nav ul {
        gap: 0.5rem 1.2rem;
    }

    .entry-head {
        flex-direction: column;
    }

    .wakatime {
        height: 30rem;
    }
}

.motto {
    font-family: 'Geist Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--secondary-color);
    margin: 0.4rem 0;
}
