/* --- CSS VARIABLES & RESET --- */
:root {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --accent-color: #ff9f1c; /* Pomarańczowy */
    --grid-line-color: #333;
    --overlay-color: rgba(0, 0, 0, 0.85); 
    --overlay-color-light: rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Fira Code', monospace;
    overflow-x: clip; /* Bezpieczne ukrywanie poziomego paska bez psucia sticky */
    scrollbar-width: none; 
    -ms-overflow-style: none;
}

body::-webkit-scrollbar { 
    display: none; 
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s, text-shadow 0.3s;
}

/* Hover na tekst - zmiana na pomarańczowy */
p:hover, h1:hover, h2:hover, h3:hover, li:hover, span:hover {
    color: var(--accent-color);
    transition: color 0.3s ease;
    cursor: default;
}

section[id], div[id] {
    scroll-margin-top: 80px;
}

/* --- TOP HEADER & NAVIGATION --- */
.top-header {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

/* Interaktywność tylko dla samych elementów menu */
.nav-scroll-btn,
.lang-container,
.hamburger-btn {
    pointer-events: auto;
}

/* Przycisk nawigacyjny ze strzałką */
.nav-scroll-btn {
    width: 44px;
    height: 40px;
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.nav-scroll-btn:hover {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    box-shadow: 0 0 12px var(--accent-color);
}

/* Przełącznik języków */
.lang-container {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.lang-btn {
    width: 44px;
    height: 40px;
    background: rgba(10, 10, 10, 0.5);
    border: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-btn:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.lang-btn.active {
    background: var(--accent-color);
    color: #000;
}

.lang-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.15);
    color: var(--accent-color);
}

/* Hamburger button (Mobile) */
.hamburger-btn {
    position: relative;
    width: 44px;
    height: 44px;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.hamburger-btn:hover {
    border-color: var(--accent-color);
    background: rgba(0, 0, 0, 0.7);
}

.hamburger-btn .bar {
    width: 22px;
    height: 2px;
    background-color: var(--text-color);
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
}

.hamburger-btn.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background-color: var(--accent-color);
}

.hamburger-btn.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background-color: var(--accent-color);
}

/* --- MOBILE MENU OVERLAY --- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(5, 5, 5, 0.7);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.close-menu-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--text-color);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-menu-btn:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    transform: rotate(90deg);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.mobile-nav-links a {
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color);
    position: relative;
    padding: 8px 16px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease, left 0.3s ease;
}

.mobile-nav-links a:hover {
    color: var(--accent-color);
    transform: scale(1.05);
}

.mobile-nav-links a:hover::after {
    width: 100%;
    left: 0;
}

/* --- NAVIGATION & PROGRESS (Right Side Desktop) --- */
.nav-container {
    position: fixed;
    top: 50%;
    right: 25px;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 15px 8px;
    background: rgba(10, 10, 10, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.nav-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-arrow-up:hover,
.nav-arrow-down:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.nav-arrow-up:hover { transform: translateY(-3px); }
.nav-arrow-down:hover { transform: translateY(3px); }

.progress-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.progress-segment {
    width: 8px;
    height: 32px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: 1px solid transparent;
    position: relative;
}

.progress-segment:hover {
    background-color: rgba(255, 159, 28, 0.6);
    transform: scaleX(1.3);
}

.progress-segment.active {
    height: 44px;
    background-color: var(--accent-color);
    box-shadow: 0 0 12px var(--accent-color);
}

.progress-segment::before {
    content: attr(data-tooltip-active);
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.progress-segment:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ==========================================================================
   SEKCJE JAKO PRZYKLEJAJĄCE SIĘ KARTY (STICKY CARD STACK)
   ========================================================================== */
section {
    position: sticky;
    top: 0;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 40px;
    background-color: #050505;
    box-sizing: border-box;
    overflow: hidden;
}

/* 1. PIERWSZA KARTA (HERO) */
#hero {
    z-index: 1;
    border-radius: 0;
    border-top: none;
    box-shadow: none;
}

/* 2. KOLEJNE KARTY - STOS NAKŁADAJĄCY SIĘ */
#programming, 
#graphics, 
#graphics-gallery, 
#art, 
#art-gallery, 
#contact {
    border-top-left-radius: 32px;
    border-top-right-radius: 32px;
    border-top: 1px solid rgba(255, 159, 28, 0.35);
    box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.85);
}

#programming       { z-index: 2; }
#graphics          { z-index: 3; }
#graphics-gallery  { z-index: 4; }
#art               { z-index: 5; }
#art-gallery       { z-index: 6; }
#contact           { z-index: 7; }

/* Tła obrazkowe wewnątrz sekcji */
.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-size: cover;
    background-position: center;
    filter: grayscale(35%);
}

.bg-color { filter: grayscale(0%); }

