/* ===================================
   Mobile Menu Wrapper - Hidden on Desktop
   =================================== */
.mobile-menu-wrapper {
    display: none;
}

/* ===================================
   Header Styles (Inside Hero)
   =================================== */
.site-header.hero-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    pointer-events: none;
    background: transparent;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.site-header.hero-header.hidden {
    opacity: 0;
}

/* Sticky Header (shown on scroll) */
.site-header.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.7rem 0;
    background: linear-gradient(90deg, rgba(13, 27, 42, 0.75) 0%, rgba(27, 38, 59, 0.75) 50%, rgba(13, 27, 42, 0.75) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    transition: opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
}

.site-header.sticky-header.scrolled {
    opacity: 1;
    pointer-events: all;
}

.site-header.sticky-header .site-branding .custom-logo-link img {
    max-height: 45px;
}

.site-header.sticky-header .site-title {
    font-size: 1.2rem;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s ease;
    pointer-events: auto;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-branding .custom-logo-link {
    display: flex;
    align-items: center;
}

.site-branding .custom-logo-link img {
    max-height: 60px;
    width: auto;
    filter: brightness(0) invert(1); /* Makes logo white */
    transition: max-height 0.4s ease;
    display: block;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    transition: font-size 0.4s ease;
}

/* Navigation */
.main-navigation .nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-navigation .nav-menu a {
    color: var(--secondary-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s ease;
}

.main-navigation .nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.main-navigation .nav-menu a:hover::after,
.main-navigation .nav-menu a.active::after {
    width: 100%;
}

.main-navigation .nav-menu a:hover,
.main-navigation .nav-menu a.active {
    color: var(--primary-color);
    opacity: 1;
}
 
/* Contact Menu Item Special Style */
.main-navigation .nav-menu li.contact-me a {
    position: relative;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    background: transparent;
    transition: all 0.3s ease;
    z-index: 1;
}

.main-navigation .nav-menu li.contact-me a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
}

.main-navigation .nav-menu li.contact-me a::after {
    display: none;
}

.main-navigation .nav-menu li.contact-me a:hover::before {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

.main-navigation .nav-menu li.contact-me a:hover {
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 24px;
    justify-content: space-between;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--secondary-color);
    transition: all 0.3s ease;
}

/* ===================================
   Hero Section
   =================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(135deg, var(--hero-bg-start) 0%, var(--hero-bg-mid) 25%, var(--about-bg-mid) 50%, var(--hero-bg-end) 100%);
    overflow: hidden;
}

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

.site-header {
    position: relative;
    z-index: 100;
}

.hero-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    margin-top: -5vh;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    pointer-events: none;
}

.hero-content .btn {
    pointer-events: auto;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 50%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 8s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    line-height: 1.3;
}

.subtitle-static {
    color: var(--secondary-color);
    font-size: 1.8rem;
    display: block;
    margin-bottom: 0.2rem;
}

.subtitle-rotating {
    display: inline-block;
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    font-size: 1.3rem;
}

.subtitle-rotating::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 1.2em;
    background: var(--primary-color);
    animation: blink 1s step-end infinite;
}

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

.subtitle-rotating.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

.subtitle-rotating.fade-in {
    animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

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

/* ===================================
   About Section
   =================================== */
.about-section {
    background: linear-gradient(180deg, var(--about-bg-start) 0%, var(--about-bg-mid) 30%, var(--hero-bg-end) 70%, var(--about-bg-mid) 100%);
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(0, 128, 255, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(147, 51, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.about-intro {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 4rem;
}

.about-text {
    text-align: left;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.about-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 12px;
    padding: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.image-wrapper:hover {
    box-shadow: 0 0 30px rgba(0, 128, 255, 0.5), 0 0 60px rgba(147, 51, 255, 0.3);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 8px;
    border: 4px solid var(--bg-color);
    transition: transform 0.3s ease;
}

.image-wrapper:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .about-intro {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    
    .about-text {
        text-align: center;
        order: 2;
    }
    
    .about-image {
        display: flex;
        justify-content: center;
        order: 1;
    }
    
    .image-wrapper {
        width: 250px;
        height: 250px;
    }
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 992px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

.skill-category {
    background: var(--overlay-medium);
    border: 1px solid var(--overlay-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 128, 255, 0.1);
}

.skill-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 12px;
}

.skill-icon svg {
    width: 100%;
    height: 100%;
    stroke: white;
}

.skill-category h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.tech-list {
    list-style: none;
    padding: 0;
}

.tech-list li {
    padding: 0.5rem 0;
    color: var(--text-color);
    font-size: 0.95rem;
    position: relative;
}

.tech-list li::before {
    content: '▹';
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-weight: bold;
}

.about-cta {
    text-align: center;
    margin-top: 3rem;
}

/* ===================================
   Portfolio Section
   =================================== */
.portfolio-section {
    background: linear-gradient(180deg, var(--portfolio-bg-start) 0%, var(--portfolio-bg-mid) 50%, var(--portfolio-bg-start) 100%);
    position: relative;
}

.portfolio-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 50%, rgba(0, 128, 255, 0.12) 0%, transparent 50%),
                radial-gradient(circle at 20% 50%, rgba(147, 51, 255, 0.12) 0%, transparent 50%);
    pointer-events: none;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-item {
    background: var(--overlay-light);
    border: 1px solid var(--overlay-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 128, 255, 0.2);
}

.portfolio-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.portfolio-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 128, 255, 0.8), rgba(147, 51, 255, 0.8));
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.portfolio-item:hover .portfolio-image::before {
    opacity: 0.5;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-content {
    padding: 1.5rem;
    text-align: center;
    background: var(--card-bg);
    border-top: 1px solid var(--overlay-medium);
}

.portfolio-content h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.btn-view-more {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-view-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 128, 255, 0.3);
}

/* Modal Styles */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-overlay);
    z-index: 9999;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 1;
}

