/* ===================================
   1. Variables & Design System
   =================================== */

   :root {
    /* Colors - Light Theme (Default) */
    --bg-body: #ffffff;
    --bg-surface: #f3f4f6; /* Cool gray 100 */
    --bg-surface-2: #e5e7eb; /* Cool gray 200 */

    --text-primary: #111827; /* Gray 900 */
    --text-secondary: #4b5563; /* Gray 600 */
    --text-tertiary: #9ca3af; /* Gray 400 */

    --accent-primary: #2563eb; /* Blue 600 */
    --accent-glow: rgba(37, 99, 235, 0.15);
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #9333ea 50%, #db2777 100%);

    --border-light: #e5e7eb;
    --border-focus: #2563eb;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1120px;
    --header-height: 80px;

    /* Animation */
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===================================
   1.1. Backgrounds & Decorations
   =================================== */

.bg-grid-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image:
        radial-gradient(var(--text-tertiary) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.07;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

[data-theme="dark"] .bg-grid-pattern {
    opacity: 0.1;
}

.decoration-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

/* Specific blob placements */
.blob-1 {
    top: 10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    animation: floatBlob 20s infinite alternate ease-in-out;
}

.blob-2 {
    top: 40%;
    left: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, #9333ea 0%, transparent 70%); /* Purple */
    animation: floatBlob 25s infinite alternate-reverse ease-in-out;
}

.blob-3 {
    top: 75%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #db2777 0%, transparent 70%); /* Pink */
    animation: floatBlob 22s infinite alternate ease-in-out;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* Tech Particles (Code symbols etc) */
.tech-particle {
    position: absolute;
    color: var(--text-tertiary);
    opacity: 0.1;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    pointer-events: none;
    z-index: -1;
    user-select: none;
}

.tp-1 { top: 15%; left: 10%; font-size: 4rem; animation: floatParticle 10s infinite ease-in-out; }
.tp-2 { top: 25%; right: 15%; font-size: 6rem; animation: floatParticle 14s infinite ease-in-out 1s; }
.tp-3 { top: 55%; left: 5%; font-size: 3rem; animation: floatParticle 12s infinite ease-in-out 2s; }
.tp-4 { top: 65%; right: 8%; font-size: 5rem; animation: floatParticle 16s infinite ease-in-out 0.5s; }
.tp-5 { top: 85%; left: 20%; font-size: 4rem; animation: floatParticle 11s infinite ease-in-out 1.5s; }

@keyframes floatParticle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

[data-theme="dark"] {
    --bg-body: #0a0a0a;
    --bg-surface: #171717; /* Neutral 900 */
    --bg-surface-2: #262626; /* Neutral 800 */

    --text-primary: #f9fafb; /* Gray 50 */
    --text-secondary: #9ca3af; /* Gray 400 */
    --text-tertiary: #6b7280; /* Gray 500 */

    --accent-primary: #60a5fa; /* Blue 400 */
    --accent-glow: rgba(96, 165, 250, 0.15);
    --primary-gradient: linear-gradient(135deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);

    --border-light: #262626;
    --border-focus: #60a5fa;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
}

/* ===================================
   2. Reset & Base
   =================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden; /* Dodatkowe zabezpieczenie przed scrollowaniem na boki */
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    width: 100%; /* Upewnienie się, że body nie wykracza poza viewport */
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===================================
   3. Components
   =================================== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 9999px; /* Pill shape */
    transition: all 0.3s var(--ease-out);
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
    transition: all 0.3s var(--ease-out);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

[data-theme="dark"] .btn-primary {
    background-color: var(--accent-primary);
    color: #ffffff;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background-color: var(--bg-surface);
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

/* Section Headers */
.section-header {
    margin-bottom: 4rem;
    position: relative;
    max-width: 800px;
}

.section-number {
    font-family: var(--font-heading);
    font-size: 10rem;
    font-weight: 800;
    position: absolute;
    top: -5rem;
    left: -2rem;
    z-index: -1;
    line-height: 1;

    /* Gradient Text Style */
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] .section-number {
    opacity: 0.3;
    filter: drop-shadow(0 0 20px rgba(96, 165, 250, 0.2));
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ===================================
   4. Navigation
   =================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 100;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
}

[data-theme="dark"] .nav.scrolled {
    background-color: rgba(10, 10, 10, 0.8);
}

.nav-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.footer-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-link:hover {
    color: var(--accent-primary);
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: background-color 0.2s;
}

.theme-toggle:hover {
    background-color: var(--bg-surface);
}

[data-theme="dark"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon,
:root:not([data-theme]) .moon-icon { display: none; }

/* ===================================
   5. Hero Section
   =================================== */

.hero {
    min-height: 100vh;
    padding-top: var(--header-height);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Background blob/glow effect */
.hero-background-glow {
    position: absolute;
    top: -9%;
    left: 26%;
    transform: translate(-50%, -50%);
    width: 69vw;
    height: 60vw;
    background: radial-gradient(
            circle,
            rgba(99, 102, 241, 0.15) 0%,
            rgba(168, 85, 247, 0.1) 40%,
            transparent 70%
    );
    filter: blur(80px); /* Slightly reduced blur for better mobile visibility */
    z-index: -1;
    pointer-events: none;
}

@media (max-width: 768px) {
    .hero-background-glow {
        width: 90vw;
        height: 90vw;
        opacity: 0.8; /* Boost visibility on mobile */
    }
}

.hero-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 4rem;
    width: 100%;
}


.hero-label {
    font-size: 0.950rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;

    /* Add subtle gradient to label too */
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    line-height: 1.05;
}

.hero-text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(124, 58, 237, 0.15)); /* Subtle glow behind text */
}

.hero-title-accent {
    color: var(--text-tertiary);
    font-weight: 300;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

/* Hero Image Specifics */
.hero-decoration {
    position: relative;
    display: flex;
    justify-content: center;
    z-index: 1;
}

/* Backglow / Shape behind image */
.hero-decoration::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140%;
    height: 120%;
    background: var(--primary-gradient);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    filter: blur(50px);
    opacity: 0.15;
    z-index: -1;
    transform: translate(-50%, -50%) rotate(-10deg);
    pointer-events: none;
    transition: transform 0.8s ease;
}

.hero-decoration:hover::before {
    transform: translate(-50%, -50%) rotate(0deg);
}

.image-wrapper {
    position: relative;
    border-radius: 2rem;
    padding: 1.5px; /* Reduced space for the gradient border */
    background: var(--primary-gradient);
    box-shadow: 0 10px 30px -10px var(--accent-glow); /* Softer shadow */
    overflow: visible;
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);

    /* Layout Changes: Narrower & Tilted */
    max-width: 330px; /* ~15-18% narrower than before */
    transform: rotate(3deg);
    margin: 0 auto;
}

/* Optional glow effect behind - made subtler */
.image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gradient);
    border-radius: 2rem;
    filter: blur(15px); /* Reduced blur */
    opacity: 0.2; /* Reduced opacity */
    z-index: -1;
    transition: opacity 0.3s ease;
}

