@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Inter:wght@400;500&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
    font-family: "Inter", sans-serif;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    width: 100%;
}

:root {
    --main_color: #a3f1f6;
    --p_color: #8a8a8a;
    --bg_color: #1F1F1F;
    --white_color: #FFF;
    --black_color: #070707;
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    background-color: #131313;
    overflow-x: hidden;
    width: 100%;
}

.container {
    width: 80%;
    margin: auto;
    max-width: 1500px;
    padding: 0 20px;
    box-sizing: border-box;
}

section {
    padding: 80px 0;
}

/* Start Header */

header {
    top: 0;
    left: 0;
    right: 0;
    position: fixed;
    height: 65px;
    transition: 0.3s ease-in-out;
    z-index: 1020;
}

header.active {
    -webkit-backdrop-filter: blur(10px);
    /* لدعم Safari */
    background: rgba(0, 0, 0, 0.5);
    /* لون شفاف للخلفية */
    backdrop-filter: blur(6px);
    /* يجعل الخلفية ضبابية */
    border-bottom: 1px solid #56565697;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    position: static;
    /* blur */
    /* filter: blur(3px); */
}

.links ul,
.icons ul {
    display: flex;
    gap: 30px;
}

header nav .logo {
    text-decoration: none;
    color: var(--white_color);
    font-size: 28px;
    font-weight: 600px;
}



header nav .links a {
    color: var(--white_color);
    text-transform: capitalize;
    font-size: 18px;
    transition: 0.3s;
}

header nav .links a:hover {
    color: var(--main_color);
}

/* header nav .links .active{
    color: var(--main_color);
} */

header nav .icons a {
    color: var(--main_color);
    font-size: 28px;
    transition: 0.3s;
    display: inline-block;
    /* أو block */
}

/* 
السبب الرئيسي لعدم عمل scale في الـ :hover هو أنه لا يعمل مباشرة على العناصر ذات النصوص (مثل <a>)،
بل يحتاج إلى display: inline-block أو display: block 
*/
header nav .icons a:hover {
    scale: 1.4;
    /* transform: scale(1.4); */
}

header nav .upwork a:hover {
    color: #6fda44;
}

header nav .linkedin a:hover {
    color: #0A66C2;
}

header nav .github a:hover {
    color: #999999;
}

/* End Header */

/* Start Background Lines */

.bg-lines span {
    position: fixed;
    top: 0;
    z-index: -1;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    width: 1px;
    -webkit-animation: left_right 18s infinite;
    animation: left_right 18s infinite;
}

.bg-lines span:nth-child(1) {
    left: 10%;
}

.bg-lines span:nth-child(2) {
    left: 20%;
}

.bg-lines span:nth-child(3) {
    left: 30%;
}

.bg-lines span:nth-child(4) {
    left: 40%;
}

.bg-lines span:nth-child(5) {
    left: 50%;
}

.bg-lines span:nth-child(6) {
    left: 60%;
}

.bg-lines span:nth-child(7) {
    left: 70%;
}

.bg-lines span:nth-child(8) {
    left: 80%;
}

.bg-lines span:nth-child(9) {
    left: 90%;
}

@keyframes left_right {
    0% {
        -webkit-animation: translateX(0);
        transform: translateX(0);
    }

    50% {
        -webkit-animation: translateX(-100px);
        transform: translateX(-100px);
    }

    0% {
        -webkit-animation: translateX(0);
        transform: translateX(0);
    }
}

/* End Background Lines */

/* Start Hero Section */

img {
    width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--white_color);
    font-family: "DM Sans", sans-serif;
}

span {
    color: var(--main_color);
}

p {
    color: var(--p_color);
}

.hero {
    padding-top: 100px;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease forwards;
}

.btns {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 20px;
}

.hire-me-btn {
    background-color: var(--main_color);
    padding: 15px 35px;
    border-radius: 10px;
    font-weight: 600;
    color: var(--black_color);
    transition: 0.3s;
}

