/* --- 1. IMPORT I ZMIENNE (DESIGN SYSTEM) --- */
:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --accent: #ff5a1a; /* Poprawiony kontrast dla 100/100 Accessibility */
    --card-bg: #f4f4f4;
    --font-main: 'Inter', sans-serif;
    --section-padding: 60px 20px;
}

body.theme-dark {
    --bg: #0f0f0f;
    --text: #f5f5f5;
    --accent: #00ffcc;
    --card-bg: #1a1a1a;
}

body.theme-matrix {
    --bg: #000000;
    --text: #00ff41;
    --accent: #00ff41;
    --card-bg: #001100;
}

body.cat-mode {
    --bg: #1a0f00;
    --text: #ffb86c;
    --accent: #ff79c6;
}

/* --- 2. BAZA I RESPONSYWNO?? PODSTAWOWA --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { 
    scroll-behavior: smooth; 
    overflow-x: hidden; 
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    transition: background 0.3s ease, color 0.3s ease;
    line-height: 1.6;
    width: 100%;
    overflow-x: hidden;
}

/* Tryb gry - kursor */
body.cat-mode-active {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" style="font-size: 24px;"><text y="24">??</text></svg>'), auto !important;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }

/* --- 3. NAWIGACJA (MOBILE-FIRST) --- */
#progress-bar {
    position: fixed;
    top: 0; left: 0;
    width: 0%; height: 4px;
    background: var(--accent);
    z-index: 9999;
}

.navbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 20px;
    gap: 15px;
}

.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -1px; }
.logo span { color: var(--accent); }

.nav-links { 
    display: flex; 
    gap: 15px; 
    flex-wrap: wrap; 
    justify-content: center;
}

.nav-item { font-weight: 600; position: relative; padding: 5px 0; font-size: 0.9rem; }
.nav-item::after {
    content: ''; position: absolute; width: 100%; height: 2px;
    bottom: 0; left: 0; background: var(--accent);
    transform: scaleX(0); transition: 0.3s ease;
}
.nav-item.active::after, .nav-item:hover::after { transform: scaleX(1); }

@media (min-width: 768px) {
    .navbar { flex-direction: row; justify-content: space-between; padding: 2rem 5%; }
    .nav-links { margin-right: auto; margin-left: 50px; gap: 30px; }
    .nav-item { font-size: 1rem; }
    :root { --section-padding: 100px 10%; }
}

/* --- 4. HERO I SEKCJE --- */
.hero {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--section-padding);
    background: radial-gradient(circle at 10% 20%, var(--card-bg) 0%, transparent 40%);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    word-wrap: break-word;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: 15px;
}

p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 800px;
    margin-bottom: 40px;
    line-height: 1.6;
}

.cta-group { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}

@media (min-width: 600px) {
    .cta-group { flex-direction: row; }
}

/* --- 5. GRID I KARTY (AUTOMATYCZNE DOPASOWANIE) --- */
.features-section, .skills-section, .portfolio-section, .data-showcase {
    padding: var(--section-padding);
}

