/* --- RESET & ZMIENNE --- */
:root {
    --bg-body: #0b0c10;        
    --bg-card: #1f2833;        
    --text-main: #dcdddd;      
    --text-white: #ffffff;     
    --text-muted: #a7b2d1;     
    
    --accent-cyan: #66fcf1;    
    --accent-navy: #45a29e;    
    --border-dim: #2b3542;     

    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --spacing-section: 80px;
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- TYPOGRAFIA --- */
h1, h2, h3 {
    color: var(--text-white);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

h1 { 
    font-size: 3.5rem; 
    line-height: 1.1; 
    color: #ffffff;
}

h2 { font-size: 2rem; margin-top: 0; }
h3 { font-size: 1.3rem; color: var(--text-white); margin-bottom: 10px;}
p { font-size: 1.1rem; margin-bottom: 1.5rem; max-width: 650px; color: var(--text-main); }
.subtitle { margin-bottom: 50px; color: var(--text-muted); }

a { text-decoration: none; color: var(--text-white); transition: color 0.3s ease; }
a:hover { color: var(--accent-cyan); }

/* --- UKŁAD --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }

.section { 
    padding: var(--spacing-section) 0; 
    border-bottom: 1px solid var(--border-dim); 
    scroll-margin-top: 110px;
}

/* --- HEADER --- */
header {
    padding: 30px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(-135deg, var(--bg-card) 0%, #050608 100%);
    border-bottom: 1px solid var(--accent-navy);
    opacity: 0.98;
}

.nav-flex { display: flex; justify-content: space-between; align-items: center; }

.logo { 
    font-weight: 700; 
    font-size: 1.5rem; 
    letter-spacing: 0.1em; 
    color: var(--text-white); 
    border: none;
    padding: 0;
}

.nav-links a { margin-left: 20px; font-size: 0.85rem; text-transform: uppercase; font-weight: 500; letter-spacing: 0.05em; color: var(--text-muted); }
.nav-links a:hover { color: var(--accent-cyan); }

/* --- HERO --- */
.hero { padding-top: 100px; padding-bottom: 100px; }

.hero-tag { 
    display: inline-block; 
    border: none;
    color: var(--accent-cyan); 
    padding: 0;
    font-size: 1rem;
    text-transform: uppercase; 
    margin-bottom: 25px;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.hero-text .lead { font-size: 1.25rem; color: var(--text-white); }

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 20px;
}
.stat-item { display: flex; flex-direction: column; }
.stat-number { font-size: 2.5rem; font-weight: 700; color: var(--accent-cyan); line-height: 1; }
.stat-desc { font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); margin-top: 5px; }

/* --- SERVICES LIST --- */
.feature-list { list-style: none; }
.feature-list li {
    padding: 25px 0;
    border-top: 1px solid var(--border-dim);
    display: flex;
    flex-direction: column; 
}
.feature-list li strong { 
    font-size: 1.1rem;
    margin-bottom: 8px; 
    color: var(--accent-cyan);
    display: block;
}
.feature-list li span { color: var(--text-muted); font-size: 0.95rem; }

/* --- CV / TIMELINE (FIXED) --- */
.timeline {    
    position: relative;
    margin-left: 10px;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 0;
    width: 2px;
    background-color: var(--border-dim);
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    opacity: 1; 
    transform: translateY(0);
    transition: all 0.6s ease-out;
}

/* Kółeczka */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -49px;   
    top: 5px;
    width: 16px;
    height: 16px;
    background: var(--bg-body);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    z-index: 2; 
}

/* --- PORTFOLIO GRID --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-item {
    display: block; 
    padding: 35px;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: 2px;
    
    opacity: 1; 
    transform: translateY(0);
    
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover {
    border-color: var(--accent-navy);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.project-cat {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 15px;
    display: block;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.project-item h3 { font-size: 1.2rem; margin-bottom: 10px; }
.project-item p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 20px; }

.read-more {
    font-size: 0.85rem;
    color: var(--text-white);
    font-weight: 600;
    border-bottom: 1px solid var(--accent-navy);
    padding-bottom: 2px;
}

/* --- CTA SECTION --- */
.cta-section { 
    background: linear-gradient(135deg, var(--bg-card) 0%, #050608 100%);
    border-top: 1px solid var(--accent-navy);
    border-bottom: 1px solid var(--accent-navy);
}
.cta-container { text-align: center; padding: 115px 0; }
.cta-section h2 { color: var(--text-white); }
.cta-section p { color: var(--text-muted); margin: 0 auto 40px auto; }

.btn-primary {
    background: transparent;
    color: var(--accent-cyan);
    padding: 15px 40px;
    border: 1px solid var(--accent-cyan);
    border-radius: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
    transition: all 0.3s ease;
}
.btn-primary:hover { 
    background: var(--accent-cyan);
    color: var(--bg-body);
    transform: scale(1.02); 
}

/* --- FOOTER --- */
footer { 
    padding: 60px 0; 
    text-align: left; 
    font-size: 0.85rem; 
    color: var(--text-muted);
    border-top: none;
	.footer-links a { var(--text-muted); margin: 0 10px; }
}
.footer-links a { color: var(--text-muted); margin: 0 10px; }
.footer-links a:hover { color: var(--accent-cyan); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .grid-2 { grid-template-columns: 1fr; gap: 40px; }
    .nav-flex { flex-direction: column; gap: 20px; }
    .hero-stats { flex-wrap: wrap; gap: 20px; }
    .timeline { padding-left: 20px; }
    .timeline-item::before { left: -29px; }
}

/* --- FAQ / Q&A SECTION --- */
.faq-container {
    max-width: 800px; 
    margin: 0 auto;
}

details {
    background: var(--bg-card);
    margin-bottom: 15px;
    border: 1px solid var(--border-dim);
    border-radius: 2px;
    transition: all 0.3s ease;
    overflow: hidden; 
}

details[open] {
    border-color: var(--accent-navy);
}

summary {
    padding: 20px 25px;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none; 
    transition: background 0.2s;
}

summary::-webkit-details-marker { display: none; }

summary:hover {
    background: rgba(102, 252, 241, 0.05); 
    color: var(--accent-cyan);
}

summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--accent-cyan);
    transition: transform 0.3s ease;
}

