/* Scroll Progress Bar */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #a97ff5 100%);
    z-index: 2000;
    transition: width 0.45s cubic-bezier(.4,0,.2,1), background 0.3s;
    box-shadow: 0 2px 8px #a97ff533;
    border-radius: 0 2px 2px 0;
    pointer-events: none;
}
.footer-link {
    min-width: 120px;
    justify-content: center;
    text-align: center;
    height: 48px;
    display: inline-flex;
    align-items: center;
    padding: 0 0.8em;
    box-sizing: border-box;
    line-height: 1.2;
    font-size: 1.08em;
}
.footer-link .footer-link-icon {
    min-width: 1.5em;
    min-height: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
}
.footer-link-label {
    flex: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.footer-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.4em;
    font-size: 1.15em;
}
.footer-link-label {
    flex: 1;
    text-align: center;
}
.footer-link-regulamin {
    order: 1;
}
.footer-link[title*="Linki"] {
    order: 2;
}
.footer-link[title*="Discord"] {
    order: 3;
}
.footer-links {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}
.footer-madeby span {
    display: inline-block;
    animation: heartBeat 1.2s infinite cubic-bezier(.4,0,.6,1);
    transform-origin: center;
}
@keyframes heartBeat {
    0% { transform: scale(1); }
    10% { transform: scale(1.15); }
    20% { transform: scale(0.95); }
    30% { transform: scale(1.1); }
    40% { transform: scale(0.98); }
    50% { transform: scale(1.05); }
    60% { transform: scale(1); }
    100% { transform: scale(1); }
}
/* Loader Screen */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--text-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loader-text {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 500;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

:root {
    /* Dark theme */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #6c63ff;
    --accent-hover: #7d75ff;
    --card-bg: rgba(255, 255, 255, 0.05);
    --transition: all 0.3s ease;
}

[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --accent: #6c63ff;
    --accent-hover: #7d75ff;
    --card-bg: rgba(0, 0, 0, 0.03);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: #000000;
    border-radius: 4px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: #333333;
}

[data-theme="light"] ::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #000000;
    border: 2px solid var(--bg-primary);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #333333;
}

/* Flare Effect */
.flare {
    position: fixed;
    border: 2px solid var(--accent);
    border-radius: 50%;
    mix-blend-mode: screen;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 1;
    backdrop-filter: blur(1px);
    background-color: transparent;
    transition: width 0.2s ease, height 0.2s ease;
    opacity: 0.7;
}

/* Dark Theme Flares */
[data-theme="dark"] .flare {
    mix-blend-mode: screen;
    opacity: 0.7;
    border-color: var(--accent);
}

/* Light Theme Flares - hidden for minimalism */
[data-theme="light"] .flare {
    display: none;
}

/* Projects and Services Flares */
.projects .flare, .services .flare {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    z-index: 0;
    transition: var(--transition);
    animation: pulse 4s ease-in-out infinite;
    bottom: 50%;
}

/* Dark Theme Section Flares */
[data-theme="dark"] .projects .flare,
[data-theme="dark"] .services .flare {
    background: var(--accent);
    mix-blend-mode: screen;
    opacity: 0.3;
}

/* Light Theme Section Flares - hidden for minimalism */
[data-theme="light"] .projects .flare,
[data-theme="light"] .services .flare {
    display: none;
}

.projects .flare-left, .services .flare-left {
    left: -100px;
    animation-delay: 0s;
}

.projects .flare-right, .services .flare-right {
    right: -100px;
    animation-delay: 2s;
}

@keyframes pulse {
    0% {
        transform: translateY(-50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-50%) scale(1.2);
        opacity: 0.5;
    }
    100% {
        transform: translateY(-50%) scale(1);
        opacity: 0.3;
    }
}

/* Ensure cards are above flares */
.project-card, .service-card {
    position: relative;
    z-index: 2;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
    }

    .projects, .services {
        padding: 4rem 1rem;
    }

    .projects .flare, .services .flare {
        width: 200px;
        height: 200px;
    }

    .projects .flare-left, .services .flare-left {
        left: -50px;
    }

    .projects .flare-right, .services .flare-right {
        right: -50px;
    }

    .section-divider {
        height: 100px;
        margin: -30px 0;
    }

    .divider-line {
        width: 80px;
    }

    .divider-dot {
        width: 8px;
        height: 8px;
    }
    .flare-left{
        display: none;
    }
    .flare-right{
        display: none;
    }

    /* Center navbar on small screens */
    .nav-content{flex-direction:column;align-items:center}
    .nav-links{display:flex;gap:12px;justify-content:center;margin-top:10px}
}