/* New overlay for gradient effect on hover */
.image-wrapper::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: calc(2rem - 3px);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.25) 0%, transparent 50%);
    opacity: 0;
    z-index: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.image-wrapper:hover::before {
    opacity: 1;
}

[data-theme="dark"] .image-wrapper {
    box-shadow: 0 15px 30px -10px rgba(0,0,0,0.4);
}

.image-wrapper:hover {
    transform: translateY(-5px) rotate(3deg); /* Maintain rotation */
    box-shadow: 0 20px 40px -10px var(--accent-glow);
}

.image-wrapper:hover::after {
    opacity: 0.4;
}

.hero-photo {
    width: 100%;
    /* max-width removed to let wrapper control width */
    height: auto;
    aspect-ratio: 0.8; /* Enforce portrait rectangle */
    object-fit: cover;
    border-radius: calc(2rem - 3px); /* Adjusted inner radius */
    filter: grayscale(100%);
    transition: filter 0.5s ease;
    background-color: var(--bg-surface);
    display: block;
}



/* ===================================
   6. About Section
   =================================== */

.about {
    padding: 8rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text .lead {
    font-size: 1.5rem;
    line-height: 1.4;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.75rem, 3vw, 1.5rem);
}

.stat-card {
    background: var(--bg-surface);
    /* Subtle gradient for depth */
    background: linear-gradient(145deg, var(--bg-surface), var(--bg-body));
    padding: clamp(1.25rem, 4vw, 2rem);
    border-radius: 1.5rem;
    border: 1px solid var(--border-light);
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: transparent; /* Move border to pseudo if needed, or just let shadow do work */
    box-shadow: 0 15px 30px -5px var(--accent-glow);
    background: linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box,
                var(--primary-gradient) border-box;
    border: 1px solid transparent; /* Required for the background clip trick to work as border */
}

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.5rem;

    /* Gradient Text */
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.stat-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: -0.01em;
}

