/**
 * @file style.css
 * @description
 * EN: Global stylesheet for the FoerchByte v2.0 portfolio.
 * Defines themes (dark/light), typography, navigation, and base layouts.
 * PL: Globalny arkusz stylów dla portfolio FoerchByte v2.0.
 * Definiuje motywy (ciemny/jasny), typografię, nawigację i bazowe układy.
 */

/* --- Globalny reset box-sizing --- */
*, *::before, *::after {
    box-sizing: border-box;
}

/* --- Zmienne kolorów dla motywów (Technical Precision) --- */
:root {
    --primary-color: #00E0FF;           /* Techniczny turkus (akcent) */
    --primary-hover-color: #00A8C0;    /* Ciemniejszy turkus */
    --text-color: #CCD6F6;              /* Jasny, techniczny tekst */
    --text-secondary: #8892B0;          /* Szary tekst dla detali i linków */
    --background-color: #020C1B;        /* Główne tło (bardzo ciemny granat) */
    --card-background: #112240;         /* Tło kart (nieco jaśniejszy granat) */
    --border-color: #1E3A5F;            /* Kolor obramowań */
    --grid-line-color: rgba(40, 68, 105, 0.15); /* Bardzo delikatna siatka */

    --success-color: #28a745;
    --danger-color: #dc3545;
    --handle-color: #495057;
    --completed-bg: #1A2F50;
    --completed-text: var(--text-secondary);
}

body.light-mode {
    --primary-color: #007bff;
    --primary-hover-color: #0056b3;
    --text-color: #212529;
    --text-secondary: #6c757d;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --border-color: #dee2e6;
    --grid-line-color: transparent;
    --handle-color: #ced4da;
    --completed-bg: #e9ecef;
    --completed-text: #6c757d;
}

/* --- Podstawowe style body --- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    transition: background-color 0.3s, color 0.3s;
    background-image: 
        linear-gradient(var(--grid-line-color) 1px, transparent 1px),
        linear-gradient(to right, var(--grid-line-color) 1px, transparent 1px);
    background-size: 80px 80px;
    background-position: center center;
    background-attachment: fixed;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Nagłówek i Nawigacja --- */
.site-header {
    background-color: rgba(2, 12, 27, 0.9);
    backdrop-filter: blur(10px);
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

body.light-mode .site-header {
     background-color: rgba(255, 255, 255, 0.95);
     box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-family: 'Roboto Mono', monospace;
    font-weight: 700;
    letter-spacing: -1px;
    position: relative;
    z-index: 101;
}

.site-title a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-title .prompt {
    color: var(--primary-color);
}

.controls-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem; 
    margin-left: 1.5rem;
    padding-left: 1.5rem;
    border-left: 1px solid var(--border-color);
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    font-family: 'Roboto Mono', monospace;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.nav-active {
    color: var(--primary-color);
}

/* Styl [Link] zgodny z mockupem */
.main-nav a::before {
    content: '[';
    color: var(--text-secondary);
    opacity: 0.6;
    margin-right: 0.2rem;
    transition: all 0.2s;
}
.main-nav a::after {
    content: ']';
    color: var(--text-secondary);
    opacity: 0.6;
    margin-left: 0.2rem;
    transition: all 0.2s;
}
.main-nav a:hover::before, .main-nav a:hover::after,
.main-nav a.nav-active::before, .main-nav a.nav-active::after {
    color: var(--primary-color);
    opacity: 1;
}

.lang-switcher {
    display: flex;
    gap: 1.5rem; 
}

.lang-switcher button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.95rem;
    opacity: 1; 
    transition: all 0.2s;
    position: relative; 
}

.lang-switcher button.active {
    color: var(--primary-color);
}

.lang-switcher button::before {
    content: '[';
    color: var(--text-secondary);
    opacity: 0.6;
    margin-right: 0.2rem;
    transition: all 0.2s;
}
.lang-switcher button::after {
    content: ']';
    color: var(--text-secondary);
    opacity: 0.6;
    margin-left: 0.2rem;
    transition: all 0.2s;
}

