/* Portfolio Site Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background-color: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    min-height: 100vh;
}

a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #fff;
}

/* Home page collage background */
.home-page {
    overflow-x: hidden;
}

.collage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.collage-photo {
    position: absolute;
    padding: 6px;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.collage-photo img {
    display: block;
    width: 100%;
    height: auto;
}

.home-content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem;
    padding-top: 3rem;
}

.home-header {
    margin-bottom: 2rem;
    background: #1a1a1a;
    padding: 8px 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8);
    max-width: 600px;
    position: relative;
}

/* Film strip perforations - top */
.home-header::before,
.home-header::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    height: 10px;
    background: repeating-linear-gradient(
        to right,
        #000 0px,
        #000 12px,
        #1a1a1a 12px,
        #1a1a1a 20px
    );
    border-radius: 1px;
}

.home-header::before {
    top: 4px;
}

.home-header::after {
    bottom: 4px;
}

.home-header .header-frames {
    justify-content: center;
}

.home-header h1 {
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.home-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.home-nav a {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.7rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
}

.home-nav a:hover {
    border-color: #fff;
    background: rgba(0, 0, 0, 0.8);
}

.intro-card {
    background: rgba(13, 13, 13, 0.85);
    padding: 10px;
    box-shadow:
        0 8px 40px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    width: 440px;
    max-width: 100%;
}

.intro-card-inner {
    background: transparent;
    padding: 2rem;
}

.intro-card-inner p {
    color: #999;
    line-height: 1.8;
    font-size: 0.95rem;
    text-align: justify;
}

.intro-card-inner .signature {
    font-style: italic;
    text-align: right;
}

/* Header - Film strip style */
.header {
    padding: 8px 12px;
    background: #1a1a1a;
    position: relative;
    max-width: 450px;
    margin: 3rem auto 2rem;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8);
}

.header::before,
.header::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    height: 10px;
    background: repeating-linear-gradient(
        to right,
        #000 0px,
        #000 12px,
        #1a1a1a 12px,
        #1a1a1a 20px
    );
    border-radius: 1px;
}

.header::before {
    top: 4px;
}

.header::after {
    bottom: 4px;
}

.header-frames {
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 14px 8px;
}

.header-frame {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
}

.header-frame.frame-title {
    flex: 1;
}

.header .breadcrumb {
    font-size: 0.8rem;
    color: #666;
    white-space: nowrap;
}

.header .breadcrumb a {
    color: #888;
}

.header .breadcrumb a:hover {
    color: #fff;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
    text-align: center;
}

/* Simple header without nav */
.header-simple .header-frames {
    justify-content: center;
}

/* Action buttons as frames */
.header-frame-btn {
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #888;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-frame-btn:hover {
    border-color: #555;
    color: #fff;
    background: #111;
}

.header-frame-btn.active {
    border-color: #666;
    color: #fff;
    background: #151515;
}

.header-frame-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    margin-right: 0.4rem;
}

.header-frame .counter {
    color: #666;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.header-title-btn {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex: 1;
}

/* Navigation */
.nav {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 2rem;
}