/* ===================================
   7. Skills / Services (Modular Tech Grid)
   =================================== */

.skills {
    padding: 6rem 0;
    position: relative;
    /* Optional: background pattern override if needed,
       but usually inherited from body/fixed bg is fine */
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Make the first card span 2 columns on larger screens */
@media (min-width: 768px) {
    .skill-card.span-2 {
        grid-column: span 2;
    }
}

.skill-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    transition: all 0.3s var(--ease-out);
    display: flex;
    flex-direction: column;
}

/* Hover Effect: Lift & Border Glow */
.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px -10px var(--accent-glow);
}

/* ===================================
   7. Skills / Services (Glossy Glass Grid)
   =================================== */

.skills {
    padding: 6rem 0;
    position: relative;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

/* Compact Span for the main card */
@media (min-width: 900px) {
    .skill-card.span-2 {
        grid-column: span 2;
    }
}

.skill-card {
    background: var(--bg-surface);
    background: linear-gradient(145deg, var(--bg-surface), var(--bg-body));
    border: 1px solid var(--border-light);
    border-radius: 1.5rem;
    overflow: hidden;
    position: relative;
    transition: all 0.3s var(--ease-out);
    display: flex;
    flex-direction: column;
}

/* Hover Effect spójny z sekcją 01 (stat-card) */
.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -5px var(--accent-glow);
    background: linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box,
                var(--primary-gradient) border-box;
    border: 1px solid transparent;
}

/* Usunięcie starego glass-reflection, bo sekcja 01 go nie używa */
.glass-reflection {
    display: none;
}

/* Card Content */
.card-content {
    padding: 2.25rem;
    z-index: 2;
    flex-grow: 1;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-icon-wrapper.glossy {
    width: 48px;
    height: 48px;
    background-color: var(--bg-body);
    color: var(--accent-primary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.skill-card:hover .card-icon-wrapper.glossy {
    background-color: var(--accent-primary);
    color: #ffffff;
    border-color: var(--accent-primary);
    transform: scale(1.1) rotate(3deg);
}

.availability-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-surface-2);
}

.skill-card:hover .availability-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.skill-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.skill-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

/* Prosta Lista Tekstowa */
.skill-list-simple {
    list-style: none;
    margin-top: auto;
    padding-top: 0.5rem;
}

.skill-list-simple li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

.skill-list-simple li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 8px;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 2px;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.skill-card:hover .skill-list-simple li {
    color: var(--text-primary);
}

.skill-card:hover .skill-list-simple li::before {
    width: 12px;
    opacity: 1;
}

/* Usunięcie starych stylów benefit-list-compact */

/* ===================================
   8. Projects / Process (Timeline)
   =================================== */

.timeline-section {
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 4rem auto 0;
    padding: 2rem 0;
}

/* Vertical Line */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--border-light) 10%,
        var(--border-light) 90%,
        transparent 100%
    );
    z-index: 1;
}