/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.2rem;
    transition: var(--transition);
    color: var(--text-primary);
    opacity: 0.7;
}

.theme-toggle:hover {
    transform: scale(1.1);
    color: var(--accent);
    opacity: 1;
}

/* Homepage portfolio CTA (under Projects) */
.projects-cta .btn.primary{
    display:inline-flex;
    align-items:center;
    gap:10px;
    padding:12px 22px;
    border-radius:999px;
    background: linear-gradient(90deg, rgba(108,99,255,0.10), rgba(108,99,255,0.06));
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: 0 10px 30px rgba(108,99,255,0.06);
    transition: transform .18s ease, box-shadow .2s ease, opacity .15s;
    text-decoration:none;
}
.projects-cta .btn.primary:hover{
    transform: translateY(-4px);
    box-shadow: 0 18px 46px rgba(108,99,255,0.09);
}

/* Ensure strong look in light theme */
[data-theme="light"] .projects-cta .btn.primary{
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    color: white;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 12px 36px rgba(108,99,255,0.12);
}

/* Skills Animation */
.skills-container {
    overflow: hidden;
    width: 100%;
    margin: 2rem 0;
}

.skill-track {
    display: flex;
    gap: 2rem;
    animation: scroll 20s linear infinite;
}

.skill-item {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border-radius: 50px;
    font-size: 1.1rem;
    white-space: nowrap;
    transition: var(--transition);
}

.skill-item:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Project Cards */
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    height: 100%;
    display: flex;
    flex-direction: column;
    aspect-ratio: 1/1.2;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.project-image {
    position: relative;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.2);
    aspect-ratio: 16/9;
    z-index: 2;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

