/* Google Font loading handled in HTML via preload; removed @import to avoid duplicate fetches */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    scroll-behavior: smooth;
}

/* Body background with creamy texture */
body {
    background: linear-gradient(135deg, #fefefe 0%, #f8f6f1 50%, #f5f3ed 100%);
    background-attachment: fixed;
    position: relative;
}

body.page-transition {
    opacity: 0;
    transition: opacity 0.15s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="cream-texture" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="0.5" fill="%23e8e4d9" opacity="0.3"/><circle cx="80" cy="80" r="0.5" fill="%23e8e4d9" opacity="0.3"/><circle cx="50" cy="10" r="0.3" fill="%23e8e4d9" opacity="0.2"/><circle cx="10" cy="60" r="0.3" fill="%23e8e4d9" opacity="0.2"/><circle cx="90" cy="40" r="0.3" fill="%23e8e4d9" opacity="0.2"/><circle cx="30" cy="90" r="0.4" fill="%23e8e4d9" opacity="0.25"/><circle cx="70" cy="30" r="0.4" fill="%23e8e4d9" opacity="0.25"/></pattern></defs><rect width="100" height="100" fill="url(%23cream-texture)"/></svg>');
    pointer-events: none;
    z-index: -1;
}

/* Custom Scroll Bar CSS */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f8f6f1;
}

::-webkit-scrollbar-thumb {
    background: #183153;
    border-radius: 12px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #0E2431;
}

/* Touch-friendly optimizations */
@media (pointer: coarse) {

    .nav-links li a,
    .menu-btn,
    .scroll-button a,
    button,
    input,
    textarea {
        min-height: 44px;
        min-width: 44px;
        padding: 12px;
    }
}

/* navbar styling */

nav {
    position: fixed;
    top: 2px;
    width: 100%;
    padding: 20px 0;
    z-index: 998;
    transition: transform 0.3s ease, backdrop-filter 0.3s ease;
    font-family: 'Poppins', sans-serif;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    will-change: transform, backdrop-filter;
}

