html {
    scroll-behavior: smooth;
}

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

body {
    font-family: Georgia, serif;
    line-height: 1.6;
    color: #414141;
    max-width: none;
    margin: 0;
    padding: 0;
}

section {
    margin-bottom: 4rem;
}

.layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.sidebar {
    position: sticky;
    top: 3rem;
    align-self: start;
    height: fit-content;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 2.5rem 0;
    justify-content: flex-start;
}

/* header {
    margin-bottom: 3rem;
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 1rem 0;
    z-index: 10;
} */

/* nav {
    display: flex;
    gap: 1.5rem;
    justify-content:center;
} */

nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
}

nav a:hover {
    color: #000;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #414141;
    padding-bottom: 0.5rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap:1.5rem;
}

.project {
    /* border: 1px solid #eee;
    border-radius: 8px; */
    /* background: #fafafa; */
    /* padding: 2rem; */
    display: flex;
    flex-direction: column;
}

.project h3 {
    margin-bottom: 0.5rem;
}

.project a {
    display: inline-block;
    margin-top: 1rem;
    color: #0066cc;
    text-decoration: none;
}

.project img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 1rem;
    display: block;
}

/* #about {
    padding-top: 2rem;
} */

.tagline {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 1.5rem;
}

/* #about p:not(.tagline) {
    text-align: justify;
    hyphens: auto;
} */

.writings-list {
    list-style: none;
}

.writings-list li {
    padding: 1.25rem 0;
    border-bottom: 1px solid #eee;
}

.writings-list a {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    text-decoration: none;
    color: #414141;
    gap: 1rem;
}

.writings-list a:hover .writing-title {
    color: #0066cc
}

.writing-title {
    font-weight: 500;
}

.writing-date {
    color: #888;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* .writings-list p {
    color: #666;
    font-size: 0.95rem;
    margin-top: 0.25rem;
} */

.contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0,.75rem;
    margin-top: 1rem;
}

.contact-list a {
    display: inline-flex;                                                                                                                                                        
    align-items: center;
    gap: 0.6rem;                                                                                                                                                                        
    color: #414141;
    text-decoration: none;
}

.contact-list svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

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

@media (max-width: 800px) {
    .layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem;
    }
    .sidebar {
        position: static;
    }
    .sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }
    h1 {
        font-size: 1rem;
    }
}