.hire-me-btn:hover {
    background-color: var(--black_color);
    color: var(--white_color);
    scale: 1.1;
}

.hire-me-btn .btn-icon {
    color: var(--black_color);
    margin-left: 10px;
    /* تباعد بين النص والسهم */
    transition: transform 0.3s;
}

.hire-me-btn:hover .btn-icon {
    color: var(--main_color);
    transform: translateX(10px);
    /* تحريك السهم عند التمرير */
}

/* I will go back here again */
.download-resume-btn {
    padding: 14px 30px;
    color: var(--white_color);
    border-radius: 10px;
    font-weight: 600;
    /* text-decoration: underline; */
    /* transition: 0.3; */
}

.hero .container {
    text-transform: capitalize;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Space between navbar and hero section */
    margin-top: 50px;
}

.hero .text-div {
    width: 50%;
}

.hero .text-div h4 {
    color: var(--p_color);
    font-size: 35px;
    margin-bottom: 15px;
}

.hero .text-div h1 {
    font-size: 70px;
}

.hero .text-div h2 {
    font-size: 70px;
    font-weight: normal;
    line-height: 0.9;
}

.hero .text-div p {
    margin: 30px 0;
    font-size: 18px;
    width: 80%;
    line-height: 1.7;
    /* background-color: #0A66C2; */
}

.hero .img-div {
    position: relative;
    width: 40%;
    border-radius: 0 0 600px 600px;
    /* background-color: red; */
    overflow: hidden;
    bottom: -40px;
    max-width: 100%;
}

.hero .personal-img {
    margin-bottom: -15px;
}

.hero .bg-img {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: -1;
}

/* End Hero Section */

/* Start About Section */
.about-me {
    width: 100%;
    /* Ensure the section takes full width */
    /*min-height: 100vh; /* Make it at least full screen height */
    background-color: var(--black_color);
}

.about-me .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 5px;
    padding: 50px;
}

.about-me .text-div {
    width: 50%;
}

.about-me .text-div h5 {
    font-size: 18px;
    text-transform: capitalize;
}

.about-me .text-div h2 {
    font-size: 45px;
    text-transform: capitalize;
    margin: 25px 0;
}


/* .about-me .text-div h4{
    font-size: 30px;
    text-transform: capitalize;
    margin-bottom: 20px;
} */

.about-me .text-div p {
    line-height: 1.8;
}

.about-me .text-div ul {
    display: flex;
    color: var(--white_color);
    margin: 30px 0 20px;
    flex-wrap: wrap;
}

.about-me .text-div ul li {
    width: 45%;
    text-transform: capitalize;
    font-size: 18px;
    /* font-weight: bold; */
    display: flex;
    margin-bottom: 20px;
    /* background-color: red; */
}

.about-me .text-div ul i {
    margin-right: 15px;
    color: var(--main_color);
    /* background-color: red; */
}

.contacts {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg_color);
    padding: 20px;
    border: 1px solid rgba(128, 128, 128, 0.5);
    border-radius: 10px;
    width: fit-content;
    gap: 20px;
    flex-wrap: wrap;
}

.email-box,
.phone-box {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 10px;
    gap: 15px;
}

.icon {
    background-color: var(--main_color);
    color: var(--black_color);
    font-size: 20px;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.info h4 {
    margin: 0;
    font-size: 14px;
    color: #aaa;
}

.info a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
}

.info a:hover {
    text-decoration: underline;
    color: var(--main_color);
    transition: 0.3s ease-in-out;
}


.about-me #lottie-container {
    width: 50%;
    margin-right: -80px;
}

/* End About Section */

/* Start Services Section */
.services {
    /* width: 100%; */
    /* height: 0; */
    min-height: 95vh;
}

.top-section {
    text-align: center;
    margin-bottom: 100px;
}

.top-section h2 {
    font-size: 30px;
    text-transform: capitalize;
}

.services .boxes {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    cursor: default;
}

