/* Timing Controls - Adjust these values to change fade timings */
:root {
    /* Initial fade in timings */
    --background-fade-duration: 3s;
    --background-fade-delay: 1.5s;
    
    /* Text fade in timings */
    --text-fade-duration: 2s;
    --text-fade-delay: 4.5s;
    
    /* Fade out timings */
    --fadeout-duration: 2s;
    --fadeout-delay: 7s;
    
    /* Scroll prompt timings */
    --scroll-fade-duration: 2s;
    --scroll-fade-delay: 9.5s;
    --scroll-bounce-delay: 11.5s;
    
    /* Professional categories fade in */
    --categories-fade-duration: 2s;
    --categories-fade-delay: 8.5s;
    
    /* Personal categories fade in (Bernardo page) */
    --personal-fade-duration: 2s;
    --personal-fade-delay: 0.5s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
    position: relative;
    height: 200vh; /* Allow scrolling between two sections */
}

html {
    scroll-behavior: auto;
}

/* Fixed background */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/images/vlcsnap-2017-12-31-01h26m54s870.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -1;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
    pointer-events: none;
}

/* Remove overlay for landing section */
.landing-section ~ .background-overlay {
    opacity: 0;
    transition: opacity 1s ease;
}

body.scrolled .background-overlay {
    opacity: 1;
}

/* Landing section */
.landing-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: #000;
}

.landing-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/images/vlcsnap-2017-12-31-01h26m54s870.png');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.landing-background-complete {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/images/image.png');
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: fadeIn var(--background-fade-duration) var(--background-fade-delay) forwards, fadeOut var(--fadeout-duration) var(--fadeout-delay) forwards;
    z-index: 2;
}

.landing-content {
    position: relative;
    z-index: 10;
    text-align: center;
    animation: fadeOut var(--fadeout-duration) var(--fadeout-delay) forwards;
}

.landing-starring {
    font-family: 'Roboto Condensed', sans-serif;
    font-style: italic;
    font-size: 54px;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeIn var(--text-fade-duration) var(--text-fade-delay) forwards;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.landing-title {
    font-family: 'Roboto Condensed', sans-serif;
    font-style: italic;
    font-size: 72px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeIn var(--text-fade-duration) var(--text-fade-delay) forwards;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.landing-as {
    font-family: 'Roboto Condensed', sans-serif;
    font-style: italic;
    font-size: 48px;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeIn var(--text-fade-duration) var(--text-fade-delay) forwards;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.landing-subtitle {
    font-family: 'Roboto Condensed', sans-serif;
    font-style: italic;
    font-size: 54px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ddd;
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeIn var(--text-fade-duration) var(--text-fade-delay) forwards;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.scroll-prompt {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn var(--scroll-fade-duration) var(--scroll-fade-delay) forwards, bounce 2s var(--scroll-bounce-delay) infinite;
    z-index: 4;
}

.scroll-prompt svg {
    width: 30px;
    height: 30px;
    fill: #fff;
}

/* Bernardo section */
.bernardo-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

.fade-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 0;
    pointer-events: none;
    z-index: 25;
    transition: opacity 1.5s ease;
}

.fade-overlay.active {
    opacity: 1;
}

.bernardo-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 2s ease;
}

.bernardo-container.visible {
    opacity: 1;
}

.bernardo-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.dog-image {
    position: absolute;
    width: 150px;
    height: auto;
    right: calc(35% - 100px);
    top: calc(35% - 80px);
    z-index: 15;
    opacity: 0;
    animation: fadeIn var(--personal-fade-duration) var(--personal-fade-delay) forwards;
    cursor: pointer;
}

/* Corner images */
.corner-image {
    position: absolute;
    width: 200px;
    height: auto;
    z-index: 16;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.corner-image.top-left {
    top: 20px;
    left: 20px;
}

.corner-image.top-right {
    top: 20px;
    right: 20px;
}

.corner-image.bottom-left {
    bottom: 20px;
    left: 20px;
}

.corner-image.bottom-right {
    bottom: 20px;
    right: 20px;
}

/* Show corner images on dog hover */
.dog-image:hover ~ .corner-image {
    opacity: 1;
}

/* Footer */
.bernardo-footer {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    opacity: 0;
    animation: fadeIn var(--personal-fade-duration) var(--personal-fade-delay) forwards;
}

.bernardo-footer p {
    color: #ffffff;
    font-size: 0.875rem;
    font-family: 'IBM Plex Sans', sans-serif;
}

/* Personal categories on Bernardo page */
.personal-categories {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    z-index: 10;
    opacity: 0;
    animation: fadeIn var(--personal-fade-duration) var(--personal-fade-delay) forwards;
}

/* Content Display with Fade */
.circle-reveal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    background: rgba(0, 0, 0, 0.85);
    transition: opacity 0.4s ease;
}

.circle-reveal-container.active {
    pointer-events: auto;
    opacity: 1;
}

.circle-mask {
    display: none;
}

.content-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
    height: 80%;
    max-height: 700px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.5s ease 0.2s;
    overflow: hidden;
    border-radius: 8px;
}

.circle-reveal-container.active .content-panel {
    opacity: 1;
}

.content-wrapper {
    height: 100%;
    overflow-y: auto;
    padding: 3rem;
}

.content-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.content-header h2 {
    font-family: 'Roboto Condensed', sans-serif;
    font-style: italic;
    font-size: 3rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #fff;
    margin: 0;
}

.close-hint {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.content-body {
    line-height: 1.8;
    color: #ddd;
}

.content-body h4 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
    color: #fff;
    font-weight: 300;
}

.content-body ul {
    list-style: none;
    padding: 0;
}

.content-body li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.content-body li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #888;
}

