:root {
    --bg-color: #ffffff;
    --text-primary: #111111;
    --text-secondary: #505055;
    --text-tertiary: #7f7f85;
    --border-color: #f2f2f7;
    --accent-bg: #f5f5f7;
    --link-color: #0056b3;
    --spacing-xs: 4px;
    --spacing-sm: 12px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 96px;
    --font-stack: Georgia, "Palatino", "Palatino Linotype", "Book Antiqua", serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html,
body {
    min-height: 100vh;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-stack);
    font-size: 16px;
    line-height: 1.5;
    padding-left: var(--scrollbar-compensation, 0px);
}

.container {
    width: 100%;
    max-width: 680px;
    min-height: 100vh;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
    display: flex;
    flex-direction: column;
}

.container > header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
}

.container > header h1 {
    margin: 0;
    line-height: 1;
}

.container > header h1 a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}

nav {
    display: flex;
    gap: var(--spacing-md);
    align-items: baseline;
}

nav a {
    font-size: 16.5px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    line-height: 1;
}

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

.container > main {
    flex: 1;
}

h1,
h2,
h3,
h4 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 30px;
    margin-bottom: 8px;
}

h3 {
    font-size: 23px;
    margin: var(--spacing-lg) 0 var(--spacing-md);
}

body.page-about .content h3 {
    font-size: 20px;
    margin: 36px 0 14px;
}

p,
li {
    color: var(--text-secondary);
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--text-primary);
}

article > header {
    margin-bottom: var(--spacing-lg);
}

article > header .meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.content {
    font-size: 16px;
    line-height: 1.7;
}

.content p {
    margin-bottom: 1rem;
}

.content ul,
.content ol {
    margin: 0 0 1.25rem 1.5rem;
    padding-left: 1.25rem;
}

.content ul {
    list-style: disc;
}

.content ol {
    list-style: decimal;
}

.content li {
    margin-bottom: 0.45rem;
}

.content li > p {
    margin-bottom: 0.45rem;
}

.content strong,
strong,
b {
    color: var(--text-primary);
    font-weight: 600;
}

hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: var(--spacing-lg) 0;
}

pre {
    background: var(--accent-bg);
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
    font-size: 0.9em;
    margin: 1.25rem 0;
}

code {
    font-family: "SFMono-Regular", "Menlo", "Monaco", monospace;
    background-color: rgba(27, 31, 35, 0.05);
    padding: 0.15em 0.35em;
    border-radius: 4px;
    font-size: 0.85em;
}

pre code {
    background: transparent;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
}

.meta,
.date,
.cv-year {
    font-size: 15px;
    color: var(--text-secondary);
}

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

.post-list li {
    margin-bottom: 14px;
}

.post-list li .date {
    min-width: 120px;
    display: inline-block;
    margin-right: 16px;
    font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
    letter-spacing: 0.01em;
}

.home-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    padding-top: 0.5rem;
}

.globe-shell {
    width: 100%;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#particle-globe {
    width: 300px;
    height: 300px;
    max-width: 100%;
    display: block;
    opacity: 0.9;
}

.home-identity {
    width: 100%;
    max-width: 560px;
    position: relative;
    padding-top: 1.5rem;
}

.home-identity::before {
    content: "";
    display: block;
    width: 56px;
    height: 1px;
    margin: 0 auto 1.5rem;
    background: var(--border-color);
}

.home-intro {
    max-width: 560px;
    text-align: center;
}

.home-intro .content {
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.85;
    text-wrap: balance;
}

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

.cv-entry {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0 20px;
    margin-bottom: 1.5rem;
}

.cv-school {
    color: var(--text-primary);
    font-weight: 600;
}

.cv-degree {
    color: var(--text-secondary);
}

.container > footer {
    width: 100%;
    margin-top: auto;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-tertiary);
}

.container > footer p {
    color: inherit;
}

body.page-home .container > header {
    margin-bottom: var(--spacing-xl);
}

@media (max-width: 600px) {
    .container {
        padding: 36px 20px;
    }

    .container > header {
        flex-wrap: wrap;
        align-items: center;
        gap: 10px 20px;
        margin-bottom: 72px;
    }

    nav {
        gap: 16px;
    }

    .globe-shell {
        min-height: 240px;
    }

    #particle-globe {
        width: 240px;
        height: 240px;
    }

    .home-hero {
        gap: 2rem;
    }

    .home-intro .content {
        font-size: 16px;
        line-height: 1.75;
    }

    .home-identity {
        padding-top: 1.25rem;
    }

    .home-identity::before {
        margin-bottom: 1.25rem;
    }

    .cv-entry {
        grid-template-columns: 1fr;
        gap: 6px 0;
        margin-bottom: 2rem;
    }

    .post-list li .date {
        min-width: 104px;
    }
}
