/* ── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
}

/* ── Layout ──────────────────────────────────────────────── */
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Header / Navigation ─────────────────────────────────── */
header {
    padding: 48px 0 16px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111;
    letter-spacing: -0.02em;
}

nav a {
    color: #666;
    text-decoration: none;
    font-size: 0.925rem;
    margin-left: 24px;
    transition: color 0.15s;
}

nav a:hover {
    color: #0366d6;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
    padding: 32px 0 40px;
    border-bottom: 1px solid #eee;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #111;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.hero .subtitle {
    font-size: 1.05rem;
    color: #666;
    font-weight: 400;
}

/* ── Sections ────────────────────────────────────────────── */
section {
    padding: 40px 0;
    border-bottom: 1px solid #eee;
}

section:last-of-type {
    border-bottom: none;
}

section h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

section p {
    margin-bottom: 16px;
    color: #444;
}

/* ── Contact ─────────────────────────────────────────────── */
.contact-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 4px;
}

.contact-list li {
    color: #666;
    font-size: 0.95rem;
}

.contact-list a {
    color: #0366d6;
    text-decoration: none;
}

.contact-list a:hover {
    text-decoration: underline;
}

/* ── Link cards (Projects / Writing) ─────────────────────── */
.link-list {
    list-style: none;
}

.link-list li {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f5f5f5;
}

.link-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.link-list a {
    display: block;
    text-decoration: none;
    color: #0366d6;
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 3px;
    transition: color 0.15s;
}

.link-list a:hover {
    color: #0056b3;
}

.link-list .desc {
    font-size: 0.9rem;
    color: #888;
}

.link-list .meta {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 2px;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
    padding: 40px 0 48px;
    font-size: 0.85rem;
    color: #aaa;
}

/* ── Responsive ──────────────────────────────────────────── */
@media screen and (max-width: 600px) {
    .container {
        padding: 0 18px;
    }

    header {
        padding: 32px 0 12px;
    }

    nav a {
        margin-left: 14px;
        font-size: 0.875rem;
    }

    .hero h1 {
        font-size: 1.65rem;
    }

    .hero .subtitle {
        font-size: 0.95rem;
    }

    section {
        padding: 32px 0;
    }
}
