/* ==========================================================================
   QA Portfolio — Dariusz Krawętkowski
   Static stylesheet (no editing UI)
   ========================================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: #000000;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(107, 70, 193, 0.15) 0%, transparent 50%),
        linear-gradient(180deg, #000000 0%, #05000a 100%);
    background-attachment: fixed;
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Background — circuit board pattern
   -------------------------------------------------------------------------- */

.circuit-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(90deg, rgba(139, 92, 246, 0.12) 1px, transparent 1px),
        linear-gradient(rgba(139, 92, 246, 0.12) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.5;
}

.circuit-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(168, 85, 247, 0.25) 2px, transparent 2px),
        radial-gradient(circle at 55% 35%, rgba(139, 92, 246, 0.25) 2px, transparent 2px),
        radial-gradient(circle at 35% 65%, rgba(147, 51, 234, 0.25) 2px, transparent 2px),
        radial-gradient(circle at 75% 25%, rgba(168, 85, 247, 0.25) 2px, transparent 2px),
        radial-gradient(circle at 85% 75%, rgba(139, 92, 246, 0.25) 2px, transparent 2px);
    background-size: 250px 250px;
}

.circuit-bg::after {
    content: '';
    position: absolute;
    top: 80px;
    left: 150px;
    width: 100px;
    height: 100px;
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 2px;
    box-shadow:
        0 0 10px rgba(139, 92, 246, 0.3),
        250px 150px 0 -1px rgba(139, 92, 246, 0.4),
        250px 150px 0 0 rgba(139, 92, 246, 0.2),
        500px 300px 0 -1px rgba(139, 92, 246, 0.4),
        500px 300px 0 0 rgba(139, 92, 246, 0.2),
        150px 400px 0 -1px rgba(139, 92, 246, 0.4),
        150px 400px 0 0 rgba(139, 92, 246, 0.2);
}

.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.7;
    animation: float 30s ease-in-out infinite;
}

.bg-shape-1 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    top: 5%;
    left: -15%;
    animation-delay: 0s;
}

.bg-shape-2 {
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, #6b46c1 0%, transparent 70%);
    top: 40%;
    right: -20%;
    animation-delay: 7s;
}

.bg-shape-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #a78bfa 0%, transparent 70%);
    bottom: -15%;
    left: 25%;
    animation-delay: 14s;
}

.bg-shape-4 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #9333ea 0%, transparent 70%);
    top: 25%;
    left: 55%;
    animation-delay: 10s;
}

.bg-shape-5 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
    bottom: 15%;
    right: 15%;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    25% {
        transform: translate(40px, -60px) scale(1.15) rotate(90deg);
    }
    50% {
        transform: translate(-30px, 30px) scale(0.85) rotate(180deg);
    }
    75% {
        transform: translate(20px, 40px) scale(1.05) rotate(270deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bg-shape {
        animation: none;
    }
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 60px 80px 60px;
    position: relative;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
    margin-bottom: 60px;
}

.header-name {
    font-size: 42px;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 2px;
    color: #ffffff;
}

.header-portfolio {
    font-size: 21px;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.1;
    color: #a78bfa;
}

/* --------------------------------------------------------------------------
   Bio
   -------------------------------------------------------------------------- */

.bio-section {
    margin-bottom: 60px;
    max-width: 100%;
}

.bio-text {
    font-size: 21px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: -0.01em;
    word-break: break-word;
    text-indent: 3em;
    max-width: 100%;
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   Section heading
   -------------------------------------------------------------------------- */

.testcase-examples-header {
    margin-bottom: 40px;
}

.testcase-examples-title {
    font-size: 28px;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #ffffff;
    line-height: 1.1;
}

.qa-section-title {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: #a78bfa;
    margin-bottom: 24px;
}

.qa-section-title-right {
    text-align: right;
}

/* --------------------------------------------------------------------------
   QA blocks — photo + test case list
   -------------------------------------------------------------------------- */

.qa-block {
    margin-bottom: 60px;
}

.qa-row {
    display: flex;
    gap: 40px;
    align-items: stretch;
}

.qa-row-left-photo {
    flex-direction: row;
}

.qa-row-right-photo {
    flex-direction: row-reverse;
}

/* Photo */
.qa-photo-col {
    flex: 0 1 35%;
    max-width: 35%;
}

.qa-photo-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, #1a0b2e 0%, #0a0a0a 50%, #2d1b4e 100%);
    border: 1px solid #6b46c1;
    transition: border-color 0.2s ease;
}

.qa-photo-wrapper:hover {
    border-color: #8b5cf6;
}

.qa-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* List */
.qa-list-col {
    flex: 0 1 65%;
    max-width: 65%;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.qa-list-wrapper {
    position: relative;
    border: 1px solid #6b46c1;
    flex: 1 1 0;
    height: 0;
    min-height: 0;
    overflow: hidden;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(10px);
}

.qa-list-scroll {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 0;
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 rgba(10, 10, 10, 0.5);
}

.qa-list-scroll::-webkit-scrollbar {
    width: 6px;
}

.qa-list-scroll::-webkit-scrollbar-track {
    background: rgba(10, 10, 10, 0.5);
}

.qa-list-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6b46c1 0%, #8b5cf6 100%);
    border-radius: 0;
}

.qa-list-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 20px;
    list-style: none;
}