.bg-hero { background-image: url('https://images.unsplash.com/photo-1462332420958-a05d1e002413?q=80&w=3007&auto=format&fit=crop'); }
.bg-prog { background-image: url('https://images.unsplash.com/photo-1462332420958-a05d1e002413?q=80&w=3007&auto=format&fit=crop'); }
.bg-graph { background-image: url('https://images.unsplash.com/photo-1462332420958-a05d1e002413?q=80&w=3007&auto=format&fit=crop'); }
.bg-art { background-image: url('https://images.unsplash.com/photo-1462332420958-a05d1e002413?q=80&w=3007&auto=format&fit=crop'); }
.bg-contact { background-image: url('https://images.unsplash.com/photo-1525547719571-a2d4ac8945e2?q=80&w=928&auto=format&fit=crop'); }

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-color);
    z-index: 1;
}

.overlay-light { background: var(--overlay-color-light); }

.container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    text-align: center;
}

/* --- ANIMACJE SEKCJI --- */
.fade-in-section,
.reveal-fade,
.reveal-slide-up,
.reveal-slide-down,
.reveal-slide-left,
.reveal-slide-right,
.reveal-zoom-in,
.reveal-scale {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-slide-up { transform: translateY(40px); }
.reveal-slide-down { transform: translateY(-40px); }
.reveal-slide-left { transform: translateX(-50px); }
.reveal-slide-right { transform: translateX(50px); }
.reveal-zoom-in, .reveal-scale { transform: scale(0.90); }
.fade-in-section { transform: translateY(30px); }

.fade-in-section.is-visible,
.fade-in-section.active,
.reveal-fade.active,
.reveal-slide-up.active,
.reveal-slide-down.active,
.reveal-slide-left.active,
.reveal-slide-right.active,
.reveal-zoom-in.active,
.reveal-scale.active {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

.stagger-1 { transition-delay: 0.12s; }
.stagger-2 { transition-delay: 0.25s; }
.stagger-3 { transition-delay: 0.38s; }

/* --- HERO SECTION --- */
.hero-title-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
    width: 100%;
}

.hero-line {
    display: block;
    line-height: 1.25;
    text-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.hero-line-1 {
    font-size: 3rem;
    font-weight: 600;
    color: #ffffff;
}

.hero-line-2 {
    font-size: 1.65rem;
    font-weight: 400;
    color: var(--accent-color);
    margin-top: 10px;
}

/* --- RAMKA HERO DESCRIPTION --- */
#hero p {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    color: #ffffff;
    background: rgba(8, 8, 8, 0.4);
    border: 1px solid rgba(255, 159, 28, 0.4);
    border-radius: 12px;
    box-shadow: 1px 1px 20px rgba(255, 159, 28, 0.5);
    padding: 20px 24px;
    text-align: left;
    min-height: 120px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

#hero p:hover {
    border-color: rgba(255, 159, 28, 0.7);
    box-shadow: 0 0 30px rgba(255, 159, 28, 0.35);
    color: #ffffff;
}

#hero-description { visibility: hidden; }
#hero-description.typing-active { visibility: visible; }

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: var(--accent-color);
    margin-left: 4px;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* --- KONTENER I STYL DLA PRZYCISKÓW SPOŁECZNOŚCIOWYCH (HERO & CONTACT) --- */
.hero-socials {
    margin-top: 40px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-socials a,
#contact .social-link,
#contact .btn-social,
#contact .contact-social a {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(8, 8, 8, 0.5);
    border-radius: 12px;
    padding: 12px 24px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 159, 28, 0.4);
    box-shadow: 0 0 20px rgba(255, 159, 28, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-socials a:hover,
#contact .social-link:hover,
#contact .btn-social:hover,
#contact .contact-social a:hover {
    border-color: rgba(255, 159, 28, 0.7);
    box-shadow: 0 0 30px rgba(255, 159, 28, 0.35);
    transform: translateY(-2px);
    color: #ffffff;
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* --- NAGŁÓWKI SEKCJI --- */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    width: 100%;
}

.section-title {
    font-size: 2.8rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--grid-line-color);
    padding-bottom: 15px;
    text-align: left;
    margin-bottom: 0;
    min-height: 1.2em;
    display: inline-block;
}

