:root {
    --font-pixel: 'Press Start 2P', 'Roboto Mono', monospace;
    --font-terminal: 'VT323', 'Roboto Mono', monospace;
}

/* Generalne style */
body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    background-color: #0f172a; /* Ciemny granat */
    color: #e2e8f0; /* Jasny szary */
    line-height: 1.6;
    scroll-behavior: smooth;
    position: relative;
}

/* Nakładka CRT / skanlinie */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0px,
        rgba(0, 0, 0, 0.2) 1px,
        transparent 1px,
        transparent 3px
    );
    mix-blend-mode: overlay;
    opacity: 0.35;
    pointer-events: none;
    z-index: 9998;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
h4 {
    font-family: 'Pixelify Sans';font-size: 22px;
}
h1, h2, h3 {
    font-family: var(--font-pixel);
    color: #f8fafc; /* Prawie biały */
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.7;
}

h2 {
    font-size: clamp(1.1em, 4vw, 1.8em);
    margin-top: 50px;
    margin-bottom: 40px;
}

/* Komentarz w stylu kodu przed tytułami sekcji */
section h2::before {
    content: "// ";
    color: #3b82f6;
    opacity: 0.7;
}

p {
    text-align: center;
    margin-bottom: 20px;
}

/* Przyciski */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 0;
    text-decoration: none;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.3s ease, color 0.3s ease;
    font-weight: 600;
    font-size: 1.05em;
    margin: 10px;
    font-family: var(--font-pixel);
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.primary-btn {
    background-color: #3b82f6; /* Jasnoniebieski */
    color: white;
    border: 2px solid #1d3a8f;
    box-shadow: 4px 4px 0 #1d3a8f;
}

.primary-btn:hover {
    background-color: #2563eb;
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 #1d3a8f;
}

.secondary-btn {
    background-color: transparent;
    color: #3b82f6;
    border: 2px solid #3b82f6;
    box-shadow: 4px 4px 0 #1e40af;
}

.secondary-btn:hover {
    background-color: #3b82f6;
    color: white;
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 #1e40af;
}

/* Header i Nawigacja */
.header {
    background: rgba(15, 23, 42, 0.95); /* Ciemny granat z przezroczystością */
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-family: var(--font-pixel);
    font-size: 1em;
    font-weight: 700;
    color: #3b82f6; /* Jasnoniebieski */
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
    transition: color 0.3s ease;
    font-family: var(--font-terminal);
    font-size: 1.3em;
}

.nav-links a::before {
    content: "";
    color: #3b82f6;
    transition: opacity 0.2s ease;
    opacity: 0;
}

.nav-links a:hover {
    color: #3b82f6;
}

.nav-links a:hover::before {
    content: "> ";
    opacity: 1;
}

/* Hero Section */
.hero-section {
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.hero-content {
    max-width: 900px;
    z-index: 2;
}

.hero-content h1 {
    font-size: clamp(1.2em, 4.5vw, 2.2em);
    line-height: 1.8;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #3b82f6, #93c5fd); /* Gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-family: var(--font-terminal);
    font-size: 1.7em;
    color: #94a3b8; /* Szary */
    margin-bottom: 40px;
}

.blink-cursor {
    display: inline-block;
    color: #3b82f6;
    animation: blink-cursor 1s steps(1) infinite;
}

@keyframes blink-cursor {
    50% { opacity: 0; }
}

.hero-visual {
    position: relative;
    margin: 40px auto;
    max-width: 800px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid #334155;
}

.hero-gif-placeholder {
    width: 100%;
    height: 80px;
    display: block;
}

.overlay-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 4em;
    color: rgba(59, 130, 246, 0.6); /* Przezroczysty niebieski */
    pointer-events: none; /* Pozwala klikać pod ikonami */
}
.overlay-icons i {
    opacity: 0.7;
    transition: all 0.5s ease;
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
}
.overlay-icons i:nth-child(even) { /* Animacja dla parzystych ikon */
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); opacity: 0.7; }
    to { transform: scale(1.1); opacity: 1; }
}


/* About Section */
.about-section {
    padding: 80px 0;
    background-color: #1e293b; /* Nieco jaśniejszy granat */
    text-align: center;
}