.qa-testcase-item {
    border: 1px solid #6b46c1;
    padding: 0;
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    background: rgba(17, 17, 17, 0.8);
    line-height: 1.4;
    word-break: break-word;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.qa-testcase-item:hover {
    border-color: #8b5cf6;
    background: rgba(30, 20, 50, 0.85);
}

/* Visual-only checklist */

.qa-check {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
}

/* Input pokrywa całą etykietę (opacity 0), więc fokus nigdy nie przewija listy. */
.qa-check-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.qa-check-box {
    position: relative;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border: 1px solid #8b5cf6;
    border-radius: 2px;
    background: rgba(10, 10, 10, 0.6);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.qa-check-box::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transform-origin: center;
    opacity: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.qa-check:hover .qa-check-box {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.qa-check-input:focus-visible + .qa-check-box {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
}

.qa-check-input:checked + .qa-check-box {
    background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    border-color: #a78bfa;
}

.qa-check-input:checked + .qa-check-box::after {
    transform: rotate(45deg) scale(1);
    opacity: 1;
}

.qa-check-text {
    flex: 1;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.qa-check-input:checked ~ .qa-check-text {
    color: #c4b5fd;
    text-decoration: line-through;
    text-decoration-color: rgba(196, 181, 253, 0.6);
}

.qa-list-fade-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0) 100%);
    pointer-events: none;
    z-index: 2;
}

.qa-list-fade-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0) 100%);
    pointer-events: none;
    z-index: 2;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .page-container {
        padding: 40px 40px 60px 40px;
    }

    .bio-text {
        font-size: 18px;
    }

    .header-name {
        font-size: 36px;
    }

    .header-portfolio {
        font-size: 18px;
    }

    .qa-row {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 30px 24px 50px 24px;
    }

    .header-name {
        font-size: 32px;
    }

    .header-portfolio {
        font-size: 16px;
    }

    .bio-section {
        margin-bottom: 40px;
    }

    .testcase-examples-header {
        margin-bottom: 30px;
    }

    .testcase-examples-title {
        font-size: 24px;
    }

    .qa-section-title {
        font-size: 18px;
        margin-bottom: 18px;
    }

    .bio-text {
        font-size: 15px;
        text-indent: 2em;
    }

    .qa-block {
        margin-bottom: 40px;
    }

    .qa-row {
        flex-direction: column;
        gap: 24px;
    }

    .qa-photo-col,
    .qa-list-col {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
    }

    .qa-list-col {
        display: block;
    }

    .qa-list-wrapper {
        flex: none;
        height: 320px;
    }
}

@media (max-width: 480px) {
    .header-name {
        font-size: 28px;
    }

    .header-portfolio {
        font-size: 14px;
    }

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

    .testcase-examples-header {
        margin-bottom: 24px;
    }

    .testcase-examples-title {
        font-size: 22px;
    }

    .qa-section-title {
        font-size: 16px;
        margin-bottom: 14px;
    }

    .bio-text {
        font-size: 14px;
        text-indent: 1.5em;
    }

    .qa-block {
        margin-bottom: 30px;
    }

    .qa-testcase-item {
        font-size: 13px;
    }

    .qa-check {
        padding: 10px 14px;
        gap: 10px;
    }
}
