/* ============================================
   VÄZN — Stylesheet v3
   Mockup-based Design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Inter:wght@400;500&display=swap');

/* --------------------------------------------
   Variables
   -------------------------------------------- */
:root {
    /* Colors */
    --bg: #f5f5f2;
    --white: #ffffff;
    --text: #1a1a1a;
    --text-muted: #555555;
    --orange: #e07800;
    --orange-hover: #c56a00;
    --border-light: #e0e0e0;
    
    /* Typography */
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Layout */
    --content-max-width: 620px;
    --content-padding: 2.5rem;
    --wrapper-max-width: 800px;
    
    /* Tilts */
    --tilt-logo: -1.5deg;
    --tilt-nav: -1deg;
    --tilt-subnav: -0.8deg;
    
    /* Effects */
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --radius: 20px;
    --radius-sm: 4px;
    --transition: 0.2s ease;
}

/* --------------------------------------------
   Reset & Base
   -------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-serif);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* --------------------------------------------
   Background Image
   -------------------------------------------- */
.site-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    height: -webkit-fill-available; /* iOS Safari fix */
    z-index: -1;
    pointer-events: none;
}

.site-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right top;
    opacity: 0.8;
}

/* --------------------------------------------
   Typography
   -------------------------------------------- */
a {
    color: inherit;
    text-decoration: underline;
    transition: color var(--transition);
}

a:hover {
    color: var(--orange);
}

h1, h2, h3 {
    font-weight: 500;
}

p {
    margin-bottom: 1em;
}

p:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------
   Main Layout
   -------------------------------------------- */
.page {
    min-height: 100vh;
    padding: var(--content-padding);
    position: relative;
    z-index: 1;
}

.site-wrapper {
    max-width: var(--wrapper-max-width);
    margin: 0 auto;
}

/* --------------------------------------------
   Header / Logo
   -------------------------------------------- */
.header {
    display: inline-block;
    background: var(--white);
    padding: 1rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
    transform: rotate(var(--tilt-logo));
    transform-origin: left center;
}

.header__logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    cursor: pointer;
}

.header__logo {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--text);
    border-bottom: 2px solid var(--text);
    padding-bottom: 0.15em;
    display: inline-block;
}

.header__logo-img {
    max-height: 8rem;
    width: auto;
    display: block;
}

.header__tagline {
    display: none; /* Hidden in this design */
}

/* --------------------------------------------
   Navigation - Main (Projects)
   -------------------------------------------- */
.nav {
    margin-bottom: 0.75rem;
    display: block;
}

.nav__toggle {
    display: none;
}

.nav__list {
    list-style: none;
    display: inline-flex;
    align-items: center;
    background: var(--white);
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    gap: 0;
    transform: rotate(var(--tilt-nav));
    transform-origin: left center;
}

.nav__item {
    display: flex;
    align-items: center;
}

.nav__item:not(:last-child)::after {
    content: '|';
    margin: 0 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.85rem;
}

.nav__link {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text);
    padding: 0.25rem 0;
    transition: color var(--transition);
}

.nav__link:hover {
    color: var(--orange);
    text-decoration: none;
}

.nav__link--active {
    color: var(--orange);
    font-weight: 500;
}

/* --------------------------------------------
   Sub-Navigation (Works within Project)
   -------------------------------------------- */
.subnav {
    margin-bottom: 1.25rem;
}

.subnav__list {
    list-style: none;
    display: inline-flex;
    align-items: center;
    background: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    gap: 0;
    transform: rotate(var(--tilt-subnav));
    transform-origin: left center;
}

.subnav__item {
    display: flex;
    align-items: center;
}

.subnav__item:not(:last-child)::after {
    content: '|';
    margin: 0 0.6rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.8rem;
}

.subnav__link {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text);
    padding: 0.2rem 0;
    transition: color var(--transition);
    display: inline-block;
    text-decoration: none;
}

.subnav__link:hover {
    color: var(--orange);
    text-decoration: none;
}

.subnav__link--active {
    color: var(--text);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
}

/* --------------------------------------------
   Intro Section (Home page)
   -------------------------------------------- */
.intro {
    background: var(--white);
    padding: 1.75rem 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    max-width: var(--content-max-width);
}

.intro__text {
    font-size: 1rem;
    max-width: 100%;
}

.intro__text p {
    margin-bottom: 0.75em;
}

/* --------------------------------------------
   Content Box (Work detail)
   -------------------------------------------- */
.content-box {
    background: var(--white);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    max-width: var(--content-max-width);
    overflow: hidden;
}