.nav a {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 1rem 2rem;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.nav a:hover {
    border-color: #fff;
    background-color: #111;
}

/* Introduction section */
.intro-card .header {
    border-bottom: none;
    padding: 0 0 1rem 0;
}

.intro-card .header h1 {
    font-size: 1.6rem;
    margin-bottom: 0;
}

.intro-card .nav {
    padding: 0 0 1.5rem 0;
    gap: 1rem;
    border-bottom: 1px solid #222;
    margin-bottom: 1.5rem;
}

.intro-card .nav a {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.intro {
    text-align: justify;
    line-height: 1.8;
    color: #999;
}

.intro p {
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

.intro p:last-of-type {
    margin-bottom: 0;
}

.intro .signature {
    margin-top: 1.5rem;
    font-style: italic;
    color: #999;
    text-align: right;
}

.intro .email-link {
    color: #fff;
    border-bottom: 1px solid #444;
    padding-bottom: 2px;
    transition: border-color 0.2s ease;
}

.intro .email-link:hover {
    border-color: #fff;
}

.email {
    float:right;
}

/* Section listings (Shows/People index) */
.section-list {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.section-list h2 {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    text-transform: uppercase;
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
}

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* People grid - max 4 columns with portrait thumbnails */
.people-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.people-grid .folder-thumb {
    aspect-ratio: 3 / 4;
}

@media (max-width: 1200px) {
    .people-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .people-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* View toggle */
.view-toggle {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.view-toggle button {
    background: transparent;
    border: 1px solid #333;
    color: #888;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle button:hover {
    border-color: #666;
    color: #ccc;
}

.view-toggle button.active {
    border-color: #fff;
    color: #fff;
    background: #111;
}

/* List view */
.people-list {
    display: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.people-list.active {
    display: block;
}

.people-grid.hidden {
    display: none;
}

.people-list ul {
    list-style: none;
    column-count: 4;
    column-gap: 2rem;
}

.people-list li {
    break-inside: avoid;
    margin-bottom: 0.75rem;
}

.people-list a {
    font-size: 1.1rem;
    color: #999;
    transition: color 0.2s ease;
}

.people-list a:hover {
    color: #fff;
}

/* Celebrity weight styles */
.people-list li.weight-1 a {
    font-weight: 400;
    color: #aaa;
}

.people-list li.weight-2 a {
    font-weight: 500;
    color: #ccc;
}

.people-list li.weight-3 a {
    font-weight: 600;
    color: #fff;
}


@media (max-width: 1000px) {
    .people-list ul {
        column-count: 3;
    }
}

@media (max-width: 750px) {
    .people-list ul {
        column-count: 2;
    }
}

@media (max-width: 500px) {
    .people-list ul {
        column-count: 1;
    }
}

/* People gallery - centered layout */
.people-gallery .thumbnail-grid {
    column-count: unset;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.people-gallery .thumbnail {
    margin-bottom: 0;
}

.people-gallery .thumbnail img {
    max-width: 500px;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Random view for shows */
.random-view {
    display: none;
    position: relative;
    min-height: calc(100vh - 200px);
    overflow: hidden;
}

.random-view.active {
    display: block;
}

.folder-grid.hidden {
    display: none;
}

.random-card {
    position: absolute;
    padding: 6px;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, z-index 0s;
    text-decoration: none;
}

.random-card:hover {
    transform: scale(1.05) rotate(0deg) !important;
    z-index: 1000 !important;
}

.random-card img {
    display: block;
    width: 100%;
    height: auto;
}

.random-card-label {
    display: block;
    padding: 8px 4px 4px;
    font-size: 0.75rem;
    color: #999;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: #1a1a1a;
}

.random-card:hover .random-card-label {
    color: #fff;
}

/* Random button countdown animation */
#btn-random {
    position: relative;
    overflow: hidden;
}

#btn-random::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    z-index: 0;
    pointer-events: none;
}

#btn-random.countdown::before {
    animation: countdownFill 15s linear forwards;
}

@keyframes countdownFill {
    from { width: 0; }
    to { width: 100%; }
}

.folder-card {
    border: 1px solid #222;
    transition: all 0.3s ease;
    display: block;
    overflow: hidden;
    position: relative;
}

.folder-card:hover {
    border-color: #555;
}

.folder-card:hover .folder-thumb img {
    transform: scale(1.05);
    opacity: 1;
}

.folder-card:hover .folder-info {
    background: rgba(0, 0, 0, 0.6);
}

.folder-thumb {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #111;
}

.folder-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.folder-info {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.4);
    transition: background 0.3s ease;
}

.folder-card h3 {
    font-size: 2rem;
    font-weight: 400;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

.folder-card h3 .year {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: #999;
    margin-top: 0.25rem;
}

/* Thumbnail gallery - Masonry layout */
.gallery {
    width: 100%;
    padding: 0.5rem;
}

.thumbnail-grid {
    column-count: 5;
    column-gap: 0.5rem;
}

.thumbnail {
    break-inside: avoid;
    margin-bottom: 0.5rem;
    overflow: hidden;
    position: relative;
    display: block;
}

.thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.85;
}

.thumbnail:hover img {
    transform: scale(1.03);
    opacity: 1;
}

/* Responsive masonry columns */
@media (max-width: 1800px) {
    .thumbnail-grid {
        column-count: 4;
    }
}

@media (max-width: 1200px) {
    .thumbnail-grid {
        column-count: 3;
    }
}

@media (max-width: 800px) {
    .thumbnail-grid {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .thumbnail-grid {
        column-count: 2;
        column-gap: 0.25rem;
    }
    .thumbnail {
        margin-bottom: 0.25rem;
    }
}

/* Individual image page */
.image-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.image-page .header {
    margin: 1rem auto;
    max-width: fit-content;
}

.image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.image-frame {
    position: relative;
    padding: 8px;
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 4px 20px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.image-frame img {
    display: block;
    max-width: calc(100vw - 6rem);
    max-height: calc(100vh - 180px);
    object-fit: contain;
}

/* Image navigation */
.image-nav {
    text-align: center;
    padding: 1rem 2rem;
}

.image-nav .counter {
    color: #666;
    font-size: 0.9rem;
}

/* Download button */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid #333;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ccc;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.download-btn:hover {
    border-color: #666;
    background-color: #111;
    color: #fff;
}

.download-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Side navigation arrows for desktop */
.nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    padding: 2rem 1rem;
    color: #444;
    transition: color 0.2s ease;
    z-index: 100;
    user-select: none;
}

.nav-arrow:hover {
    color: #fff;
}

.nav-arrow.prev {
    left: 0;
}

.nav-arrow.next {
    right: 0;
}

.nav-arrow.disabled {
    opacity: 0.2;
    pointer-events: none;
}

/* Back to gallery link */
.image-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

.back-link a {
    color: #888;
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.back-link a:hover {
    color: #fff;
}

/* Responsive styles */
@media (max-width: 768px) {
    .header {
        padding: 1.5rem 1rem;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }

    .nav a {
        text-align: center;
    }

    .home-content {
        padding: 1rem;
    }

    .intro-card {
        padding: 8px;
    }

    .intro-card-inner {
        padding: 1.5rem;
    }

    .intro-card .nav {
        flex-direction: row;
        gap: 0.5rem;
    }

    .intro-card .nav a {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .collage-photo {
        padding: 4px;
    }

    .section-list {
        padding: 1rem;
    }

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

    .gallery {
        padding: 0.25rem;
    }

    .image-container {
        padding: 0.75rem;
    }

    .image-frame {
        padding: 4px;
    }

    .image-frame img {
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 140px);
    }

    .image-top-bar {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .nav-arrow {
        display: none;
    }
}

/* Touch-friendly improvements for mobile */
@media (hover: none) and (pointer: coarse) {
    .thumbnail img,
    .folder-thumb img {
        opacity: 1;
    }

    .thumbnail:active img {
        transform: scale(0.98);
    }
}

/* Terms page */
.terms-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.terms-card {
    background: #111;
    border: 1px solid #333;
    padding: 2rem;
    line-height: 1.8;
}

.terms-card h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.terms-card .copyright {
    color: #888;
    margin-bottom: 2rem;
}

.terms-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ccc;
}

.terms-card p {
    color: #999;
}

.terms-card a {
    color: #fff;
}

.terms-card b {
    color: #ddd;
}

.terms-card a:hover {
    text-decoration: underline;
}

/* Terms link on image pages */
.terms-link {
    text-align: center;
    padding: 1rem;
}

.terms-link a {
    color: #555;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.terms-link a:hover {
    color: #888;
}

/* Person subtitle (bands/famous for) */
.person-subtitle {
    display: block;
    font-size: 0.85rem;
    font-weight: 300;
    color: #888;
    margin-top: 0.25rem;
}

.people-list .person-subtitle {
    display: inline;
    margin-left: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.people-list .person-subtitle::before {
    content: '— ';
}

/* Gallery subtitle bar */
.gallery-subtitle {
    text-align: center;
    color: #888;
    font-size: 0.95rem;
    font-weight: 300;
    padding: 0 2rem 1rem;
    margin-top: -1rem;
}
