* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    background-color: #1e1e1e;
    color: #d9d9d9;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('M-bg.png') center / min(1300px, 95vw) no-repeat;
    opacity: 0.035;
    pointer-events: none;
}

.main-content {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 16px 40px;
    font-size: 13px;
    color: #888;
}

.brand {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
}

.brand-logo {
    height: 26px;
    width: auto;
}

.brand-name {
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
}

.home-page {
    scrollbar-width: none;
    display: flex;
    flex: 1;
    padding: 20px 40px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.home-page::-webkit-scrollbar {
    display: none;
}

.line-numbers {
    display: flex;
    flex-direction: column;
    text-align: right;
    min-width: 15px;
    padding-right: 20px;
    border-right: 1px solid #2b2b2b;
    color: #5a5a5a;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.8;
    user-select: none;
}

.content {
    padding: 0 60px;
    flex: 1;
    max-width: 1560px;
    margin: 0 auto;
}

.content p {
    font-size: 20px;
    line-height: 1.8;
    margin-bottom: 24px;
    color: #d9d9d9;
    max-width: 1440px;
    text-align: justify;
}

#about,
#projects,
#stats,
#contact {
    padding-top: 140px;
}

#web-design,
#automation,
#ai-integration,
#e-commerce,
#game-development {
    margin-top: 48px;
}

#contact {
    padding-bottom: 140px;
}

.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
    min-height: calc(100dvh - 100px);
    padding-bottom: 60px;
    text-align: center;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: #ffffff;
    margin-bottom: 24px;
}

.content .hero-subtitle {
    font-size: 20px;
    line-height: 1.7;
    color: #aaaaaa;
    max-width: 720px;
    margin: 0 auto 48px;
    text-align-last: center;
}

.contact-card.hero-cta {
    display: inline-flex;
    padding-right: 28px;
}

.hero-cta .contact-platform {
    margin-bottom: 0;
}

.cta-arrow {
    margin-left: 12px;
    color: #555555;
    transition: transform 0.3s ease, color 0.3s ease;
}

.hero-cta:hover .cta-arrow {
    color: #7fdcfb;
    transform: translateX(4px);
}

.scroll-arrow {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    padding: 8px 16px;
    font-size: 30px;
    color: #7fdcfb;
    text-decoration: none;
}

.scroll-arrow i {
    display: block;
    animation: arrow-bounce 2.8s ease-in-out infinite;
}

@keyframes arrow-bounce {
    0%   { transform: translateY(0); }
    7%   { transform: translateY(-12px); }
    14%  { transform: translateY(0); }
    21%  { transform: translateY(-8px); }
    28%  { transform: translateY(0); }
    100% { transform: translateY(0); }
}

.scrollbar {
    position: fixed;
    top: 24px;
    bottom: 24px;
    right: 14px;
    width: 14px;
    display: flex;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
}

.scrollbar::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    border-radius: 2px;
    background-color: #2b2b2b;
    transition: background-color 0.3s ease;
}