.services .box {
    width: 23%;
    text-align: center;
    padding: 40px 5px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: 0.3s ease-in-out;
}

.services .box i {
    color: var(--main_color);
    font-size: 70px;
    margin-bottom: 30px;
    transition: 0.3s ease-in-out;
}

.services .box h3 {
    text-transform: capitalize;
    font-size: 25px;
    margin-bottom: 20px;
}

.services .box p {
    margin-bottom: 10px;
    font-size: 18px;
    line-height: 1.7;
}

.services .box:hover {
    border-color: var(--main_color);
}

.services .box:hover i {
    scale: 1.2;
}

/* End Services Section */

/* Start certificates Section */
.certificates {
    background-color: var(--black_color);
}

.certificates .certificate-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 100px;
    gap: 50px;
}

.certificates .certificate-box img {
    width: 45%;
    border: 10px solid var(--main_color);
    border-radius: 25px;
    transition: transform 0.3s ease-in-out;
}

.certificates .certificate-box img:hover {
    transform: scale(1.02);
}

.certificates .certificate-box .text {
    margin-left: 50px;
    width: calc(50% - 50px);
    /* display: flex;
    flex-direction: column;
    justify-content: center; */
}

.certificates .certificate-box .text h4 {
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: normal;
    text-transform: capitalize;
}

.certificates .certificate-box .text h3 {
    font-size: 40px;
    color: var(--white_color);
    transition: 0.5s;
    text-transform: capitalize;
}

.certificates .certificate-box .text h3:hover {
    color: var(--main_color);
}

.certificates .certificate-box .text p {
    margin: 30px 0 50px;
    line-height: 1.8;
}

.certificates .certificate-box .text .link {
    display: block;
    width: 50px;
    height: 50px;
    border: 1px solid var(--border-color);
    color: var(--black_color);
    font-size: 20px;
    background-color: var(--main_color);
    text-align: center;
    line-height: 50px;
    border-radius: 50%;
    rotate: 45deg;
    transition: 0.3s ease-in-out;
    cursor: pointer;
    text-decoration: none;
    outline: none;
    /* margin: 0 auto; */
}

.certificates .certificate-box .text .link:hover,
.certificates .certificate-box .text .link:focus {
    scale: 1.2;
    background-color: var(--white_color);
    border-color: var(--main_color);
    outline: 2px solid var(--main_color);
    outline-offset: 2px;
}

.certificates .certificate-box .text .link:focus {
    outline: 2px solid var(--main_color);
    outline-offset: 2px;
}

/* Skip link for keyboard navigation */
.certificates .certificate-box .text .link:focus-visible {
    outline: 2px solid var(--main_color);
    outline-offset: 2px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .certificates .certificate-box img {
        transition: none;
    }

    .certificates .certificate-box img:hover {
        transform: none;
    }

    .certificates .certificate-box .text h3 {
        transition: none;
    }

    .certificates .certificate-box .text .link {
        transition: none;
    }

    .certificates .certificate-box .text .link:hover,
    .certificates .certificate-box .text .link:focus {
        scale: 1;
    }
}

.certificates .certificate-box.certificate-box-2 {
    flex-direction: row-reverse;
}

.certificates .certificate-box.certificate-box-2 .text {
    margin-left: 0;
    margin-right: 50px;
}

/* Responsive Design for Certificates */
@media (max-width: 1200px) {
    .certificates .certificate-box {
        gap: 30px;
    }

    .certificates .certificate-box .text {
        margin-left: 30px;
        width: calc(50% - 30px);
    }

    .certificates .certificate-box.certificate-box-2 .text {
        margin-left: 0;
        margin-right: 30px;
    }

    .certificates .certificate-box .text h3 {
        font-size: 32px;
    }
}

