/* Font Face Declarations */
@font-face {
    font-family: 'Montserrat';
    src: url('ArtAssets/fonts/Montserrat/Montserrat-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('ArtAssets/fonts/Montserrat/Montserrat-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #2D1B69 0%, #1A0B3D 50%, #0F0529 100%);
    background-attachment: fixed;
    color: white;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    padding: 20px 0;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 45px;
    text-transform: lowercase;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #FFE1FA;
}

/* Hero Section */
.hero {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
}

.hero-text-container {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.hero-gleb {
    width: auto;
    height: auto;
}

.hero-subtitle {
    width: auto;
    height: auto;
    margin-left: 20px;
}

.hero-surname {
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Section Styles */
section {
    padding: 20px 0;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #FFE1FA;
    text-transform: lowercase;
}

/* About Me Section */

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-size: 18px;
    line-height: 1.8;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
}

/* Skills Section */
.skills-subsection {
    margin-bottom: 20px;
}

.subsection-title {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: -20px;
    color: white;
    text-transform: lowercase;
}

.skills-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 216px 288px;
    margin-bottom: -50px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.skills-container .subsection-title {
    margin-bottom: 0;
    align-self: center;
    font-size: 2rem;
    font-weight: 700;
    margin-top: -120px;
    margin-bottom: 120px;
}

.skills-container .skill-items {
    display: flex;
    gap: 200px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: baseline;
}

.skills-container-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.skill-item {
    text-align: center;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    align-self: flex-start;
}

.skill-icon-img {
    width: auto;
    height: auto;
    margin: 0 auto 15px;
    display: block;
}

.skill-item:nth-child(2) .skill-icon-img {
    margin-top: -30px;
}

.skill-name {
    font-size: 30px;
    font-weight: 400;
    color: white;
    margin-bottom: 8px;
}

.skill-years {
    font-size: 30px;
    font-weight: 700;
    color: white;
}

.tech-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px 0px;
    padding: 116px 144px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    justify-items: center;
}

.tech-item:nth-child(4) {
    grid-column: 2;
}

.tech-item:nth-child(5) {
    grid-column: 3;
}

.tech-item:nth-child(6) {
    grid-column: 2;
    margin-left: -200px;
}

.tech-item:nth-child(7) {
    grid-column: 3;
    margin-left: -200px;
}

.tech-item:nth-child(8) {
    grid-column: 1;
}

.tech-grid .subsection-title {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 0;
    font-size: 2rem;
    font-weight: 700;
    margin-top: -80px;
    margin-bottom: 80px;
}

.tech-container-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.tech-item {
    text-align: center;
}

.tech-icon-img {
    width: auto;
    height: auto;
    margin: 10px auto 0;
    display: block;
}

.tech-icon {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

.tech-name {
    font-size: 30px;
    font-weight: 400;
    color: white;
    margin-bottom: 0;
}

.tech-item:last-child .tech-name {
    font-size: 44.06px;
    margin-top: 30px;
}

/* Portfolio Section */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 500px);
    gap: 80px 50px;
    margin-bottom: 60px;
    justify-content: center;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: visible;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 300px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 107, 157, 0.2);
}