.timeline-item {
    position: relative;
    display: flex;
    justify-content: flex-end;
    padding-bottom: 6rem;
    width: 50%;
    padding-right: 4rem;
    margin-left: 0;
    z-index: 2;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

/* Alternating items - Even items go right */
.timeline-item:nth-child(even) {
    justify-content: flex-start;
    margin-left: 50%;
    padding-left: 4rem;
    padding-right: 0;
}

.timeline-item:nth-child(odd) {
    text-align: right;
}

/* Marker / Dot - Improved Centering & Design */
.timeline-marker {
    position: absolute;
    top: 2.5rem;
    right: -10px; /* (Width 20px / 2) = Exactly on the center line */
    width: 20px;
    height: 20px;
    background: var(--primary-gradient);
    border: 4px solid var(--bg-body);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 0 2px var(--accent-primary);
    transition: all 0.4s var(--ease-out);
}

.timeline-item:nth-child(even) .timeline-marker {
    left: -10px;
    right: auto;
}

/* State changes */
.timeline-item:hover .timeline-marker {
    transform: scale(1.3);
    box-shadow: 0 0 0 4px var(--bg-body), 0 0 20px var(--accent-glow);
}

/* Content Card */
.timeline-content {
    background: var(--bg-surface);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border-light);
    transition: all 0.4s var(--ease-out);
    width: 100%;
    position: relative;
    box-shadow: var(--shadow-sm);
}

/* Optional Glassmorphism for modern feel */
@supports (backdrop-filter: blur(10px)) {
    .timeline-content {
        background: rgba(255, 255, 255, 0.5); /* Light mode fallback */
        backdrop-filter: blur(12px);
    }
    [data-theme="dark"] .timeline-content {
        background: rgba(23, 23, 23, 0.5);
    }
}

