:root {
    --bg: #fafafa;
    --text: #111; /* Darker for better contrast */
    --text-muted: #444; /* Darker/clearer than #666 */
    --nav-text: #444;
    --link: #2a6db5;
    --link-hover: #1a4d8a;
    --border: #e0e0e0;
    --border-light: #e8e8e8;
    --card-bg: #fff;
    --shadow: rgba(0,0,0,0.05);
    --shadow-hover: rgba(0,0,0,0.1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0a0a0a; /* Slightly deeper black */
        --text: #ffffff;
        --text-muted: #e0e0e0; /* Brighter for better visibility */
        --nav-text: #d0d0d0; /* Brighter for better visibility */
        --link: #90caf9; /* Brighter, more saturated blue */
        --link-hover: #bbdefb;
        --border: #444; /* Higher contrast border */
        --border-light: #333;
        --card-bg: #1a1a1a;
        --shadow: rgba(0,0,0,0.6);
        --shadow-hover: rgba(0,0,0,0.8);
    }
}

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

body {
    margin: 0;
    padding: 40px 20px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    font-family: 'Georgia', serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

/* Nav */
nav {
    margin-bottom: 48px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}
nav ul, footer ul {
    padding: 0;
    list-style: none;
    margin: 0;
    text-align: center;
}
nav ul li {
    display: inline;
    margin-right: 24px;
}
nav ul li a {
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-size: 0.9em;
    font-weight: bold;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* Typography */
h1 {
    font-size: 2.2em;
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
    text-align: center; /* Center main heading */
}
h2 {
    font-size: 1.1em;
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--nav-text);
    margin-top: 36px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 4px;
}
p {
    font-size: 1em;
    line-height: 1.7;
    color: var(--text);
    margin: 0 0 16px;
}

/* Hero Section */
.hero-image {
    width: 100%;
    max-width: 480px;
    height: auto;
    max-height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 auto 16px;
    display: block;
    
    /* Heavier edge blending effect (feathering) */
    -webkit-mask-image: radial-gradient(circle, black 30%, rgba(0, 0, 0, 0) 85%);
    mask-image: radial-gradient(circle, black 30%, rgba(0, 0, 0, 0) 85%);
}

/* Links */
a {
    text-decoration: none;
    color: var(--link);
}
a:hover {
    text-decoration: underline;
    color: var(--link-hover);
}

/* Hidden projects toggle */
.hidden-project {
    display: none !important;
}
.show-all-btn {
    display: block;
    margin: 20px auto;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-size: 0.85em;
    transition: all 0.2s;
}
.show-all-btn:hover {
    border-color: var(--link);
    color: var(--link);
}

/* General lists */
.blurb ul {
    padding-left: 20px;
    margin: 8px 0 16px;
}
.blurb ul li {
    margin-bottom: 6px;
    font-size: 1em;
    color: var(--text);
}

/* Projects grid */
.projects-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 32px 0;
    justify-content: center;
}
.project-card {
    width: calc(50% - 8px);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-bg);
    color: var(--text);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    box-shadow: 0 6px 16px var(--shadow-hover);
    transform: translateY(-2px);
    text-decoration: none;
    border-color: var(--link);
}
.project-card .meta {
    padding: 16px;
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-size: 0.9em;
}
.project-card .meta strong {
    display: block;
    color: var(--link); /* Title now uses the brighter link color */
    margin-bottom: 4px;
    font-size: 1.1em;
}
.project-card .meta div {
    color: var(--text-muted);
}

/* Footer */
footer {
    margin-top: 60px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    font-size: 0.85em;
    color: var(--text-muted);
    font-family: 'Helvetica', 'Arial', sans-serif;
}
footer ul li {
    display: inline;
    margin-right: 20px;
}
footer a {
    color: var(--text-muted);
}
footer a:hover {
    color: var(--text);
}

/* Mobile */
@media (max-width: 600px) {
    body { padding: 24px 16px; }
    h1 { font-size: 1.7em; }
    nav ul {
        display: flex;
        justify-content: space-around;
    }
    nav ul li { margin-right: 0; }
    .hero-image { height: 200px; }
    .project-card { width: 100%; }
}

