:root {
    --black: #000000;
    --white: #ffffff;
    --accent: #f4f4f4;
    --line-weight: 0.5px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0 !important;
}

html { scroll-behavior: smooth; }

body.loader-active {
    overflow: hidden;
}

body {
    background-color: var(--white);
    color: var(--black);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    line-height: 1.6;
    text-transform: uppercase;
    cursor: crosshair;
    -webkit-font-smoothing: antialiased;
}

header {
    padding: 40px;
    border-bottom: var(--line-weight) solid var(--black);
    display: flex;
    justify-content: space-between;
}

.site-title {
    font-size: 14px;
    letter-spacing: 0.05em;
}

.site-title a {
    text-decoration: none;
    color: inherit;
}

nav {
    padding: 20px 40px;
    border-bottom: var(--line-weight) solid var(--black);
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 100;
}

nav a {
    text-decoration: none;
    color: #666;
    transition: color 0.1s;
}

nav a:hover { color: var(--black); }

.nav-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    cursor: crosshair;
    color: var(--black);
    letter-spacing: 0.05em;
}

@media (min-width: 769px) {
    .nav-links {
        display: flex;
        flex-direction: row;
        gap: 25px;
        align-items: center;
    }
    nav > span {
        display: none;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 16px 20px;
        flex-wrap: nowrap;
        gap: 0;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: var(--line-weight) solid var(--black);
        z-index: 99;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 14px 20px;
        border-top: var(--line-weight) solid #eee;
        color: #666;
    }

    .nav-links a:hover {
        background: var(--accent);
        color: var(--black);
    }

    .search-trigger {
        display: none;
    }
}

section {
    padding: 100px 40px;
    border-bottom: var(--line-weight) solid var(--black);
    min-height: 60vh;
}

.section-label {
    font-size: 9px;
    color: #999;
    margin-bottom: 20px;
    display: block;
}

h2 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 40px;
    letter-spacing: 0.05em;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
}

.item-card {
    border: var(--line-weight) solid var(--black);
    padding: 20px;
    transition: background 0.2s;
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: crosshair;
}

.item-card:hover { background: var(--accent); }

.item-card.no-link {
    cursor: default;
    opacity: 0.7;
}

.resource-icon {
    font-size: 20px;
    margin-bottom: 15px;
    color: #999;
    letter-spacing: 0.1em;
}

.webapp-container {
    margin-top: 60px;
    border-top: var(--line-weight) solid var(--black);
    padding-top: 40px;
}

.webapp-frame {
    width: 100%;
    height: 700px;
    border: var(--line-weight) solid var(--black);
    display: block;
}

.film-card {
    border: var(--line-weight) solid var(--black);
    padding: 20px;
}

.vimeo-frame {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
    border: none;
}

/* Archive grid */
.archive-grid {
    columns: 3;
    column-gap: 2px;
}

@media (max-width: 900px) { .archive-grid { columns: 2; } }
@media (max-width: 500px) { .archive-grid { columns: 1; } }

.archive-item {
    break-inside: avoid;
    margin-bottom: 2px;
    overflow: hidden;
    cursor: crosshair;
    position: relative;
}

.archive-item img {
    width: 100%;
    display: block;
    filter: grayscale(20%);
    transition: filter 0.3s, transform 0.3s;
}

.archive-item:hover img {
    filter: grayscale(0%);
    transform: scale(1.02);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.active { display: flex; }

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border: var(--line-weight) solid #444;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    cursor: crosshair;
    letter-spacing: 0.1em;
    background: none;
    border: none;
    padding: 0;
}