.timeline-content:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.timeline-date {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.timeline-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.timeline-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Tags in content */
.timeline-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.timeline-item:nth-child(odd) .timeline-tags {
    justify-content: flex-start;
}

.tech-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 99px;
    background-color: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.timeline-content:hover .tech-tag {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ===================================
   8.5. FAQ Section
   =================================== */

.faq-section {
    padding: 6rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s var(--ease-out);
}

.faq-item:hover {
    border-color: var(--accent-primary);
}

.faq-item[open] {
    background-color: var(--bg-body);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.faq-question {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-primary);
    list-style: none; /* Hide default triangle */
}

/* Hide default marker in Safari/Chrome */
.faq-question::-webkit-details-marker {
    display: none;
}

.chevron {
    color: var(--text-tertiary);
    transition: transform 0.3s var(--ease-out), color 0.3s ease;
}

.faq-item[open] .chevron {
    transform: rotate(180deg);
    color: var(--accent-primary);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
    animation: slideDown 0.3s var(--ease-out);
    font-size: 0.95rem;
}

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

/* ===================================
   9. Contact
   =================================== */

.contact {
    padding: 6rem 0 8rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: stretch;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-text-brief {
    margin-bottom: 1rem;
}

.contact-text-brief .lead {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.contact-text-brief p:not(.lead) {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.125rem;
    font-weight: 500;
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background-color: var(--bg-surface);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-link svg {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.contact-link:hover svg {
    color: var(--accent-primary);
}

/* Form Styles */
.contact-form-container {
    background: var(--bg-surface);
    background: linear-gradient(145deg, var(--bg-surface), var(--bg-body));
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group:has(textarea) {
    flex-grow: 1;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background-color: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control::placeholder {
    color: var(--text-tertiary);
    opacity: 0.6;
}

textarea.form-control {
    resize: none;
    flex-grow: 1;
    min-height: 150px;
}

.form-success-message {
    text-align: center;
    padding: 2rem 1rem;
    animation: fadeIn 0.5s ease forwards;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 20px -5px var(--accent-glow);
}

.form-success-message h3 {
    margin-bottom: 0.75rem;
}

.form-success-message p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

/* ===================================
   10. Footer
   =================================== */

.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-light);
    font-size: 0.875rem;
    color: var(--text-tertiary);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ===================================
   11. Animations
   =================================== */

.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s var(--ease-out) forwards;
}

.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }
.fade-in-up:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   12. Mobile Responsive
   =================================== */

@media (max-width: 900px) {
    .nav {
        height: auto;
        padding: 0.5rem 0;
    }

    .nav-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-logo {
        margin-right: auto;
        margin-bottom: 0.5rem;
    }

    .footer-logo {
        margin-bottom: 0.5rem;
    }

    .theme-toggle {
        position: absolute;
        top: 1rem;
        right: 1.5rem;
    }

    .nav-links {
        display: flex;
        gap: 1.5rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
        margin-top: 2rem;
    }

    .hero-content {
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-decoration {
        order: 1;
    }

    .hero-cta {
        justify-content: center;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .section-number {
        font-size: 6rem;
        top: -3rem;
        left: 0;
    }

    .project-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .project-number {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        opacity: 0.6;
    }

    /* Timeline Mobile */
    .timeline::before {
        left: 20px;
        transform: none;
    }

    .timeline-item {
        width: 100% !important;
        margin-left: 0 !important;
        padding-left: 3.5rem !important;
        padding-right: 0 !important;
        justify-content: flex-start !important;
        text-align: left !important;
        padding-bottom: 3rem;
    }

    .timeline-item:nth-child(even) {
        margin-left: 0 !important;
    }

    .timeline-marker {
        left: 10px !important;
        right: auto !important;
    }

    .timeline-item:nth-child(odd) .timeline-tags {
        justify-content: flex-start;
    }

    /* Hero photo - reduce size by 25% on mobile */
    .hero-photo {
        max-width: 300px;
    }

    /* Fix for blobs and particles causing horizontal overflow on mobile */
    .blob-1, .blob-2, .blob-3, .tech-particle {
        display: none;
    }

    .hero-background-glow {
        width: 100vw;
        left: 50%;
        transform: translate(-50%, -50%);
        filter: blur(40px);
        opacity: 0.8;
    }
}

/* ===================================
   Pricing Section
   =================================== */

.pricing-section {
    padding: 8rem 0;
}

.section-subtitle {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.pricing-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 2.5rem;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

/* Wyróżnienie środkowej karty (Popular) */
.pricing-card.popular {
    border-color: var(--accent-primary);
    background: linear-gradient(180deg, var(--accent-glow) 0%, var(--bg-surface) 100%);
    box-shadow: 0 0 0 1px var(--accent-primary); /* Podwójna ramka */
}

.badge-popular {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-primary);
    color: white; /* Ustawione na sztywno, bo na niebieskim tle tekst musi być biały */
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.pricing-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.pricing-price .currency {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-tertiary);
    vertical-align: super;
}

.pricing-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.pricing-features {
    flex-grow: 1;
    margin-bottom: 2rem;
}

.pricing-features li {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.pricing-features .check {
    color: var(--accent-primary);
    font-weight: bold;
    flex-shrink: 0;
}

.full-width {
    width: 100%;
}

/* Sekcja Maintenance */
.pricing-maintenance {
    background-color: var(--bg-surface);
    border: 1px dashed var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.maintenance-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.maintenance-content p {
    font-size: 1rem;
    color: var(--text-secondary);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    font-weight: 600;
    transition: gap 0.2s ease;
}

.link-arrow:hover {
    gap: 0.75rem;
}

.link-arrow::after {
    content: '→';
}

/* ===================================
   Custom Adjustments
   =================================== */

/* Reorder Pricing Cards on Desktop (Start package in the middle) */
@media (min-width: 901px) {
    .pricing-grid .pricing-card:nth-child(1) { order: 2; } /* Start/Popular -> Middle */
    .pricing-grid .pricing-card:nth-child(2) { order: 1; } /* Firma -> Left */
    .pricing-grid .pricing-card:nth-child(3) { order: 3; } /* Custom -> Right */
}

/* Fix "Indywidualnie" text overflow */
.pricing-grid .pricing-card:nth-child(3) .pricing-price {
    font-size: 2rem;
    word-break: break-all; /* Ensure it doesn't break layout on very small screens */
}
@media (max-width: 380px) {
    .pricing-grid .pricing-card:nth-child(3) .pricing-price {
        font-size: 1.6rem;
    }
}