.portfolio-image {
    flex: 1;
    background: linear-gradient(45deg, #FF6B9D, #4ECDC4);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.placeholder-image {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.portfolio-title {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 10px 0;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: white;
    background: transparent;
    z-index: 10;
    margin-top: 5px;
}

.portfolio-item {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.hidden-project {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: visible;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 300px;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.hidden-project.show {
    display: flex;
    animation: fadeInUp 0.5s ease-out;
}

.hidden-project:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 107, 157, 0.2);
}

.hidden-project .portfolio-image {
    flex: 1;
    background: linear-gradient(45deg, #FF6B9D, #4ECDC4);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.hidden-project .project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 15px;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    z-index: 1;
}

.hidden-project .placeholder-image {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

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

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 15px;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
}

.portfolio-cta {
    text-align: center;
}

.see-more-btn {
    width: auto;
    height: auto;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

.see-more-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* SEE MORE button hover transition */
.see-more-btn {
    background-image: url('ArtAssets/Group 9.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 271px;
    height: 69px;
    transition: background-image 0.3s ease, transform 0.3s ease, filter 0.3s ease;
    display: block;
    text-decoration: none;
}

.see-more-btn:hover {
    background-image: url('ArtAssets/Property 1=Variant2.svg');
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Contact Section */
.contact-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    max-width: 500px;
    margin: 0 0 0 -650px;
}

.contact-btn {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.contact-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.contact-btn-img {
    width: auto;
    height: auto;
    display: block;
}

/* GitHub button hover transition */
.contact-btn[href*="github"] {
    background-image: url('ArtAssets/Frame 109.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 302px;
    height: 95px;
    transition: background-image 0.3s ease, transform 0.3s ease, filter 0.3s ease;
    display: block;
    text-decoration: none;
}

.contact-btn[href*="github"]:hover {
    background-image: url('ArtAssets/Property 1=Variant2 (1).svg');
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Telegram button hover transition */
.contact-btn[href*="telegram"] {
    background-image: url('ArtAssets/Frame 112.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 399px;
    height: 95px;
    transition: background-image 0.3s ease, transform 0.3s ease, filter 0.3s ease;
    display: block;
    text-decoration: none;
}

.contact-btn[href*="telegram"]:hover {
    background-image: url('ArtAssets/Property 1=Variant2 (2).svg');
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Itch.io button hover transition */
.contact-btn[href*="itch"] {
    background-image: url('ArtAssets/Frame 110.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 307px;
    height: 95px;
    transition: background-image 0.3s ease, transform 0.3s ease, filter 0.3s ease;
    display: block;
    text-decoration: none;
}

.contact-btn[href*="itch"]:hover {
    background-image: url('ArtAssets/Property 1=Variant2 (3).svg');
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* LinkedIn button hover transition */
.contact-btn[href*="linkedin"] {
    background-image: url('ArtAssets/Frame 111.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 345px;
    height: 90px;
    transition: background-image 0.3s ease, transform 0.3s ease, filter 0.3s ease;
    display: block;
    text-decoration: none;
}

.contact-btn[href*="linkedin"]:hover {
    background-image: url('ArtAssets/Property 1=Variant2 (4).svg');
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Telegram button hover transition */
.contact-btn[href*="t.me"] {
    background-image: url('ArtAssets/Frame 112.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 399px !important;
    height: 95px !important;
    transition: background-image 0.3s ease, transform 0.3s ease, filter 0.3s ease;
    display: block !important;
    text-decoration: none;
}

.contact-btn[href*="t.me"]:hover {
    background-image: url('ArtAssets/Property 1=Variant2 (2).svg');
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #2D1B69 0%, #1A0B3D 100%);
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.close {
    color: #FFE1FA;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 1001;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #D683C9;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 30px;
}

/* Image Carousel */
.image-carousel {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    display: block;
    transition: opacity 0.3s ease;
    margin: 0 auto;
}

.modal-video {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
    display: block;
    margin: 0 auto;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(214, 131, 201, 0.8);
    color: white;
    border: none;
    font-size: 24px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0.8;
}

.carousel-btn:hover {
    background: rgba(214, 131, 201, 1);
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #D683C9;
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: rgba(214, 131, 201, 0.7);
}

.modal-text h3 {
    color: #FFE1FA;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.modal-text p {
    color: white;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-contribution {
    margin-bottom: 20px;
}

.modal-contribution h4 {
    color: #FFE1FA;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.modal-tech h4 {
    color: #FFE1FA;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.modal-tech {
    margin-bottom: 20px;
}

.tech-tag {
    display: inline-block;
    background: rgba(214, 131, 201, 0.2);
    color: #D683C9;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 5px 5px 5px 0;
    border: 1px solid rgba(214, 131, 201, 0.3);
}

.modal-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.modal-link {
    background: linear-gradient(135deg, #D683C9 0%, #B85CB8 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.modal-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(214, 131, 201, 0.4);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .hero-name {
        flex-direction: column;
        gap: 10px;
    }
    
    .subtitle {
        margin-left: 0;
    }
    
    .skills-container {
        flex-direction: column;
        align-items: center;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 20px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .about-text {
        text-align: left;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-text h3 {
        font-size: 1.5rem;
    }
    
    .modal-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 15px;
    }
    
    .nav-link {
        font-size: 14px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 60px 0;
    }
}
