:root {
    --bg-color: #ffffff;
    --text-color: #1f2937;
    --muted-text: #4b5563;
    --link-color: #0b63ce;
    --link-hover: #084ea3;
    --header-bg: #f8fafc;
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
    --ring: #2563eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.10);
    --radius: 10px;
    --max-width: 980px;
    --measure: 75ch;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    line-height: 1.65;
    margin: 0;
    padding: 0;
    text-rendering: optimizeLegibility;
}

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

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

a:hover {
    text-decoration: underline;
    color: var(--link-hover);
}

a:focus-visible {
    outline: 3px solid var(--ring);
    outline-offset: 3px;
    border-radius: 6px;
}

header {
    background-color: var(--header-bg);
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--card-border);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

nav li {
    display: inline;
}

nav a {
    display: inline-block;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    text-decoration: none;
}

nav a:hover {
    text-decoration: none;
    background-color: rgba(15, 23, 42, 0.06);
}

nav a[aria-current="page"] {
    background-color: rgba(11, 99, 206, 0.12);
    border: 1px solid rgba(11, 99, 206, 0.25);
}

main {
    padding: 2.25rem 0;
}

h1 {
    font-size: 2.25rem;
    margin: 0 0 0.75rem;
    letter-spacing: -0.015em;
}

h2 {
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.5rem;
    margin-top: 2.25rem;
    letter-spacing: -0.01em;
}

h3 {
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}

p {
    margin: 0.75rem 0;
    max-width: var(--measure);
}

.intro {
    font-size: 1.1rem;
    color: var(--muted-text);
    margin-bottom: 2rem;
    max-width: var(--measure);
}

.project-card {
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1.35rem 1.35rem;
    margin-bottom: 1.5rem;
    background-color: var(--card-bg);
    box-shadow: var(--shadow-sm);
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(11, 99, 206, 0.35);
}

.project-card p {
    max-width: none;
}

.project-card ul {
    max-width: none;
}

.project-meta {
    font-weight: bold;
    color: var(--muted-text);
    margin-bottom: 0.75rem;
    display: block;
}

ul.bullets {
    padding-left: 1.25rem;
    margin: 0.5rem 0 1rem;
}

ul.bullets li {
    margin: 0.25rem 0;
}

.project-card ul.bullets {
    margin-top: 0.35rem;
    margin-bottom: 0.9rem;
}

.chip-link {
    display: inline-block;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    background-color: rgba(15, 23, 42, 0.04);
    text-decoration: none;
}

.chip-link:hover {
    text-decoration: none;
    background-color: rgba(15, 23, 42, 0.08);
}

figure {
    margin: 1rem 0 1.5rem;
}

figure img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

figcaption {
    margin-top: 0.5rem;
    color: var(--muted-text);
    font-size: 0.95rem;
}

footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--card-border);
    margin-top: 3rem;
    font-size: 0.9rem;
    color: var(--muted-text);
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

footer p {
    max-width: none;
    margin: 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.footer-links a {
    margin: 0;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    h1 {
        font-size: 1.9rem;
    }
    
    nav ul {
        justify-content: center;
        gap: 0.5rem;
    }

    .container {
        padding: 0 1.5rem;
    }

    main {
        padding: 1.75rem 0;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0b1220;
        --text-color: #e5e7eb;
        --muted-text: #b6c0cf;
        --link-color: #6aa9ff;
        --link-hover: #9cc4ff;
        --header-bg: #0f172a;
        --card-bg: #0f172a;
        --card-border: #223047;
        --ring: #93c5fd;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
        --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.45);
    }

    nav a:hover {
        background-color: rgba(148, 163, 184, 0.12);
    }

    nav a[aria-current="page"] {
        background-color: rgba(106, 169, 255, 0.12);
        border-color: rgba(106, 169, 255, 0.25);
    }

    .chip-link {
        background-color: rgba(148, 163, 184, 0.10);
        border-color: var(--card-border);
    }

    .chip-link:hover {
        background-color: rgba(148, 163, 184, 0.16);
    }
}
