/* ===================================================================
   Projects - COMPLETE STYLESHEET
   ================================================================== */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #101010;
    font-family: 'Courier New', monospace;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===================================================================
   NAVIGATION BAR
   ================================================================== */
.header-main {
    position: sticky;
    top: 0px;
    width: 100%;
    background-color: rgb(0, 0, 0);
    color: snow;
    font-family: Helvetica, sans-serif, Arial;
    font-style: italic;
    z-index: 100;
    padding: 0 20px;
    box-sizing: border-box;
}

.nav-items {
    display: flex;
    align-items: center;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.header-pb {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-pb img {
    width: 50%;
    height: 50%;
    object-fit: cover;
    transition: filter 0.25s ease-in-out;
    filter: grayscale(100%);
}

.header-pb img:hover {
    filter: none;
}

.header-jona-melvin-grobe, .header-contact {
    flex-grow: 1; 
    white-space: nowrap;
}

.header-jona-melvin-grobe {
    margin-left: -10px;
}

.header-contact {
    text-align: right;
    padding-right: 10px;
}

.header-jona-melvin-grobe a, .header-contact a {
    color: inherit;
    text-decoration: none;
}

/* ===================================================================
   HERO SECTION
   ================================================================== */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

/* Image Slideshow Styles */
.image-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    filter: brightness(0.4) contrast(1.2);
    transition: opacity 0.8s ease;
}

.slide-image.active {
    opacity: 1;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.4) contrast(1.2);
    opacity: 0;
    transition: opacity 0.8s ease;
}

.background-image.video-loaded {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
    z-index: 5;
}

/* ===================================================================
   CUSTOM CURSOR & MOBILE HINTS
   ================================================================== */
.custom-cursor {
    position: fixed;
    width: 120px;
    height: 120px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
    transition: opacity 0.2s ease, transform 0.2s ease;
    letter-spacing: 0.5px;
    color: white;
}

.hero-section:hover .custom-cursor {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.mobile-tap-hint {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 7;
    text-align: center;
    opacity: 0.8;
    animation: fadeInOut 3s ease-in-out infinite;
}

.mobile-tap-hint .tap-icon {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.mobile-tap-hint .tap-text {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    color: white;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ===================================================================
   PROJECT HEADING
   ================================================================== */
.project-heading {
    position: relative;
    z-index: 10;
    text-align: center;
    font-family: 'Courier New', monospace;
    color: white;
    animation: fadeInUp 1s ease-out;
}

.project-heading h1 {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    background: linear-gradient(45deg, #ffffff, #cccccc, #ffffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

.sub-heading {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================================================
   MODAL STYLES
   ================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

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

.modal-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

/* Fallback for older browsers without aspect-ratio support */
@supports not (aspect-ratio: 16 / 9) {
    .modal-content {
        height: 0;
        padding-bottom: 56.25%; /* 16:9 fallback */
    }
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.close-button {
    display: none; /* hide close button if not needed */
}

/* ===================================================================
   DETAILS SECTION
   ================================================================== */
.details-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 2rem;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
}

.details-table {
    display: flex;
    justify-content: space-evenly;
    width: 100%;
    color: white;
    font-family: monospace, sans-serif;
    font-size: 15px;
    gap: 40px;
    flex-wrap: wrap;
    padding: 1rem 0;
}

.detail {
    display: flex;
    flex-direction: column;
    min-width: 150px;
    text-align: left;
}

.detail h4 {
    color: white;
    font-size: 15px;
    margin-bottom: 0.5rem;
    font-weight: normal;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0.25rem;
}

.details-description {
    color: white;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.details-description a {
    color: white;
    text-decoration: none;
}

.details-description a:hover {
    text-decoration: underline;
}

.details-description-secondary {
    color: grey;
    font-size: 15px;
    font-weight: bold;
}

/* ===================================================================
   VIDEO SECTION
   ================================================================== */
.video-section {
    padding: 2rem;
    margin: 1.5rem 0; /* Reduced from 2rem to 1.5rem */
}

.center-container {
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 2rem;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-container:hover {
    transform: translateY(-10px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 20px;
}
/* Video wrapper to contain both video and caption */
.video-wrapper {
    width: 100%;
    max-width: 1200px;
    position: relative;
}

/* Video caption styling */
.video-caption {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.025);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    font-style: italic;
    letter-spacing: 0.5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .video-caption {
        font-size: 0.9rem;
        margin-top: 0.1rem;
    }
}



/* ===================================================================
   CONTENT SECTIONS
   ================================================================== */
.content-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem; /* Reduced top/bottom padding from 2rem to 1rem */
}

.project-description {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 2rem;
    margin: 1rem 0; /* Reduced from 2rem to 1rem */
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.project_subtitle {
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: bold;
    position: relative;
    display: inline-block;
}

.project_subtitle::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.5));
    transition: width 0.3s ease;
}

.project-description:hover .project_subtitle::after {
    width: 100%;
}

.project_text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.project_text a {
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.project_text a:hover {
    border-bottom-color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* ===================================================================
   IMAGE GALLERY
   ================================================================== */
.image-collection-wrapper {
    margin: 1.5rem 0; /* Reduced from 2rem to 1.5rem */
    padding: 0 2rem;
}

.image-collection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.image-collection img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    filter: grayscale(100%) brightness(0.8);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.image-collection img:hover {
    filter: none;
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

/* ===================================================================
   MUSIC SECTION
   ================================================================== */
.music-section {
    padding: 2rem;
    margin: 1rem 0; /* Reduced from 2rem to 1rem */
    border-radius: 20px;
}

.music-section iframe {
    border-radius: 20px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* ===================================================================
   SCROLL ANIMATIONS
   ================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInScroll 0.8s ease-out forwards;
}

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

/* ===================================================================
   COPYRIGHT
   ================================================================== */
.copyright {
    text-align: center;
    padding: 3rem 2rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* ===================================================================
   RESPONSIVE DESIGN
   ================================================================== */

/* Hide mobile hint and cursor on desktop/mobile respectively */
@media (min-width: 769px) {
    .mobile-tap-hint {
        display: none;
    }
}

@media (max-width: 768px) {
    .custom-cursor {
        display: none;
    }
    .hero-section {
        cursor: default;
    }
}

/* Tablet and smaller desktop */
@media (max-width: 1200px) {
    .details-table {
        flex-direction: column;
        align-items: center;
        max-width: 600px;
        margin: 0 auto;
        gap: 30px;
    }
    
    .detail {
        text-align: center;
    }
    
    .image-collection {
        grid-template-columns: 1fr;
    }
    
    .project-description {
        padding: 2rem;
    }
    
    .content-section {
        padding: 1rem; /* Reduced padding for mobile */
    }
}

/* Mobile specific fixes */
@media (max-width: 768px) {
    .hero-section {
        height: 70vh;
    }
    
    .project_subtitle {
        font-size: 1.5rem;
    }
    
    .project_text {
        font-size: 1rem;
    }
    
    .modal-content {
        max-width: 95%;
    }
    
    .video-container {
        padding-bottom: 56.25%; /* Ensure proper ratio on mobile */
        max-height: none; /* Remove any height restrictions */
        border-radius: 10px;
    }
    
    .video-container iframe {
        border-radius: 10px;
    }
    
    .video-section {
        padding: 1rem;
    }
    
    .center-container {
        padding: 0 1rem;
    }
}