/* ============================================================
   GLOBAL RESET / BAZA
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0b0b0b;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Consolas', 'Lucida Console', 'Courier New', monospace;
    padding: 1.5rem;
}

/* ============================================================
   NAKŁADKI CRT / SCANLINE
   ============================================================ */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.4) 0px,
        rgba(0, 0, 0, 0.05) 2px,
        transparent 3px,
        transparent 5px
    );
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 255, 100, 0.06);
    pointer-events: none;
    z-index: 9999;
    animation: scanMove 7s linear infinite;
    opacity: 0.5;
}

@keyframes scanMove {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

/* ============================================================
   KONTENER GŁÓWNY – TERMINAL
   ============================================================ */
.terminal {
    max-width: 1400px;
    width: 100%;
    background: #0c0c0c;
    border: 1px solid #2a2a2a;
    padding: 2rem 2rem 1.5rem;
    box-shadow: 0 0 40px rgba(0, 200, 80, 0.03), inset 0 0 60px rgba(0, 0, 0, 0.8);
    border-radius: 6px;
    position: relative;
    animation: flicker 0.2s infinite alternate;
}

@keyframes flicker {
    0% { opacity: 0.98; }
    100% { opacity: 1; }
}

/* ============================================================
   NAGŁÓWEK
   ============================================================ */
.terminal-header {
    border-bottom: 1px dashed #2e2e2e;
    padding-bottom: 1.2rem;
    margin-bottom: 1.5rem;
}

.title-line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #d4ffd4;
    text-shadow: 0 0 12px rgba(80, 255, 120, 0.15);
}

.prompt {
    color: #3acf6b;
    font-weight: 400;
    font-size: 2.6rem;
    margin-right: 6px;
}

.title {
    background: linear-gradient(135deg, #b0ffb0, #6fdf8f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: 1px;
}

.cursor-blink {
    color: #3acf6b;
    font-weight: 300;
    animation: blink 1.2s step-end infinite;
    margin-left: 4px;
}

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

.subtitle {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #5a6a5a;
    margin-top: 0.3rem;
    padding-left: 0.2rem;
    border-left: 2px solid #1f3a1f;
    padding-left: 12px;
}

.path {
    color: #5f8b5f;
}

.status {
    color: #3acf6b;
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 0.8rem;
    background: #112211;
    padding: 0.1rem 0.8rem;
    border-radius: 12px;
    border: 1px solid #2a5a2a;
}

/* ============================================================
   FILTRY LAT
   ============================================================ */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1rem;
    padding: 0.8rem 1rem;
    background: #0a0f0a;
    border: 1px solid #1a2a1a;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.filter-label {
    color: #4a7a4a;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-right: 0.5rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid #1f331f;
    color: #6a8a6a;
    padding: 0.25rem 1rem;
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.25s;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn:hover {
    border-color: #3a7a3a;
    color: #a0d0a0;
    background: #0f1a0f;
}

.filter-btn.active {
    border-color: #3acf6b;
    color: #b0ffb0;
    background: #112211;
    box-shadow: 0 0 15px rgba(58, 207, 107, 0.08);
}

.filter-count {
    color: #4a6a4a;
    font-size: 0.75rem;
    margin-left: auto;
    border-left: 1px solid #1a2a1a;
    padding-left: 1rem;
}

/* ============================================================
   SIATKA PRAC
   ============================================================ */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 0 0 2rem;
    min-height: 300px;
}

.work-card {
    background: #0f0f0f;
    border: 1px solid #1e1e1e;
    padding: 0.8rem;
    transition: all 0.3s;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}

.work-card.hidden {
    display: none;
}

.work-card:hover {
    border-color: #3a7a4a;
    box-shadow: 0 0 25px rgba(50, 200, 80, 0.05);
}

.work-header {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    border-bottom: 1px dotted #1a1a1a;
    padding-bottom: 0.4rem;
    margin-bottom: 0.7rem;
}

.badge {
    font-size: 0.6rem;
    color: #3a7a4a;
    background: #0f1a0f;
    padding: 0.1rem 0.5rem;
    border-radius: 2px;
    letter-spacing: 0.5px;
    border: 1px solid #1a2a1a;
}

.work-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #c8e0c8;
    letter-spacing: 0.3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.work-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    background: #080a08;
    border: 1px solid #161616;
    margin: 0.4rem 0 0.6rem;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.work-preview img {
    width: 100%;
    height: 100%;
    max-height: 200px;
    object-fit: cover;
    display: block;
    image-rendering: auto;
    transition: transform 0.3s;
}

.work-card:hover .work-preview img {
    transform: scale(1.02);
}

.work-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.6rem;
    font-size: 0.65rem;
    color: #5a7a5a;
    margin-top: 0.2rem;
}

.year-tag {
    color: #4a6a4a;
    font-size: 0.6rem;
    border: 1px solid #1a2a1a;
    padding: 0.05rem 0.5rem;
    border-radius: 10px;
    background: #0f140f;
}

/* ============================================================
   STOPKA / KONTAKT
   ============================================================ */
.terminal-footer {
    border-top: 1px dashed #1a1a1a;
    padding-top: 1.4rem;
    margin-top: 0.4rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem 2rem;
}

.contact-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.contact-line {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: #b0c8b0;
}

.prompt-small {
    color: #3acf6b;
    font-weight: 700;
    font-size: 0.8rem;
    width: 1.2rem;
}

.contact-label {
    color: #5a7a5a;
    min-width: 60px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-value {
    color: #d0e8d0;
    font-weight: 400;
    word-break: break-all;
    border-bottom: 1px dotted #223222;
    padding-bottom: 1px;
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: #3a5a3a;
    background: #0a100a;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    border: 1px solid #152015;
}

.cursor-blink-small {
    color: #3acf6b;
    animation: blink 1.2s step-end infinite;
}

.sys-msg {
    color: #6a8a6a;
}

/* ============================================================
   RESPONSYWNOŚĆ
   ============================================================ */
@media (max-width: 950px) {
    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    .title-line {
        font-size: 2.2rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .terminal {
        padding: 1rem;
    }
    .works-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }
    .title-line {
        font-size: 1.8rem;
    }
    .filter-bar {
        gap: 0.4rem;
        padding: 0.6rem;
    }
    .filter-btn {
        font-size: 0.65rem;
        padding: 0.15rem 0.6rem;
    }
    .terminal-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .footer-status {
        justify-content: center;
    }
}

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