/**
 * christianobermaier.com – Stylesheet
 *
 * Design references: mjammjam.com (structure), milesskinner.com (reduction)
 * Approach: System font stack, monochrome, generous whitespace,
 *           single-column editorial layout.
 */

/* ==========================================================================
   0. Reset & Base
   ========================================================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue',
                 Arial, sans-serif;
    font-size: 2rem;
    line-height: 1.7;
    color: #fff;
    background-color: #5B21B6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.6;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.25);
    margin: 2rem 0;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4 {
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

h3 {
    font-size: 1.15rem;
}

p + p {
    margin-top: 1em;
}

/* ==========================================================================
   1. Layout
   ========================================================================== */

.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    min-height: 70vh;
}

/* ==========================================================================
   2. Header & Hamburger Navigation
   ========================================================================== */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.site-title {
    font-size: clamp(1.2rem, 2.2vw, 2rem);
    font-weight: 400;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    z-index: 1001;
}

/* Hamburger Button */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #fff;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger → X animation */
.hamburger.is-active .hamburger-line:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.hamburger.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.is-active .hamburger-line:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Navigation Overlay */
.main-nav {
    position: fixed;
    inset: 0;
    background: #5B21B6;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.main-nav.is-open {
    opacity: 1;
    visibility: visible;
}

.main-nav ul {
    text-align: center;
}

.main-nav li {
    margin: 1.5rem 0;
}

.main-nav a {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: 0.2em;
    font-weight: 300;
    text-transform: uppercase;
}

.main-nav a.active {
    border-bottom: 1px solid #fff;
    padding-bottom: 2px;
}

/* ==========================================================================
   3. Home Page & Works List
   ========================================================================== */

.home-works {
    padding: 3rem 0 6rem;
}

/* Home: Flex-Wrapper mit gap */
.home-sections {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    padding: 3rem 0 6rem;
}

/* Home: generische Sektion (SOUND / MUSIC / ABOUT) */
.home-section {
}