.lang-switcher button:hover::before, .lang-switcher button:hover::after,
.lang-switcher button.active::before, .lang-switcher button.active::after {
    color: var(--primary-color);
    opacity: 1;
}

.lang-switcher button:hover {
    color: var(--primary-color);
}


.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--text-secondary);
    transition: color 0.2s;
    display: flex;
    align-items: center;
}
.theme-toggle:hover {
    color: var(--primary-color);
}
.theme-toggle svg {
    width: 20px;
    height: 20px;
}
.theme-toggle .moon-icon { display: none; }
.theme-toggle .sun-icon { display: block; }

body.light-mode .theme-toggle .moon-icon { display: block; }
body.light-mode .theme-toggle .sun-icon { display: none; }

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 110;
}

.hamburger-bar {
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* --- Główna treść i animacje --- */
.content-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out forwards;
}

.fade-out {
    animation: fadeOut 0.3s ease-in-out forwards;
}

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

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

/* --- Style ogólne dla stron projektów --- */
.project-title-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 2rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-family: 'Roboto Mono', monospace;
}

.project-title-link:hover {
    transform: translateX(-5px);
}

.project-page-title, .section-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: var(--text-color);
    border-bottom: none; 
    padding-bottom: 0;
    display: block;
    margin-bottom: 1.5rem;
    margin-top: 0;
    font-weight: 700;
}

.project-page-title::before, .section-title::before {
    content: '// ';
    color: var(--primary-color);
    font-family: 'Roboto Mono', monospace;
    font-weight: normal;
    font-size: 0.8em;
    margin-right: 0.5rem;
    opacity: 0.7;
}

/* --- Elementy wspólne (loader, modal) --- */
.loader { 
    width: 18px; 
    height: 18px; 
    border: 2px solid var(--primary-color); 
    border-bottom-color: transparent; 
    border-radius: 50%; 
    display: inline-block; 
    box-sizing: border-box; 
    animation: rotation 1s linear infinite; 
    margin-left: 10px; 
}
@keyframes rotation { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

.modal-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    background-color: rgba(2, 12, 27, 0.9); 
    backdrop-filter: blur(5px); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    z-index: 1000; 
}
.modal-content { 
    background-color: var(--card-background); 
    padding: 2.5rem; 
    border-radius: 2px; 
    border: 1px solid var(--primary-color);
    max-width: 450px; 
    width: 90%; 
    text-align: center; 
    box-shadow: 0 0 40px rgba(0, 224, 255, 0.1);
}
.modal-content p { 
    color: var(--text-color); 
    font-size: 1.1rem; 
    margin-bottom: 2rem; 
}
.modal-buttons { 
    display: flex; 
    justify-content: center; 
    gap: 1.5rem; 
}
.modal-buttons button { 
    padding: 0.8rem 2rem; 
    border-radius: 2px; 
    border: none; 
    cursor: pointer; 
    font-weight: 500; 
    font-family: 'Roboto Mono', monospace; 
    transition: all 0.2s;
}
.modal-buttons .confirm-btn { 
    background-color: var(--primary-color); 
    color: var(--background-color); 
    font-weight: 700; 
}
.modal-buttons .confirm-btn:hover { 
    background-color: var(--primary-hover-color); 
    box-shadow: 0 0 15px rgba(0, 224, 255, 0.4); 
}
.modal-buttons .cancel-btn { 
    background-color: transparent; 
    border: 1px solid var(--text-secondary); 
    color: var(--text-secondary); 
}
.modal-buttons .cancel-btn:hover { 
    border-color: var(--text-color); 
    color: var(--text-color); 
}

