/* Basic configuration */
:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --border-color: #000000;
    --max-width: 650px;
    --font-serif: "Georgia", "Times New Roman", Times, serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-serif);
    line-height: 1.6;
    font-size: 18px;
    display: flex;
    justify-content: center;
    padding: 4rem 1.5rem;
}

.container {
    width: 100%;
    max-width: var(--max-width);
}

/* Header */
header {
    margin-bottom: 4rem;
}

.site-url {
    font-size: 0.8rem;
    text-transform: lowercase;
    opacity: 0.5;
    letter-spacing: 0.1rem;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: normal;
    margin-bottom: 0;
}

/* About Section */
.about-content {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.profile-photo {
    width: 200px;
    /* Increased size for row alignment prominence */
    height: auto;
    filter: grayscale(100%);
    border: 1px solid var(--border-color);
    padding: 6px;
    background: white;
    flex-shrink: 0;
}

.bio {
    flex: 1;
}

.bio h2 {
    margin-top: 0;
    /* Align H2 with top of photo */
}

/* Work Section */
.repo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.repo-card {
    display: block;
    border: 1px solid var(--border-color);
    padding: 1rem;
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s;
    height: 100%;
}

.repo-card:hover {
    background: #f9f9f9;
}

.repo-card h3 {
    font-size: 1.1rem;
    font-weight: normal;
    margin-bottom: 0.25rem;
}

.repo-desc {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.repo-meta {
    font-size: 0.75rem;
    display: flex;
    gap: 1rem;
    opacity: 0.7;
}

h2 {
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    margin-top: 3rem;
    border-bottom: 1px solid var(--border-color);
    display: inline-block;
    padding-bottom: 2px;
}

p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* Lists */
.writing-list {
    list-style: none;
}

.writing-list li {
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px dotted #ccc;
    padding-bottom: 0.5rem;
}

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

.writing-list a {
    color: var(--text-color);
    text-decoration: none;
    transition: opacity 0.2s;
}

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

.date {
    font-size: 0.9rem;
    color: #666;
    /* Subtle grey for dates still fits the B&W theme */
    font-variant-numeric: tabular-nums;
    margin-right: 1rem;
    order: 2;
}

/* Footer */
footer {
    margin-top: 6rem;
    font-size: 0.8rem;
    text-transform: lowercase;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    opacity: 0.6;
}

/* Media Queries */
@media (max-width: 600px) {
    body {
        padding: 2rem 1rem;
    }

    h1 {
        margin-bottom: 2rem;
    }

    .writing-list li {
        flex-direction: column;
        border-bottom: 1px solid #eee;
        padding-bottom: 0.8rem;
    }

    .about-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .profile-photo {
        width: 120px;
    }

    .date {
        margin-top: 0.2rem;
        font-size: 0.8rem;
    }
}