/*
Theme Name: YDI Core v11 (Top Align Images)
Description: Zdjęcia projektów wyrównane do góry (widać logo), kompaktowe kafelki, pełny neon.
Version: 11.0
*/

:root {
    --bg-main: #020617;
    --bg-card: rgba(15, 23, 42, 0.6);
    --text-white: #f8fafc;
    --text-gray: #94a3b8;
    --accent: #0ea5e9;
    --accent-glow: rgba(14, 165, 233, 0.7);
    --success: #10b981;
    --font-code: 'Fira Code', 'Consolas', monospace;
    --font-body: 'Inter', system-ui, sans-serif;
    --radius: 16px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-white);
    font-family: var(--font-body);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- HEADER --- */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(2, 6, 23, 0.7);
    border-bottom: 1px solid rgba(14, 165, 233, 0.1);
    position: sticky;
    top: 0; z-index: 1000;
    backdrop-filter: blur(15px);
}

.code-logo-mini {
    font-family: var(--font-code);
    font-size: 1.1rem;
    font-weight: 500;
    color: #fff;
    display: inline-flex;
    align-items: center;
    background: transparent !important;
    border: none !important;
    min-width: 260px;
    white-space: pre;
}

.syntax-symbol { color: var(--accent); margin-right: 10px; font-weight: bold; text-shadow: 0 0 10px var(--accent-glow); }