.scrollbar-thumb {
    position: relative;
    width: 4px;
    border-radius: 4px;
    background-color: rgba(127, 220, 251, 0.35);
    transition: width 0.2s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.scrollbar:hover::before {
    background-color: #333333;
}

.scrollbar:hover .scrollbar-thumb,
.scrollbar.is-active .scrollbar-thumb {
    width: 6px;
    background-color: #7fdcfb;
    box-shadow: 0 0 10px rgba(127, 220, 251, 0.5);
}

.scrollbar.is-hidden {
    display: none;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.is-locked {
    position: relative;
}

.locked-overlay {
    position: absolute;
    inset: -6px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(37, 37, 38, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid #3c3c3c;
    border-radius: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    letter-spacing: 1px;
    color: #d9d9d9;
    cursor: not-allowed;
}

.project-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #252526;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.project-card:hover {
    transform: translateY(-2px);
}

.more-card {
    justify-content: center;
    gap: 12px;
    color: #888888;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.more-card:hover {
    transform: translateY(-5px);
    color: #7fdcfb;
    border-color: #7fdcfb;
    background-color: rgba(127, 220, 251, 0.03);
}

.card-content {
    position: relative;
    z-index: 1;
}

.project-title {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 8px;
    font-weight: 600;
}

.project-status {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #aaaaaa;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.green { background-color: #4CAF50; box-shadow: 0 0 8px rgba(76, 175, 80, 0.5); }
.status-dot.yellow { background-color: #FFC107; box-shadow: 0 0 8px rgba(255, 193, 7, 0.5); }
.status-dot.blue { background-color: #2196F3; box-shadow: 0 0 8px rgba(33, 150, 243, 0.5); }
.status-dot.red { background-color: #F44336; box-shadow: 0 0 8px rgba(244, 67, 54, 0.5); }

.card-logo {
    position: absolute;
    right: 20%;
    bottom: -35px;
    font-size: 130px;
    color: rgba(127, 220, 251, 0.08);
    transform: rotate(-15deg);
    z-index: 0;
    pointer-events: none;
    transition: transform 0.4s ease;
}

.project-card:hover .card-logo {
    transform: rotate(0deg) scale(1.1);
}

.card-actions {
    position: relative;
    z-index: 1;
}

.like-btn {
    background: none;
    border: 1px solid #444;
    color: #888;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.like-btn:hover {
    color: #7fdcfb;
    border-color: #7fdcfb;
}

.like-btn.is-liked {
    color: #1e1e1e;
    border-color: #7fdcfb;
    background-color: #7fdcfb;
}

.stats-grid {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 20px;
}

.stat-box {
    flex: 1;
    background-color: #252526;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.stat-box:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 46px;
    font-weight: 700;
    color: #7fdcfb;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
}

.stat-title {
    font-size: 15px;
    color: #aaaaaa;
    font-weight: 500;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: #252526;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 16px 20px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.contact-icon {
    width: 48px;
    height: 48px;
    background-color: #1e1e1e;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #aaaaaa;
    transition: all 0.3s ease;
}

.r10-icon {
    font-size: 16px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.5px;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-platform {
    font-size: 15px;
    font-weight: 600;
    color: #d9d9d9;
    margin-bottom: 3px;
    transition: color 0.3s ease;
}

.contact-handle {
    font-size: 13px;
    color: #777777;
    transition: color 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: #7fdcfb;
    background-color: rgba(127, 220, 251, 0.03);
}

.contact-card:hover .contact-icon {
    background-color: #7fdcfb;
    color: #1e1e1e;
    box-shadow: 0 0 15px rgba(127, 220, 251, 0.4);
}

.contact-card:hover .contact-platform {
    color: #7fdcfb;
}

.contact-card:hover .contact-handle {
    color: #aaaaaa;
}

.blue {
    color: #7fdcfb;
}

.green {
    color: #b6ce9f;
}

.orange {
    color: #cc9066;
}

.content h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 400;
    color: #6a9955;
    margin-bottom: 32px;
    letter-spacing: 0.5px;
    text-transform: lowercase;
}

.content h2::before {
    content: "// ";
}

.content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #cc9066;
    margin-bottom: 16px;
    text-transform: lowercase;
}

.content h3::before {
    content: "> ";
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(10, 10, 10, 0.8);
    animation: modal-fade 0.2s ease-out;
}

.modal-window {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1180px, 92vw);
    height: min(880px, 88vh);
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: modal-rise 0.22s ease-out;
    will-change: transform, opacity;
}

@keyframes modal-fade {
    from { opacity: 0; }
}

@keyframes modal-rise {
    from { opacity: 0; transform: translateY(16px); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid #2b2b2b;
}

.modal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #808080;
    text-transform: lowercase;
}

.modal-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #252526;
    border: 1px solid #333;
    border-radius: 10px;
    color: #aaaaaa;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn:hover {
    color: #7fdcfb;
    border-color: #7fdcfb;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 36px 44px 48px;
    scrollbar-width: thin;
    scrollbar-color: #3c3c3c transparent;
}

.modal-body p {
    font-size: 16px;
    line-height: 1.8;
    color: #d9d9d9;
    text-align: justify;
    margin-bottom: 16px;
}

.modal-heading {
    font-size: 26px;
    font-weight: 600;
    color: #cc9066;
    text-transform: lowercase;
    margin-bottom: 8px;
}

.modal-heading::before {
    content: "> ";
}

.modal-body .modal-subheading {
    color: #808080;
    margin-bottom: 28px;
}

.product-top {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 44px;
}

.gallery-main {
    position: relative;
    aspect-ratio: 16 / 10;
    background-color: #252526;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
}

.gallery-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.gallery-slide.is-active {
    opacity: 1;
}

.gallery-slide img,
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: linear-gradient(135deg, #252526, #2d2d30);
    color: #5a5a5a;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
}

.gallery-placeholder i {
    font-size: 96px;
    color: rgba(127, 220, 251, 0.2);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #3c3c3c;
    background-color: rgba(30, 30, 30, 0.75);
    color: #aaaaaa;
    cursor: pointer;
    z-index: 1;
    transition: all 0.2s;
}

.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }

.gallery-nav:hover {
    color: #7fdcfb;
    border-color: #7fdcfb;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.gallery-thumb {
    aspect-ratio: 16 / 10;
    padding: 0;
    background: none;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.55;
    transition: all 0.2s;
}

.gallery-thumb .gallery-placeholder {
    font-size: 0;
    gap: 0;
}

.gallery-thumb .gallery-placeholder i {
    font-size: 24px;
}

.gallery-thumb:hover,
.gallery-thumb.is-active {
    opacity: 1;
    border-color: #7fdcfb;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-category {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #cc9066;
    text-transform: lowercase;
}

.product-category::before {
    content: "> ";
}

.product-title {
    font-size: 34px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.modal-body .product-summary {
    color: #aaaaaa;
    margin-bottom: 0;
}

.product-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 15px;
    color: #d9d9d9;
}

.product-features i {
    color: #7fdcfb;
    margin-right: 10px;
}

.product-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.quote-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background-color: rgba(127, 220, 251, 0.08);
    border: 1px solid #7fdcfb;
    border-radius: 10px;
    color: #7fdcfb;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.quote-btn:hover {
    background-color: #7fdcfb;
    color: #1e1e1e;
    box-shadow: 0 0 18px rgba(127, 220, 251, 0.4);
}

.like-btn.like-btn-large {
    padding: 14px 22px;
    border-radius: 10px;
    font-size: 15px;
}

.product-section {
    margin-top: 56px;
}

.modal-section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 400;
    color: #6a9955;
    text-transform: lowercase;
    margin-bottom: 20px;
}

