/*===================================================
  FONTS AND BASE STYLES
====================================================*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* Gilroy Font Family */
@font-face {
    font-family: 'Gilroy Light';
    src: url('fonts/Gilroy-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Gilroy Regular';
    src: url('fonts/Gilroy-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Gilroy Medium';
    src: url('fonts/Gilroy-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Gilroy Semibold';
    src: url('fonts/Gilroy-Semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Gilroy Bold';
    src: url('fonts/Gilroy-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Gilroy Extrabold';
    src: url('fonts/Gilroy-Extrabold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'Gilroy Heavy';
    src: url('fonts/Gilroy-Heavy.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
}

body { 
    font-family: "Poppins", sans-serif;
    /* font-family: 'Gilroy Regular', sans-serif; */
    background-color: #FDFAF6;
}

html {
    scroll-behavior: smooth;
}

/* Prevent smooth scrolling on page load */
html.loading {
    scroll-behavior: auto;
}

p {
    color: rgb(85, 85, 85);
}

/* Transitions */
a, btn {
    transition: all 300ms ease;
}

/*===================================================
  NAVIGATION
====================================================*/

/* Desktop Navigation */
nav, .nav-links {
    display: flex;
}

nav {
    justify-content: space-around;
    align-items: center;
    height: 17vh;
}

.nav-links {
    gap: 2rem;
    list-style: none;
    font-size: 1.5rem;
}

.nav-links li a {
    position: relative;
    color: #333;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: capitalize;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links li a:hover {
    color: #D5451B;
    background-color: rgba(213, 69, 27, 0.08);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #D5451B;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links li a:hover::after {
    width: 80%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    font-family: 'Gilroy Bold', sans-serif;
    position: relative;
    cursor: default;
    transition: all 0.3s ease;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: #D5451B;
    transition: width 0.3s ease;
}

.logo:hover {
    color: #D5451B;
}

.logo:hover::after {
    width: 100%;
}

/* Hamburger Menu */

#hamburger-nav {
    display: none;
}

.hamburger-menu {
    position: relative;
    display: inline-block;
    z-index: 1000;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 24px;
    width: 30px;
    cursor: pointer;
    position: relative;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
}

.hamburger-icon span {
    width: 100%;
    height: 2px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

.hamburger-icon.open span:first-child {
    transform: rotate(45deg) translate(7px, 7px);
    background-color: #D5451B;
}

.hamburger-icon.open span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger-icon.open span:last-child {
    transform: rotate(-45deg) translate(7px, -7px);
    background-color: #D5451B;
}

.menu-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #FDFAF6;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
    z-index: 999;
}

.menu-links.open {
    opacity: 1;
    visibility: visible;
}

.menu-links ul {
    list-style: none;
    text-align: center;
    padding: 0;
}

.menu-links li {
    margin: 1.5rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
}

.menu-links.open li {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.menu-links a {
    font-family: 'Gilroy Bold', sans-serif;
    font-size: 2rem;
    color: #333;
    text-decoration: none;
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.menu-links a:hover {
    color: #D5451B;
}

.menu-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #D5451B;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.menu-links a:hover::after {
    width: 80%;
}

/*===================================================
  SECTION COMMON STYLES
====================================================*/
section {
    padding: 4rem 0;
    margin: 0 15rem;
    box-sizing: border-box;
    min-height: auto;
}

.section-container {
    display: flex;
}

/*===================================================
  PROFILE/HERO SECTION
====================================================*/
#profile {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5rem;
    padding-top: 6rem;
    height: auto;
    min-height: 80vh;
    position: relative;
    z-index: 1;
}

.bold-text {
    font-family: 'Gilroy Bold', sans-serif;
    font-weight: 900;
    color: rgb(21, 21, 21);
}

.profile-h1-text {
    font-family: 'Gilroy Regular', sans-serif;
    color: rgb(21, 21, 21);
    font-weight: 300;
}

.ios-developer-highlight {
    font-family: 'Gilroy Black', sans-serif;
    color: #D5451B;
    font-weight: 900;
    font-size: 3.2rem;
    display: inline-block;
    letter-spacing: -0.03em;
    line-height: 1;
    margin: 0.3rem 0;
}

.custom-text .bold-text {
    font-weight: 600;
}

.section__pic-container {
    display: flex;
    aspect-ratio: 1/1;
    width: min(300px, 30vw);
    height: auto;
    align-self: center;
    overflow: hidden;
    border-radius: 50%;
    position: relative;
    margin: 0 auto;
}

.section__pic-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.section__text {
    align-self: center;
    text-align: left;
    max-width: 600px;
}

.section__text p {
    font-weight: 600;
}

.section__text__p1 {
    text-align: center;
}

.section__text__p1_hello {
    font-size: 2rem;
    line-height: 1.2;
    text-align: left;
    font-family: 'Gilroy Bold', sans-serif;
    font-weight: 700;
    color: rgb(21, 21, 21);
    margin-bottom: 0.8rem;
    letter-spacing: -0.02em;
}

.profile-description {
    font-size: 1.2rem;
    color: #666;
    margin-top: 0.5rem;
    font-family: 'Gilroy Regular', sans-serif;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.wave {
    display: inline-block;
    animation: wave 2.5s infinite;
    transform-origin: 70% 70%;
    font-size: 2rem;
    margin-left: 0.3rem;
}

@keyframes wave {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

/* Greeting Text Styles */
.greeting-text {
    font-family: 'Gilroy Bold', sans-serif;
    font-weight: 700;
    color: rgb(21, 21, 21);
    display: inline-block;
}

/* Легкий стиль шрифту */
.light-font {
    font-family: 'Gilroy Light', sans-serif;
    font-weight: 300;
    color: #000;
}

.black-font {
    font-family: 'Gilroy Bold', sans-serif;
    font-weight: 900;
    color: black;
}

.section__text__p2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.title_main_profile {
    font-size: 1.2rem;
    text-align: left;
    font-weight: 300;
    font-style: normal;
    margin-bottom: 0.3rem; /* МЕНШИЙ */
    padding: 0.4rem 0;
}

.title {
    font-size: 1.5rem;
    text-align: center;
}

#social-container {
    display: flex;
    justify-content: left;
    margin-top: 1rem;
    gap: 1rem;
}

/* ICONS */
.icon {
    cursor: pointer;
    height: 3rem;
    transition: transform 0.3s ease;
}

#social-container .icon:hover {
    transform: scale(1.2);
}

/* BUTTONS */

.btn-container {
    display: flex;
    justify-content: left;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.8rem 1.6rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Gilroy Semibold', sans-serif;
}

.btn-colar-1, 
.btn-colar-2 {
    border: rgb(53,53,21) 0.1rem solid;
}

.btn-colar-1, 
.btn-colar-2:hover {
    background: #D5451B;
    color: white;
    border: 2px solid transparent;
}

.btn-colar-2 {
    background: transparent;
    color: #D5451B;
    border: 2px solid #D5451B;
}

.btn-colar {
    gap: 1rem;
}

.break-desktop {
    display: inline;
}

/*===================================================
  ABOUT SECTION
====================================================*/
#about {
    position: relative;
    padding: 6rem 0;
}

.about-containers {
    gap: 2rem;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.about-details-container {
    justify-content: center;
    flex-direction: column;
    background: white;
    border-radius: 2rem;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-details-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.section__pic-container_about {
    display: block;
    width: 400px;
    height: 400px;
    margin: 0 auto;
    position: relative;
    transition: transform 0.3s ease;
}

.section__pic-container_about:hover {
    transform: scale(1.02);
}

.about-pic {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 2rem;
}

.custom-text {
    margin-bottom: 1.5rem;
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.custom-text:last-child {
    margin-bottom: 0;
}

.bold-text {
    color: #D5451B;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.bold-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #D5451B;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.bold-text:hover::after {
    transform: scaleX(1);
}

#about .section__text__p1 {
    font-size: 1.2rem;
    color: #D5451B;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#about .title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
    font-weight: 700;
}

.about-content {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

.about-text {
    flex: 1;
    max-width: 50%;
}

.skills-container {
    flex: 1;
    max-width: 50%;
}

.skills-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 2rem;
    font-weight: 600;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: white;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(213, 69, 27, 0.1);
    position: relative;
    overflow: hidden;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: rgba(213, 69, 27, 0.1);
    transition: all 0.3s ease;
}

.skill-item:hover::before {
    width: 100%;
    background: rgba(249, 246, 243, 0.8);
}

.skill-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(213, 69, 27, 0.08);
    border-color: rgba(213, 69, 27, 0.2);
    background: linear-gradient(to right, rgba(213, 69, 27, 0.05), rgba(249, 246, 243, 0.5));
}

.skill-item .icon {
    width: 1.2rem;
    height: 1.2rem;
    filter: brightness(0) saturate(100%) invert(20%) sepia(0%) saturate(0%) hue-rotate(153deg) brightness(96%) contrast(94%);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    opacity: 0.85;
}

.skill-item:hover .icon {
    transform: scale(1.05);
    filter: brightness(0) saturate(100%) invert(40%) sepia(0%) saturate(0%) hue-rotate(153deg) brightness(90%) contrast(90%);
    opacity: 1;
}

.skill-item h4 {
    font-size: 0.95rem;
    color: #333;
    margin: 0;
    font-weight: 500;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    opacity: 0.85;
}

.skill-item:hover h4 {
    color: #333;
    opacity: 1;
    font-weight: 600;
}

/*===================================================
  PROJECTS SECTION
====================================================*/
#projects {
    position: relative;
    padding: 6rem 0;
    background-color: #FDFAF6;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: 3rem;
}

.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.project-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image img {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(213, 69, 27, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.view-project {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 2rem;
    border: 2px solid white;
    border-radius: 30px;
    transition: all 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
}

.project-gallery:hover .view-project {
    transform: translateY(0);
    opacity: 1;
}

.project-content {
    padding: 2rem;
}

.project-content h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
}

.project-content h3:hover {
    color: #D5451B;
}

.project-content p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-gallery {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    overflow: hidden;
}

.project-gallery img.fourth-screen {
    display: none;
}

.project-gallery img {
    width: 100%;
    aspect-ratio: 9/19.5;
    object-fit: contain;
    border-radius: 10px;
    background-color: #fff;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.project-gallery img:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(213, 69, 27, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(3px);
}

.project-gallery:hover .gallery-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Projects Section Media Queries */
@media screen and (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-image {
        height: 250px;
    }

    .section__pic-container {
        width: min(220px, 25vw);
        margin: 0 auto 1rem;
    }
}

@media screen and (max-width: 768px) {
    .project-content h3 {
        font-size: 1.3rem;
    }

    .project-content p {
        font-size: 0.95rem;
    }

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

    .project-gallery img {
        height: 100px;
    }

    .section__pic-container {
        width: min(200px, 30vw);
        margin: 0 auto 0.8rem;
    }
}

@media screen and (max-width: 600px) {
    .project-image {
        height: 200px;
    }

    .project-content {
        padding: 1.5rem;
    }

    .project-gallery {
        gap: 0.5rem;
    }

    .project-gallery img {
        height: 80px;
    }

    .view-project {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }

    .section__pic-container {
        width: min(180px, 35vw);
        margin: 0 auto 0.5rem;
    }
}

@media screen and (max-width: 380px) {
    .section__pic-container {
        width: min(160px, 40vw);
        margin: 0 auto 0.4rem;
    }
}

@media screen and (max-height: 700px) {
    .section__pic-container {
        width: min(120px, 25vw);
        margin-bottom: 0.6rem;
    }
}

/*===================================================
  CONTACT SECTION
====================================================*/
#contact {
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: 4rem 0;
}

#contact .section__text__p1 {
    font-size: 1.2rem;
    color: #D5451B;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#contact .title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
    font-weight: 700;
}

.contact-info-upper-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-info-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-info-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.contact-info-container p {
    font-size: 1.1rem;
    color: #333;
    margin: 0;
}

.contact-info-container a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info-container a:hover {
    color: #D5451B;
}

.icon-contact {
    width: 2rem;
    height: 2rem;
    transition: transform 0.3s ease;
}

.contact-info-container:hover .icon-contact {
    transform: scale(1.1);
}

/*===================================================
  FOOTER
====================================================*/
footer {
    height: 26vh;
    margin: 0 1rem;
}

footer p {
    text-align: center;
}

#projects .section__text__p1 {
    font-size: 1.2rem;
    color: #D5451B;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#projects .title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
    font-weight: 700;
}

#desktop-nav {
    background-color: #FDFAF6;
    width: 100%;
    z-index: 1000;
}

/* Ensure text doesn't overflow on small screens */
.section__text {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}


