/* =========================================
   BASE & RESET
   ========================================= */
html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #000;
    overflow-x: hidden;
    overflow-y: auto;
}

/* =========================================
   INTRO & VIDEO BACKGROUND
   ========================================= */
.intro-curtain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: 9999;
    pointer-events: none;
    animation: fadeOutCurtain 1.5s ease-in-out forwards;
}

#myVideo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    transform-origin: center center;
    animation: videoZoomOut 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* =========================================
   HERO SECTION
   ========================================= */
.content {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 30px 20px;
    color: white;
    text-align: center;
}

/* Top Right Text */
.top-right-info {
    position: absolute;
    top: 100px;
    right: 5%;
    border-left: 2px solid #bfff36;
    padding-left: 15px;
    color: white;
    font-size: 1.3rem;
    letter-spacing: 3px;
    text-align: left;
    font-weight: 200;
    line-height: 1.5;
    animation: slideFromTop 1s ease-out forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

@media (max-width: 1200px) { .top-right-info { right: 50px; } }
@media (max-width: 768px) { .top-right-info { display: none; } }

/* Logo */
.logo-container {
    margin-top: 30px;
    animation: slideFromTop 1s ease-out forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.logo-container img { width: 200px; height: auto; }
@media (max-width: 768px) { .logo-container img { width: 150px; } }

/* Hero Buttons */
.buttons-group {
    display: flex;
    gap: 60px;
    margin-bottom: 50px;
    animation: slideFromBottom 1s ease-out forwards;
    animation-delay: 0.8s;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

button, a.btn-secondary, a.btn-primary {
    font-family: 'Poppins', sans-serif;
    font-weight: 200;
    letter-spacing: 5px;
    padding: 15px 40px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 70px;
    transition: all 0.3s ease;
    border: 1px solid white;
    background-color: transparent;
    color: white;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

button:hover, a.btn-secondary:hover, a.btn-primary:hover {
    background-color: white;
    color: #000;
    transform: translateY(-5px);
}

/* Sticky Nav State */
.buttons-group.fixed-nav {
    position: fixed;
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
    flex-direction: column;
    gap: 20px;
    margin: 0;
    z-index: 1000;
    opacity: 1;
    animation: none;
    background: transparent;
    padding: 0;
    border: none;
}

.buttons-group.fixed-nav button,
.buttons-group.fixed-nav a {
    width: 100%;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
}

.buttons-group.fixed-nav button:hover,
.buttons-group.fixed-nav a:hover {
    border-color: #bfff36;
    color: #bfff36;
    background-color: black;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 0;
    right: 5%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 40px;
    gap: 15px;
    animation: slideFromBottom 1s ease-out forwards;
    animation-delay: 1s;
    opacity: 0;
}

.scroll-line-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.scroll-line {
    width: 1px;
    height: 150px;
    background: linear-gradient(to bottom, transparent, #fff);
}

.scroll-icon {
    color: white;
    font-size: 1.2rem;
    animation: scrollBounce 2s infinite;
}

.scroll-text {
    color: #bfff36;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 4px;
    white-space: nowrap;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    margin-bottom: 45px;
}

@media (max-width: 1200px) { .scroll-indicator { right: 50px; } }
@media (max-width: 768px) { .scroll-indicator { display: none; } }

/* =========================================
   PORTFOLIO SECTION
   ========================================= */
.portfolio {
    position: relative;
    background-color: #111;
    padding: 100px 20px;
    min-height: 100vh;
    z-index: 10;
}

.portfolio-header {
    text-align: center;
    margin-bottom: 60px;
    color: white;
}

.portfolio-header h2 {
    font-size: 3rem;
    font-weight: 200;
    letter-spacing: 5px;
    margin-bottom: 10px;
}

.portfolio-header p {
    color: #888;
    font-weight: 300;
    letter-spacing: 2px;
}

.gallery-grid {
    column-count: 3;
    column-gap: 20px;
    max-width: 1600px; /* Wide Layout */
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    margin-bottom: 20px;
    break-inside: avoid;
    overflow: hidden;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

/* Item Overlay */
.item-overlay {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    top: 10px;
    left: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    border: 1px solid #bfff36;
    border-radius: 15px;
}

.item-overlay h3 {
    font-weight: 400;
    letter-spacing: 2px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.item-overlay span {
    color: #bfff36;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 10px;
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s;
}

.gallery-item:hover img { transform: scale(1.1); }
.gallery-item:hover .item-overlay { opacity: 1; }
.gallery-item:hover h3, .gallery-item:hover span { transform: translateY(0); }

@media (max-width: 1024px) { .gallery-grid { column-count: 2; } }
@media (max-width: 768px) {
    .gallery-grid { column-count: 1; }
    .portfolio-header h2 { font-size: 2rem; }
}

/* =========================================
   TOOLTIPS & ICONS
   ========================================= */
.project-tools {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: row;
    gap: 15px;
    z-index: 50;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease 0.2s;
}

.gallery-item:hover .project-tools {
    opacity: 1;
    transform: translateY(0);
}

.tool-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.tool-wrapper:hover .tool-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 5px #bfff36);
}

/* Tooltip Bubble */
.tool-wrapper::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #1a1a1a;
    color: white;
    font-size: 0.75rem;
    font-weight: 400;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    border-bottom: 2px solid #bfff36;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 100;
}

/* Tooltip Arrow */
.tool-wrapper::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border-width: 5px;
    border-style: solid;
    border-color: #bfff36 transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tool-wrapper:hover::before, .tool-wrapper:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* =========================================
   RESUME SECTION
   ========================================= */
.resume {
    background-color: #0b0b0b;
    padding: 100px 20px;
    color: white;
    position: relative;
    z-index: 10;
}

.resume-container {
    max-width: 1600px; /* Wide Layout */
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 80px;
}

/* Left Column */
.resume-left {
    flex: 1;
    min-width: 300px;
}

.section-title {
    font-size: 3rem;
    font-weight: 200;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.about-text {
    color: #888;
    line-height: 1.8;
    margin-bottom: 40px;
    font-size: 1rem;
}

.subsection-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    display: inline-block;
}

/* Skills */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.skill-tag {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover {
    border-color: #bfff36;
    color: #bfff36;
    transform: translateY(-2px);
}

/* Download Btn */
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.btn-download:hover { color: #bfff36; }

/* Right Column (Timeline) */
.resume-right {
    flex: 1;
    min-width: 300px;
}

.timeline {
    position: relative;
    border-left: 1px solid #333;
    padding-left: 30px;
    margin-left: 10px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
    content: '';
    position: absolute;
    left: -35px;
    top: 5px;
    width: 10px;
    height: 10px;
    background-color: #bfff36;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(191, 255, 54, 0.5);
}

.date {
    display: block;
    color: #bfff36;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.timeline-item h4 {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 2px;
}

.company {
    display: block;
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
    margin-bottom: 10px;
}

.timeline-item p {
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .resume-container { gap: 40px; }
    .section-title { font-size: 2.2rem; }
}

/* =========================================
   MODAL (LIGHTBOX)
   ========================================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #111;
    width: 95%;
    max-width: 1600px;
    height: 90vh;
    display: flex;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid #333;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.active .modal-content { transform: scale(1); }

/* Close X */
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
}

.close-modal:hover { color: #bfff36; }

/* Modal Left (Gallery) - Custom Scrollbar */
.modal-left {
    flex: 3;
    background-color: #000;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 40px;
    overflow-y: auto;

    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: #bfff36 #111;
}

/* Chrome / Safari / Edge Scrollbar */
.modal-left::-webkit-scrollbar {
    width: 10px;
    display: block;
}

.modal-left::-webkit-scrollbar-track {
    background: #111;
    border-left: 1px solid #222;
}

.modal-left::-webkit-scrollbar-thumb {
    background-color: #bfff36;
    border-radius: 10px;
    border: 2px solid #111;
}

.modal-left::-webkit-scrollbar-thumb:hover {
    background-color: #fff;
}

/* Gallery Images inside Modal */
.modal-gallery-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    border-bottom: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Modal Right (Info) */
.modal-right {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    background-color: #161616;
    border-left: 1px solid #222;
}

#modal-title {
    font-size: 2.5rem;
    font-weight: 200;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: white;
}

#modal-category {
    color: #bfff36;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    margin-bottom: 20px;
}

#modal-desc {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

@media (max-width: 1024px) {
    .modal-content {
        flex-direction: column;
        height: auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    .modal-left {
        flex: auto;
        height: 400px;
    }
    .modal-right {
        flex: auto;
        padding: 30px;
    }
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    background-color: #000;
    color: white;
    padding: 60px 20px;
    text-align: center;
    border-top: 1px solid #222;
}

.footer-content h3 {
    font-size: 1.5rem;
    font-weight: 200;
    letter-spacing: 3px;
    margin-bottom: 30px;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.socials a {
    color: #888;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.socials a:hover {
    color: #bfff36;
    transform: translateY(-5px);
}

.copyright {
    color: #555;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeOutCurtain {
    0% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

@keyframes videoZoomOut {
    0% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

@keyframes slideFromTop {
    0% { opacity: 0; transform: translateY(-50px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideFromBottom {
    0% { opacity: 0; transform: translateY(50px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* =========================================
   MOBILE MENU (HAMBURGER)
   ========================================= */

.hamburger, .mobile-nav {
    display: none;
}

@media (max-width: 768px) {

    .buttons-group {
        display: none !important;
    }

    .hamburger {
        display: flex;
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1500;
        color: white;
        font-size: 1.8rem;
        cursor: pointer;
        background: rgba(0, 0, 0, 0.5);
        width: 50px;
        height: 50px;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(5px);
        transition: all 0.3s ease;
    }

    .hamburger:hover {
        border-color: #bfff36;
        color: #bfff36;
    }

    .mobile-nav {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        z-index: 1600;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease-in-out;
    }

    .mobile-nav.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-nav-links {
        display: flex;
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .mobile-link {
        font-size: 2rem;
        color: white;
        text-decoration: none;
        font-weight: 200;
        letter-spacing: 5px;
        text-transform: uppercase;
        transition: color 0.3s ease;
    }

    .mobile-link:hover {
        color: #bfff36;
        transform: scale(1.1);
    }

    .mobile-socials {
        margin-top: 50px;
        display: flex;
        gap: 30px;
        justify-content: center;
    }

    .mobile-socials a {
        color: #888;
        font-size: 1.5rem;
    }

    .close-mobile-nav {
        position: absolute;
        top: 20px;
        right: 30px;
        font-size: 3rem;
        color: white;
        cursor: pointer;
        transition: transform 0.3s;
    }

    .close-mobile-nav:hover {
        color: #bfff36;
        transform: rotate(90deg);
    }
}

/* --- LEWY NAPIS PIONOWY --- */
.left-side-info {
    position: fixed;
    left: 7%;
    top: 50%;

    transform: translateY(-50%) rotate(-90deg);

    color: rgba(255, 255, 255, 1);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 3px;
    white-space: nowrap;
    z-index: 5;
    pointer-events: none;

    font-family: 'Poppins', sans-serif;
}

@media (max-width: 1200px) {
    .left-side-info {
        display: none;
    }
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 25px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50px;
}

.filter-btn:hover {
    border-color: #bfff36;
    color: #000;
}

.filter-btn.active {
    background: #bfff36;
    color: #000;
    border-color: #bfff36;
    font-weight: 600;
}

/* Animacja dla kart galerii */
.gallery-item {
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.gallery-item.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.8);
}
