/* ============================================================
   ART — contact archive (loads after style.css)
   ============================================================ */

.art-container { max-width: 1340px; margin: 0 auto; }

/* Header: scope | title | readout ----------------------------- */
.art-header { margin-bottom: 20px; }

.art-head-grid {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) 250px;
    gap: 28px;
    align-items: center;
    padding: 22px 28px 24px;
}

.art-header h1 { font-size: clamp(2.4rem, 5vw, 4rem); margin-bottom: 10px; }

.art-header p { max-width: 640px; margin: 0 auto 6px; color: var(--text-dim); font-size: 0.92rem; }
.art-header p b { color: var(--amber); font-weight: 400; border: 1px solid var(--amber-dim); padding: 0 4px; }

.art-header .stamp { margin-top: 12px; transform: rotate(-3deg); }

/* Filter row — channel select -------------------------------- */
.tag-tabs {
    position: sticky;
    top: 52px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 0 0 24px;
    padding: 8px 12px;
    background: rgba(2, 8, 5, 0.94);
    border: 1px solid var(--line);
}
.tag-tabs::before {
    content: "CHANNEL >";
    margin-right: 6px;
    color: var(--text-dim);
    font-size: 0.75rem;
    letter-spacing: 2px;
}

.tag-button {
    background: transparent;
    color: var(--phos);
    border: 1px solid var(--line);
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}
.tag-button::before { content: "[ "; opacity: 0.6; }
.tag-button::after  { content: " ]"; opacity: 0.6; }
.tag-button:hover,
.tag-button.active {
    background: var(--phos);
    border-color: var(--phos);
    color: var(--bg);
    text-shadow: none;
}

.tag-button.spoiler-button { color: var(--amber); border-color: var(--amber-dim); }
.tag-button.spoiler-button::before { content: "[! "; }
.tag-button.spoiler-button::after  { content: " !]"; }
.tag-button.spoiler-button:hover,
.tag-button.spoiler-button.active { background: var(--amber); border-color: var(--amber); color: var(--bg); }

/* Grid --------------------------------------------------------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    align-items: start;
    counter-reset: file;
}

.gallery-item {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
    counter-increment: file;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.gallery-item:hover { box-shadow: var(--glow), inset 0 0 30px rgba(0, 0, 0, 0.6); transform: translateY(-2px); }
.gallery-item.is-hidden { display: none; }

/* title strip on every card */
.gallery-item::before {
    content: "FILE_" counter(file, decimal-leading-zero) "  //  CONTACT LOGGED";
    display: block;
    padding: 2px 8px;
    background: var(--line-dim);
    color: var(--phos-soft);
    font-size: 0.62rem;
    letter-spacing: 2px;
}
.gallery-item:hover::before { background: var(--phos); color: var(--bg); text-shadow: none; }

.image-button {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--line-dim);
    background: #000;
    cursor: zoom-in;
}
/* targeting brackets on hover */
.image-button::after {
    content: "";
    position: absolute;
    inset: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, inset 0.15s ease;
    --b: var(--amber);
    background:
        linear-gradient(var(--b), var(--b)) top left / 20px 2px no-repeat,
        linear-gradient(var(--b), var(--b)) top left / 2px 20px no-repeat,
        linear-gradient(var(--b), var(--b)) top right / 20px 2px no-repeat,
        linear-gradient(var(--b), var(--b)) top right / 2px 20px no-repeat,
        linear-gradient(var(--b), var(--b)) bottom left / 20px 2px no-repeat,
        linear-gradient(var(--b), var(--b)) bottom left / 2px 20px no-repeat,
        linear-gradient(var(--b), var(--b)) bottom right / 20px 2px no-repeat,
        linear-gradient(var(--b), var(--b)) bottom right / 2px 20px no-repeat;
}
.gallery-item:hover .image-button::after { opacity: 1; inset: 16px; }

.gallery-thumb {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.85) contrast(1.05);
    transition: filter 0.2s ease;
}
.gallery-item:hover .gallery-thumb { filter: none; }
.contain-thumb { object-fit: contain; padding: 12px; background: #000; }

.gallery-info { padding: 14px 16px 16px; text-align: left; }

.gallery-info h2 {
    font-family: var(--mono);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--phos);
    margin: 0 0 8px;
}
.gallery-info h2::before { content: "> "; color: var(--text-dim); }

.gallery-info p { margin: 0 0 12px; font-size: 0.88rem; line-height: 1.55; color: var(--text); }

.tag-pill {
    display: inline-block;
    margin: 4px 6px 0 0;
    padding: 1px 6px;
    border: 1px solid var(--line-dim);
    color: var(--text-dim);
    font-size: 0.68rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.tag-pill::before { content: "#"; }

/* Spoilers — redacted until hovered --------------------------- */
.gallery-item[data-tags~="spoiler"] { border-color: var(--amber-dim); }
.gallery-item[data-tags~="spoiler"]::before {
    content: "FILE_" counter(file, decimal-leading-zero) "  //  EYES ONLY";
    background: var(--amber);
    color: var(--bg);
    text-shadow: none;
}
.gallery-item[data-tags~="spoiler"] .gallery-info h2,
.gallery-item[data-tags~="spoiler"] .gallery-info p {
    background: var(--amber);
    color: transparent;
    text-shadow: none;
    user-select: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.gallery-item[data-tags~="spoiler"] .gallery-info h2::before { color: transparent; }
.gallery-item[data-tags~="spoiler"]:hover .gallery-info h2,
.gallery-item[data-tags~="spoiler"]:hover .gallery-info p {
    background: transparent;
    color: var(--amber);
    user-select: auto;
}

/* Lightbox — enhance monitor --------------------------------- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 8000;
    padding: 48px 70px 32px;
    background: rgba(0, 5, 2, 0.95);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.lightbox.open { display: flex; }

.lightbox-bar {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 110px 6px 16px;
    background: var(--phos);
    color: var(--bg);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: none;
}

.lightbox img {
    max-width: min(1100px, 100%);
    max-height: 76vh;
    object-fit: contain;
    background: #000;
    border: 1px solid var(--phos);
    outline: 1px solid var(--line-dim);
    outline-offset: 6px;
    box-shadow: var(--glow), 0 20px 70px rgba(0, 0, 0, 0.8);
}

.lightbox p {
    margin: 20px 0 0;
    color: var(--phos);
    font-size: 0.88rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.lightbox p::before { content: "> "; color: var(--text-dim); }
.lightbox p::after  { content: "_"; animation: blink 1s steps(1) infinite; }

.lightbox-close,
.lightbox-nav {
    position: fixed;
    background: var(--panel);
    color: var(--phos);
    border: 1px solid var(--phos);
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
}
.lightbox-close { top: 2px; right: 8px; padding: 2px 10px; font-size: 0.75rem; z-index: 2; }
.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 64px;
    font-family: var(--pixel);
    font-size: 2rem;
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-close:hover,
.lightbox-nav:hover { background: var(--phos); color: var(--bg); text-shadow: none; }

@media (max-width: 900px) {
    .art-head-grid { grid-template-columns: 1fr; justify-items: center; padding: 18px 16px 20px; }
}
@media (max-width: 700px) {
    .tag-tabs { top: 44px; }
    .tag-tabs::before { display: none; }
    .gallery-grid { grid-template-columns: 1fr; }
    .lightbox { padding: 44px 12px 24px; }
    .lightbox-bar span:last-child { display: none; }
    .lightbox-nav { top: auto; bottom: 10px; transform: none; height: 44px; }
}