/* Neony w logo */
.c-white  { color: #e2e8f0; text-shadow: 0 0 5px rgba(226, 232, 240, 0.3); }
.c-blue   { color: #61afef; text-shadow: 0 0 8px rgba(97, 175, 239, 0.6); }
.c-purple { color: #c678dd; text-shadow: 0 0 8px rgba(198, 120, 221, 0.6); }
.c-yellow { color: #e5c07b; text-shadow: 0 0 8px rgba(229, 192, 123, 0.6); }
.c-green  { color: #98c379; text-shadow: 0 0 8px rgba(152, 195, 121, 0.6); }
.c-pink   { color: #e06c75; text-shadow: 0 0 8px rgba(224, 108, 117, 0.6); }

.cursor {
    display: inline-block;
    width: 10px; height: 1.2em;
    background-color: var(--accent);
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    vertical-align: middle;
    box-shadow: 0 0 10px var(--accent);
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* --- HERO SECTION --- */
.hero-section {
    position: relative;
    padding: 160px 0 120px;
    text-align: center;
    overflow: hidden;
    background: #020617;
}
.video-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.video-background video { width: 100%; height: 100%; object-fit: cover; }
.video-background .overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(2, 6, 23, 0.8); z-index: 1; }
.hero-container { position: relative; z-index: 2; }

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    margin: 0 0 20px;
    line-height: 1.2;
    letter-spacing: -3px;
    background: linear-gradient(to right, #fff 20%, #0ea5e9 50%, #fff 80%);
    background-size: 200% auto;
    color: #fff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
    filter: drop-shadow(0 0 20px rgba(14, 165, 233, 0.2));
}
@keyframes shine { to { background-position: 200% center; } }

.hero-desc { font-size: 1.3rem; color: var(--text-gray); max-width: 800px; margin: 0 auto 50px; }
.hero-desc strong { color: var(--accent); font-weight: 600; text-shadow: 0 0 15px var(--accent-glow); }

.btn-primary {
    display: inline-block;
    padding: 18px 50px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--accent);
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 0 20px var(--accent-glow);
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 1px solid var(--accent);
    backdrop-filter: blur(5px);
    transition: 0.4s;
}
.btn-primary:hover { background: var(--accent); color: #fff; transform: translateY(-5px); box-shadow: 0 0 40px var(--accent-glow); }

/* --- GRID PROJEKTÓW --- */
.projects-section { padding: 80px 0; }
.section-header h2 { 
    font-size: 3rem; text-align: center; margin-bottom: 60px; font-weight: 800; 
    text-shadow: 0 0 30px rgba(255,255,255,0.1);
}

.projects-list { 
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 30px; 
}

/* Karta Projektu */
.project-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    height: 100%;
}

.project-card.is-featured {
    grid-column: 1 / -1; 
    flex-direction: row; 
    border: 1px solid var(--accent);
    box-shadow: 0 0 40px rgba(14, 165, 233, 0.2);
}

.project-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 50px rgba(14, 165, 233, 0.3); 
    transform: translateY(-8px);
}

/* --- VISUAL (ZDJĘCIA) --- */
.project-visual {
    position: relative;
    width: 100%;
    height: 220px; 
    background: #000;
    overflow: hidden;
    border: none; 
}

.project-card.is-featured .project-visual {
    width: 55%; 
    height: auto; 
    min-height: 350px;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.project-visual img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    /* KLUCZOWA ZMIANA: Wyrównaj do góry */
    object-position: top; 
    opacity: 0.8; 
    transition: transform 0.7s ease; 
}
.project-card:hover .project-visual img { transform: scale(1.1); opacity: 1; }

.no-image {
    display: flex; align-items: center; justify-content: center; height: 100%;
    background: #020617; color: #334155; font-size: 2rem;
}

.featured-badge {
    position: absolute; top: 15px; left: 15px;
    background: #020617; color: var(--success);
    font-weight: 800; font-size: 0.7rem;
    padding: 6px 12px; border-radius: 30px; z-index: 10;
    border: 1px solid var(--success);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

/* --- DETALE --- */
.project-details {
    padding: 25px; 
    display: flex; flex-direction: column; flex-grow: 1;
    background: linear-gradient(180deg, rgba(255,255,255,0.01) 0%, rgba(2,6,23,0.3) 100%);
}

.tags { margin-bottom: 15px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags span {
    font-family: var(--font-code); font-size: 0.7rem; color: var(--text-gray);
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3px 10px; border-radius: 4px; transition: 0.3s;
}

.project-card:hover .tags span { 
    border-color: var(--accent); 
    color: var(--accent); 
    background: rgba(14, 165, 233, 0.15); 
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.2);
}

.project-details h3 { 
    margin: 0 0 10px; 
    font-size: 1.6rem; 
    line-height: 1.2; font-weight: 800; 
}
.project-details h3 a { color: #fff; transition: 0.3s; }
.project-card:hover h3 a { color: var(--accent); text-shadow: 0 0 20px var(--accent-glow); }

.desc { color: var(--text-gray); font-size: 0.95rem; margin-bottom: 25px; flex-grow: 1; line-height: 1.5; }

.btn-project {
    align-self: flex-start; padding: 10px 20px; background: transparent;
    border: 1px solid rgba(255,255,255,0.2); color: #fff; font-weight: 600;
    border-radius: 8px; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 8px;
}
.btn-project:hover { background: var(--accent); border-color: var(--accent); transform: translateX(5px); box-shadow: 0 0 20px var(--accent-glow); }

/* --- STOPKA --- */
.site-footer { border-top: 1px solid rgba(255,255,255,0.05); padding: 60px 20px; text-align: center; color: var(--text-gray); font-family: var(--font-code); background: #01040f; }
.icon-heart { color: #ef4444; width: 20px; height: 20px; animation: pulse 1.5s infinite; filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.6)); vertical-align: middle; }
.icon-coffee { color: #d97706; width: 20px; height: 20px; vertical-align: middle; filter: drop-shadow(0 0 8px rgba(217, 119, 6, 0.5)); }

@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }

@media (max-width: 900px) {
    .projects-list { grid-template-columns: 1fr; }
    .project-card.is-featured { flex-direction: column; }
    .project-card.is-featured .project-visual { width: 100%; height: auto; min-height: 250px; }
    .hero-title { font-size: 3rem; }
}

/* --- STRONA KONTAKT (PROFESSIONAL TECH) --- */

.contact-page-wrapper {
    padding: 120px 0 80px;
    min-height: 80vh; /* Żeby na dużych ekranach stopka była na dole */
    display: flex;
    align-items: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Podział 50/50 */
    gap: 80px;
    align-items: center;
}

/* --- LEWA STRONA: HISTORIA --- */
.page-title {
    font-family: var(--font-code);
    font-size: 3.5rem;
    margin-bottom: 40px;
    color: #fff;
    text-shadow: 0 0 20px var(--accent-glow);
}

.story-header {
    font-family: var(--font-code);
    color: var(--accent);
    font-size: 1rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.dev-story p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-gray);
    margin-bottom: 25px;
    max-width: 500px;
}

.dev-story strong {
    color: #fff;
    font-weight: 600;
}

/* Specyfikacja techniczna (tagi) */
.tech-specs {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.tech-specs span {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--accent);
    border: 1px solid rgba(14, 165, 233, 0.3);
    padding: 5px 12px;
    border-radius: 4px;
    background: rgba(14, 165, 233, 0.05);
}

.email-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
    transition: 0.3s;
}
.email-link:hover {
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent-glow);
}

.availability {
    margin-top: 15px;
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--text-gray);
}
.status-green {
    color: var(--success);
    font-weight: bold;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* --- PRAWA STRONA: FORMULARZ (GLASS) --- */
.glass-panel {
    background: rgba(15, 23, 42, 0.6); /* Ciemne szkło */
    backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.glass-panel h3 {
    margin: 0 0 30px;
    font-size: 1.8rem;
    color: #fff;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 8px;
    margin-left: 2px;
}

/* Wygląd inputów */
.ydi-form input, 
.ydi-form textarea {
    width: 100%;
    background: rgba(2, 6, 23, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: 0.3s;
    outline: none;
    box-sizing: border-box; /* Ważne, żeby padding nie rozpychał */
}

/* Input Focus - Neon Effect */
.ydi-form input:focus, 
.ydi-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.2);
    background: rgba(2, 6, 23, 1);
}

.btn-full {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
    cursor: pointer;
}

/* --- RWD (Mobile) --- */
@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr; /* Jedna kolumna na telefonie */
        gap: 50px;
    }
    .page-title {
        font-size: 2.5rem;
    }
    .glass-panel {
        padding: 25px;
    }
}

/* --- WIADOMOŚCI FORMULARZA --- */
.form-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    font-family: var(--font-body);
}

.form-message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

/* --- NOWY PRZYCISK W MENU (Header) --- */
.nav-btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--accent);
    font-family: var(--font-code);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background: rgba(14, 165, 233, 0.05);
}

