/* Rabbit Hole Page Styles */

/* Make navigation solid on rabbit hole page */
.rabbit-hole-page .nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.rabbit-hole-page .nav-links-centered {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
}

.rabbit-hole-page .nav-links-centered a {
    color: #000000;
    text-shadow: none;
}

.rabbit-hole-page .home-icon svg {
    stroke: #000000;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Main Content */
.rabbit-hole-content {
    min-height: 100vh;
    padding-top: 160px;
    padding-bottom: 80px;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);
}

.page-header {
    text-align: center;
    margin-bottom: 4rem;
}

.page-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 100;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: #000000;
}

.page-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #666666;
    max-width: 600px;
    margin: 0 auto;
}

/* Tiles Grid */
.tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Tablet optimization */
@media (max-width: 1024px) and (min-width: 769px) {
    .tiles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile optimization */
@media (max-width: 768px) {
    .tiles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Small mobile optimization */
@media (max-width: 480px) {
    .tiles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* Work Tile */
.work-tile {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.tile-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #f5f5f5;
}

.tile-image .image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
}

.tile-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.tile-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
    margin: 0;
    letter-spacing: -0.01em;
}

.tile-description {
    font-size: 1rem;
    color: #666666;
    line-height: 1.6;
    margin: 0 0 0.75rem 0;
}

.tile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0;
}

.tag {
    padding: 0.375rem 0.75rem;
    background: #f0f0f0;
    color: #333333;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
}

/* IMDb Style Tile */
.imdb-tile .imdb-bg {
    background: #000000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.imdb-logo {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 4rem;
    font-weight: 700;
    color: #000000;
    letter-spacing: -0.05em;
    padding: 0.5rem 1rem;
    display: inline-block;
    background: #f5c518;
    border-radius: 6px;
}

.imdb-content {
    background: #ffffff;
}

.imdb-content .tile-title {
    color: #000000;
}

.imdb-content .tile-description {
    color: #333333;
}

.imdb-tile .tag {
    background: #e0e0e0;
    color: #000000;
}

/* Demoscene Style Tile */
.demoscene-tile .demoscene-bg {
    background: #000000;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.demoscene-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.demoscene-content {
    background: #ffffff;
}

.demoscene-content .tile-title {
    color: #000000;
    text-shadow: none;
}

.demoscene-content .tile-description {
    color: #333333;
}

.demoscene-tile .tag {
    background: #e0e0e0;
    color: #000000;
    border: none;
    cursor: pointer;
}

/* Responsive adjustments */
/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .rabbit-hole-content {
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .page-header {
        margin-bottom: 3rem;
    }

    .tile-image {
        height: 180px;
    }

    .tile-content {
        padding: 1.25rem;
    }

    .tile-title {
        font-size: 1.25rem;
    }

    .tile-description {
        font-size: 0.875rem;
        line-height: 1.5;
    }

    .imdb-logo {
        font-size: 3rem;
    }

    .tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .rabbit-hole-content {
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .page-header {
        margin-bottom: 2.25rem;
    }

    .page-title {
        font-size: clamp(2.25rem, 5.5vw, 3.75rem);
        margin-bottom: 1.125rem;
    }

    .tile-image {
        height: 140px;
    }

    .tile-content {
        padding: 1rem;
    }

    .tile-title {
        font-size: 1rem;
    }

    .tile-description {
        font-size: 0.8125rem;
        line-height: 1.4;
    }

    .imdb-logo {
        font-size: 2.5rem;
    }

    .tag {
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .rabbit-hole-content {
        padding-top: 110px;
        padding-bottom: 50px;
    }

    .page-header {
        margin-bottom: 1.75rem;
    }

    .page-title {
        font-size: clamp(2rem, 5vw, 3.5rem);
        margin-bottom: 1.25rem;
    }

    .tile-image {
        height: 120px;
    }

    .tile-content {
        padding: 0.75rem;
    }

    .tile-title {
        font-size: 0.875rem;
    }

    .tile-description {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .imdb-logo {
        font-size: 2rem;
    }

    .tag {
        font-size: 0.625rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Demoscene Modal */
.demoscene-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 2rem;
}

.demoscene-modal.active {
    opacity: 1;
    visibility: visible;
}

.demoscene-modal-content {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.demoscene-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.demoscene-close svg {
    stroke: #000000;
    filter: none;
}

.demoscene-close:hover {
    transform: scale(1.1);
}

.demoscene-modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    text-shadow: none;
    margin-bottom: 1.5rem;
    text-align: center;
}

.demoscene-modal-text {
    color: #333333;
    line-height: 1.8;
    font-size: 1rem;
}

.demoscene-modal-text p {
    margin-bottom: 1.25rem;
}

.demoscene-modal-text p:last-child {
    margin-bottom: 0;
}

/* Demoscene Modal - Mobile adjustments */
@media (max-width: 768px) {
    .demoscene-modal {
        padding: 1rem;
    }

    .demoscene-modal-content {
        padding: 2rem 1.5rem;
        max-height: 85vh;
    }

    .demoscene-modal-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .demoscene-modal-text {
        font-size: 0.9375rem;
        line-height: 1.6;
    }

    .demoscene-close {
        top: 0.75rem;
        right: 0.75rem;
    }
}

@media (max-width: 480px) {
    .demoscene-modal {
        padding: 0.5rem;
    }

    .demoscene-modal-content {
        padding: 1.5rem 1rem;
    }

    .demoscene-modal-title {
        font-size: 1.25rem;
    }

    .demoscene-modal-text {
        font-size: 0.875rem;
        line-height: 1.5;
    }
}

/* Mobile optimizations for video modal */
@media (max-width: 768px) {
    #trailerModal .demoscene-modal-content {
        padding: 1.5rem 1rem;
        max-width: 95%;
    }

    #trailerModal .demoscene-modal-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    #trailerModal .demoscene-modal-content {
        padding: 1rem 0.75rem;
        max-width: 98%;
    }

    #trailerModal .demoscene-modal-title {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }
}

/* Portfolio Carousel */
.portfolio-carousel {
    position: relative;
    width: 100%;
    margin-top: 1rem;
}

.portfolio-carousel-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
}

.portfolio-carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.portfolio-carousel-image.active {
    opacity: 1;
    pointer-events: auto;
}

.portfolio-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.portfolio-arrow:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.portfolio-arrow svg {
    stroke: #000000;
}

.portfolio-arrow-left {
    left: 1rem;
}

.portfolio-arrow-right {
    right: 1rem;
}

.portfolio-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 10;
}

/* Hide arrows on mobile and tablet (touch devices) */
@media (max-width: 1024px) {
    .portfolio-arrow {
        display: none;
    }

    .portfolio-carousel-container {
        height: 400px;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .portfolio-carousel-container {
        height: 350px;
    }

    .portfolio-counter {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

@media (max-width: 480px) {
    .portfolio-carousel-container {
        height: 280px;
    }
}

/* DSLR icon mobile optimization */
@media (max-width: 768px) {
    .portfolio-icon {
        transform: scale(0.58);
    }
}