.project-info {
    padding: clamp(1rem, 2vw, 2rem);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.project-info h3 {
    color: var(--accent);
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

.project-info p {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--accent);
}

.project-card:hover::before {
    opacity: 0.15;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

/* Service Cards */
.service-card {
    position: relative;
    padding: clamp(1.5rem, 2.5vw, 2.5rem);
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card h3 {
    color: var(--accent);
    margin: 0;
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    font-weight: 600;
    position: relative;
    z-index: 1;
    text-align: center;
    line-height: 1.3;
    max-width: 100%;
}

.service-card p {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    line-height: 1.6;
    position: relative;
    z-index: 1;
    margin: 0;
    text-align: center;
    max-width: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before {
    opacity: 0.1;
}

/* Grid Layouts */
.projects-grid, .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(1rem, 2vw, 2rem);
    padding: clamp(1rem, 2vw, 2rem);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card, .service-card {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.4s; }
.project-card:nth-child(4) { animation-delay: 0.6s; }

.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.4s; }
.service-card:nth-child(4) { animation-delay: 0.6s; }

/* Light Theme Adjustments */
[data-theme="light"] .project-card,
[data-theme="light"] .service-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .project-info {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .service-card::before {
    background: linear-gradient(45deg, var(--accent), transparent);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .projects-grid, .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }

    .project-card {
        aspect-ratio: 1/1.1;
    }

    .service-card {
        aspect-ratio: 1/0.8;
        justify-content: center;
        align-items: center;
        gap: 0.8rem;
    }

    .project-info, .service-card {
        padding: 1.5rem;
    }

    .project-info h3, .service-card h3 {
        font-size: 1.5rem;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .project-info p, .service-card p {
        font-size: 1.1rem;
        text-align: center;
        line-height: 1.5;
    }
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

[data-theme="light"] .logo {
    color: var(--accent);
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    margin-left: 2rem;
    transition: var(--transition);
    opacity: 0.7;
}

[data-theme="light"] .nav-links a {
    color: var(--text-primary);
}

.nav-links a:hover {
    color: var(--accent);
    opacity: 1;
}

.hero {
    min-height: 100vh;
    padding: 0;
    scroll-margin-top: 0;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.main-title {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.specializations {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.specialization {
    padding: 0.8rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    font-size: 1.1rem;
    transition: var(--transition);
}

.specialization:hover {
    background: var(--accent);
    transform: translateY(-3px);
    opacity: 1;
}

section {
    padding: 6rem 2rem;
    position: relative;
    scroll-margin-top: 80px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.project-tags span {
    padding: 0.3rem 0.8rem;
    background: var(--accent);
    border-radius: 20px;
    font-size: 0.8rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.project-link {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    opacity: 0.7;
}

.project-link:hover {
    background: var(--accent);
    opacity: 1;
}

/* Service Cards Enhancement */
.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
    color: var(--accent);
}

.service-card:hover {
    transform: translateY(-5px);
    background: var(--accent);
    opacity: 1;
}

.service-card:hover h3 {
    color: var(--text-primary);
}

.service-card:hover p {
    color: var(--text-primary);
    opacity: 0.9;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .service-card {
        padding: 1.5rem;
        margin: 0.5rem;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .service-icon {
        font-size: 2rem;
    }

    .service-card h3 {
        font-size: 1.2rem;
        text-align: center;
    }

    .service-card p {
        font-size: 0.9rem;
        text-align: center;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content, .project-card, .service-card {
    animation: fadeIn 1s ease-out forwards;
}

/* Scroll animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-link {
    color: var(--text-primary);
    font-size: 1.5rem;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    opacity: 0.7;
    text-decoration: none;
}

.social-link::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--card-bg);
    border-radius: 50%;
    z-index: -1;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.social-link:hover {
    color: var(--accent);
    transform: translateY(-3px);
    opacity: 1;
}

.social-link:hover::before {
    background: var(--card-bg);
    transform: scale(1.1);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .social-links {
        gap: 1rem;
    }

    .social-link {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
}

/* Theme Switch */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-left: 2rem;
}

.theme-checkbox {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--card-bg);
    transition: .4s;
    border-radius: 24px;
    opacity: 0.7;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.theme-slider:before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: var(--accent);
    transition: .4s;
    border-radius: 50%;
}

.theme-checkbox:checked + .theme-slider {
    background-color: var(--card-bg);
}

.theme-checkbox:checked + .theme-slider:before {
    transform: translateX(26px);
}

.theme-switch:hover .theme-slider {
    opacity: 1;
}

[data-theme="light"] .theme-slider {
    background-color: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .theme-slider:before {
    background-color: var(--accent);
}

/* Menu Toggle Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.menu-icon {
    display: block;
    width: 24px;
    height: 24px;
    padding-right: 23px;
    position: relative;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition);
}

.menu-icon::before {
    top: 6px;
}

.menu-icon::after {
    bottom: 6px;
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.7;
}

.nav-links a:hover {
    color: var(--accent);
    opacity: 1;
}

/* Mobile Menu */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 1rem;
        gap: 1.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        align-items: center;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .menu-toggle.active .menu-icon::before {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active .menu-icon::after {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    [data-theme="light"] .nav-links {
        background: var(--bg-secondary);
    }
}

/* Projects and Services Sections */
.projects, .services {
    position: relative;
    padding: 8rem 0.6rem;
    overflow: hidden;
    background: linear-gradient(
        to bottom,
        var(--bg-primary) 0%,
        rgba(10, 10, 10, 0.95) 50%,
        var(--bg-primary) 100%
    );
}

[data-theme="light"] .projects,
[data-theme="light"] .services {
    background: linear-gradient(
        to bottom,
        var(--bg-primary) 0%,
        rgba(248, 249, 250, 0.95) 50%,
        var(--bg-primary) 100%
    );
}

.projects h2, .services h2 {
    position: relative;
    z-index: 2;
    margin-bottom: 4rem;
}

.projects-grid, .services-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Flares for unified background */
.projects .flare, .services .flare {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
    z-index: 1;
    transition: var(--transition);
    animation: pulse 4s ease-in-out infinite;
    bottom: 50%;
}

.projects .flare-left, .services .flare-left {
    left: -150px;
    animation-delay: 0s;
}

.projects .flare-right, .services .flare-right {
    right: -150px;
    animation-delay: 2s;
}

/* Dark Theme Flares */
[data-theme="dark"] .projects .flare,
[data-theme="dark"] .services .flare {
    background: var(--accent);
    mix-blend-mode: screen;
    opacity: 0.15;
}

/* Light Theme Flares - hidden for minimalism */
[data-theme="light"] .projects .flare,
[data-theme="light"] .services .flare {
    display: none;
}

@keyframes pulse {
    0% {
        transform: translateY(-50%) scale(1);
        opacity: 0.15;
    }
    50% {
        transform: translateY(-50%) scale(1.2);
        opacity: 0.25;
    }
    100% {
        transform: translateY(-50%) scale(1);
        opacity: 0.15;
    }
}


/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    background: var(--accent-hover);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top i {
    transition: transform 0.3s ease;
}

.back-to-top:hover i {
    transform: translateY(-3px);
}

/* Light theme - white arrow for back to top */
[data-theme="light"] .back-to-top {
    color: #ffffff;
}

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

/* Footer styles */
footer {
    background: linear-gradient(90deg, rgba(169,127,245,0.08) 0%, rgba(24,19,26,0.98) 100%);
    padding: 2.2rem 1.2rem 1.2rem 1.2rem;
    text-align: center;
    position: relative;
    border-top: 1.5px solid var(--accent);
    box-shadow: 0 -4px 32px #0003;
    margin-top: 3rem;
    z-index: 2;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7em;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2em;
    justify-content: center;
    margin-bottom: 0.5em;
}

.footer-link, .footer-link-regulamin {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.08em;
    border-radius: 6px;
    padding: 0.3em 0.8em;
    background: rgba(169,127,245,0.07);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    box-shadow: 0 2px 8px #0001;
}
.footer-link-regulamin {
    border: 1.5px solid var(--accent);
    background: rgba(169,127,245,0.13);
    font-weight: 700;
    letter-spacing: 0.5px;
}
.footer-link:hover, .footer-link-regulamin:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 16px #a97ff555;
    text-decoration: none;
}
.footer-link svg, .footer-link-regulamin svg {
    margin-right: 0.2em;
    vertical-align: middle;
}
.footer-link-label {
    vertical-align: middle;
}
.footer-copy {
    color: var(--accent-light);
    font-size: 1em;
    margin: 0.2em 0 0.1em 0;
}
.footer-madeby {
    font-size: 0.95em;
    color: #bba6e6;
    margin-top: 0.2em;
    letter-spacing: 0.2px;
}
@media (max-width: 600px) {
    .footer-links {
        flex-direction: column;
        gap: 0.5em;
    }
    .footer-content {
        padding: 0 0.2em;
    }
}

[data-theme="light"] footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(90deg, #f3f0ff 0%, #e9e4fa 100%) !important;
    box-shadow: 0 -4px 32px #bba6e633;
}

/* Music Toggle Button */
.music-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.2rem;
    transition: var(--transition);
    color: var(--text-primary);
    opacity: 0.7;
    position: relative;
    margin-left: 2rem;
}

.music-toggle:hover {
    transform: scale(1.1);
    color: var(--accent);
    opacity: 1;
}

.music-toggle.active {
    color: var(--accent);
    opacity: 1;
}

.music-toggle.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) scale(1.5);
        opacity: 0.5;
    }
    100% {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

/* Section Dividers */
.section-divider {
    position: relative;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    overflow: visible;
    margin: -50px 0;
}

.divider-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.divider-line {
    width: 150px;
    height: 2px;
    background: var(--accent);
    opacity: 0.7;
    position: relative;
    overflow: hidden;
}

.divider-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    animation: lineFlow 2s linear infinite;
}

.divider-dot {
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    position: relative;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 15px var(--accent);
}

@keyframes lineFlow {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}
a {
    text-decoration: none;
}
/* Language Switch - podobny do theme switch ale z flagami */
.lang-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-left: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.lang-switch::before {
    content: "";
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--card-bg);
    transition: .4s;
    border-radius: 24px;
    opacity: 0.7;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.lang-switch::after {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-image: url('images/polish.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: .4s;
    border-radius: 50%;
}

.lang-switch[data-lang="en"]::after {
    background-image: url('images/english.png');
    transform: translateX(26px);
}

.lang-switch:hover::before {
    opacity: 1;
}

[data-theme="light"] .lang-switch::before {
    background-color: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Mobile styles dla lang-switch - identyczne z theme-switch */
@media (max-width: 768px) {
    .nav-links .lang-switch {
        position: relative;
        display: inline-block;
        width: 50px;
        height: 24px;
        margin-left: 2rem;
        background: none;
        border: none;
        cursor: pointer;
        transition: var(--transition);
    }
}