.section-title .typing-cursor {
    display: inline-block;
    width: 3px;
    height: 0.85em;
    background-color: var(--accent-color);
    margin-left: 6px;
    vertical-align: middle;
    animation: blink 0.8s infinite;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-btn:hover {
    background-color: var(--accent-color);
    color: #000;
    box-shadow: 0 0 15px var(--accent-color);
}

.section-desc {
    text-align: justify;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #aaa;
}

.section-details {
    text-align: left;
    background: rgba(0, 0, 0, 0.5);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-details h4 {
    color: var(--accent-color);
    margin: 15px 0 10px 0;
}

.section-details h4:first-child { margin-top: 0; }

.section-details ul {
    list-style-type: none;
    padding-left: 0;
}

.section-details ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: #ccc;
}

.section-details ul li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* ==========================================================================
   INTERAKTYWNA KARUZELA 3D (ZDJĘCIA 2X WIĘKSZE)
   ========================================================================== */
.gallery-section {
    padding-bottom: 60px;
}

.carousel-3d {
    position: relative;
    width: 100%;
    max-width: 1100px;
    height: 480px; /* Zwiększono wysokość z 260px na 480px */
    margin: 30px auto 0;
    perspective: 1600px; /* Zwiększona perspektywa 3D */
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-3d .carousel-item {
    position: absolute;
    width: 440px;  /* Zwiększono z 220px na 440px (2x) */
    height: 320px; /* Zwiększono z 160px na 320px (2x) */
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 159, 28, 0.4);
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease, filter 0.6s ease;
    background: #000;
}

.carousel-3d .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Stan aktywnego (środkowego) zdjęcia */
.carousel-3d .carousel-item.active {
    z-index: 10;
    transform: translateX(0) translateZ(200px) scale(1.1);
    opacity: 1;
    filter: grayscale(0%);
    border-color: var(--accent-color);
    box-shadow: 0 0 30px rgba(255, 159, 28, 0.4);
}

/* Stany boczne w perspektywie 3D */
.carousel-3d .carousel-item.prev {
    z-index: 5;
    transform: translateX(-320px) translateZ(0) rotateY(25deg);
    opacity: 0.7;
    filter: grayscale(40%);
}

.carousel-3d .carousel-item.next {
    z-index: 5;
    transform: translateX(320px) translateZ(0) rotateY(-25deg);
    opacity: 0.7;
    filter: grayscale(40%);
}

.carousel-3d .carousel-item.far-prev {
    z-index: 2;
    transform: translateX(-560px) translateZ(-200px) rotateY(40deg);
    opacity: 0.3;
    filter: grayscale(70%);
}

.carousel-3d .carousel-item.far-next {
    z-index: 2;
    transform: translateX(560px) translateZ(-200px) rotateY(-40deg);
    opacity: 0.3;
    filter: grayscale(70%);
}

.carousel-3d .carousel-item.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateZ(-400px);
}

/* ==========================================================================
   LIGHTBOX PEŁNOEKRANOWY
   ========================================================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.94);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover { color: var(--accent-color); }

/* ==========================================================================
   CONTACT SECTION & KAFELEK E-MAIL (oleksii@pryimak.pl)
   ========================================================================== */
.contact-box,
#contact .contact-card,
#contact .contact-info-item,
#contact .contact-item {
    border-radius: 12px;
    background: rgba(8, 8, 8, 0.5);
    border: 1px solid rgba(255, 159, 28, 0.4);
    box-shadow: 0 0 20px rgba(255, 159, 28, 0.2);
    padding: 30px 40px;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 20px;
}

.contact-box:hover,
#contact .contact-card:hover,
#contact .contact-info-item:hover,
#contact .contact-item:hover {
    border-color: rgba(255, 159, 28, 0.7);
    box-shadow: 0 0 30px rgba(255, 159, 28, 0.35);
    transform: translateY(-2px);
}

.contact-cta {
    font-size: 1.25rem;
    color: #e0e0e0;
    margin-bottom: 20px;
    text-align: center;
}

/* Usunięcie podświetleń tekstu linku e-mail */
#contact a,
#contact .contact-link {
    text-decoration: none;
    outline: none;
    box-shadow: none;
    background-color: transparent;
}

#contact a:focus,
#contact a:active {
    outline: none;
    background-color: transparent;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .hamburger-btn { display: flex; }
    .nav-container { display: none; }
    
    section { padding: 85px 20px 50px 20px; }

    #hero h1 { font-size: 2.2rem; }
    .hero-line-1 { font-size: 2.1rem; }
    .hero-line-2 { font-size: 1.2rem; }
    .section-title { font-size: 2rem; }
    
    .carousel-3d {
        height: 300px;
    }
    
    .carousel-3d .carousel-item {
        width: 260px;
        height: 190px;
    }
    
    .carousel-3d .carousel-item.prev { transform: translateX(-140px) translateZ(-50px) rotateY(20deg); }
    .carousel-3d .carousel-item.next { transform: translateX(140px) translateZ(-50px) rotateY(-20deg); }
    .carousel-3d .carousel-item.far-prev { transform: translateX(-240px) translateZ(-150px) rotateY(35deg); }
    .carousel-3d .carousel-item.far-next { transform: translateX(240px) translateZ(-150px) rotateY(-35deg); }
}