/*
 * Global Stylesheet for Mateusz Piekarski CV & Portfolio
 * A dark, professional theme with blue accents inspired by futuristic design.
 */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0f1b2b;
    color: #ffffff;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Header */
.site-header {
    background-color: rgba(15, 27, 43, 0.9);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid #162d47;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0;
}
.logo {
    font-size: 1.6rem;
    font-weight: bold;
    color: #00aaff;
}
.nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}
.nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
.nav a:hover {
    color: #00aaff;
}

/* Active nav link */
.nav a.active {
    color: #00aaff;
    border-bottom: 2px solid #00aaff;
}

/* Hero */
.hero {
    padding: 6rem 0 4rem;
    background: linear-gradient(180deg, #0f1b2b 0%, #09101f 100%);
    display: flex;
    align-items: center;
    min-height: 85vh;
}
.hero-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.hero-text {
    flex: 1 1 450px;
}
.hero-text h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}
.hero-text h1 span {
    color: #00aaff;
}
.hero-text p {
    max-width: 500px;
    margin-bottom: 2rem;
    color: #d1dce8;
}
.hero-actions {
    display: flex;
    gap: 1rem;
}
.btn-primary,
.btn-secondary {
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.btn-primary {
    background-color: #00aaff;
    color: #0f1b2b;
}
.btn-primary:hover {
    background-color: #0086c1;
}
.btn-secondary {
    border: 2px solid #00aaff;
    color: #00aaff;
}
.btn-secondary:hover {
    background-color: #00aaff;
    color: #0f1b2b;
}
.hero-images {
    display: flex;
    flex: 1 1 300px;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}
.hero-images img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #162d47;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Sections */
.section {
    padding: 4rem 0;
}
.section h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: #00aaff;
    text-align: center;
}
.section p {
    color: #d1dce8;
}

/* About */
.about p {
    max-width: 800px;
    margin: 0 auto 1rem;
    text-align: justify;
}
.availability-note {
    max-width: 800px;
    margin: 1.5rem auto 0;
    padding: 1rem 1.25rem;
    background-color: rgba(0, 170, 255, 0.08);
    border: 2px solid #00aaff;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 170, 255, 0.18);
}
.availability-note h3 {
    margin: 0 0 0.35rem;
    color: #ffffff;
    font-size: 1.1rem;
}
.availability-note p {
    margin: 0;
    color: #d1dce8;
    text-align: left;
}

/* Timeline (Experience) */
.timeline {
    position: relative;
    padding-left: 30px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #162d47;
}
.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 25px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 5px;
    width: 12px;
    height: 12px;
    background-color: #00aaff;
    border-radius: 50%;
    border: 2px solid #0f1b2b;
}
.timeline-item h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #ffffff;
}
.timeline-item .period {
    font-size: 0.9rem;
    color: #9db6cf;
    display: block;
    margin-bottom: 0.5rem;
}
.timeline-item p {
    margin: 0;
    color: #d1dce8;
}

/* Education */
.education-list {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
}
.education-list li {
    margin-bottom: 0.8rem;
    line-height: 1.4;
}
.education-list li strong {
    color: #00aaff;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.skill {
    background-color: #13233a;
    padding: 1.2rem;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.skill h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #00aaff;
}
.skill p {
    margin: 0;
    color: #d1dce8;
    font-size: 0.9rem;
}
.cert-list {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 0.65rem;
}
.sensitive-data-note {
    max-width: 800px;
    margin: 0 auto 1.25rem;
    padding: 1rem 1.25rem;
    background-color: rgba(27, 188, 108, 0.1);
    border: 2px solid #28d17c;
    border-radius: 6px;
    box-shadow: 0 0 0 rgba(40, 209, 124, 0.4);
    animation: sensitivePulse 1.8s ease-in-out infinite;
}
.sensitive-data-note p {
    margin: 0;
    color: #d9ffe8;
    font-weight: 700;
    text-align: center;
}
@keyframes sensitivePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 209, 124, 0.42);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 209, 124, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 209, 124, 0);
    }
}
.cert-list li {
    margin: 0;
}
.cert-list li::before {
    content: none;
}
.cert-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(0, 170, 255, 0.35);
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(19, 35, 58, 0.96), rgba(13, 29, 48, 0.96));
    color: #d1dce8;
    cursor: pointer;
    font: inherit;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}