.content-box__header {
    display: none; /* Project header hidden when showing individual works */
}

.content-box__description {
    display: none; /* Project description hidden when showing works */
}

/* When showing project overview (no work selected) */
.content-box--overview .content-box__header {
    display: block;
    padding: 1.5rem 2rem 0;
}

.content-box--overview .content-box__description {
    display: block;
    padding: 1rem 2rem 1.5rem;
}

.content-box__title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.content-box__meta {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --------------------------------------------
   Work Detail View
   -------------------------------------------- */
.work-detail {
    padding: 1.75rem 2rem;
}

.work-detail__header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.work-detail__title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 500;
}

.work-detail__type {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--orange);
    text-transform: none;
}

.work-detail__year {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: capitalize;
    display: block;
}

.work-detail__content {
    font-size: 0.95rem;
    line-height: 1.75;
}

.work-detail__content p {
    margin-bottom: 1em;
}

.work-detail__section-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

/* Image floated right within text */
.work-detail__image {
    float: right;
    width: 45%;
    max-width: 220px;
    margin: 0.25rem 0 1rem 1.5rem;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.work-detail__image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Clear float */
.work-detail__content::after {
    content: '';
    display: table;
    clear: both;
}

/* Action buttons - positioned under thumbnail */
.work-detail__actions {
    float: right;
    width: 45%;
    max-width: 220px;
    margin: 0 0 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    clear: right;
}

.work-detail__link {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--text);
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-align: center;
    width: 100%;
}

.work-detail__link:hover {
    border-color: var(--orange);
    color: var(--orange);
    text-decoration: none;
}

.work-detail__link--video::before {
    content: '▶';
    font-size: 0.65rem;
}

.work-detail__link--audio::before {
    content: '♪';
    font-size: 0.75rem;
}

.work-detail__link--images::before {
    content: '⊞';
    font-size: 0.85rem;
}