.home-section-header {
    display: flex;
    align-items: baseline;
    gap: 2rem;
    margin-bottom: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.home-section-header h2 {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.2em;
}

.home-section-header h2 a {
    color: #fff;
}

.home-works-count {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

.home-section-body {
    padding-top: 1.5rem;
}

.home-section-body--teaser p {
    margin-bottom: 0.25rem;
}

.home-section-footer {
    padding-top: 0.75rem;
}

.home-section-more {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.05em;
    display: inline-block;
    margin-top: 0.75rem;
}

.home-section-more:hover {
    color: #fff;
    opacity: 1;
}

.home-about-img {
    max-width: 180px;
    margin-bottom: 1.5rem;
}

/* Works list – used on home AND /sound/ */
.works-list {
    list-style: none;
}

.works-list-item {
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.works-list-link {
    display: grid;
    grid-template-columns: 3rem 1fr auto;
    gap: 1.5rem;
    align-items: baseline;
    padding: 0.75rem 0;
    color: #fff;
    transition: opacity 0.15s ease;
}

.works-list-link:hover {
    opacity: 0.45;
}

.works-num {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.works-title {
    font-size: clamp(1.2rem, 2.2vw, 2rem);
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.works-meta {
    display: flex;
    gap: 1.25rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.04em;
    flex-shrink: 0;
    text-align: right;
    white-space: nowrap;
}

.works-role {
    display: none; /* home: nur Jahr sichtbar; auf /sound/ optional einblenden */
}

/* Auf /sound/: Role anzeigen */
.works-list--full .works-role {
    display: inline;
}

/* ==========================================================================
   4. Portfolio Index (/sound/)
   ========================================================================== */

.portfolio-index {
    padding: 3rem 0 6rem;
}

.portfolio-index h1 {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.portfolio-intro {
    max-width: 700px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 2rem;
    line-height: 1.8;
    font-size: 0.9rem;
}

/* Works list on /sound/ shows role too */
.works-list--full .works-list-link {
    grid-template-columns: 2.5rem 1fr auto;
}

/* ==========================================================================
   5. Project Detail (/sound/[slug]/)
   ========================================================================== */

.project-detail {
    padding: 4rem 0 6rem;
}

.project-header {
    margin-bottom: 3rem;
}

.project-header h1 {
    letter-spacing: 0.02em;
}

/* Two-column layout: meta sidebar + content */
.project-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

/* Meta Sidebar */
.project-meta {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.meta-item {
    margin-bottom: 1.5rem;
}

.meta-label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-bottom: 0.25rem;
}

.meta-value {
    font-size: 0.95rem;
    color: #fff;
}

.meta-festivals {
    list-style: none;
    font-size: 0.95rem;
}

.meta-festivals li {
    margin-bottom: 0.25rem;
}

/* Project Content */
.project-text {
    max-width: 700px;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: rgba(255,255,255,0.9);
}

.project-text p + p {
    margin-top: 1.2em;
}

/* Audio */
.project-audio {
    margin: 2rem 0;
}

.project-audio audio {
    width: 100%;
    max-width: 500px;
}

/* Gallery */
.project-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-gallery a {
    display: block;
    cursor: zoom-in;
}

.project-gallery img {
    width: 100%;
}

/* Prev/Next */
.project-nav {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 2rem;
    margin-top: 4rem;
}

.project-nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 45%;
}

.project-nav-label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
}

.project-nav-title {
    font-size: 1rem;
}

.project-nav-next {
    text-align: right;
    margin-left: auto;
}

.project-nav-placeholder {
    flex: 1;
}

/* ==========================================================================
   6. Generic Page (/about/, /music/, /dbl/, /imprint/)
   ========================================================================== */

.page {
    padding: 4rem 0 6rem;
    max-width: 800px;
}

.page--free {
    max-width: 100%;
}

.page-header {
    margin-bottom: 3rem;
}

.page-header h1 {
    letter-spacing: 0.15em;
}

.page-hero-image {
    max-width: 500px;
    margin-bottom: 2rem;
}

.page-content {
    line-height: 1.8;
    color: rgba(255,255,255,0.9);
}

.page-content p + p {
    margin-top: 1.2em;
}

.page-content a {
    border-bottom: 1px solid rgba(255,255,255,0.4);
}

.page-content a:hover {
    opacity: 1;
    border-color: #fff;
}

/* Page Gallery */
.page-gallery {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.page-gallery-item img {
    width: 100%;
}

/* Page Audio */
.page-audio {
    margin: 2rem 0;
}

.page-audio audio {
    width: 100%;
    max-width: 500px;
}

/* OSM Map */
.page-map {
    margin: 3rem 0;
}

#osm-map {
    width: 100%;
    height: 400px;
    border-radius: 2px;
    background: #f5f5f5;
}

/* Contact */
.page-contact {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-link {
    font-size: 1.1rem;
    border-bottom: 1px solid #fff;
    display: inline-block;
    padding-bottom: 2px;
    width: fit-content;
}

.contact-location {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

/* ==========================================================================
   7. 404 Page
   ========================================================================== */

.error-page {
    padding: 8rem 0;
    text-align: center;
}

.error-page h1 {
    font-size: 6rem;
    margin-bottom: 1rem;
    color: rgba(255,255,255,0.2);
}

.error-page p {
    color: rgba(255,255,255,0.5);
    margin-bottom: 2rem;
}

.back-home {
    border-bottom: 1px solid #fff;
    padding-bottom: 2px;
}

/* ==========================================================================
   8. Footer
   ========================================================================== */

.site-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.footer-name {
    font-weight: 400;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.footer-contact {
    font-size: 0.9rem;
    color: #666;
}

.footer-nav a {
    font-size: 0.85rem;
    color: #888;
    letter-spacing: 0.05em;
}

.footer-copy {
    font-size: 0.8rem;
    color: #bbb;
}

/* ==========================================================================
   9. Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .site-header {
        padding: 1.5rem;
    }

    .site-main {
        padding: 0 1.5rem;
    }

    .home-works {
        padding: 2rem 0 4rem;
    }

    /* Works list: schmaler auf Mobile */
    .works-list-link {
        grid-template-columns: 2rem 1fr;
        gap: 0.75rem;
    }

    /* Meta auf Mobile: nur Jahr */
    .works-meta {
        display: none;
    }

    .works-list--full .works-meta {
        display: flex;
        gap: 0.5rem;
    }

    .works-list--full .works-role {
        display: none;
    }

    /* Project detail: stack meta above content on mobile */
    .project-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-meta {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .meta-item {
        margin-bottom: 0;
    }

    .project-nav {
        flex-direction: column;
        gap: 1.5rem;
    }

    .project-nav-next {
        text-align: left;
        margin-left: 0;
    }

    .project-nav-link {
        max-width: 100%;
    }

    .footer-inner {
        flex-direction: column;
        gap: 1.5rem;
    }

    .site-footer {
        padding: 3rem 1.5rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .works-title {
        font-size: 0.85rem;
    }
}
