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

:root {
    --background: #f5f7fa;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e9edf2;
    --primary: #0f172a;
    --radius: 12px;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.10);
    --container: 1100px;
    --transition: 0.25s ease;
}


body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}


.hero {
    max-width: var(--container);
    margin: 0 auto;
    padding: 60px 20px 40px;
    text-align: center;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 16px;
    font-weight: 400;
}

.hero .description {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-light);
    font-size: 1.05rem;
}


main {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px 60px;
}


section {
    margin-top: 60px;
    padding-top: 50px;
    border-top: 1px solid var(--border);
}

section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

section>.description {
    color: var(--text-light);
    margin-bottom: 28px;
    font-size: 1.05rem;
    max-width: 80%;
}

.sub-title {
    margin: 32px 0 16px;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: -0.01em;
}


.technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.technology {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.technology:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.gallery-wrapper {
    position: relative;
    margin-top: 8px;
}

.gallery {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 12px 0 20px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #edf2f7;
    -webkit-overflow-scrolling: touch;
}

.gallery::-webkit-scrollbar {
    height: 8px;
}

.gallery::-webkit-scrollbar-track {
    background: #edf2f7;
    border-radius: 20px;
}

.gallery::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 20px;
    transition: var(--transition);
}

.gallery::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.gallery article {
    min-width: 420px;
    max-width: 420px;
    flex-shrink: 0;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.gallery article:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.gallery img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform var(--transition);
}

.gallery img:hover {
    transform: scale(1.02);
}

.image-title {
    padding: 16px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--surface);
}

.gallery-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--surface);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    color: var(--text);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
    user-select: none;
}

.gallery-button:hover:not(.hidden) {
    background: #f8fafc;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
    transform: translateY(-50%) scale(1.05);
}

.gallery-button:active:not(.hidden) {
    transform: translateY(-50%) scale(0.95);
}

.gallery-button.left {
    left: -22px;
}

.gallery-button.right {
    right: -22px;
}

.gallery-button.hidden {
    display: none;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9999;
    padding: 20px;
    cursor: pointer;
}

.lightbox.show {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 92%;
    max-height: 92%;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: default;
    transition: transform 0.2s ease;
    object-fit: contain;
}

.footer {
    text-align: center;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    margin-top: 60px;
    padding: 35px 20px;
    font-size: 0.95rem;
}

@media (max-width: 1024px) {
    .gallery-button.left {
        left: 4px;
    }

    .gallery-button.right {
        right: 4px;
    }

    .gallery-button {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .hero .description {
        font-size: 0.95rem;
    }

    section h2 {
        font-size: 1.6rem;
    }

    section>.description {
        max-width: 100%;
        font-size: 0.95rem;
    }

    .gallery article {
        min-width: calc(100% - 20px);
        max-width: calc(100% - 20px);
    }

    .gallery-button {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .gallery-button.left {
        left: 6px;
    }

    .gallery-button.right {
        right: 6px;
    }

    .gallery img {
        height: 180px;
    }

    .image-title {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero {
        padding: 40px 16px 30px;
    }

    main {
        padding: 0 16px 40px;
    }

    section {
        margin-top: 40px;
        padding-top: 30px;
    }

    .gallery article {
        min-width: calc(100% - 8px);
        max-width: calc(100% - 8px);
    }

    .gallery-button {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
}