/* --- Klasy pomocnicze --- */
.hidden { 
    display: none; 
}
.sr-only { 
    position: absolute; 
    width: 1px; 
    height: 1px; 
    padding: 0; 
    margin: -1px; 
    overflow: hidden; 
    clip: rect(0, 0, 0, 0); 
    white-space: nowrap; 
    border-width: 0; 
}

/* --- Media Queries (Responsywność) --- */

/* Układ dla tabletów i mniejszych desktopów */
@media (max-width: 900px) {
    .contact-layout { 
        grid-template-columns: 1fr; 
        gap: 3rem; 
    }
}

/* Główny breakpoint dla urządzeń mobilnych */
@media (max-width: 768px) {
    .menu-toggle { 
        display: flex; 
    }
    
    .nav-wrapper { 
        display: none; 
        position: fixed; 
        top: 0; 
        right: 0; 
        height: 100vh; 
        width: 80%; 
        max-width: 350px; 
        background-color: var(--card-background); 
        flex-direction: column; 
        justify-content: center; 
        align-items: center; 
        gap: 2.5rem; 
        transform: translateX(100%); 
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
        box-shadow: -10px 0 30px -15px rgba(2, 12, 27, 0.7); 
        border-left: 1px solid var(--primary-color);
        z-index: 99;
    }
    
    .site-header.nav-open .nav-wrapper { 
        transform: translateX(0); 
        display: flex;
    }
    
    .main-nav { 
        flex-direction: column; 
        align-items: center; 
        gap: 2rem; 
    }
    
    .main-nav a { 
        font-size: 1.2rem; 
    }
    
    .controls-wrapper { 
        margin: 0; 
        padding: 0; 
        border: none; 
        flex-direction: row; 
        gap: 2rem; 
        margin-top: 2rem; 
    }
    
    /* Animacja hamburgera w "X" */
    .site-header.nav-open .menu-toggle .hamburger-bar:nth-child(1) { 
        transform: rotate(45deg);
    }
    .site-header.nav-open .menu-toggle .hamburger-bar:nth-child(2) { 
        opacity: 0; 
    }
    .site-header.nav-open .menu-toggle .hamburger-bar:nth-child(3) { 
        transform: rotate(-45deg);
    }
}

/* Breakpoint dla desktopów (zapewnia, że nawigacja jest widoczna) */
@media (min-width: 769px) {
    .nav-wrapper {
        display: flex;
        align-items: center;
    }
}

/* ========================================================================
  POPRAWKA KRYTYCZNA: Przywrócenie brakujących stylów dla przycisków CTA
  (Używane na /home i /changelog)
  ========================================================================
*/
.about-cta, .hero-cta-group {
    margin-top: 3rem;
    display: flex;
    flex-wrap: wrap; /* Dodane dla responsywności */
    gap: 1.5rem;
}

.cta-button {
    padding: 1rem 2rem;
    border-radius: 2px; /* Zgodne z v2.0 */
    text-decoration: none;
    font-weight: 500;
    font-family: 'Roboto Mono', monospace;
    font-size: 1rem;
    transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    border: 1px solid var(--primary-color);
    display: inline-flex; /* Poprawka dla wyrównania ikony */
    align-items: center; 
    justify-content: center;
    text-align: center;
}

.cta-button.primary {
    background-color: var(--primary-color);
    color: var(--background-color);
    font-weight: 700;
}

.cta-button.primary:hover {
    background-color: var(--primary-hover-color);
    border-color: var(--primary-hover-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 224, 255, 0.3);
}

.cta-button.secondary {
    background-color: transparent;
    border-color: var(--text-secondary);
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
}

.cta-button.secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Poprawka responsywna dla CTA na mobilkach */
@media (max-width: 768px) {
    .about-cta, .hero-cta-group {
        flex-direction: column;
        width: 100%;
        max-width: 350px; /* Dopasowanie do estetyki mobilnej */
    }
    
    .cta-button {
        width: 100%; /* Przyciski zajmują całą szerokość w kolumnie */
    }
}