.cert-link:hover,
.cert-link:focus-visible {
    transform: translateX(8px);
    border-color: #00aaff;
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(0, 170, 255, 0.18);
    outline: none;
}
.cert-link__action {
    flex: 0 0 auto;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    background-color: rgba(0, 170, 255, 0.16);
    color: #8fdbff;
    font-size: 0.82rem;
    font-weight: 700;
}
/* Assistant Section */
.assistant-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.assistant-grid .assistant-image {
    flex: 1 1 350px;
}
.assistant-grid .assistant-image img {
    width: 100%;
    max-height: 250px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.assistant-grid .assistant-text {
    flex: 1 1 350px;
}
.assistant-grid .assistant-text p {
    margin-bottom: 1rem;
    color: #d1dce8;
}
.assistant-selfie {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    margin-top: 1rem;
}
.assistant-gallery {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.assistant-gallery img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Certificate modal */
body.modal-open {
    overflow: hidden;
}
.certificate-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}
.certificate-modal.is-open {
    display: flex;
}
.certificate-modal__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(4, 10, 18, 0.86);
    backdrop-filter: blur(8px);
}
.certificate-modal__panel {
    position: relative;
    z-index: 1;
    width: min(96vw, 1100px);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background-color: #0f1b2b;
    border: 1px solid rgba(0, 170, 255, 0.42);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}
.certificate-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background-color: rgba(15, 27, 43, 0.9);
    color: #ffffff;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}
.certificate-modal__close:hover,
.certificate-modal__close:focus-visible {
    border-color: #00aaff;
    color: #00aaff;
    outline: none;
}
.certificate-modal__header {
    padding: 1rem 4rem 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 170, 255, 0.2);
}
.certificate-modal__header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.1rem;
}
.certificate-counter {
    display: inline-block;
    margin-top: 0.2rem;
    color: #9db6cf;
    font-size: 0.9rem;
}
.certificate-modal__body {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 4.25rem;
    background-color: #09101f;
}
#certificate-image {
    max-width: 100%;
    max-height: calc(92vh - 115px);
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}
.certificate-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(0, 170, 255, 0.35);
    border-radius: 50%;
    background-color: rgba(15, 27, 43, 0.86);
    color: #ffffff;
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
}
.certificate-nav:hover,
.certificate-nav:focus-visible {
    background-color: #00aaff;
    color: #0f1b2b;
    outline: none;
}
.certificate-nav--prev {
    left: 0.8rem;
}
.certificate-nav--next {
    right: 0.8rem;
}
.certificate-missing {
    max-width: 620px;
    margin: 0;
    padding: 1.2rem;
    border: 1px dashed rgba(0, 170, 255, 0.55);
    border-radius: 6px;
    color: #d1dce8;
    text-align: center;
    background-color: rgba(0, 170, 255, 0.08);
}

/* Contact */
.contact-info {
    text-align: center;
    margin-top: 1rem;
}
.contact-info a {
    color: #00aaff;
    text-decoration: none;
}
.contact-info a:hover {
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background-color: #09101f;
    padding: 1rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: #64758b;
    border-top: 1px solid #162d47;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero {
        padding-top: 8rem;
    }
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    .hero-images {
        justify-content: center;
    }
    .nav ul {
        gap: 0.8rem;
    }
    .cert-link {
        align-items: flex-start;
        flex-direction: column;
        transform: none;
    }
    .cert-link:hover,
    .cert-link:focus-visible {
        transform: translateY(-3px);
    }
    .certificate-modal {
        padding: 0.5rem;
    }
    .certificate-modal__body {
        min-height: 260px;
        padding: 0.75rem;
    }
    .certificate-nav {
        top: auto;
        bottom: 0.8rem;
        transform: none;
    }
    #certificate-image {
        max-height: calc(92vh - 130px);
    }
    .assistant-grid {
        flex-direction: column;
    }
}
