:root {
    --text: #1a1a1a;
    --text-secondary: #666;
    --bg: #ffffff;
    --bg-alt: #f9f9f9;
    --accent: #0055ff;
    --border: #e5e5e5;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

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

html {
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

/* Layout */

main {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */

.site-header {
    border-bottom: 1px solid var(--border);
}

.site-header nav {
    max-width: 680px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    font-size: 1.1rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 1.5rem;
    border-left: 1px solid var(--border);
}

.nav-icons a {
    color: var(--text-secondary);
    display: flex;
    transition: color 0.2s;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.nav-links a.active {
    font-weight: 600;
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--border);
    max-width: 680px;
    margin: 4rem auto 0;
    padding: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}


/* Typography */

h1, h2, h3 {
    line-height: 1.3;
    font-weight: 600;
}

h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.4rem; margin-top: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.1rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }

p {
    margin-bottom: 1rem;
}

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

a:hover {
    text-decoration: underline;
}

/* Bio */

.bio {
    padding: 2rem 0;
}

.bio h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.bio .tagline {
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.bio .role {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.bio .about {
    font-size: 1rem;
    line-height: 1.7;
}


/* Projects */

.projects-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
}

.project-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.project-card:hover {
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.project-card h3 {
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
}

.project-card-link {
    display: block;
    padding: 1.5rem;
    color: inherit;
    text-decoration: none;
}

.project-card-link:hover {
    text-decoration: none;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.project-tags span {
    background: var(--bg-alt);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

/* Blog list (homepage) */

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

.post-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

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

.post-list a {
    color: var(--text);
    font-weight: 500;
    font-size: 1.05rem;
}

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

.post-list time {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.post-list .excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.3rem;
    line-height: 1.5;
}

/* Blog list (blog page cards) */

.post-list-cards {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
}

.post-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.post-card-link {
    display: block;
    padding: 1.5rem;
    color: inherit;
    text-decoration: none;
}

.post-card-link:hover {
    text-decoration: none;
}

.post-card h3 {
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
}

.post-card time {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.post-card .excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Blog post */

.back-link {
    display: inline-block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    transition: color 0.2s;
}

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

.post-header {
    margin-bottom: 2rem;
}

.post-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.post-header time {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.post-content {
    line-height: 1.8;
}

.post-content h2 {
    margin-top: 2.5rem;
}

.post-content pre {
    background: var(--bg-alt);
    padding: 1rem 1.25rem;
    border-radius: 6px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 1.5rem 0;
}

.post-content code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--bg-alt);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-content img {
    max-width: 100%;
    border-radius: 6px;
}

.post-content blockquote {
    border-left: 3px solid var(--border);
    padding-left: 1rem;
    color: var(--text-secondary);
    margin: 1.5rem 0;
}

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

.post-content li {
    margin-bottom: 0.4rem;
}

/* Home sections */

.home-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.home-section h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.section-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.section-link:hover {
    color: var(--accent);
    text-decoration: none;
}

/* Page header */

.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: 1.8rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/* Responsive */

@media (max-width: 600px) {
    html { font-size: 16px; }
    .bio h1 { font-size: 1.8rem; }
    .site-header nav { padding: 1rem; }
    main { padding: 1.5rem 1rem; }
}