.about-section h2 {
    color: #f8fafc;
    margin-bottom: 60px;
}

.about-section p {
    max-width: 800px;
    margin: 0 auto 50px auto;
    font-size: 1.1em;
    color: #cbd5e1;
    text-align:justify;
    hyphens: auto;

}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.skill-item {
    background-color: #334155;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
}

.skill-item i {
    font-size: 3.5em;
    color: #3b82f6;
    margin-bottom: 20px;
}

.skill-item h3 {
    font-size: clamp(0.8em, 2.2vw, 1em);
    line-height: 1.7;
    color: #f8fafc;
}

.skill-item p {
    font-size: 1em;
    color: #a0aec0;
    text-align: center;
}

/* Projects Section */
.projects-section {
    padding: 80px 0;
    background-color: #0f172a;
}

.projects-section h2 {
    color: #f8fafc;
    margin-bottom: 60px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    text-align: center;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #334155;
}

.project-card h3 {
    font-size: clamp(0.75em, 2vw, 0.95em);
    line-height: 1.7;
    margin: 20px 0 10px;
    color: #f8fafc;
    padding: 0 15px;
}

.project-card p {
    font-size: 0.95em;
    color: #cbd5e1;
    padding: 0 20px;
    margin-bottom: 25px;
    text-align: center;
}

.project-card .project-btn {
    margin-bottom: 25px;
    display: inline-block;
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background-color: #0f172a; /* Zmieniłem ten jaskrawy niebieski na ciemny, żeby pasował */
    text-align: center;
} /* <--- TA KLAMRA MUSI TU BYĆ, ŻEBY ZAMKNĄĆ SEKCJĘ! */

/* Kontener rozwijania */
.collapsible-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}




.toggle-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: 2px solid #1d3a8f;
    padding: 14px 32px;
    border-radius: 0;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 4px 4px 0 #1d3a8f;
    transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px; /* Odstęp między tekstem a ikonką */
    font-family: var(--font-pixel);
    text-transform: uppercase;
}

.toggle-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #1d3a8f;
    filter: brightness(1.1);
}

.toggle-btn:active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 #1d3a8f;
}

/* Styl ikonki wewnątrz przycisku */
.toggle-btn i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

/* Same pola tekstowe (Imie, Email) */
.input-field {
    background-color: #02003e !important; /* Bardzo ciemne tło */
    border: 2px solid #334155 !important;
    color: rgb(109, 203, 250) !important;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    flex: 1; /* Pola będą się równo rozciągać */
    min-width: 200px;
}

/* Efekt po kliknięciu w pole (Focus) */
.input-field:focus {
    border-color: #3b82f6 !important;
    background-color: #1e293b !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.submit-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white !important;
    border: 2px solid #1d3a8f;
    padding: 0 35px;
    border-radius: 0;
    font-weight: 700;
    font-size: 0.7rem;
    cursor: pointer;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    box-shadow: 4px 4px 0 #1d3a8f;
    position: relative;
    overflow: hidden;
    font-family: var(--font-pixel);
    text-transform: uppercase;
}

.submit-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #1d3a8f;
}

.submit-btn:active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 #1d3a8f;
}

.floating-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Wspólna baza dla wszystkich globów */
.gif-deco {
    position: absolute;
    width: 60px;
    opacity: 0;
    visibility: hidden;
    /* Domyślnie na środku, ale rozmiar zero - to chroni przed spawnowaniem */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    
    animation: fadeIn 0.8s ease-out forwards, 
               float 4s ease-in-out infinite;
    animation-delay: 2s; /* Globalne opóźnienie, żeby strona zdążyła się załadować */
}

/* TWOJA LISTA - Upewnij się, że każda klasa ma kropkę na początku! */
.gif-1 { top: 12%; left: 7%;   transform: scale(0.8); filter: blur(1px);}
.gif-2 { top: 18%; right: 4%;  left: auto; transform: scale(0.9); filter: blur(1px);}
.gif-3 { top: 40%; left: 15%;  transform: scale(0.5); opacity: 0.3; filter: blur(1px); }
.gif-4 { bottom: 12%; right: 6%; top: auto; left: auto; transform: scale(1.3); filter: blur(1px);}
.gif-5 { bottom: 25%; left: 65%; top: auto; transform: scale(0.7); filter: blur(2px); }
.gif-6 { top: 55%; left: 4%;   transform: scale(0.6); opacity: 0.2; filter: blur(2px); }
.gif-7 { bottom: 35%; right: 18%; top: auto; left: auto; transform: scale(0.85);filter: blur(1px); }
.gif-8 { bottom: 5%; left: 22%; top: auto; transform: scale(1.1);filter: blur(1px); }