.content-body p {
    margin: 1rem 0;
    line-height: 1.8;
}

/* Scrollbar styling for content */
.content-wrapper::-webkit-scrollbar {
    width: 8px;
}

.content-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.content-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.content-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Professional categories on landing */
.professional-categories {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    z-index: 20;
    opacity: 0;
    animation: fadeIn var(--categories-fade-duration) var(--categories-fade-delay) forwards;
    pointer-events: auto;
}

.categories-left,
.categories-right {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.categories-left {
    align-items: flex-start;
}

.categories-right {
    align-items: flex-end;
}

.category-item {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.category-item h3 {
    font-family: 'Roboto Condensed', sans-serif;
    font-style: italic;
    font-size: 28px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.category-item:hover h3 {
    transform: scale(1.1);
    text-shadow: 3px 3px 8px rgba(0,0,0,0.9);
}

/* Animations */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Back button */
.back-button {
    position: absolute;
    top: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    z-index: 30;
    opacity: 0;
    animation: fadeIn 2s 10s forwards;
}

.back-button:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(-4px);
}

.back-button svg {
    transition: transform 0.3s ease;
}

.back-button:hover svg {
    transform: translateX(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .landing-starring {
        font-size: 56px;
    }

    .landing-title {
        font-size: 64px;
    }

    .landing-as {
        font-size: 48px;
    }

    .landing-subtitle {
        font-size: 36px;
    }



    .professional-categories {
        flex-direction: column;
        gap: 2rem;
    }

    .categories-left,
    .categories-right {
        align-items: center;
    }

    .category-item h3 {
        font-size: 20px;
        text-align: center;
    }

    .personal-categories {
        flex-direction: column;
        gap: 2rem;
    }

    .dog-image {
        width: 100px;
        right: calc(20% - 50px);
        top: calc(20% - 150px);
    }

    .corner-image {
        width: 120px;
    }

    .corner-image.top-left {
        top: 10px;
        left: 10px;
    }

    .corner-image.top-right {
        top: 10px;
        right: 10px;
    }

    .corner-image.bottom-left {
        bottom: 10px;
        left: 10px;
    }

    .corner-image.bottom-right {
        bottom: 10px;
        right: 10px;
    }

    /* Circle reveal responsive */
    .content-panel {
        width: 95%;
        height: 90%;
        max-height: none;
    }

    .content-wrapper {
        padding: 2rem;
    }

    .content-header h2 {
        font-size: 2rem;
    }

    .image-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .image-reveal-section {
        padding: 5rem 0;
    }

    .transition-text {
        font-size: 1.8rem;
    }

    .professional-header h2 {
        font-size: 2rem;
    }

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

    .category-card {
        padding: 1.5rem;
    }

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

    .modal-header h3 {
        font-size: 1.8rem;
    }
}