details[open] summary::after {
    transform: rotate(45deg); 
}

.faq-answer {
    padding: 0 25px 25px 25px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    border-top: 1px solid transparent;
}

details[open] .faq-answer {
    border-top-color: var(--border-dim);
    padding-top: 20px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- MODALS & CODE STYLES --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(11, 12, 16, 0.9);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-card);
    margin: 5% auto;
    padding: 40px;
    border: 1px solid var(--accent-navy);
    width: 90%;
    max-width: 800px;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    color: var(--text-muted);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
	background: none;
    border: none;
    padding: 0;
}
.close-modal:hover { color: var(--accent-cyan); }

.modal-header {
    border-bottom: 1px solid var(--border-dim);
    margin-bottom: 25px;
    padding-bottom: 15px;
}

.modal-body h3 {
    color: var(--accent-cyan);
    font-size: 1.1rem;
    margin-top: 30px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.code-block-header {
    margin-top: 25px;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: var(--text-white);
    font-weight: 700;
    background: var(--border-dim);
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px 3px 0 0;
}

.code-snippet {
    background: #000;
    padding: 15px;
    border-radius: 4px;
    border-left: 3px solid var(--accent-cyan);
    overflow-x: auto;
    margin-bottom: 20px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.code-snippet pre { margin: 0; }

.code-snippet code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    color: #a5b3ce;
    display: block;
}
/* ========================================= */
/* === FORMULARZ KONTAKTOWY (DARK THEME) === */
/* ========================================= */

/* 1. Specyficzne ustawienia dla modala kontaktowego */
/* ID ma wyższą wagę niż klasa .modal, więc nadpisze style bez !important */
#modal-contact {
    background-color: rgba(11, 12, 16, 0.95); /* Ciemniejsze tło overlay */
    backdrop-filter: blur(5px);
    z-index: 2000; /* Wyżej niż header (100) i inne modale */
}

/* 2. Wygląd karty (Dark Mode) - spójny z resztą strony */
#modal-contact .modal-content {
    background-color: var(--bg-card);      
    border: 1px solid var(--accent-navy);  
    color: var(--text-main);               
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    border-radius: 2px;
    max-width: 500px;
}

/* 3. Nagłówki wewnątrz */
#modal-contact h2 {
    color: var(--text-white);
    border-bottom: none;
    margin-bottom: 5px;
}

#modal-contact .hero-tag {
    margin-bottom: 5px;
}

#modal-contact p {
    color: var(--text-muted);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-dim);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

/* 4. Pola formularza (Inputy w stylu Tech) */
#contactForm .form-group {
    margin-bottom: 20px;
}

#contactForm label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--accent-cyan);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

#contactForm input, 
#contactForm textarea {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--bg-body);
    border: 1px solid var(--border-dim);
    color: var(--text-white);
    font-family: inherit;
    font-size: 0.95rem;
    border-radius: 2px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Aktywny input */
#contactForm input:focus, 
#contactForm textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(102, 252, 241, 0.1);
}

/* 5. Przycisk */
.full-width {
    width: 100%;
    text-align: center;
    margin-top: 10px;
    cursor: pointer;
}

/* 6. Ukrycie Honeypota */
.antispam-hidden {
    position: absolute;
    opacity: 0;
    z-index: -1;
    height: 0;
    width: 0;
    overflow: hidden;
    left: -9999px;
}

/* 7. Status */
#statusMessage {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
}

/* 8. Disclaimer RODO (pod przyciskiem) */
.form-disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 15px;
    text-align: center;
    line-height: 1.4;
}

.form-disclaimer a {
    color: var(--accent-cyan);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s ease;
}

.form-disclaimer a:hover {
    color: var(--text-white);
}