/* ============================================
   Catrine Ørgaard Rudolf — Website Styles
   ============================================ */

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

:root {
    --color-bg: #f5f1eb;
    --color-bg-warm: #ece6db;
    --color-text: #2a2520;
    --color-text-light: #6b6158;
    --color-accent: #8b7355;
    --color-accent-light: #b49e7c;
    --color-white: #faf8f5;
    --color-border: #d9d0c3;
    --font-serif: 'Cormorant Garamond', 'Georgia', serif;
    --font-sans: 'Inter', -apple-system, sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

/* ---- Navigation ---- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 3rem;
    transition: background 0.4s ease, padding 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
    background: rgba(245, 241, 235, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.75rem 3rem;
    border-bottom: 1px solid var(--color-border);
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 2px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-text);
    transition: width 0.3s var(--ease-out);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--color-text);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:first-child {
    transform: translateY(3.75px) rotate(45deg);
}

.nav-toggle.active span:last-child {
    transform: translateY(-3.75px) rotate(-45deg);
}

/* ---- Hero ---- */

.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 6rem 3rem 3rem;
    position: relative;
    gap: 4rem;
}

.hero-content {
    padding-left: 2rem;
}

.hero-title {
    font-family: var(--font-serif);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.hero-line {
    display: block;
    font-size: clamp(3rem, 7vw, 6rem);
    overflow: hidden;
}

.hero-line:nth-child(2) {
    font-style: italic;
    color: var(--color-accent);
}

.hero-subtitle {
    margin-top: 2rem;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

.hero-image {
    height: 80vh;
    overflow: hidden;
    border-radius: 2px;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 8s var(--ease-out);
}

.hero-image:hover img {
    transform: scale(1);
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-scroll span {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

.hero-scroll-line {
    width: 60px;
    height: 1px;
    background: var(--color-accent-light);
    position: relative;
    overflow: hidden;
}

.hero-scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--color-text);
    animation: scrollLine 2s var(--ease-in-out) infinite;
}

@keyframes scrollLine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ---- Sections ---- */

.section {
    padding: 8rem 3rem;
}

.section-header {
    margin-bottom: 4rem;
}

.section-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

/* ---- Exhibitions ---- */

.exhibitions {
    background: var(--color-white);
}

.exhibition-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.exhibition-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    padding: 2.5rem;
    background: var(--color-bg);
    border-radius: 3px;
    transition: transform 0.5s var(--ease-out);
    cursor: default;
}

.exhibition-card:hover {
    transform: translateY(-3px);
}

.exhibition-card-image {
    overflow: hidden;
    border-radius: 2px;
    aspect-ratio: 4/3;
    background: var(--color-bg-warm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.exhibition-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
    transition: transform 0.8s var(--ease-out);
}

.exhibition-card:hover .exhibition-card-image img {
    transform: scale(1.03);
}

.exhibition-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.exhibition-tag {
    display: inline-block;
    width: fit-content;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    color: var(--color-text-light);
}

.exhibition-name {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.exhibition-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-light);
    max-width: 480px;
}

.exhibition-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--color-text-light);
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}

/* ---- Gallery ---- */

.gallery {
    background: var(--color-bg);
}

.gallery-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.5rem 1.2rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--color-text-light);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-text);
    border-color: var(--color-text);
    color: var(--color-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    aspect-ratio: 1;
    cursor: pointer;
    background: var(--color-bg-warm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item--wide {
    grid-column: span 2;
    aspect-ratio: 2/1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.75rem;
    transition: transform 0.6s var(--ease-out);
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 1.25rem;
    background: rgba(42, 37, 32, 0.92);
    color: var(--color-white);
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-out);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 0.35rem;
}

.gallery-overlay p {
    font-size: 0.75rem;
    opacity: 0.8;
    line-height: 1.5;
}

.gallery-item.hidden {
    display: none;
}

/* ---- About ---- */

.about {
    background: var(--color-white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
}

.about-text {
    max-width: 500px;
}

.about-intro {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    line-height: 1.6;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.about-text p:last-child {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--color-text-light);
}

.about-cv {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.cv-block h3 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.cv-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 1rem;
    padding: 0.5rem 0;
}

.cv-year {
    font-size: 0.8rem;
    color: var(--color-accent);
    font-weight: 500;
}

.cv-text {
    font-size: 0.88rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

/* ---- Contact ---- */

.contact {
    background: var(--color-text);
    color: var(--color-bg);
}

.contact .section-label {
    color: var(--color-accent-light);
}

.contact .section-title {
    color: var(--color-white);
}

.contact-inner {
    max-width: 800px;
}

.contact-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(245, 241, 235, 0.7);
    margin-bottom: 3rem;
    max-width: 520px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.contact-link {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    transition: opacity 0.3s ease;
}

.contact-link:hover {
    opacity: 0.7;
}

.contact-link-label {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent-light);
}

.contact-link-value {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 300;
}

.contact-address {
    margin-bottom: 3rem;
}

.contact-address address {
    font-style: normal;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.6;
    margin-top: 0.3rem;
}

.contact-regards {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(245, 241, 235, 0.5);
    padding-top: 3rem;
    border-top: 1px solid rgba(245, 241, 235, 0.1);
}

/* ---- Footer ---- */

.footer {
    padding: 1.5rem 3rem;
    background: var(--color-text);
    border-top: 1px solid rgba(245, 241, 235, 0.08);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-name {
    font-family: var(--font-serif);
    font-size: 0.85rem;
    color: rgba(245, 241, 235, 0.4);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.75rem;
    color: rgba(245, 241, 235, 0.4);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-bg);
}

/* ---- Lightbox ---- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(20, 18, 15, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    max-width: 85vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 85vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 2px;
}

.lightbox-info {
    margin-top: 1.5rem;
    text-align: center;
    color: rgba(245, 241, 235, 0.7);
}

.lightbox-info h4 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--color-white);
    margin-bottom: 0.3rem;
}

.lightbox-info p {
    font-size: 0.8rem;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2rem;
    color: rgba(245, 241, 235, 0.6);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--color-white);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: rgba(245, 241, 235, 0.4);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 1rem;
    line-height: 1;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--color-white);
}

/* ---- Scroll Animations ---- */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 8rem;
        gap: 3rem;
    }

    .hero-content {
        padding-left: 0;
    }

    .hero-image {
        height: 50vh;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-text {
        max-width: 100%;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .exhibition-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 1rem 1.5rem;
    }

    .nav.scrolled {
        padding: 0.75rem 1.5rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: var(--color-bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform 0.5s var(--ease-out);
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1rem;
    }

    .section {
        padding: 5rem 1.5rem;
    }

    .hero {
        padding: 6rem 1.5rem 2rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .gallery-item--wide {
        grid-column: span 2;
    }

    .gallery-overlay {
        transform: translateY(0);
        background: rgba(42, 37, 32, 0.88);
        padding: 0.75rem 1rem;
    }

    .gallery-overlay h4 {
        font-size: 0.95rem;
    }

    .gallery-overlay p {
        font-size: 0.65rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .hero-scroll {
        display: none;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item--wide {
        grid-column: span 1;
    }

    .gallery-filter {
        gap: 0.35rem;
    }

    .filter-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.65rem;
    }
}
