/* ====================================
   Portfolio Scroll - SEO Enhanced Styles
   ==================================== */

/* Font Face declaraties */
@font-face {
    font-family: 'Berlin Type Office';
    src: url('fonts/berlin-type-office-400-normal.woff') format('woff'),
         url('fonts/berlin-type-office-400-normal.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Berlin Type Office';
    src: url('fonts/berlin-type-office-700-normal.woff') format('woff'),
         url('fonts/berlin-type-office-700-normal.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

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

html, body {
    width: 100%;
    scroll-behavior: smooth;
    font-family: 'Berlin Type Office', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Only enable scroll snap on desktop */
@media (min-width: 169px) {
    html {
        scroll-snap-type: y mandatory;
    }
}

/* Portfolio title (H1) */
.portfolio-title {
    width: 100%;
    padding: 40px 20px;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: #1a1a1a;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    font-family: 'Berlin Type Office', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Portfolio description */
.portfolio-description {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 40px;
    padding: 0 20px;
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    text-align: center;
    font-family: 'Berlin Type Office', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Main gallery container */
.portfolio-scroll {
    width: 100%;
}

.portfolio-gallery {
    width: 100%;
}

/* Portfolio item */
.portfolio-item {
    width: 100%;
}

/* Portfolio page section */
.portfolio-page {
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    flex-shrink: 0;
    padding: 40px 20px;
}

/* Figure element for semantic HTML */
.portfolio-page figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Main image */
.portfolio-image {
    width: auto;
    height: auto;
    max-width: 800px;
    max-height: 800px;
    max-width: 90vw;
    max-height: 60vh;
    object-fit: contain;
    pointer-events: none;
    transition: all 0.3s ease;
    display: block;
}

/* Image caption (h2) */
.portfolio-caption {
    font-size: 1rem;
    font-weight: 400;
    color: #333;
    text-align: center;
    max-width: 90vw;
    font-family: 'Berlin Type Office', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.portfolio-caption h2 {
    margin: 0;
    font-size: 1rem;
    color: #333;
    font-weight: 400;
    font-family: 'Berlin Type Office', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Lazy loading shimmer effect */
.portfolio-image.lazy-image,
.portfolio-image.loading {
    background: linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 50%, #e0e0e0 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.portfolio-image.loaded {
    animation: fadeIn 0.4s ease-in;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* Scroll indicator arrow */
.portfolio-scroll::after {
    content: '';
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 15l7 7 7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    animation: bounce-arrow 2s infinite;
    z-index: 50;
    pointer-events: none;
    opacity: 0.3;
}

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

/* Mobile responsive */
@media (max-width: 768px) {
    .portfolio-title {
        font-size: 2rem;
        padding: 30px 15px;
    }
    
    .portfolio-description {
        font-size: 1rem;
        padding: 0 15px;
    }
    
    .portfolio-page {
        padding: 30px 15px;
    }
    
    .portfolio-image {
        max-width: 95vw;
        max-height: 70vh;
    }
    
    .portfolio-caption {
        font-size: 1.1rem;
    }
}

/* Print styles (for when people print the portfolio) */
@media print {
    .portfolio-scroll::after {
        display: none;
    }
    
    .portfolio-page {
        page-break-after: always;
        height: auto;
        min-height: auto;
    }
}

/* Accessibility - focus states */
.portfolio-scroll a:focus,
.portfolio-scroll button:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
