* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #ece9e1;
    --text-strong: #1a1a1a;
    --text-body: #383838;
    --text-desc: #414141;
    --text-muted: #5c5c5c;
    --text-meta: #616161;
    --nav: #333333;
    --divider: #d6d2c8;
    --hover: #000000;
    --selection: #d8d3c6;
}

:root[data-theme="dark"] {
    --bg: #1a1a1a;
    --text-strong: #ece9e1;
    --text-body: #d3d0c7;
    --text-desc: #c3c0b6;
    --text-muted: #98958b;
    --text-meta: #8b887e;
    --nav: #ddd9cd;
    --divider: #34332d;
    --hover: #faf8f2;
    --selection: #37352d;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text-strong);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body,
nav a,
h2,
.project-name,
.project-links a,
li a,
.bio,
li p,
.pub-meta,
.more,
#theme-toggle {
    transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

main {
    max-width: 620px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
}

header {
    margin-bottom: 1.7rem;
}

h1 {
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.bio {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-body);
    margin-top: 0.75rem;
    line-height: 1.65;
}

.bio a {
    color: inherit;
    text-decoration: none;
}

.bio a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

nav {
    display: flex;
    gap: 1.75rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--divider);
}

nav a {
    font-size: 0.95rem;
    font-weight: 450;
    color: var(--nav);
    text-decoration: none;
}

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

section {
    margin-bottom: 3rem;
}

h2 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

ul {
    list-style: none;
}

li {
    margin-bottom: 1.25rem;
}

.project-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.project-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-strong);
}

.project-name a {
    color: inherit;
    text-decoration: none;
}

.project-name a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.project-links {
    display: flex;
    gap: 0.6rem;
}

.project-links a {
    font-size: 0.85rem;
    font-weight: 450;
    color: var(--text-muted);
    text-decoration: none;
}

.project-links a:hover {
    color: var(--hover);
}

li a {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-strong);
    text-decoration: none;
}

li a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

li p {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-desc);
    margin-top: 0.3rem;
}

.pub-meta {
    font-size: 0.8rem;
    color: var(--text-meta);
}

.pub-links {
    display: flex;
    gap: 0.9rem;
    margin-top: 0.3rem;
    font-size: 0.68rem;
}

.pub-links a {
    font-size: 0.80rem;
    color: var(--text-muted);
    text-decoration: none;
}

.pub-links a:hover {
    color: var(--hover);
}

.more {
    font-size: 0.95rem;
    font-weight: 450;
    color: var(--text-muted);
    text-decoration: none;
}

.more:hover {
    color: var(--hover);
}

#theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: 1px solid var(--divider);
    border-radius: 50%;
    color: var(--text-muted);
    line-height: 1;
    cursor: pointer;
}

#theme-toggle svg {
    display: block;
}

#theme-toggle:hover {
    color: var(--hover);
    border-color: var(--text-muted);
}

@media (max-width: 480px) {
    main {
        padding: 4rem 1.5rem 2rem;
    }

    nav {
        gap: 1.25rem;
    }

    h1 {
        font-size: 1.3rem;
    }

    #theme-toggle {
        top: 1rem;
        right: 1rem;
    }
}

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