:root {
    --bg-color: #050505;
    --text-primary: #e5e5e5;
    --text-secondary: #888888;
    --border-color: #222222;
    --accent-color: #ffffff;
    --accent-hover: #cccccc;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --nav-height: 80px;
}

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

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

/* Grain texture overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Layout */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background-color: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
}

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

.logo .dot {
    color: #ff3333;
}

.logo .subtitle {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

nav {
    display: flex;
    gap: 30px;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-btn:hover {
    color: var(--text-primary);
}

.nav-btn.active {
    color: var(--accent-color);
}

.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--accent-color);
}

/* Views */
main {
    flex: 1;
    position: relative;
    padding: 60px 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.view {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Manifesto Section */
.manifesto-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Artist Intro — photo + bio row */
.artist-intro {
    display: flex;
    align-items: center;
    gap: 32px;
    max-width: 800px;
    margin: 0 auto 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.artist-photo-wrap {
    flex-shrink: 0;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #333;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

.artist-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%) contrast(1.1);
    transition: filter 0.4s ease;
}

.artist-photo-wrap:hover .artist-photo {
    filter: grayscale(0%) contrast(1);
}

.artist-bio {
    flex: 1;
}

.bio-line {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
}

.bio-tagline {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 8px;
    margin-bottom: 12px;
}

.bio-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bio-links a {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid #2a2a2a;
    border-radius: 2px;
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
    letter-spacing: 0.02em;
}

.bio-links a:hover {
    color: var(--text-primary);
    border-color: #555;
    background: rgba(255, 255, 255, 0.04);
}

/* Hero Area */
.hero-area {
    max-width: 800px;
    margin: 0 auto 40px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 60px;
    letter-spacing: -0.03em;
}

.hero-line {
    display: block;
    overflow: hidden;
}

.anim-reveal .hero-line {
    opacity: 0;
    transform: translateY(40px);
    animation: revealLine 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.anim-reveal .hero-line:nth-child(1) { animation-delay: 0.1s; }
.anim-reveal .hero-line:nth-child(2) { animation-delay: 0.3s; }
.anim-reveal .hero-line:nth-child(3) { animation-delay: 0.5s; }

@keyframes revealLine {
    to { opacity: 1; transform: translateY(0); }
}

.highlight-title {
    font-weight: 700;
}

/* Human × Machine clickable link */
.hxm-link {
    color: inherit;
    text-decoration: none;
    position: relative;
    cursor: pointer;
    transition: color 0.3s ease;
}

.hxm-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff3333, #ffffff);
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hxm-link:hover {
    color: #ff3333;
}

.hxm-link:hover::after {
    width: 100%;
}

/* Intro prose - kept as flowing text */
.intro-prose {
    max-width: 800px;
    margin: 0 auto 80px;
}

.intro-prose p {
    font-size: 1.05rem;
    color: #c0c0c0;
    margin-bottom: 24px;
    font-weight: 300;
}

.intro {
    font-size: 1.25rem !important;
    line-height: 1.5;
    color: var(--text-primary) !important;
}

.highlight-text {
    font-size: 1.5rem !important;
    font-family: var(--font-heading);
    font-weight: 500 !important;
    color: var(--accent-color) !important;
    margin: 40px 0 !important;
}

.anim-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.anim-fade-up:nth-child(1) { animation-delay: 0.7s; }
.anim-fade-up:nth-child(2) { animation-delay: 0.95s; }

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   POSTER GRID — Unit8-inspired poster cards
   ========================================= */
.poster-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 80px;
}

.poster-card {
    position: relative;
    background: #0a0a0a;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid transparent;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.poster-card:hover {
    border-color: #333;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* Top-left branding */
.poster-label {
    position: absolute;
    top: 24px;
    left: 28px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    z-index: 3;
    letter-spacing: -0.02em;
}

.poster-dot {
    color: #ff3333;
}

/* Canvas for geometric animation */
.poster-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Title block at bottom */
.poster-title-block {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px;
    z-index: 3;
    transition: opacity 0.4s ease;
}

.poster-heading {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    text-transform: lowercase;
}

/* Text overlay — hidden by default, slides up on hover */
.poster-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    background: rgba(5, 5, 5, 0.92);
    padding: 70px 28px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.45s ease, transform 0.45s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.poster-card:hover .poster-text-overlay {
    opacity: 1;
    transform: translateY(0);
}

.poster-text-overlay p {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: #b0b0b0;
    line-height: 1.65;
    margin-bottom: 14px;
    font-weight: 300;
}

.poster-text-overlay p strong {
    color: var(--text-primary);
    font-weight: 500;
}

.poster-text-overlay blockquote {
    padding: 14px 0 14px 20px;
    border-left: 2px solid #333;
    margin: 14px 0;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-style: italic;
    color: #888;
    line-height: 1.7;
}

.poster-text-overlay em {
    color: var(--text-primary);
}

/* Poster scroll-reveal */
.anim-poster {
    opacity: 0;
    transform: translateY(50px) scale(0.97);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.anim-poster.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.manifesto-footer {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.warning-text {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem !important;
    color: var(--text-secondary) !important;
}

.warning-text {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem !important;
    color: var(--text-secondary) !important;
}

.cta-btn {
    background-color: var(--accent-color);
    color: #000;
    border: none;
    padding: 16px 32px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border-radius: 2px;
}

.cta-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* Gallery Section */
.gallery-header {
    margin-bottom: 60px;
    text-align: center;
}

.gallery-header h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: -0.03em;
}

.gallery-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 10px;
}

.artwork-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.art-card {
    background: #0d0d0d;
    border: 1px solid var(--border-color);
    padding: 30px;
    cursor: pointer;
    position: relative;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
}

.art-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.art-card:hover {
    transform: translateY(-5px);
    border-color: #444;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.art-card:hover::before {
    opacity: 1;
}

.art-number {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.art-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.art-desc {
    font-size: 0.9rem;
    color: #888;
    line-height: 1.5;
}

.art-action {
    margin-top: 30px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.art-card:hover .art-action {
    opacity: 1;
}

/* Fullscreen Viewer Overlay */
#artwork-viewer {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--bg-color);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#artwork-viewer.active {
    opacity: 1;
    visibility: visible;
}

.viewer-toolbar {
    height: 60px;
    background-color: #000;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    flex-shrink: 0;
}

.viewer-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #00ff41;
}

.blink {
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.viewer-controls {
    display: flex;
    align-items: center;
    gap: 24px;
}

.viewer-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.close-btn {
    background: transparent;
    border: 1px solid #333;
    color: var(--text-primary);
    padding: 8px 16px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #ff3333;
    color: #fff;
    border-color: #ff3333;
}

.iframe-container {
    flex: 1;
    width: 100%;
    position: relative;
    background: #000;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* About Overlay */
.about-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.about-overlay.active {
    opacity: 1;
    visibility: visible;
}

.about-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.about-panel {
    position: relative;
    max-width: 700px;
    max-height: 80vh;
    width: 90%;
    background: #0a0a0a;
    border: 1px solid #222;
    padding: 50px 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(30px) scale(0.96);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-overlay.active .about-panel {
    transform: translateY(0) scale(1);
}

.about-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.about-close:hover {
    color: #ff3333;
}

.about-body p {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: #c0c0c0;
    line-height: 1.7;
    margin-bottom: 20px;
    font-weight: 300;
    opacity: 0;
    transform: translateY(15px);
    animation: none;
}

.about-overlay.active .about-body p {
    animation: aboutLineIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.about-overlay.active .about-body p:nth-child(1) { animation-delay: 0.1s; }
.about-overlay.active .about-body p:nth-child(2) { animation-delay: 0.18s; }
.about-overlay.active .about-body p:nth-child(3) { animation-delay: 0.26s; }
.about-overlay.active .about-body p:nth-child(4) { animation-delay: 0.34s; }
.about-overlay.active .about-body p:nth-child(5) { animation-delay: 0.42s; }
.about-overlay.active .about-body p:nth-child(6) { animation-delay: 0.50s; }
.about-overlay.active .about-body p:nth-child(7) { animation-delay: 0.58s; }

@keyframes aboutLineIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Photo click hint */
.artist-photo-wrap {
    cursor: pointer;
    position: relative;
}

.artist-photo-wrap::after {
    content: 'ABOUT';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-heading);
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity 0.3s ease;
    text-transform: uppercase;
}

.artist-photo-wrap:hover::after {
    opacity: 1;
}

/* Loader */
.loader-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    pointer-events: none;
}

/* Responsiveness */
@media (max-width: 768px) {
    header {
        padding: 0 20px;
    }
    .hidden-mobile {
        display: none;
    }
    main {
        padding: 40px 20px;
    }
    .artist-intro {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .bio-links {
        justify-content: center;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .poster-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .poster-card {
        aspect-ratio: 3 / 4;
    }
    .poster-heading {
        font-size: 1.6rem;
    }
    .poster-text-overlay {
        padding: 60px 20px 20px;
    }
    .gallery-header h2 {
        font-size: 2.2rem;
    }
    .viewer-toolbar {
        padding: 0 15px;
    }
    .viewer-hint {
        display: none;
    }
}