/* Mobile performance tweaks */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }

    nav {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

nav.sticky {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 16px 0;
    box-shadow: 0 8px 32px rgba(24, 49, 83, 0.1);
    border-bottom: 1px solid rgba(24, 49, 83, 0.1);
}

nav .navbar {
    width: 90%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: auto;
}

nav .navbar .logo a {
    font-weight: 500;
    font-size: 35px;
    color: #183153;
    display: flex;
    align-items: center;
    text-decoration: none;
}

nav .navbar .logo a img {
    width: 35px;
    height: 35px;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

nav .navbar .logo a:hover img {
    transform: scale(1.1);
}

nav.sticky .navbar .logo a {
    color: #183153;
}

nav .navbar .menu {
    display: flex;
    position: relative;
}

nav .navbar .menu li {
    list-style: none;
    margin: 0 8px;
}

.navbar .menu a {
    font-size: 18px;
    font-weight: 500;
    color: #183153;
    padding: 8px 16px;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 6px;
}

.navbar .menu a:hover {
    color: #183153;
    background: rgba(24, 49, 83, 0.1);
    transform: translateY(-2px);
}

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

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

nav.sticky .menu a {
    color: #183153;
}

nav.sticky .menu a:hover {
    color: #183153;
}

.navbar .media-icons a {
    color: #183153;
    font-size: 18px;
    margin: 0 6px;
}

nav.sticky .media-icons a {
    color: #183153;
}

/* Side Navigation Menu Button CSS */

nav .menu-btn,
.navbar .menu .cancel-btn {
    position: absolute;
    color: #183153;
    right: 30px;
    top: 20px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
}

nav .menu-btn {
    color: #183153;
}

nav.sticky .menu-btn {
    color: #183153;
}

.navbar .menu .menu-btn {
    color: #183153;
}

/* home section styling */

.home {
    height: 100vh;
    width: 100%;
    background: transparent;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Poppins', sans-serif;
    position: relative;
}

.home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #FFFFE6;
    z-index: -1;
}

.home .home-content {
    width: 90%;
    height: 100%;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.home .text-one {
    font-size: 28px;
    color: #183153;
    margin-bottom: 10px;
    font-weight: 500;
}

.home .text-two {
    color: #0E2431;
    font-size: 70px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.1;
}

/* text animation */

.home .text-three {
    font-size: 40px;
    margin: 6px 0;
    color: #183153;
    list-style-type: none;
}

.home .text-three {
    height: 45px;
    line-height: 45px;
    overflow: hidden;
}

.text-three li {
    position: relative;
    top: 0;
    animation: slide 3s steps(2) infinite;
}

@keyframes slide {
    100% {
        top: -100px;
    }
}

.text-three li span {
    position: relative;
}

.text-three li span::before {
    content: '';
    position: absolute;
    left: 0;
    width: 400%;
    height: 45px;
    border-left: 2px solid black;
    animation: typing 1.5s steps(7) infinite;
}

@keyframes typing {
    100% {
        left: 100%;
        margin: 0 -30px 0 30px;
    }
}

/* text four started */

.home .text-four {
    font-size: 26px;
    margin: 20px 0 30px 0;
    color: #0E2431;
    opacity: 0.8;
}

.home .button {
    margin: 20px 0;
}

.home .button button {
    outline: none;
    padding: 15px 35px;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 500;
    background: #183153;
    color: #fff;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.home .button button:hover {
    border-color: #183153;
    background-color: rgba(255, 255, 255, 0.95);
    color: #183153;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(24, 49, 83, 0.2);
}

/* About Section Styling */
/* Those Elements Where We Have Apply Same CSS,
 I'm Selecting Directly 'Section Tag' and 'Class'  */

section {
    padding: 100px 0;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
    /* background: rgba(255, 255, 255, 0.7); */
    /* background: #FFFFF0; */
    background: linear-gradient(to bottom, #FFFFE6, #FFFFF0);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    /* margin: 20px 0; */
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

section:first-child {
    opacity: 1;
    transform: translateY(0);
}

section .content {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    font-family: 'Poppins', sans-serif;
    padding: 0 20px;
}

.about .about-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 60px;
}

section .title {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

section .title span {
    color: #0E2431;
    font-size: 30px;
    font-weight: 600;
    position: relative;
    padding-bottom: 8px;
}

section .title span::before,
section .title span::after {
    content: '';
    position: absolute;
    height: 3px;
    width: 100%;
    background: #183153;
    left: 0;
    bottom: 0;
}

section .title span::after {
    bottom: -7px;
    width: 70%;
    left: 50%;
    transform: translateX(-50%);
}

.about .about-details .left {
    width: 45%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about .left img {
    height: 400px;
    width: 400px;
    object-fit: cover;
    border-radius: 12px;
}

.about-details .right {
    width: 55%;
}

section .topic {
    color: #0E2431;
    font-size: 25px;
    font-weight: 500;
    margin-bottom: 10px;
}

.about-details .right p {
    text-align: justify;
    color: #0E2431;
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 25px;
}

section .button {
    margin: 16px 0;
}

section .button button {
    outline: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    background: #183153;
    color: #fff;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

section .button button:hover {
    border-color: #183153;
    background-color: rgba(255, 255, 255, 0.95);
    color: #183153;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(24, 49, 83, 0.2);
}

/* My Skills CSS */

.skills {
    /* background: rgba(255, 255, 255, 0.8); */
    background: linear-gradient(to bottom, #FFFFF0, #FFFFFA);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.skills .content {
    padding: 40px 0;
}

.skills .skills-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
}

.skills-details .text {
    width: 50%;
}

.skills-details p {
    color: #0E2431;
    text-align: justify;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.skills .skills-details .experience {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #183153, #0E2431);
    padding: 30px;
    border-radius: 20px;
    color: white;
    box-shadow: 0 15px 40px rgba(24, 49, 83, 0.2);
    position: relative;
    overflow: hidden;
}

.skills-details .experience::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #183153, #0E2431);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.skills-details .experience .num {
    color: #fff;
    font-size: 60px;
    font-weight: 700;
    margin-right: 20px;
    position: relative;
    z-index: 1;
}

.skills-details .experience .exp {
    color: #fff;
    margin-left: 20px;
    font-size: 18px;
    font-weight: 500;
    position: relative;
    z-index: 1;
    line-height: 1.4;
}

.skills-details .boxes {
    width: 45%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.skills-details .box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 30px 25px;
    border-radius: 18px;
    text-align: center;
    transition: all 0.4s ease;
    margin: 0;
    opacity: 0;
    transform: translateY(30px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.skills-details .box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #183153, #0E2431);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.skills-details .box:hover::before {
    transform: scaleX(1);
}

.skills-details .box:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(24, 49, 83, 0.15);
    background: rgba(255, 255, 255, 1);
}

.skills-details .boxes .topic {
    font-size: 20px;
    font-weight: 600;
    color: #183153;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.skills-details .boxes .per {
    font-size: 48px;
    font-weight: 700;
    color: #183153;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #183153, #0E2431);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* My Services CSS */

.services {
    /* background: rgba(255, 255, 255, 0.7); */
    background: linear-gradient(to bottom, #FFFFFA, #FFFFFF);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.services .content {
    padding: 40px 0;
}

.services .boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.services .boxes .box {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    opacity: 0;
    transform: translateY(30px);
    position: relative;
    overflow: hidden;
}

.services .boxes .box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #183153, #0E2431);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.services .boxes .box:hover::before {
    transform: scaleX(1);
}

.services .boxes .box:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(24, 49, 83, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.services .boxes .icon {
    height: 80px;
    width: 80px;
    background: linear-gradient(135deg, #183153, #0E2431);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.services .boxes .box:hover .icon {
    transform: scale(1.1) rotate(5deg);
}

.services .icon i {
    font-size: 40px;
    color: #fff;
}

.services .boxes .topic {
    font-size: 25px;
    font-weight: 500;
    color: #183153;
    margin-bottom: 15px;
}

.services .boxes p {
    color: #64748b;
    line-height: 1.6;
    font-size: 16px;
}

/* Contact Me CSS */

.contact {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="cream-texture" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="0.5" fill="%23e8e4d9" opacity="0.2"/><circle cx="75" cy="75" r="0.5" fill="%23e8e4d9" opacity="0.2"/><circle cx="50" cy="10" r="0.3" fill="%23e8e4d9" opacity="0.15"/><circle cx="10" cy="60" r="0.3" fill="%23e8e4d9" opacity="0.15"/><circle cx="90" cy="40" r="0.3" fill="%23e8e4d9" opacity="0.15"/></pattern></defs><rect width="100" height="100" fill="url(%23cream-texture)"/></svg>');
    pointer-events: none;
}

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

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 60px;
    align-items: start;
}

/* Contact Info Styles */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
    height: 100%;
    justify-content: space-between;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 35px 30px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    opacity: 0;
    transform: translateY(30px);
}

.info-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(24, 49, 83, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.info-item .icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #183153, #0E2431);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.info-item:hover .icon {
    transform: scale(1.1) rotate(5deg);
}

.info-item .icon i {
    color: white;
    font-size: 24px;
}

.info-content h3 {
    color: #183153;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.info-content p {
    color: #64748b;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

/* Contact Form Styles */
.contact-form {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 45px 35px;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    opacity: 0;
    transform: translateY(30px);
}

.contact-form h2 {
    color: #183153;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #183153, #0E2431);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-form>p {
    color: #64748b;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid rgba(226, 232, 240, 0.5);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.8);
    color: #183153;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #183153;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(24, 49, 83, 0.1);
    transform: translateY(-2px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 18px 30px;
    background: linear-gradient(135deg, #183153, #0E2431);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(24, 49, 83, 0.3);
}

.submit-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.submit-btn:hover i {
    transform: translateX(5px);
}

/* Animation for contact elements */
.info-item:nth-child(1) {
    animation: fadeInUp 0.6s ease 0.1s forwards;
}

.info-item:nth-child(2) {
    animation: fadeInUp 0.6s ease 0.2s forwards;
}

.info-item:nth-child(3) {
    animation: fadeInUp 0.6s ease 0.3s forwards;
}

.info-item:nth-child(4) {
    animation: fadeInUp 0.6s ease 0.4s forwards;
}

.contact-form {
    animation: fadeInUp 0.6s ease 0.5s forwards;
}

/* Contact Section Responsive Design */
@media (max-width: 1024px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 600px;
        margin: 60px auto 0;
    }
}

@media (max-width: 768px) {
    .contact {
        padding: 100px 0;
    }

    .contact-container {
        gap: 30px;
        margin-top: 50px;
    }

    .contact-form {
        padding: 40px 30px;
    }

    .contact-form h2 {
        font-size: 28px;
    }

    .info-item {
        padding: 25px;
    }

    .info-item .icon {
        width: 50px;
        height: 50px;
    }

    .info-item .icon i {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .contact {
        padding: 80px 0;
    }

    .contact-container {
        margin-top: 40px;
    }

    .contact-form {
        padding: 30px 20px;
    }

    .contact-form h2 {
        font-size: 24px;
    }

    .contact-form>p {
        font-size: 14px;
    }

    .info-item {
        padding: 20px;
        gap: 15px;
    }

    .info-item .icon {
        width: 45px;
        height: 45px;
    }

    .info-item .icon i {
        font-size: 18px;
    }

    .info-content h3 {
        font-size: 18px;
    }

    .info-content p {
        font-size: 14px;
    }

    .form-group input,
    .form-group textarea {
        padding: 15px 18px;
        font-size: 14px;
    }

    .submit-btn {
        padding: 15px 25px;
        font-size: 16px;
    }
}

/* Footer CSS */

footer {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(24, 49, 83, 0.1);
}

footer .text {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #64748b;
}

footer .text span a {
    font-weight: 500;
    color: #183153;
    text-decoration: none;
}

footer .text span a:hover {
    text-decoration: underline;
}

/* Scroll TO Top Button CSS */

.scroll-button a {
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: #183153;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 15px 18px;
    font-size: 18px;
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: none;
    transition: all 0.3s ease;
    z-index: 999;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.scroll-button a:hover {
    background: #183153;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(24, 49, 83, 0.2);
}

/* Responsive Media Query */

@media (max-width: 1190px) {
    section .content {
        width: 85%;
    }
}

@media (max-width: 1000px) {
    .about .about-details {
        justify-content: center;
        flex-direction: column;
    }

    .about .about-details .left {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .about-details .right {
        width: 90%;
        margin: 40px 0;
    }

    .services .boxes .box {
        margin: 20px 0;
        width: calc(100% / 2 - 20px);
    }
}

@media (max-width: 900px) {
    .about .left img {
        height: 350px;
        width: 350px;
    }
}

@media (max-width: 750px) {
    nav .navbar {
        width: 90%;
    }

    nav .navbar .menu {
        position: fixed;
        left: -100%;
        top: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        height: 100vh;
        max-width: 400px;
        width: 100%;
        padding-top: 60px;
        flex-direction: column;
        align-items: center;
        transition: all 0.5s ease;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        border-right: 1px solid rgba(24, 49, 83, 0.1);
    }

    .navbar.active .menu {
        left: 0;
    }

    nav .navbar .menu a {
        font-size: 23px;
        display: block;
        color: #183153;
        margin: 10px 0;
    }

    nav.sticky .menu a:hover {
        color: #183153;
        background: rgba(24, 49, 83, 0.1);
    }

    nav .navbar .media-icons {
        display: none;
    }

    nav .menu-btn,
    .navbar .menu .cancel-btn {
        display: block;
    }

    .home .text-two {
        font-size: 65px;
    }

    .home .text-three {
        font-size: 35px;
    }

    .skills .skills-details {
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }

    .skills-details .text {
        width: 100%;
        margin-bottom: 50px;
    }

    .skills-details .boxes {
        justify-content: center;
        align-items: center;
        width: 100%;
        margin: -48px;
    }

    .services .boxes .box {
        margin: 20px 0;
        width: 100%;
    }
}

@media(max-width:657px) {
    .home .text-one {
        font-size: 23px;
    }

    .home .text-two {
        font-size: 50px;
    }

    .home .text-three {
        font-size: 35px;
    }

    .home .text-four {
        font-size: 21px;
    }
}

@media (max-width: 522px) {
    .home .text-two {
        font-size: 45px;
    }

    .home .text-three {
        font-size: 33px;
    }

    .skills-details .boxes .per {
        font-size: 50px;
        color: #183153;
    }
}

@media(max-width:375px) {
    .home .text-one {
        font-size: 20px;
    }

    .home .text-two {
        font-size: 37px;
    }

    .home .text-three {
        font-size: 30px;
    }

    .home .text-four {
        font-size: 16px;
    }
}

@media(max-width:476px) {
    .home .text-one {
        font-size: 23px;
    }

    .home .text-two {
        font-size: 35px;
    }

    .home .text-three {
        font-size: 27px;
    }

    .home .text-four {
        font-size: 16px;
    }
}

@media(max-width:375px) {
    .home .text-one {
        font-size: 20px;
    }

    .home .text-two {
        font-size: 37px;
    }

    .home .text-three {
        font-size: 30px;
    }

    .home .text-four {
        font-size: 16px;
    }
}

/* Smooth animations for elements */
.skills-details .box,
.services .boxes .box,
.contact-card {
    animation: fadeInUp 0.6s ease forwards;
}

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

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

/* Enhanced hover effects for buttons */
.home .button button,
section .button button {
    position: relative;
    overflow: hidden;
}

.home .button button::before,
section .button button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.home .button button:hover::before,
section .button button:hover::before {
    left: 100%;
}

/* Enhanced section transitions */
section {
    animation: sectionFadeIn 0.8s ease forwards;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

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

/* Improved text animation background */
.text-three li span::before {
    background: #FFFFE6;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Enhanced media icons hover */
.navbar .media-icons a {
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
}

.navbar .media-icons a:hover {
    background: rgba(24, 49, 83, 0.1);
    transform: translateY(-2px);
}

/* Mobile Optimization */
@media (max-width: 768px) {

    /* Fix navigation issues */
    .navbar .menu {
        padding-top: 80px;
        height: 100vh;
        max-width: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Improve touch targets */
    .navbar .menu li a,
    .button button,
    .form-group input,
    .form-group textarea,
    .submit-btn {
        min-height: 44px;
        padding: 12px 16px;
    }

    /* Fix font sizes for mobile */
    .text-two {
        font-size: 40px;
    }

    .text-three {
        font-size: 24px;
    }

    .text-four {
        font-size: 18px;
    }
    
    .content {
        width: 95%;
    }

    /* Fix layout shifts */
    .home .text {
        min-height: auto;
        height: auto;
    }

    /* Optimize animations */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            transition-duration: 0.01ms !important;
        }
    }
}

/* Touch device optimizations */
@media (hover: none) {

    .button button:hover,
    .nav-links li a:hover,
    .media-icons a:hover {
        transform: none;
    }
}

/* Projects Page Enhanced Styling */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.project-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(24, 49, 83, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #183153, #0E2431);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(24, 49, 83, 0.15);
    background: rgba(255, 255, 255, 1);
}

.project-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #183153, #0E2431);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: all 0.3s ease;
}

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

.project-image i {
    font-size: 35px;
    color: #fff;
}

.project-content h3 {
    color: #183153;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.project-content p {
    color: #64748b;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
}

.tech-tag {
    background: rgba(24, 49, 83, 0.1);
    color: #183153;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(24, 49, 83, 0.1);
}

.tech-tag:hover {
    background: #183153;
    color: white;
    transform: translateY(-2px);
}

.project-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.project-link {
    padding: 12px 24px;
    background: linear-gradient(135deg, #183153, #0E2431);
    color: white;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.project-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(24, 49, 83, 0.2);
}

.project-link i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.project-link:hover i {
    transform: translateX(3px);
}

/* Projects Responsive Design */
@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-top: 40px;
        padding: 0 20px;
    }

    .project-card {
        padding: 30px 25px;
    }

    .project-image {
        width: 70px;
        height: 70px;
    }

    .project-content h3 {
        font-size: 22px;
    }

    .tech-tag {
        padding: 6px 14px;
        font-size: 13px;
    }
}

@media (hover: none) {
    .project-card:hover {
        transform: none;
        box-shadow: 0 8px 32px rgba(24, 49, 83, 0.08);
    }

    .project-link:hover {
        transform: none;
        box-shadow: none;
    }
}