.project-modal.closing {
    opacity: 0;
}

.modal-content {
    background: linear-gradient(135deg, #0d1f30 0%, #081825 100%);
    border: 1px solid var(--overlay-border);
    border-radius: 12px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-modal.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.project-modal.closing .modal-content {
    transform: translateY(20px);
    opacity: 0;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: white;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding-top: 2px;
}

.modal-close:hover {
    background: var(--primary-color);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    align-items: stretch;
}

.modal-image {
    position: relative;
    line-height: 0;
    height: 100%;
    display: flex;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    display: block;
}

.modal-image-link {
    display: block;
    position: relative;
    line-height: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid rgba(0, 128, 255, 0.3);
    height: 100%;
    flex: 1;
}

.modal-image-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 128, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-image-link:hover::after {
    opacity: 1;
}

.modal-image-link:hover img {
    transform: scale(1.05);
}

.modal-info {
    display: flex;
    flex-direction: column;
}

.modal-info h2 {
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-description {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: var(--text-color);
}

.modal-meta {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--overlay-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 0;
}

.meta-item {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.meta-item:last-child {
    margin-bottom: 0;
}

.meta-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: rgba(255, 255, 255, 0.9);
    fill: none;
}

.meta-item strong {
    color: rgba(255, 255, 255, 0.9);
    display: inline-block;
    margin-bottom: 0;
    margin-right: 8px;
    font-weight: 600;
}

.tech-tags {
    color: var(--primary-color);
}

.meta-item-tech {
    display: block;
}

.meta-item-tech > div:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.meta-item-tech .tech-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.tech-icon {
    font-size: 32px;
    color: var(--primary-color);
}

.tech-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.modal-footer {
    padding: 0 2rem 2rem;
    text-align: center;
    margin-top: -0.5rem;
}

.modal-footer .btn {
    display: inline-block;
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
        padding: 1.5rem 1rem;
    }
    
    .modal-meta {
        margin-bottom: 2rem;
    }
    
    .modal-footer {
        padding: 0 1rem 1.5rem;
    }
    
    .project-modal.active {
        padding: 1rem;
    }
    
    .modal-footer {
        margin-top: -2rem;
    }
    
    .portfolio-content h3 {
        font-size: 1.5rem;
    }
    
    .btn-view-more {
        font-size: 1.1rem;
        padding: 0.8rem 1.5rem;
    }
    
    .skill-category h4 {
        font-size: 1.8rem;
    }
    
    .tech-list li {
        font-size: 1.1rem;
        padding: 0.7rem 0;
    }
    
    .hero-main {
        margin-top: -15vh;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Contact Section
   =================================== */
.contact-section {
    background: linear-gradient(180deg, var(--about-bg-mid) 0%, var(--hero-bg-end) 30%, var(--about-bg-mid) 70%, var(--about-bg-start) 100%);
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(0, 128, 255, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(147, 51, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.contact-section .container {
    position: relative;
    z-index: 1;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
}

.contact-info p {
    margin-bottom: 1rem;
}

/* ===================================
   Footer
   =================================== */
.site-footer {
    background: #0a0a0a;
    color: var(--text-color);
    text-align: center;
    padding: 2rem 0;
    margin-top: 0;
    border-top: 1px solid var(--border-color);
}

.site-footer p {
    margin: 0;
    color: var(--text-color);
}

/* ===================================
   Social Sidebar
   =================================== */
.social-sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 128, 255, 0.15), rgba(147, 51, 255, 0.15));
    border: 1px solid rgba(0, 128, 255, 0.3);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-color: var(--primary-color);
    color: #fff;
    transform: translateX(-5px);
    box-shadow: 0 5px 20px rgba(0, 128, 255, 0.3);
}

.social-link i {
    transition: transform 0.3s ease;
}

.social-link:hover i {
    transform: scale(1.1);
}

/* Mobile Social Links */
.social-links-mobile {
    display: none;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.social-link-mobile {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 128, 255, 0.15), rgba(147, 51, 255, 0.15));
    border: 1px solid rgba(0, 128, 255, 0.3);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link-mobile:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-color: var(--primary-color);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 128, 255, 0.3);
}

/* ===================================
   Responsive - Mobile
   =================================== */
@media (max-width: 768px) {
    .social-sidebar {
        display: none;
    }
    
    .social-links-mobile {
        display: flex;
    }
    
    .menu-toggle {
        display: flex;
        position: relative;
        z-index: 1001;
    }
    
    /* Mobile menu wrapper - poza sticky header */
    .mobile-menu-wrapper {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        pointer-events: none;
        opacity: 0;
        backdrop-filter: blur(40px) saturate(180%);
        -webkit-backdrop-filter: blur(40px) saturate(180%);
        transition: opacity 0.4s ease;
    }
    
    /* Domyślnie top 90px gdy header nie jest scrolled */
    body:not(.header-scrolled) .mobile-menu-wrapper {
        top: 90px;
    }
    
    /* Top 60px gdy header jest scrolled */
    body.header-scrolled .mobile-menu-wrapper {
        top: 67px;
    }
    
    .mobile-menu-wrapper.active {
        pointer-events: all;
        opacity: 1;
    }
    
    .mobile-menu-wrapper .nav-menu {
        display: flex;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(13, 27, 42, 0.75);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 3rem 1rem;
        gap: 0;
        list-style: none;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Aktywne menu */
    .mobile-menu-wrapper.active .nav-menu {
        transform: translateX(0);
    }
    
    .mobile-menu-wrapper .nav-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        width: auto;
        text-align: center;
    }
    
    .mobile-menu-wrapper .nav-menu li:last-child {
        border-bottom: none;
    }

    .mobile-menu-wrapper .nav-menu a {
        font-size: 1.3rem;
        padding: 1rem 2rem;
        display: inline-block;
        width: auto;
        color: var(--secondary-color);
        transition: all 0.3s ease;
    }
    
    .mobile-menu-wrapper .nav-menu a:hover,
    .mobile-menu-wrapper .nav-menu a.active {
        color: var(--primary-color);
    }
    
    /* Contact-me button w mobile menu */
    .mobile-menu-wrapper .nav-menu li.contact-me a {
        position: relative;
        padding: 0.75rem 1.5rem;
        border-radius: 8px;
        background: transparent;
        z-index: 1;
    }
    
    .mobile-menu-wrapper .nav-menu li.contact-me a::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 8px;
        padding: 2px;
        background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
        -webkit-mask: 
            linear-gradient(#fff 0 0) content-box, 
            linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        z-index: -1;
    }
    
    .mobile-menu-wrapper .nav-menu li.contact-me a::after {
        display: none;
    }
    
    .mobile-menu-wrapper .nav-menu li.contact-me a:hover::before {
        background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    }
    
    .mobile-menu-wrapper .nav-menu li.contact-me a:hover {
        color: var(--primary-color);
    }
    
    /* Dodaj dodatkowy spacing dla contact-me w mobile menu */
    .mobile-menu-wrapper .nav-menu li.contact-me {
        margin-top: 1rem;
    }
    
    /* Ukryj menu wewnątrz headerów na mobile - używamy tylko mobile-menu-wrapper */
    .site-header .main-navigation .nav-menu {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }
}

/* Menu Toggle Animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===================================
   Multistep Contact Form
   =================================== */
.multistep-form {
    max-width: 100%;
    margin: 0;
}

.form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    position: relative;
}

.form-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--overlay-border);
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(13, 27, 42, 0.95);
    border: 2px solid var(--overlay-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.progress-step.active .step-number {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.progress-step.completed .step-number {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.step-label {
    font-size: 0.85rem;
    color: var(--text-color);
    font-weight: 500;
}

.progress-step.active .step-label {
    color: var(--primary-color);
}

.form-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
}

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

.form-step h3 {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--overlay-medium);
    border: 1px solid var(--overlay-border);
    border-radius: 6px;
    color: var(--secondary-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: var(--overlay-medium);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 128, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.checkbox-group {
    margin: 2rem 0;
}

.checkbox-label {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.6;
}

.checkbox-label input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.checkbox-label span {
    position: relative;
    padding-left: 60px;
}

.checkbox-label span::before {
    content: '';
    position: absolute;
    left: 0;
    top: -6px;
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 13px;
    transition: all 0.3s ease;
}

.checkbox-label span::after {
    content: '';
    position: absolute;
    left: 3px;
    top: -1px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked ~ span::before {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked ~ span::after {
    left: 27px; 
}

.checkbox-label span {
    color: var(--text-color);
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.checkbox-label a:hover {
    color: var(--accent-color);
}

.form-navigation {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-prev,
.btn-next,
.btn-submit {
    min-width: 140px;
}

.btn-prev {
    background: var(--overlay-medium);
    color: var(--secondary-color);
}

.btn-prev:hover {
    background: var(--overlay-border);
}

.form-summary {
    background: var(--overlay-light);
    border: 1px solid var(--overlay-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--overlay-border);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.summary-item span {
    color: var(--secondary-color);
    word-break: break-word;
}

.form-message {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-top: 1.5rem;
    text-align: center;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-message.success {
    background: rgba(54, 176, 176, 0.1);
    border: 1px solid rgba(54, 176, 176, 0.3);
    color: #36b0b0;
}

.form-message.error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
}

.form-loader {
    text-align: center;
    padding: 2rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.form-loader i {
    margin-right: 0.5rem;
}

@media (max-width: 768px) {
    .form-progress {
        margin-bottom: 2rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .form-navigation {
        flex-direction: column;
    }
    
    .btn-prev,
    .btn-next,
    .btn-submit {
        width: 100%;
    }
}

/* reCAPTCHA Info & Badge Styling */
.recaptcha-info {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 1rem;
    line-height: 1.4;
}

.recaptcha-info a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.recaptcha-info a:hover {
    color: var(--accent-color);
}

/* Hide Google reCAPTCHA badge (allowed per Google ToS when disclosure is visible) */
.grecaptcha-badge {
    visibility: hidden;
    opacity: 0;
}

/* =============================================
   Cookie Consent Banner & Modal
   ============================================= */

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    animation: slideUp 0.4s ease;
}

/* Floating Cookie Button */
.cookie-float-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 128, 255, 0.4);
    z-index: 9998;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInScale 0.4s ease;
}

.cookie-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 128, 255, 0.6);
}

.cookie-float-btn:active {
    transform: scale(0.95);
}

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

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.cookie-icon {
    font-size: 3rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.cookie-text {
    flex: 1;
}

.cookie-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: #fff;
}

.cookie-text p {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-actions .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn-tertiary {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-tertiary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.cookie-modal-content {
    position: relative;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease;
}

.cookie-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.cookie-modal-content h2 {
    margin: 0 0 1rem 0;
    font-size: 1.75rem;
    color: #fff;
}

.cookie-modal-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.cookie-categories {
    margin-bottom: 2rem;
}

.cookie-category {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #fff;
}

.cookie-category-info p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

.cookie-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-toggle.disabled {
    opacity: 0.6;
}

.toggle-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.cookie-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.cookie-toggle input[type="checkbox"]:checked ~ .toggle-slider {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-color: var(--primary-color);
}

.cookie-toggle input[type="checkbox"]:checked ~ .toggle-slider::after {
    left: 27px;
}

.cookie-modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.cookie-modal-actions .btn {
    flex: 1;
    justify-content: center;
}

.cookie-modal-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.cookie-modal-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.cookie-modal-footer a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .cookie-icon {
        font-size: 2rem;
    }
    
    .cookie-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-actions .btn {
        width: 100%;
    }
    
    .cookie-float-btn {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        bottom: 15px;
        left: 15px;
    }
    
    .cookie-modal-content {
        padding: 2rem 1.5rem;
        max-height: 90vh;
    }
    
    .cookie-category-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cookie-toggle {
        align-self: flex-start;
    }
    
    .cookie-modal-actions {
        flex-direction: column;
    }
}

/* =============================================
   404 Error Page
   ============================================= */

.error-404-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1a1a2e 100%);
}

.error-404-content {
    text-align: center;
    max-width: 700px;
}

.error-404-icon {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.error-404-title {
    font-size: 8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    line-height: 1;
    animation: slideInDown 0.6s ease;
}

.error-404-subtitle {
    font-size: 2rem;
    color: #fff;
    margin: 1.5rem 0 1rem 0;
    animation: slideInUp 0.6s ease;
}

.error-404-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
    line-height: 1.6;
    animation: fadeIn 0.8s ease;
}

.error-404-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    animation: fadeIn 1s ease;
}

.error-404-actions .btn {
    padding: 1rem 2rem;
}

.error-404-search {
    margin-bottom: 3rem;
    animation: fadeIn 1.2s ease;
}

.error-404-search p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.error-404-search form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
}

.error-404-search input[type="search"] {
    flex: 1;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.error-404-search input[type="search"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
}

.error-404-search button[type="submit"],
.error-404-search input[type="submit"],
.error-404-search .search-submit {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.error-404-search button[type="submit"]:hover,
.error-404-search input[type="submit"]:hover,
.error-404-search .search-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 128, 255, 0.3);
}

.error-404-links {
    animation: fadeIn 1.4s ease;
}

.error-404-links h3 {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.error-404-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.error-404-links li {
    margin: 0;
}

.error-404-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.error-404-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

.error-404-links a i {
    color: var(--primary-color);
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .error-404-title {
        font-size: 5rem;
    }
    
    .error-404-subtitle {
        font-size: 1.5rem;
    }
    
    .error-404-icon {
        font-size: 4rem;
    }
    
    .error-404-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .error-404-actions .btn {
        width: 100%;
    }
    
    .error-404-search form {
        flex-direction: column;
    }
    
    .error-404-search button[type="submit"],
    .error-404-search input[type="submit"],
    .error-404-search .search-submit {
        width: 100%;
    }
    
    .error-404-links ul {
        flex-direction: column;
        align-items: stretch;
    }
    
    .error-404-links a {
        justify-content: center;
    }
}

/* ===================================
   Scroll to Top Button
   =================================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top i {
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}