@media (max-width: 992px) {
    .certificates .certificate-box {
        flex-direction: column;
        text-align: center;
        margin-bottom: 80px;
        gap: 40px;
    }

    .certificates .certificate-box img {
        width: 70%;
        max-width: 400px;
    }

    .certificates .certificate-box .text {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .certificates .certificate-box.certificate-box-2 {
        flex-direction: column;
    }

    .certificates .certificate-box.certificate-box-2 .text {
        margin-right: 0;
    }

    .certificates .certificate-box .text h3 {
        font-size: 28px;
    }

    .certificates .certificate-box .text p {
        margin: 20px 0 30px;
        text-align: center;
    }

    .certificates .certificate-box .text .link {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .certificates .certificate-box {
        margin-bottom: 60px;
        gap: 30px;
    }

    .certificates .certificate-box img {
        width: 85%;
        border: 8px solid var(--main_color);
    }

    .certificates .certificate-box .text {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .certificates .certificate-box .text h3 {
        font-size: 24px;
    }

    .certificates .certificate-box .text h4 {
        font-size: 18px;
    }

    .certificates .certificate-box .text p {
        font-size: 16px;
        margin: 15px 0 25px;
        text-align: center;
    }

    .certificates .certificate-box .text .link {
        width: 45px;
        height: 45px;
        line-height: 45px;
        font-size: 18px;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .certificates .certificate-box {
        margin-bottom: 50px;
        gap: 25px;
    }

    .certificates .certificate-box img {
        width: 95%;
        border: 6px solid var(--main_color);
        border-radius: 15px;
    }

    .certificates .certificate-box .text {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .certificates .certificate-box .text h3 {
        font-size: 20px;
    }

    .certificates .certificate-box .text h4 {
        font-size: 16px;
    }

    .certificates .certificate-box .text p {
        font-size: 14px;
        line-height: 1.6;
        text-align: center;
    }

    .certificates .certificate-box .text .link {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 16px;
        margin: 0 auto;
    }
}

/* End certificates Section */


/* Start Contact Section */
.contact {
    background-color: var(--black_color);
    padding: 100px 0;
}

.contact .container {
    display: flex;
    justify-content: center;
    text-align: center;
    align-items: center;
    flex-direction: column;
    min-height: 400px;
    padding: 60px 40px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact .contact-text h2 {
    font-size: 48px;
    font-weight: 700;
    color: var(--white_color);
    margin-bottom: 20px;
    line-height: 1.2;
    text-transform: none;
    text-transform: capitalize;
}

.contact .container p {
    color: var(--p_color);
    width: 60%;
    line-height: 1.8;
    font-weight: 600;
    margin: 30px 0 50px;
    font-size: 18px;
    text-transform: capitalize;
}

.contact-btns {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-btns .contact-me-btn {
    background: linear-gradient(135deg, var(--main_color) 0%, #7dd3fc 100%);
    color: var(--black_color);
    padding: 18px 36px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(163, 241, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.contact-btns .contact-me-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(163, 241, 246, 0.4);
    background: linear-gradient(135deg, #7dd3fc 0%, var(--main_color) 100%);
}

.contact-btns .contact-me-btn:active {
    transform: translateY(-1px);
}

.contact-btns .button-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--white_color) 0%, #f8f9fa 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.contact-btns .button-icon:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #f8f9fa 0%, var(--white_color) 100%);
}

.contact-btns .button-icon:active {
    transform: translateY(-1px) scale(1.02);
}

.contact-btns .button-icon svg {
    transition: all 0.3s ease;
}

.contact-btns .button-icon:hover svg {
    transform: scale(1.1);
}

/* Additional contact section enhancements */
.contact .contact-text h2 {
    background: linear-gradient(135deg, var(--white_color) 0%, var(--main_color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out;
}

.contact .container p {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.contact-btns {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Focus states for accessibility */
.contact-btns .contact-me-btn:focus,
.contact-btns .button-icon:focus {
    outline: 2px solid var(--main_color);
    outline-offset: 4px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    .contact .contact-text h2,
    .contact .container p,
    .contact-btns {
        animation: none;
    }

    .contact-btns .contact-me-btn:hover,
    .contact-btns .button-icon:hover {
        transform: none;
    }
}

/* End Contact Section*/


/* Dropdown Menu Styling */
.dropdown-menu {
    -webkit-backdrop-filter: blur(10px);
    /* لدعم Safari */
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(15px);
    padding: 80px 20px 20px;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.dropdown-menu.open {
    transform: translateX(0);
    /* يظهر داخل الشاشة */
    pointer-events: auto;
}

.dropdown-menu:focus {
    outline: none;
    /* Remove default focus outline since it's a full-screen overlay */
}

.dropdown-links,
.dropdown-icons {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-links {
    margin-bottom: 40px;
}

.dropdown-links li {
    padding: 15px 0;
    text-align: center;
    margin: 0 20px;
}

.dropdown-icons li {
    padding: 10px;
    text-align: center;
}

.dropdown-links a {
    color: #fff;
    text-decoration: none;
    font-size: 24px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    padding: 10px 20px;
    border-radius: 8px;
    text-transform: capitalize;
}

.dropdown-links a:hover,
.dropdown-links a:focus {
    color: var(--main_color);
    background-color: rgba(163, 241, 246, 0.1);
    transform: translateY(-2px);
}

.dropdown-icons a {
    color: var(--main_color);
    text-decoration: none;
    font-size: 28px;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 10px;
    border-radius: 50%;
    background-color: rgba(163, 241, 246, 0.1);
}

.dropdown-icons a:hover,
.dropdown-icons a:focus {
    scale: 1.2;
    background-color: rgba(163, 241, 246, 0.2);
}

.dropdown-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Specific hover colors for social icons */
.dropdown-icons .upwork a:hover {
    color: #6fda44;
    background-color: rgba(111, 218, 68, 0.1);
}

.dropdown-icons .linkedin a:hover {
    color: #0A66C2;
    background-color: rgba(10, 102, 194, 0.1);
}

.dropdown-icons .github a:hover {
    color: #999999;
    background-color: rgba(153, 153, 153, 0.1);
}

/* Toggle Button */
.toggle-btn {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--white_color);
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    border: none;
    background-color: transparent;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.toggle-btn:focus {
    outline: 2px solid var(--main_color);
    outline-offset: 2px;
}


/* Responsive Styling */
@media (max-width: 1125px) {
    .container {
        width: 90%;
    }
}

@media (max-width: 895px) {

    nav .links,
    nav .icons {
        display: none;
    }

    .toggle-btn {
        display: block;
    }
}

@media (max-width: 480px) {
    .toggle-btn {
        top: 15px;
        right: 15px;
        font-size: 20px;
        padding: 8px;
    }

    .close-btn {
        top: 15px;
        right: 15px;
        font-size: 24px;
        padding: 8px;
    }

    .dropdown-menu {
        padding: 60px 15px 15px;
    }

    .dropdown-links a {
        font-size: 20px;
        padding: 12px 15px;
    }

    .dropdown-links li {
        padding: 10px 0;
        margin: 0 10px;
    }

    .dropdown-icons a {
        font-size: 24px;
        padding: 8px;
    }

    .dropdown-icons {
        gap: 15px;
    }
}

/* Additional responsive adjustments */
@media (max-width: 1200px) {
    .hero .text-div h1 {
        font-size: 56px;
    }

    .hero .text-div h2 {
        font-size: 56px;
    }

    /* Contact section tablet adjustments */
    .contact .container {
        padding: 50px 35px;
        max-width: 1000px;
    }

    .contact .contact-text h2 {
        font-size: 42px;
    }

    .contact .container p {
        width: 70%;
        font-size: 17px;
    }
}

@media (max-width: 992px) {
    .hero {
        height: auto;
        padding-bottom: 40px;
    }

    .hero .container {
        flex-direction: column;
        gap: 30px;
        margin-top: 80px;
    }

    .hero .text-div {
        width: 100%;
        text-align: center;
    }

    .hero .text-div p {
        width: 100%;
    }

    .btns {
        justify-content: center;
        flex-wrap: wrap;
    }

    .about-me .container {
        flex-direction: column;
        gap: 30px;
        padding: 30px;
    }

    .about-me .text-div,
    .about-me #lottie-container {
        width: 100%;
        margin-right: 0;
    }

    /* Contact section tablet layout */
    .contact .container {
        padding: 45px 30px;
        max-width: 900px;
    }

    .contact .contact-text h2 {
        font-size: 38px;
    }

    .contact .container p {
        width: 75%;
        font-size: 16px;
    }

    .services .box {
        width: 48%;
        margin-bottom: 20px;
    }

    .cube-container {
        width: 360px;
        height: 360px;
        max-width: 90%;
    }

    .cube,
    .cube-face {
        width: 160px;
        height: 160px;
    }

    .front {
        transform: rotateY(0deg) translateZ(80px);
    }

    .back {
        transform: rotateY(180deg) translateZ(80px);
    }

    .right {
        transform: rotateY(90deg) translateZ(80px);
    }

    .left {
        transform: rotateY(-90deg) translateZ(80px);
    }

    .top {
        transform: rotateX(90deg) translateZ(80px);
    }

    .bottom {
        transform: rotateX(-90deg) translateZ(80px);
    }
}

@media (max-width: 768px) {
    .top-section {
        margin-bottom: 60px;
    }

    .top-section h2 {
        font-size: 26px;
    }

    .services .box i {
        font-size: 56px;
    }

    .services .box h3 {
        font-size: 22px;
    }

    .contact .container {
        flex-direction: column;
        gap: 30px;
    }

    .contact .social-contact {
        width: 100%;
    }

    .contact form {
        width: 100%;
    }

    .contact form .inpts input {
        width: 100%;
    }

    /* Stack contact cards vertically on mobile */
    .contacts {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 15px;
    }

    .email-box,
    .phone-box {
        justify-content: center;
        text-align: center;
        padding: 15px;
    }

    /* Contact section responsive */
    .contact .container {
        padding: 40px 30px;
        min-height: 300px;
    }

    .contact .contact-text h2 {
        font-size: 36px;
    }

    .contact .container p {
        width: 80%;
        font-size: 16px;
        margin: 20px 0 40px;
    }

    .contact-btns {
        gap: 15px;
    }

    .contact-btns .contact-me-btn {
        padding: 16px 32px;
        font-size: 16px;
    }

    .contact-btns .button-icon {
        width: 55px;
        height: 55px;
    }
}

@media (max-width: 576px) {
    header {
        height: 80px;
    }

    .hero {
        padding-top: 80px;
    }

    .hero .text-div h1 {
        font-size: 42px;
    }

    .hero .text-div h2 {
        font-size: 42px;
    }

    .hero .text-div h4 {
        font-size: 24px;
    }

    .container {
        width: 92%;
        padding: 0 15px;
    }

    .services .box {
        width: 100%;
    }

    .cube-container {
        width: 300px;
        height: 300px;
        max-width: 85%;
    }

    .cube,
    .cube-face {
        width: 140px;
        height: 140px;
    }

    .front {
        transform: rotateY(0deg) translateZ(70px);
    }

    .back {
        transform: rotateY(180deg) translateZ(70px);
    }

    .right {
        transform: rotateY(90deg) translateZ(70px);
    }

    .left {
        transform: rotateY(-90deg) translateZ(70px);
    }

    .top {
        transform: rotateX(90deg) translateZ(70px);
    }

    .bottom {
        transform: rotateX(-90deg) translateZ(70px);
    }

    /* Additional mobile optimizations */
    .contacts {
        padding: 15px;
        gap: 10px;
    }

    .email-box,
    .phone-box {
        padding: 12px;
        gap: 10px;
    }

    .icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .info h4 {
        font-size: 12px;
    }

    .info a {
        font-size: 14px;
    }

    /* Contact section mobile optimizations */
    .contact {
        padding: 60px 0;
    }

    .contact .container {
        padding: 30px 20px;
        min-height: 250px;
        border-radius: 15px;
    }

    .contact .contact-text h2 {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .contact .container p {
        width: 95%;
        font-size: 14px;
        margin: 15px 0 30px;
        line-height: 1.6;
    }

    .contact-btns {
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }

    .contact-btns .contact-me-btn {
        width: 100%;
        max-width: 280px;
        padding: 14px 28px;
        font-size: 16px;
    }

    .contact-btns .button-icon {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 992px) {
    .hero {
        height: auto;
        padding-bottom: 40px;
    }

    .hero .container {
        flex-direction: column;
        gap: 30px;
        margin-top: 80px;
    }

    .hero .text-div {
        width: 100%;
        text-align: center;
    }

    .hero .text-div p {
        width: 100%;
    }

    .btns {
        justify-content: center;
        flex-wrap: wrap;
    }

    .about-me .container {
        flex-direction: column;
        gap: 30px;
        padding: 30px;
    }

    .about-me .text-div,
    .about-me #lottie-container {
        width: 100%;
        margin-right: 0;
    }

    .services .box {
        width: 48%;
        margin-bottom: 20px;
    }

    .cube-container {
        width: 360px;
        height: 360px;
        max-width: 90%;
    }

    .cube,
    .cube-face {
        width: 160px;
        height: 160px;
    }

    .front {
        transform: rotateY(0deg) translateZ(80px);
    }

    .back {
        transform: rotateY(180deg) translateZ(80px);
    }

    .right {
        transform: rotateY(90deg) translateZ(80px);
    }

    .left {
        transform: rotateY(-90deg) translateZ(80px);
    }

    .top {
        transform: rotateX(90deg) translateZ(80px);
    }

    .bottom {
        transform: rotateX(-90deg) translateZ(80px);
    }
}

@media (max-width: 768px) {
    .top-section {
        margin-bottom: 60px;
    }

    .top-section h2 {
        font-size: 26px;
    }

    .services .box i {
        font-size: 56px;
    }

    .services .box h3 {
        font-size: 22px;
    }

    .contact .container {
        flex-direction: column;
        gap: 30px;
    }

    .contact .social-contact {
        width: 100%;
    }

    .contact form {
        width: 100%;
    }

    .contact form .inpts input {
        width: 100%;
    }

    /* Stack contact cards vertically on mobile */
    .contacts {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 15px;
    }

    .email-box,
    .phone-box {
        justify-content: center;
        text-align: center;
        padding: 15px;
    }
}

@media (max-width: 576px) {
    header {
        height: 80px;
    }

    .hero {
        padding-top: 80px;
    }

    .hero .text-div h1 {
        font-size: 42px;
    }

    .hero .text-div h2 {
        font-size: 42px;
    }

    .hero .text-div h4 {
        font-size: 24px;
    }

    .container {
        width: 92%;
        padding: 0 15px;
    }

    .services .box {
        width: 100%;
    }

    .cube-container {
        width: 300px;
        height: 300px;
        max-width: 85%;
    }

    .cube,
    .cube-face {
        width: 140px;
        height: 140px;
    }

    .front {
        transform: rotateY(0deg) translateZ(70px);
    }

    .back {
        transform: rotateY(180deg) translateZ(70px);
    }

    .right {
        transform: rotateY(90deg) translateZ(70px);
    }

    .left {
        transform: rotateY(-90deg) translateZ(70px);
    }

    .top {
        transform: rotateX(90deg) translateZ(70px);
    }

    .bottom {
        transform: rotateX(-90deg) translateZ(70px);
    }

    /* Additional mobile optimizations */
    .contacts {
        padding: 15px;
        gap: 10px;
    }

    .email-box,
    .phone-box {
        padding: 12px;
        gap: 10px;
    }

    .icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .info h4 {
        font-size: 12px;
    }

    .info a {
        font-size: 14px;
    }
}

/* Prevent background scroll when mobile menu open */
body.no-scroll {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
}

/* Ensure html also doesn't scroll */
html.no-scroll {
    overflow: hidden !important;
}


/* @media (max-width: 1000px){
    nav .links,
    nav .icons{
        display: none;
    }
    nav .toggle-btn{
        display: block;
    }
    /* nav .dropdown-menu{
        display: block;
    } 
} */

/* CSS Animated Cube Styles */
.cube-container {
    position: relative;
    width: 512px;
    height: 512px;
    max-width: 100%;
    overflow: hidden;
}

.cube-wrapper {
    position: absolute;
    left: 50%;
    top: 25%;
    transform: translateX(-50%);
    perspective: 1000px;
}

.cube {
    position: relative;
    width: 200px;
    height: 200px;
    transform-style: preserve-3d;
    animation: rotateCube 6s infinite linear;
}

.cube-face {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 3px solid white;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Stars pattern on cube faces */
.cube-face::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 30px 40px, white 1px, transparent 1px),
        radial-gradient(circle at 80px 60px, rgba(224, 232, 234, 0.8) 1px, transparent 1px),
        radial-gradient(circle at 120px 30px, white 1px, transparent 1px),
        radial-gradient(circle at 160px 80px, rgba(224, 232, 234, 0.8) 1px, transparent 1px),
        radial-gradient(circle at 50px 120px, white 1px, transparent 1px),
        radial-gradient(circle at 180px 150px, rgba(224, 232, 234, 0.8) 1px, transparent 1px);
    background-size: 200px 200px;
    animation: twinkle 3s infinite;
}

/* Cube face positions */
.front {
    transform: rotateY(0deg) translateZ(100px);
}

.back {
    transform: rotateY(180deg) translateZ(100px);
}

.right {
    transform: rotateY(90deg) translateZ(100px);
    background: rgba(64, 112, 128, 0.6);
}

.left {
    transform: rotateY(-90deg) translateZ(100px);
    background: rgba(64, 112, 128, 0.4);
}

.top {
    transform: rotateX(90deg) translateZ(100px);
    background: rgba(255, 255, 255, 0.1);
}

.bottom {
    transform: rotateX(-90deg) translateZ(100px);
    background: rgba(64, 112, 128, 0.6);
}

/* Reflection cube */
.cube-reflection {
    position: absolute;
    left: 50%;
    top: 65%;
    transform: translateX(-50%) scaleY(-1);
    perspective: 1000px;
    opacity: 0.15;
    filter: blur(1px);
}

.cube-reflection .cube {
    animation: rotateCube 6s infinite linear;
}

/* Fade effect at the bottom */
.fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.05));
    pointer-events: none;
}


/* Keyframe animations */
@keyframes rotateCube {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }

    25% {
        transform: rotateX(0deg) rotateY(90deg);
    }

    50% {
        transform: rotateX(90deg) rotateY(90deg);
    }

    75% {
        transform: rotateX(90deg) rotateY(180deg);
    }

    100% {
        transform: rotateX(0deg) rotateY(360deg);
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

@keyframes shootingStar1 {

    0%,
    90% {
        opacity: 0;
        transform: translateX(0) translateY(0);
    }

    90% {
        opacity: 1;
    }

    95% {
        opacity: 0.6;
        transform: translateX(100px) translateY(50px);
    }

    100% {
        opacity: 0;
        transform: translateX(100px) translateY(50px);
    }
}

@keyframes shootingStar2 {

    0%,
    90% {
        opacity: 0;
        transform: translateX(0) translateY(0);
    }

    90% {
        opacity: 1;
    }

    95% {
        opacity: 0.6;
        transform: translateX(-80px) translateY(40px);
    }

    100% {
        opacity: 0;
        transform: translateX(-80px) translateY(40px);
    }
}