@keyframes fadeIn {
    from {
        opacity: 0;
        visibility: hidden;
        transform: scale(0.3) translateY(40px);
    }
    to {
        opacity: 0.4;
        visibility: visible;
        transform: scale(1) translateY(0);
    }
}

/* Ukrycie myszki systemowej */
html, body {
    cursor: none !important;
}

/* Styl bazowy obu elementów */
.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999999;
    border-radius: 0;
    transform: translate(-50%, -50%);
    /* Zapobiega miganiu na początku */
    will-change: left, top;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: #3b82f6;
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(2, 94, 241, 0.955);
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Efekt najechania */
.cursor-outline.cursor-hover {
    width: 60px;
    height: 60px;
    background-color: rgba(4, 0, 252, 0.41);
    border-color: #3b82f6;
}

/* Ukrywamy kursor dla wszystkiego, na co da się kliknąć */
html, body, a, button, input, select, textarea, .submit-btn, [role="button"] {
    cursor: none !important;
}

/* Na wszelki wypadek dla wszystkich elementów na stronie */
* {
    cursor: none !important;
}
/* Miniatury projektów z GIF-ów */
.project-card img.gif-thumb {
    object-fit: contain;
    background-color: #0f172a;
    image-rendering: pixelated;
    padding: 20px;
    box-sizing: border-box;
}

.project-card h4 {
    padding: 0 15px;
    margin: 20px 0 10px;
}

/* Rozwijane "Więcej" w kartach */
.more {
    margin: 0 20px 25px;
    text-align: left;
}
.more summary {
    cursor: pointer;
    font-family: var(--font-pixel);
    font-size: 0.65em;
    color: #3b82f6;
    text-align: center;
    list-style: none;
    padding: 10px;
    border: 2px solid #3b82f6;
    box-shadow: 4px 4px 0 #1e40af;
    width: fit-content;
    margin: 0 auto;
}
.more summary::-webkit-details-marker { display: none; }
.more[open] summary { margin-bottom: 15px; }
.more p { text-align: left; padding: 0; }

.contact-form-row { justify-content: center; flex-wrap: wrap; gap: 10px; }
/* ===== Telefony i tablety ===== */
html, body { overflow-x: hidden; }

/* Ekrany dotykowe: zwykły kursor zamiast własnego */
@media (hover: none), (pointer: coarse) {
    .cursor-dot, .cursor-outline { display: none !important; }
    html, body, a, button, input, select, textarea, .submit-btn, [role="button"] { cursor: auto !important; }
}

@media (max-width: 768px) {
    .header { padding: 10px 0; }
    .navbar { flex-direction: column; gap: 6px; padding: 0 12px; }
    .logo { font-size: 0.75em; }
    .nav-links { flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
    .nav-links li { margin-left: 0; }
    .nav-links a { font-size: 1.15em; white-space: nowrap; }

    .hero-section { height: auto; min-height: 80vh; padding: 40px 16px; box-sizing: border-box; }
    .hero-content { width: 100%; }
    .hero-content p { font-size: 1.25em; }
    .hero-visual { margin: 24px auto; }
    .overlay-icons { font-size: 2.4em; }
    .hero-actions .btn { display: block; margin: 12px auto; max-width: 280px; }
    .gif-deco { width: 40px; }

    .container { padding: 16px; }
    h2 { margin-top: 30px; margin-bottom: 24px; }
    .about-section p { font-size: 1em; margin-bottom: 24px; }
    .skills-grid, .project-grid { grid-template-columns: 1fr; gap: 20px; }
    .skill-item { padding: 20px; }
    .skill-item i { font-size: 2.6em; }
    h4 { font-size: 18px; }
}