.modal-section-title::before {
    content: "// ";
}

@media (pointer: coarse) {
    .scrollbar {
        display: none;
    }
}

@media (max-width: 1200px) {
    .content {
        padding: 0 40px;
    }

    .hero-title {
        font-size: 48px;
    }
}

@media (max-width: 900px) {
    .top-bar {
        padding: 14px 24px;
    }

    .home-page {
        padding: 16px 32px;
    }

    .last-update,
    .line-numbers {
        display: none;
    }

    .content {
        padding: 0;
    }

    .hero-title {
        font-size: 40px;
    }

    .content .hero-subtitle,
    .content p {
        font-size: 18px;
    }

    #about,
    #projects,
    #stats,
    #contact {
        padding-top: 100px;
    }

    #contact {
        padding-bottom: 100px;
    }

    .modal-window {
        width: 94vw;
        height: 90vh;
        height: 90dvh;
    }

    .modal-body {
        padding: 28px 28px 40px;
    }

    .product-top {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 600px) {
    .top-bar {
        padding: 12px 24px;
    }

    .home-page {
        padding: 12px 24px;
    }

    .brand {
        gap: 12px;
    }

    .brand-logo {
        height: 22px;
    }

    .brand-name {
        font-size: 15px;
    }

    .hero-title {
        font-size: 32px;
        letter-spacing: 0;
    }

    .content .hero-subtitle {
        font-size: 16px;
        margin-bottom: 36px;
        text-align: center;
    }

    .content p {
        font-size: 16px;
    }

    .content h2 {
        font-size: 17px;
        margin-bottom: 20px;
    }

    .content h3 {
        font-size: 17px;
    }

    #about,
    #projects,
    #stats,
    #contact {
        padding-top: 72px;
    }

    #contact {
        padding-bottom: 72px;
    }

    #web-design,
    #automation,
    #ai-integration,
    #e-commerce,
    #game-development {
        margin-top: 32px;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .project-grid.is-locked > .project-card:nth-child(n + 3) {
        display: none;
    }

    .project-card {
        padding: 16px;
    }

    .project-title {
        font-size: 16px;
    }

    .card-logo {
        font-size: 100px;
    }

    .locked-overlay {
        font-size: 16px;
    }

    .stats-grid {
        flex-direction: column;
        gap: 14px;
    }

    .stat-box {
        padding: 22px 16px;
    }

    .stat-number {
        font-size: 38px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .modal-window {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        border: none;
        border-radius: 0;
    }

    .modal-header {
        padding: 10px 12px;
    }

    .modal-title {
        font-size: 12px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .modal-body {
        padding: 20px 24px 32px;
    }

    .modal-heading {
        font-size: 21px;
    }

    .product-title {
        font-size: 26px;
    }

    .gallery-placeholder i {
        font-size: 64px;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-actions {
        flex-wrap: wrap;
    }

    .modal-body p {
        font-size: 15px;
    }

    .product-section {
        margin-top: 40px;
    }
}
