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

body {
    font-family: "Source Sans 3", sans-serif;
    margin: 40px;
    color: #333;
    background-color: #fff;
}

img {
    max-width: 100%;
    height: auto;
}

header h1 {
    font-family: "EB Garamond", serif;
    font-size: 24px;
    font-weight: normal;
    margin: 0;
}

header a {
    text-decoration: none;
    color: inherit;
}

nav {
    text-align: center;
    margin-top: 60px;
    margin-bottom: 60px;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-block;
}

nav ul li {
    display: inline;
    margin: 0 15px;
}

nav ul li a {
    display: inline-block;
    text-decoration: none;
    color: #333;
    font-size: 18px;
    padding: 4px 0;
}

nav ul li a:hover {
    color: orange;
}

nav ul li a.active {
    font-weight: bold;
}

main {
    text-align: left;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

main h2 {
    font-family: "EB Garamond", serif;
    font-size: 28px;
    font-weight: normal;
    margin-bottom: 40px;
    text-align: center;
}

main a {
    color: orange;
    text-decoration: none;
}

main a:hover {
    text-decoration: underline;
}

/* News (index) */
.news-entry,
.news-entry-no-image {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
}

.news-entry {
    display: flex;
    align-items: flex-start;
}

.news-entry img {
    width: 150px;
    flex-shrink: 0;
    margin-right: 25px;
}

.news-entry-text h3,
.news-entry-no-image h3 {
    font-family: "EB Garamond", serif;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.news-entry-text p,
.news-entry-no-image p {
    margin: 0;
}

.news-meta {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px !important;
}

/* About */
.about-image {
    width: min(400px, 100%);
    aspect-ratio: 1;
    max-width: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 40px auto 0 auto;
}

main p {
    margin-bottom: 1em;
}

/* Projects */
.project-entry {
    margin-bottom: 50px;
    border-bottom: 1px solid #eee;
    padding-bottom: 40px;
}

.project-entry:last-child {
    border-bottom: none;
}

.project-entry h3 {
    font-family: "EB Garamond", serif;
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 10px;
}

.project-images {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.project-images img {
    width: calc(50% - 10px);
    height: 250px;
    object-fit: cover;
    border: 1px solid #ddd;
}

.pos-custom {
    object-position: 40% 30%;
}

/* Compositions */
.composition-entry {
    margin-bottom: 50px;
}

.composition-entry h3 {
    font-family: "EB Garamond", serif;
    margin-bottom: 10px;
}

.composition-entry p {
    margin-top: 0;
}

.bandcamp-embed {
    border: 0;
    width: 100%;
    max-width: 350px;
    display: block;
}

.bandcamp-embed--album {
    height: 470px;
}

.bandcamp-embed--track {
    height: 442px;
}

/* Publications */
.publication-entry {
    margin-bottom: 40px;
}

.publication-entry h3 {
    font-family: "EB Garamond", serif;
    margin-bottom: 5px;
}

.publication-entry p {
    margin: 0;
}

/* Workshops */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin-top: 20px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.workshop-entry {
    padding-bottom: 25px;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.workshop-entry:last-child {
    border-bottom: none;
}

.workshop-entry h3 {
    font-family: "EB Garamond", serif;
    margin-bottom: 5px;
}

.workshop-entry p {
    margin: 0;
    color: #666;
}

.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.image-gallery a {
    display: block;
}

.image-gallery img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border: 1px solid #ddd;
    transition: opacity 0.2s;
    cursor: pointer;
}

.image-gallery img:hover {
    opacity: 0.7;
}

/* Contact */
main.main-center {
    text-align: center;
    line-height: 1.8;
}

main.main-center h2 {
    text-align: center;
}

.contact-info {
    font-size: 1.1em;
}

.other-links {
    margin-top: 50px;
    text-align: left;
    display: inline-block;
}

.other-links h3 {
    font-family: "EB Garamond", serif;
    text-align: center;
    font-weight: normal;
}

.other-links ul {
    list-style: none;
    padding: 0;
}

.other-links li {
    margin-bottom: 10px;
}

/* CV */
main.main-wide {
    text-align: center;
    max-width: 900px;
}

.download-button {
    display: inline-block;
    background-color: orange;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    margin-bottom: 40px;
}

.download-button:hover {
    background-color: #e69500;
    text-decoration: none;
}

.pdf-viewer {
    width: 100%;
    height: 800px;
    border: 1px solid #ddd;
}

.pdf-mobile-note {
    display: none;
    margin-bottom: 20px;
    color: #666;
}

/* Mobile */
@media (max-width: 768px) {
    body {
        margin: 16px;
    }

    nav {
        margin-top: 24px;
        margin-bottom: 24px;
    }

    nav ul li {
        display: block;
        margin: 0;
    }

    nav ul li a {
        padding: 10px 0;
        font-size: 17px;
    }

    main h2 {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .news-entry {
        flex-direction: column;
    }

    .news-entry img {
        width: 100%;
        max-width: 200px;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .about-image {
        width: min(280px, 100%);
    }

    .project-images {
        flex-direction: column;
    }

    .project-images img {
        width: 100%;
        height: auto;
        min-height: 180px;
    }

    .image-gallery {
        justify-content: center;
    }

    .pdf-viewer {
        display: none;
    }

    .pdf-mobile-note {
        display: block;
    }
}

@media (max-width: 480px) {
    nav ul li a {
        font-size: 16px;
    }

    main h2 {
        font-size: 22px;
    }

    .bandcamp-embed--album {
        height: 400px;
    }

    .bandcamp-embed--track {
        height: 380px;
    }
}