.nav-btn-contact:hover {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-2px);
}

.blink-dot {
    animation: blink 1s step-end infinite;
}

/* --- FIX DLA DUŻEGO KURSORA NA PODSTRONIE KONTAKT --- */
.page-title .cursor {
    height: 0.8em !important; /* Wysokość dopasowana do wielkiego fontu */
    width: 20px !important;   /* Grubszy kursor */
    vertical-align: baseline !important;
    background-color: var(--accent);
    margin-left: 5px;
}

/* Poprawka RWD dla przycisku kontakt w menu */
@media (max-width: 900px) {
    .header-right {
        gap: 10px;
    }
    .nav-btn-contact {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* --- COMPACT MATH CAPTCHA (Styl Koder PRO) --- */

/* Wrapper dla in-line (Label + Input obok siebie) */
.math-compact-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    margin-bottom: 25px;
    
    /* Likwidujemy tło, ramkę i padding poprzedniej wersji */
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
}

/* Styl dla etykiety "Proszę obliczyć..." */
.math-label {
    margin: 0 !important; /* Usuwamy marginesy labela WP */
    font-family: var(--font-code);
    font-size: 0.95rem !important;
    color: #fff !important;
    white-space: nowrap; /* Zapobiega łamaniu wiersza */
}

/* Styl dla niebieskiego znaku > w labelu */
.math-label .syntax-symbol {
    color: var(--accent);
    margin-right: 8px;
    font-weight: bold;
}

/* Wygląd pola wpisywania wyniku (Kod-style) */
.math-input-inline {
    width: 60px !important; /* Bardzo wąskie */
    height: 38px !important; /* Niższe niż standardowe inputy */
    background: rgba(2, 6, 23, 0.8) !important; /* Ciemne */
    border: 1px solid rgba(14, 165, 233, 0.3) !important; /* Cienka niebieska ramka */
    border-radius: 4px !important;
    color: var(--accent) !important; /* Niebieski wynik */
    font-family: var(--font-code);
    font-size: 1rem !important;
    font-weight: bold;
    text-align: center;
    padding: 0 !important; /* Usuwamy padding */
    transition: 0.3s;
    outline: none;
    
    /* Ukrywamy strzałki góra/dół dla Chrome/Safari/Edge */
    appearance: none; 
    -moz-appearance: textfield; /* Dla Firefox */
}

/* Ukrywanie strzałek dla Webkit (Chrome, etc) */
.math-input-inline::-webkit-outer-spin-button,
.math-input-inline::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Hover/Focus na koderowy input */
.math-input-inline:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.3) !important;
    background: #000 !important;
}

/* RWD: Na małych ekranach może wrócić do dwóch wierszy */
@media (max-width: 600px) {
    .math-compact-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .math-input-inline {
        width: 100% !important;
        text-align: left;
        padding-left: 15px !important;
    }
}