/* Links section */
.work-detail__links-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.work-detail__links-title {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.work-detail__links-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.work-detail__links-list li {
    margin-bottom: 0.3rem;
}

.work-detail__links-list a {
    color: var(--text);
    text-decoration: underline;
}

.work-detail__links-list a:hover {
    color: var(--orange);
}

/* --------------------------------------------
   Catalog Cards (Works list - for overview)
   -------------------------------------------- */
.catalog {
    padding: 0 2rem 1.5rem;
}

.catalog__title {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.card {
    padding: 1rem 0;
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1rem;
    align-items: start;
    cursor: pointer;
    transition: opacity var(--transition);
}

.card:hover {
    opacity: 0.8;
}

.card + .card {
    border-top: 1px solid var(--border-light);
}

.card__thumb {
    aspect-ratio: 1;
    background: var(--text);
    overflow: hidden;
}

.card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card__content {
    padding-top: 0.25rem;
}

.card__title {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.15rem;
}

.card__type {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--orange);
}

.card__description {
    display: none; /* Hidden in compact view */
}

/* --------------------------------------------
   CV Section
   -------------------------------------------- */
.cv {
    padding: 1.75rem 2rem;
}

.cv__section {
    margin-bottom: 1.75rem;
}

.cv__section:last-child {
    margin-bottom: 0;
}

.cv__heading {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--orange);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.cv__year {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.cv__year-label {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cv__entries {
    list-style: none;
}

.cv__entry {
    margin-bottom: 0.2rem;
}

/* --------------------------------------------
   About Section
   -------------------------------------------- */
.about-page {
    padding: 1.75rem 2rem;
}

.about-page h2 {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--orange);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

/* Image floated right within text - same as work-detail */
.about-page__image {
    float: right;
    width: 45%;
    max-width: 400px;
    margin: 0.25rem 0 1rem 1.5rem;
    box-shadow: var(--shadow);
}

.about-page__image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-page__content {
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Clear float */
.about-page__content::after {
    content: '';
    display: table;
    clear: both;
}

.about-page__content br {
    display: block;
    content: "";
    margin-top: 0.75rem;
}

/* --------------------------------------------
   Contact Section
   -------------------------------------------- */
.contact {
    padding: 1.75rem 2rem;
}

.contact__info {
    margin-bottom: 1.5rem;
}

.contact__item {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.contact__label {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.15rem;
}

.contact__value a {
    color: var(--orange);
}

.contact__value a:hover {
    text-decoration: underline;
}

/* Contact form */
.contact__form-box {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.form__group {
    margin-bottom: 1rem;
}

.form__label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.form__input,
.form__textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-family: var(--font-serif);
    font-size: 0.95rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    transition: border-color var(--transition);
}

.form__input:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--orange);
}

.form__textarea {
    min-height: 100px;
    resize: vertical;
}

.form__submit {
    padding: 0.65rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--text);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
}

.form__submit:hover {
    background: var(--orange);
}

.form__honey {
    position: absolute;
    left: -9999px;
}

.form__message {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.form__message--success {
    background: #e8f5e9;
    border: 1px solid #81c784;
}

.form__message--error {
    background: #ffebee;
    border: 1px solid #e57373;
}

/* --------------------------------------------
   Footer
   -------------------------------------------- */
.footer {
    position: fixed;
    bottom: 2rem;
    right: 2.5rem;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: right;
    z-index: 10;
}

.footer span {
    display: block;
    margin-bottom: 0.25rem;
}

.footer span:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------
   Lightbox
   -------------------------------------------- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox[hidden] {
    display: none;
}

.lightbox__figure {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox__img {
    max-width: 100%;
    max-height: calc(100vh - 8rem);
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.lightbox__caption {
    color: white;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    margin-top: 1rem;
    opacity: 0.8;
}

.lightbox__counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    opacity: 0.6;
}

.lightbox__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity var(--transition), background var(--transition);
}

.lightbox__close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity var(--transition), background var(--transition);
}

.lightbox__nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav--prev {
    left: 1.5rem;
}

.lightbox__nav--next {
    right: 1.5rem;
}

/* --------------------------------------------
   Media Modal
   -------------------------------------------- */
.media-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.media-modal[hidden] {
    display: none;
}

.media-modal__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity var(--transition), background var(--transition);
    z-index: 2001;
}

.media-modal__close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.media-modal__content {
    background: var(--white);
    border-radius: var(--radius-sm);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.media-modal__title {
    padding: 1rem 1.5rem;
    background: var(--text);
    color: var(--white);
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 500;
}

.media-modal__player {
    padding: 1.5rem;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
}

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

.audio-player {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.audio-player audio {
    width: 100%;
}

.audio-player__stop {
    padding: 0.65rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    background: var(--text);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    align-self: flex-start;
    transition: background var(--transition);
}

.audio-player__stop:hover {
    background: var(--orange);
}

/* --------------------------------------------
   Responsive
   -------------------------------------------- */
@media (max-width: 700px) {
    :root {
        --content-width: 100%;
        --content-padding: 1.25rem;
    }
    
    .site-background {
        opacity: 0.7;
    }
    
    .header {
        padding: 0.75rem 1rem;
    }
    
    .header__logo {
        font-size: 2.2rem;
    }
    
    .nav__list,
    .subnav__list {
        padding: 0.5rem 1rem;
    }
    
    .work-detail__image {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 0 1rem 0;
    }
    
    .work-detail__actions {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 0 1rem 0;
    }
    
    .cv__year {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .footer {
        position: static;
        text-align: left;
        margin-top: 2rem;
        margin-left: var(--content-padding);
    }
    
    .footer span {
        display: inline;
        margin-right: 1rem;
    }
}

@media (max-width: 500px) {
    .nav {
        position: relative;
    }
    .nav__toggle {
        display: flex;
        width: auto;
        background: var(--white);
        padding: 0.6rem 1.25rem;
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        border: none;
        font-family: var(--font-sans);
        font-size: 0.85rem;
        color: var(--text);
        cursor: pointer;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
    }
    
    .nav__toggle-icon {
        font-size: 1rem;
        transition: transform var(--transition);
    }
    
    .nav__toggle--open .nav__toggle-icon {
        transform: rotate(45deg);
    }
    
    .nav__list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin-top: 0.5rem;
        flex-direction: column;
        align-items: stretch;
        z-index: 99;
    }
    
    .nav__list--open {
        display: flex;
    }
    
    .nav__item {
        width: 100%;
    }
    
    .nav__item:not(:last-child)::after {
        display: none;
    }
    
    .nav__link {
        display: block;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-light);
    }
    
    .nav__item:last-child .nav__link {
        border-bottom: none;
    }
    
    .subnav__list {
        flex-wrap: wrap;
        gap: 0.25rem 0;
    }
    
    .header__logo {
        font-size: 1.8rem;
    }
}

/* --------------------------------------------
   Print
   -------------------------------------------- */
@media print {
    .nav,
    .subnav,
    .site-background,
    .lightbox,
    .media-modal,
    .contact__form-box,
    .work-detail__actions {
        display: none;
    }
    
    .page {
        width: 100%;
    }
    
    .content-box,
    .intro {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}