.features-grid, .skills-grid, .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.skill-card, .project-card, .feature-item {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(128, 128, 128, 0.1);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-svg {
    width: 40px;
    height: 40px;
    margin-bottom: 20px;
    color: var(--accent);
}

.feature-svg svg {
    width: 100%;
    height: 100%;
    display: block;
}

.skill-card:hover, .project-card:hover, .feature-item:hover { 
    transform: translateY(-10px); 
    border-color: var(--accent); 
}

.project-meta { font-size: 0.8rem; font-weight: 700; color: var(--accent); text-transform: uppercase; margin-bottom: 0.5rem; }
.project-stats { margin: 1.5rem 0; padding: 1rem; background: rgba(128, 128, 128, 0.05); border-radius: 10px; font-family: monospace; font-size: 0.85rem; }
.project-link { color: var(--accent) !important; font-weight: bold; border-bottom: 2px solid transparent; width: fit-content; }


/* =========================================
   6. PODSTRONA: KONTAKT - HUB 2.0
   ========================================= */

.contact-page {
    padding: var(--section-padding);
    max-width: 1400px; /* Zwi?kszamy max-width z 1200px na 1400px */
    width: 100%; /* Upewniamy si?, ?e zajmuje dost?pn? przestrze¨˝ */
    margin: 0 auto;
}
.contact-hero {
    margin-bottom: 40px;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 50px;
    width: 100%; /* Wymuszamy rozci?gni?cie siatki do brzeg¨®w kontenera */
}

@media (min-width: 1024px) {
    .contact-container {
        grid-template-columns: 1.5fr 1fr; /* Zmieniamy proporcje: formularz b?dzie szerszy */
        gap: 80px; /* Zwi?kszamy odst?p mi?dzy formularzem a praw? kolumn? z 60px na 80px */
    }
}

.contact-form {
    background: var(--card-bg);
    padding: clamp(30px, 5vw, 50px);
    border-radius: 24px;
    border: 1px solid rgba(128, 128, 128, 0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 900;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 18px;
    margin-bottom: 25px;
    background: var(--bg);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(255, 77, 0, 0.05);
}

.btn-contact {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    background: var(--accent);
    color: #fff !important;
    padding: 1.2rem 2.5rem;
    font-weight: 800;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(255, 77, 0, 0.25);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (min-width: 768px) { .btn-contact { width: fit-content; } }

.btn-contact:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(255, 77, 0, 0.4);
}

.sending .btn-icon { animation: flyAway 1s forwards ease-in; }
.sending .btn-text { opacity: 0; transform: translateX(-20px); transition: 0.3s;}
.sent-success { background: #2ecc71 !important; box-shadow: 0 10px 25px rgba(46, 204, 113, 0.4) !important;}

@keyframes flyAway {
    0% { transform: translate(0, 0) rotate(0); opacity: 1; }
    20% { transform: translate(-5px, 5px) rotate(-10deg); }
    100% { transform: translate(120px, -120px) rotate(20deg); opacity: 0; }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(128, 128, 128, 0.1);
    border-left: 6px solid var(--accent);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateX(12px);
    background: #fff;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

.info-icon {
    font-size: 1.8rem;
    background: rgba(255, 77, 0, 0.1);
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.info-text h3 {
    margin: 0;
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-text a, .info-text p {
    margin: 5px 0 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
}

.social-links { display: flex; gap: 10px; align-items: center; font-weight: 800; }
.social-links a { color: var(--accent); }

.status-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(39, 201, 63, 0.1);
    color: #27c93f;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    width: fit-content;
    margin-top: 10px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #27c93f;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(39, 201, 63, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(39, 201, 63, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(39, 201, 63, 0); }
    100% { box-shadow: 0 0 0 0 rgba(39, 201, 63, 0); }
}


/* --- 7. STYLE LAB & EASTER EGGS --- */
.easter-egg-hint {
    margin-top: 30px;
    font-family: monospace;
    font-size: 0.85rem;
    opacity: 0.5;
    transition: opacity 0.3s;
    cursor: default;
}

.easter-egg-hint:hover { opacity: 1; }
.easter-egg-hint span { color: var(--accent); font-weight: bold; }

.mouse {
    position: fixed;
    font-size: 35px;
    z-index: 10000;
    cursor: pointer;
    user-select: none;
}

/* --- 8. PRZYCISKI --- */
.btn-primary { 
    background: var(--accent); 
    color: var(--bg) !important; 
    padding: 1.2rem 2.5rem; 
    font-weight: bold; 
    border-radius: 50px; 
    border: none;
    text-align: center;
    cursor: pointer;
}

.btn-secondary { 
    border: 2px solid var(--text); 
    color: var(--text); 
    padding: 1.2rem 2.5rem; 
    font-weight: bold; 
    border-radius: 50px;
    text-align: center;
    cursor: pointer;
}

/* --- 9. STOPKA --- */
.footer-section {
    padding: 60px 20px;
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    align-items: center; 
    gap: 20px;
}

@media(min-width: 768px){
     .footer-section { align-items: flex-start; padding-left: 10%; }
}

.email-link {
    font-size: clamp(1.1rem, 5vw, 2.5rem);
    font-weight: 900;
    color: var(--accent) !important;
    word-break: break-all;
}

/* --- PASEK STATYSTYK --- */
.stats-bar {
    display: flex;
    flex-direction: column; 
    gap: 2rem;
    justify-content: space-around;
    padding: 50px 20px;
    background: var(--accent); 
    color: var(--bg);
    text-align: center;
}

.stat-number { display: block; font-size: 2.5rem; font-weight: 900; }
.stat-label { font-size: 0.9rem; text-transform: uppercase; font-weight: bold; }

@media (min-width: 768px) {
    .stats-bar { flex-direction: row; padding: 50px 10%; }
}

.tag { 
    display: inline-block;
    color: var(--accent); 
    text-transform: uppercase; 
    font-weight: bold; 
    letter-spacing: 2px; 
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.section-header { margin-bottom: 30px; }

/* --- SEKCJA ARCHITEKTURA --- */
.data-showcase {
    padding: var(--section-padding);
    display: grid; 
    grid-template-columns: 1fr;
    gap: 50px; 
    align-items: center;
    background: linear-gradient(90deg, var(--bg) 0%, var(--card-bg) 100%);
}

@media (min-width: 900px) {
    .data-showcase { grid-template-columns: 1fr 1fr; }
}

.tech-stack-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
}

.tech-pill { 
    padding: 6px 16px; 
    border: 1px solid var(--accent); 
    border-radius: 20px; 
    font-size: 0.8rem; 
    font-family: monospace;
    color: var(--text);
    background: transparent;
}

.data-viz { 
    background: #1e1e1e; 
    padding: 30px; 
    border-radius: 15px; 
    color: #00ff41; 
    font-family: monospace; 
    font-size: 1rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    width: 100%;
    overflow-x: auto;
}

.viz-row { margin-bottom: 10px; opacity: 0.9; }
.indent-1 { margin-left: 20px; color: #9cdcfe; }
.indent-2 { margin-left: 40px; color: #ce9178; }

/* --- PODSTRONA: STYLE LAB --- */
.lab-section { padding: var(--section-padding); }

.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    padding: 30px 0;
}

.lab-item {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    transition: transform 0.3s ease;
    border: 1px solid rgba(128, 128, 128, 0.1);
}
.lab-item:hover { transform: scale(1.02); border-color: var(--accent); }
.lab-item h3 { margin-bottom: 10px; font-size: 1.5rem; }
.lab-item p { margin-bottom: 20px; opacity: 0.8; }

.glass-demo { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 40px; border-radius: 15px; display: flex; justify-content: center; }
.glass-card { background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 8px 32px 0 rgba(0,0,0,0.3); padding: 30px; border-radius: 15px; color: white; text-align: center; width: 100%; }

.neu-demo { background: #e0e0e0; padding: 40px; border-radius: 15px; display: flex; justify-content: center; }
.neu-button { width: 100%; max-width: 150px; height: 100px; background: #e0e0e0; border-radius: 20px; border: none; box-shadow: 10px 10px 20px #bebebe, -10px -10px 20px #ffffff; color: #444; font-weight: bold; cursor: pointer; }

.brutalist-demo { background: #fff; padding: 40px; border-radius: 15px; display: flex; justify-content: center; border: 2px dashed #000; }
.brutalist-card { background: #ffff00; border: 4px solid #000; padding: 20px; box-shadow: 8px 8px 0px 0px #000; color: #000; font-weight: 900; width: 100%; text-align: center; }

.reset-box { margin-top: 40px; text-align: center; width: 100%; }


/* =========================================
   NADAPISYWANIE DLA TRYB¨®W STYLE LAB
   ========================================= */

/* --- LAB: GLASSMORPHISM --- */
body.lab-glass { 
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e) fixed !important; 
    color: #fff !important; 
}
body.lab-glass .navbar, 
body.lab-glass .lab-item, 
body.lab-glass .skill-card, 
body.lab-glass .project-card, 
body.lab-glass .feature-item, 
body.lab-glass .contact-form, 
body.lab-glass .info-card { 
    background: rgba(255, 255, 255, 0.05) !important; 
    backdrop-filter: blur(15px) !important; 
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important; 
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
    color: #fff !important;
}
body.lab-glass h1, body.lab-glass h2, body.lab-glass h3, body.lab-glass p { color: #fff !important; }

/* --- LAB: NEUMORPHISM --- */
body.lab-neu { 
    background: #e0e0e0 !important; 
    color: #444 !important; 
}
body.lab-neu .navbar, 
body.lab-neu .lab-item, 
body.lab-neu .skill-card, 
body.lab-neu .project-card, 
body.lab-neu .feature-item, 
body.lab-neu .contact-form, 
body.lab-neu .info-card { 
    background: #e0e0e0 !important; 
    box-shadow: 15px 15px 30px #bebebe, -15px -15px 30px #ffffff !important; 
    border: none !important; 
    border-radius: 30px !important;
}
body.lab-neu h1, body.lab-neu h2, body.lab-neu h3, body.lab-neu p { color: #444 !important; }


/* --- LAB: BRUTALISM --- */
body.lab-brutal { 
    background: #fff !important; 
    color: #000 !important; 
    font-family: monospace !important;
}
body.lab-brutal .navbar, 
body.lab-brutal .lab-item, 
body.lab-brutal .skill-card, 
body.lab-brutal .project-card, 
body.lab-brutal .feature-item, 
body.lab-brutal .contact-form, 
body.lab-brutal .info-card { 
    border: 4px solid #000 !important; 
    box-shadow: 8px 8px 0px #000 !important; 
    background: #fff !important;
    border-radius: 0 !important; 
}
body.lab-brutal h1, body.lab-brutal h2, body.lab-brutal h3 { 
    background: #ffff00 !important; 
    border: 4px solid #000 !important; 
    box-shadow: 6px 6px 0px #000 !important; 
    padding: 10px !important; 
    display: inline-block !important;
    text-transform: uppercase !important;
    color: #000 !important;
}
body.lab-brutal p { color: #000 !important; }


/* =========================================
   SYSTEM ARCHITEKTA (X-RAY) - CLEAN VERSION
   ========================================= */

.xray-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10005; 
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 800;
    font-family: monospace;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(255, 77, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.xray-toggle:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 77, 0, 0.5);
}

.xray-report-panel {
    position: fixed;
    bottom: 110px; 
    right: 30px;
    z-index: 10004;
    background: #1e1e1e;
    color: #fff;
    padding: 25px;
    border-radius: 20px;
    width: 320px;
    font-family: monospace;
    display: none;
    box-shadow: 0 20px 50px rgba(0,0,0,0.7);
    border: 1px solid var(--accent);
    animation: slideInXray 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

body.xray-mode .xray-report-panel { display: block; }

.report-row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.green { color: #00ff41; font-weight: bold; }
.report-note { 
    font-size: 11px; opacity: 0.6; margin-top: 15px; 
    border-top: 1px solid #333; padding-top: 10px; line-height: 1.4;
}

body.xray-mode * { outline: 1px dashed rgba(255, 77, 0, 0.3) !important; }

body.xray-mode section, 
body.xray-mode nav, 
body.xray-mode footer,
body.xray-mode .skill-card,
body.xray-mode .project-card {
    outline: 2px dashed var(--accent) !important;
}

body.xray-mode h1::after, 
body.xray-mode h2::after, 
body.xray-mode h3::after {
    content: " [SEO VALID]";
    font-size: 10px; background: var(--accent); color: #fff;
    padding: 2px 6px; margin-left: 10px; border-radius: 4px;
    font-weight: bold; vertical-align: middle;
}

.business-insight {
    position: absolute;
    background: #00ff41;
    color: #000;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 900;
    z-index: 1000;
    box-shadow: 4px 4px 0px #000;
    pointer-events: none;
}


/* =========================================
   STYLE O MNIE (HERO MONITOR & AVATAR)
   ========================================= */

.hero-about { padding: 40px 5%; }

.hero-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

@media (min-width: 900px) {
    .hero-container { grid-template-columns: 1.2fr 0.8fr; }
}

/* STYL MONITORA */
.hero-monitor {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    border: 1px solid #333;
}

.monitor-header {
    background: #2d2d2d;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }
.file-name { color: #888; font-family: monospace; font-size: 0.8rem; margin-left: 10px; }

.monitor-body { padding: 30px; color: #fff; }
.monitor-body h1, .monitor-body p { color: #fff !important; }

/* AVATAR */
.hero-avatar { display: flex; justify-content: center; }
.avatar-wrapper { position: relative; width: fit-content; }

.profile-img {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 4px solid var(--accent);
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.status-badge {
    position: absolute;
    bottom: 20px;
    right: 0;
    background: #1e1e1e;
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    border: 1px solid var(--accent);
    font-family: monospace;
}

/* LISTA AI */
.ai-list { list-style: none; margin-top: 20px; }
.ai-list li { margin-bottom: 10px; font-weight: bold; }

/* NAPRAWA PIGU?EK W MONITORZE */
.hero-monitor .tech-pill {
    color: #ffffff !important; 
    border-color: var(--accent); 
    background: rgba(255, 255, 255, 0.05); 
    font-weight: bold;
    opacity: 1; 
}

.hero-monitor .tech-pill:hover {
    background: var(--accent);
    color: #000000 !important;
}
/* --- NAPRAWA STOPKI W TRYBACH STYLE LAB --- */

/* Glassmorphism - przezroczysta stopka z delikatną linią */
body.lab-glass .footer-section {
    background: transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Poprawa przycisku "Przywróć standardowy wygląd" w trybie Glass */
body.lab-glass .btn-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

body.lab-glass .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Neumorphism - miękkie tło stopki */
body.lab-neu .footer-section {
    background: #e0e0e0 !important;
    box-shadow: inset 10px 10px 20px #bebebe, inset -10px -10px 20px #ffffff !important;
}

/* Brutalism - surowa odcinająca linia */
body.lab-brutal .footer-section {
    background: #fff !important;
    border-top: 4px solid #000 !important;
}
/* --- POPRAWKI BRUTALIZMU DLA STOPKI --- */
body.lab-brutal .footer-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
}

body.lab-brutal .footer-cta h2 {
    display: block !important; /* Wymusza załamanie linii, e-mail spada w dół */
    width: fit-content; /* Żółta ramka nadal ciasno opina tekst */
    margin: 0 !important;
}

body.lab-brutal .email-link {
    color: #000 !important; /* Czarny tekst zamiast pomarańczowego */
    background: #fff;
    border: 4px solid #000;
    padding: 10px 20px;
    box-shadow: 6px 6px 0px #000;
    font-family: monospace;
}

body.lab-brutal .email-link:hover {
    background: #000;
    color: #fff !important;
}

body.lab-brutal .tag {
    color: #fff !important;
    background: #000;
    padding: 5px 15px;
    border: 4px solid #000;
    margin-bottom: 0;
}

body.lab-brutal .easter-egg-hint {
    opacity: 1 !important; /* Brutalizm nie bierze jeńców - zero przezroczystości */
    color: #000 !important;
    font-weight: 900;
    border-top: 4px dashed #000;
    padding-top: 20px;
    margin-top: 20px;
    width: 100%;
}

body.lab-brutal .easter-egg-hint span {
    background: #ffff00;
    color: #000 !important;
    border: 2px solid #000;
    padding: 2px 5px;
}
/* =========================================
   10. EFEKTY SPECJALNE (MATRIX & TYPEWRITER)
   ========================================= */

/* --- Tło Matrix --- */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; /* Zawsze z tyłu */
    pointer-events: none; /* Nie blokuje klikania w linki */
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Kiedy Matrix jest włączony, pokazujemy Canvas i lekko prześwitujemy tło */
body.theme-matrix #matrix-canvas {
    opacity: 1;
}

body.theme-matrix {
    --bg: rgba(0, 0, 0, 0.2); /* Lekko przezroczyste tło, żeby widzieć deszcz kodu */
}

/* --- Typewriter (Efekt pisania) --- */
.typewriter {
    color: var(--accent);
    border-right: 4px solid var(--accent); /* Kursor */
    padding-right: 5px;
    animation: blinkCursor 0.8s infinite normal;
    display: inline-block;
    min-height: 1em;
}

@keyframes blinkCursor {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--accent); }
}/* --- MATRIX VISIBILITY REPAIR --- */

/* 1. Wymuszenie przezroczystości głównych kontenerów podstron */
body.theme-matrix .hero-monitor,
body.theme-matrix .contact-form,
body.theme-matrix .info-card,
body.theme-matrix .lab-item,
body.theme-matrix .skill-card,
body.theme-matrix .project-card {
    background: rgba(0, 17, 0, 0.7) !important; /* Ciemnozielony prześwit */
    border: 1px solid var(--accent) !important;
    backdrop-filter: blur(2px); /* Delikatne rozmycie, żeby kod w tle nie przeszkadzał w czytaniu */
}

/* 2. Naprawa widoczności nagłówków na podstronach */
body.theme-matrix .monitor-header {
    background: rgba(0, 50, 0, 0.9) !important;
}

/* 3. Upewnienie się, że tło strony nie przykrywa Canvasu */
body.theme-matrix {
    background-color: #000 !important;
}

/* 4. Resetowanie cieni, które w Matrixie wyglądają źle (rozmywają się) */
body.theme-matrix * {
    box-shadow: none !important;
    text-shadow: 0 0 5px var(--accent); /* Dodaje hakerski blask tekstom */
}

/* 5. Gwarancja, że Canvas jest widoczny i zajmuje cały ekran */
#matrix-canvas {
    display: none; /* Domyślnie ukryty */
}

body.theme-matrix #matrix-canvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1; /* Musi być pod treścią */
    width: 100vw;
    height: 100vh;
}
/* --- 11. PODSTRONA: BLOG (KNOWLEDGE BASE) --- */

.blog-page {
    padding: var(--section-padding);
    max-width: 1400px;
    margin: 0 auto;
}

/* Nagłówek podstrony */
.hero-mini {
    margin-bottom: 60px;
    border-left: 4px solid var(--accent);
    padding-left: 30px;
}

.hero-mini h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-top: 10px;
    line-height: 1.05;
}

.hero-mini h1 span {
    color: var(--accent);
}

.hero-mini p {
    max-width: 720px;
    opacity: 0.75;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Siatka artykułów */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

/* Karta bloga */
.blog-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 24px;
    border: 1px solid rgba(128, 128, 128, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.blog-card:hover {
    transform: translateY(-12px);
    border-color: var(--accent);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
}

/* Wnętrze karty */
.card-body {
    padding: 40px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Meta informacje */
.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.blog-meta .category {
    color: var(--accent);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
}

.blog-meta .date {
    font-family: monospace;
    font-size: 0.8rem;
    opacity: 0.5;
    white-space: nowrap;
}

/* Teksty na kartach */
.blog-card h3 {
    font-size: 1.45rem;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--text);
}

.blog-card p {
    font-size: 1rem;
    line-height: 1.65;
    opacity: 0.72;
    margin-bottom: 32px;
    flex-grow: 1;
}

/* Link "Czytaj dalej" */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent) !important;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: gap 0.3s ease, opacity 0.3s ease;
}

.read-more-btn:hover {
    gap: 15px;
    opacity: 0.85;
}

/* --- POJEDYNCZY ARTYKUŁ --- */

.blog-article {
    max-width: 920px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.blog-article .blog-card {
    height: auto;
}

.blog-article .card-body {
    padding: 46px;
}

.blog-article .blog-card:hover {
    transform: none;
}

.blog-article .blog-card h3 {
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.15;
    margin-bottom: 26px;
}

.blog-article .blog-card p {
    font-size: 17px;
    line-height: 1.85;
    margin-bottom: 22px;
    opacity: 0.78;
    flex-grow: 0;
}

.blog-article .read-more-btn {
    margin-top: 28px;
}

/* --- ADAPTACJA DLA TRYBU MATRIX --- */

body.theme-matrix .blog-card {
    background: rgba(0, 15, 0, 0.82) !important;
    border: 1px solid #00ff41 !important;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.08);
}

body.theme-matrix .blog-card:hover {
    box-shadow: 0 0 45px rgba(0, 255, 65, 0.18);
}

body.theme-matrix .blog-card h3,
body.theme-matrix .blog-card p,
body.theme-matrix .blog-meta .date {
    color: #00ff41 !important;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.45);
}

body.theme-matrix .blog-meta .category,
body.theme-matrix .read-more-btn {
    color: #00ff41 !important;
}

/* --- INTEGRACJA Z TRYBEM ARCHITEKTA (X-RAY) --- */

body.xray-mode .blog-card::after {
    content: "DATA_TYPE: ARTICLE";
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 3px 7px;
    border-radius: 5px;
    z-index: 2;
}

/* --- MOBILE --- */

@media (max-width: 768px) {
    .blog-page {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero-mini {
        padding-left: 20px;
        margin-bottom: 40px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 35px;
    }

    .card-body {
        padding: 28px;
    }

    .blog-card h3 {
        font-size: 1.25rem;
    }

    .blog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .blog-article {
        padding: 0;
    }

    .blog-article .card-body {
        padding: 30px;
    }

    .blog-article .blog-card p {
        font-size: 16px;
        line-height: 1.75;
    }
}