:root {
    --background: #f7f4ee;
    --surface: rgba(255, 255, 255, 0.58);
    --text: #1f1f1f;
    --muted: #6f6a61;
    --soft: #9b9488;
    --border: #ddd5c7;
    --border-strong: #cfc4b3;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: Georgia, "Times New Roman", serif;
    background:
        radial-gradient(
            circle at top left,
            rgba(255, 255, 255, 0.85),
            transparent 32rem
        ),
        var(--background);
    color: var(--text);
}

a {
    color: inherit;
}

.page {
    width: min(1080px, 100%);
    min-height: calc(100vh - 4rem);
    margin: 0 auto;
    padding: 2rem;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(3rem, 8vw, 6rem);
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.brand {
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.social-link {
    width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    transition:
        color 160ms ease,
        border-color 160ms ease,
        background 160ms ease;
}

.social-link svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: currentColor;
}

.social-link:hover,
.social-link:focus-visible {
    color: var(--text);
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.5);
}

.hero {
    max-width: 900px;
    margin: 0 auto clamp(4rem, 9vw, 6.5rem);
    text-align: center;
}

.site-name {
    margin: 0;
    font-size: clamp(4.5rem, 12vw, 8rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 0.95;
}

h1 {
    max-width: 780px;
    margin: 2rem auto 0;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: clamp(1.45rem, 3vw, 2.35rem);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.18;
    text-wrap: balance;
}

.tagline {
    max-width: 700px;
    margin: 1.2rem auto 0;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    color: var(--muted);
    line-height: 1.65;
    text-wrap: balance;
}

.projects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.project-card {
    min-height: 24rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    padding: clamp(1.5rem, 3vw, 2rem);
    border: 1px solid var(--border);
    border-radius: 28px;
    background: var(--surface);
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        background 160ms ease;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.78);
}

.card-kicker {
    margin: 0 0 1rem;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.project-card h2 {
    margin: 0 0 1.1rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 400;
    line-height: 1.05;
}

.project-description,
.project-detail {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.project-detail {
    margin-top: 0.85rem;
    color: var(--soft);
}

.status {
    margin: 1.2rem 0 0;
    color: var(--soft);
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 0.88rem;
    line-height: 1.5;
}

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

.project-links a {
    min-height: 2.55rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 0.86rem;
    text-decoration: none;
    transition:
        border-color 160ms ease,
        background 160ms ease;
}

.project-links a:hover,
.project-links a:focus-visible {
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.82);
}

.platform-icon {
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1;
}

.hf-icon {
    font-size: 1rem;
}

.kaggle-icon {
    border: 1px solid currentColor;
    border-radius: 0.28rem;
    font-size: 0.68rem;
    font-weight: 700;
}

.footer {
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 0.9rem;
    color: var(--muted);
}

.footer a {
    text-decoration: none;
}

.footer a:hover,
.footer a:focus-visible {
    text-decoration: underline;
}

@media (max-width: 820px) {
    .projects {
        grid-template-columns: 1fr;
    }

    .project-card {
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .page {
        padding: 1.25rem;
    }

    .header {
        margin-bottom: 3rem;
    }

    .site-name {
        font-size: clamp(4rem, 20vw, 6rem);
    }

    h1 {
        margin-top: 1.5rem;
    }

    .project-links {
        flex-direction: column;
        align-items: stretch;
    }

    .project-links a {
        justify-content: center;
    }
}