.lightbox-close:hover { color: #999; }

.archive-item:focus-visible {
    outline: var(--line-weight) solid var(--black);
    outline-offset: 2px;
}

.img-box {
    width: 100%;
    aspect-ratio: 1/1;
    background: #eee;
    margin-bottom: 15px;
    border: var(--line-weight) solid var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.meta-data {
    font-size: 9px;
    color: #666;
    margin-top: 10px;
    border-top: var(--line-weight) solid #ddd;
    padding-top: 10px;
}

.search-trigger { margin-left: auto; color: #999; }

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.release-link {
    color: #666;
    text-decoration: none;
}
.release-link:hover { color: var(--black); }
.disco-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-btn {
    background: none;
    border: var(--line-weight) solid var(--black);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    text-transform: uppercase;
    padding: 6px 14px;
    cursor: crosshair;
    color: #666;
    transition: background 0.1s, color 0.1s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--black);
    color: var(--white);
}

footer {
    padding: 60px 40px;
    border-top: var(--line-weight) solid var(--black);
    font-size: 9px;
    color: #999;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    text-decoration: none;
    color: #999;
    transition: color 0.1s;
    letter-spacing: 0.05em;
}

.footer-links a:hover { color: var(--black); }

.footer-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-right a {
    color: #999;
    text-decoration: none;
}

.footer-right a:hover { color: var(--black); }

/* Home section */
.home-section {
    min-height: auto !important;
    padding: 80px 40px 60px !important;
}

.home-header {
    margin-bottom: 50px;
}

.home-name {
    font-size: 36px;
    font-weight: 300;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.home-tagline {
    font-size: 9px;
    color: #999;
    letter-spacing: 0.08em;
}

.home-releases {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.home-release-card {
    text-decoration: none;
    color: inherit;
    display: block;
    overflow: hidden;
    position: relative;
}

.home-release-img {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.home-release-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    filter: grayscale(10%);
}

.home-release-card:hover .home-release-img img {
    transform: scale(1.04);
    filter: grayscale(0%);
}

.home-release-title {
    font-size: 10px;
    margin-top: 10px;
    letter-spacing: 0.05em;
}

.home-release-meta {
    font-size: 9px;
    color: #999;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .home-releases { grid-template-columns: 1fr; }
    .home-name { font-size: 24px; }
    .home-section { padding: 60px 20px 40px !important; }
    .footer-inner { flex-direction: column; }
    .footer-right { text-align: left; }
    section { padding: 60px 20px; }
}

/* Contact section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 900px;
}

.contact-email {
    font-size: 14px;
    color: var(--black);
    text-decoration: none;
    border-bottom: var(--line-weight) solid var(--black);
    padding-bottom: 2px;
    display: inline-block;
}

.contact-email:hover {
    background: var(--accent);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-links a {
    text-decoration: none;
    color: #666;
    transition: color 0.1s;
}

.contact-links a:hover {
    color: var(--black);
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Back to top */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--black);
    color: var(--white);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 8px 14px;
    border: none;
    cursor: crosshair;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 200;
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

#back-to-top:hover {
    background: #333;
}

/* Active nav link */
.nav-links a.active {
    color: var(--black);
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading screen */
@font-face {
    font-family: 'Bmbo2';
    src: url('Font/Bmbo2-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

#loader {
    position: fixed;
    inset: 0;
    background: var(--white);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    cursor: crosshair;
    transition: opacity 0.5s ease;
    overflow: hidden;
}

#loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-cursor {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.loader-cursor-h,
.loader-cursor-v {
    position: absolute;
    background: var(--black);
    opacity: 0.12;
}

.loader-cursor-h {
    height: var(--line-weight);
    width: 100%;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: top 0.08s ease-out;
}

.loader-cursor-v {
    width: var(--line-weight);
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    transition: left 0.08s ease-out;
}

.loader-text {
    position: relative;
    z-index: 1;
    font-family: 'Bmbo2', serif;
    font-size: clamp(32px, 8vw, 56px);
    text-transform: none;
    letter-spacing: 0.08em;
    color: var(--black);
    display: flex;
    gap: 0.06em;
    padding: 0 32px;
    user-select: none;
}

.loader-char {
    display: inline-block;
    will-change: transform;
    transition: transform 0.12s ease-out;
}

.loader-hint {
    position: relative;
    z-index: 1;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #888;
    opacity: 0;
    transition: opacity 0.4s ease;
    user-select: none;
}

#loader.ready .loader-hint {
    opacity: 1;
    animation: loader-hint-pulse 2s ease-in-out infinite;
}

@keyframes loader-hint-pulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .loader-char,
    .loader-cursor-h,
    .loader-cursor-v {
        transition: none !important;
    }

    #loader.ready .loader-hint {
        animation: none;
        opacity: 1;
    }

    .archive-item:hover img,
    .home-release-card:hover .home-release-img img {
        transform: none;
    }
}
