*{
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;     /* Rich blue */
    --primary-light: #60a5fa; /* Lighter blue */
    --primary-dark: #1e40af;  /* Darker blue */
    --accent: #3b82f6;      /* Blue accent */
    --secondary: #6b7280;   /* Medium gray for secondary elements */
    --dark: #000000;       /* Pure black */
    --darker: #000000;     /* Pure black */
    --light: #f9fafb;      /* Off white */
    --gray: #6b7280;       /* Medium gray */
    --light-gray: #e5e7eb; /* Light gray */
    --shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
    --transition: all 0.3s ease;
}

html{
    scroll-behavior: smooth;
}

body{
    background: var(--darker);
    color: var(--light);
    line-height: 1.6;
}

#header{
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    border-bottom: 1px solid var(--primary);
}

.header-text p{
  color: #6b7280;
  font-size: 18px;
}

.header-text h3 span{
    font-size: 25px;
}

.container{
    padding: 10px 10%;
    max-width: 1400px;
    margin: 0 auto;
}

nav{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 15px 0;
    position: relative;
    z-index: 100;
}

.logo{
    width: 140px;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

nav ul{
    display: flex;
    gap: 20px;
}

nav ul li{
    display: inline-block;
    list-style: none;
    margin: 10px 10px;
}

nav ul li a{
    color: var(--light);
    text-decoration: none;
    font-size: 18px;
    position: relative;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

nav ul li a::after{
    content:'';
    width: 0;
    height: 2px;
    background: var(--primary);
    position: absolute;
    left:0;
    bottom: -6px;
    transition: 0.5s;
    box-shadow: 0 0 5px rgba(37, 99, 235, 0.5);
}

nav ul li a:hover{
    color: var(--primary);
}

nav ul li a:hover::after{
    width: 100%;
}

.header-text{
    margin-top: 15%;
    font-size: 30px;
    text-align: left;
    position: relative;
    z-index: 1;
}

.header-text h1{
    font-size: 60px;
    margin-top: 20px;
    font-weight: 700;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

span{
    color: var(--primary);
}

.header-text h1 span{
    color: var(--primary-light);
    vertical-align: bottom;
    font-family: monospace;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--primary);
    display: inline-block;
    width: 0;
    animation: typing 2s steps(15, end) forwards, blink 0.7s step-end infinite;
}

@keyframes typing {
    from{width: 0ch;}
    to{width: 15ch;}
}

@keyframes blink {
    50%{border-color: transparent;}
}

/* about section */

#about{
    min-height: 100vh;
    padding: 100px 0;
    color: var(--light);
    background: var(--darker);
    border-bottom: 1px solid var(--primary);
}

.row{
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.about-col-1{
    flex-basis: 35%;
}

.about-col-1 img{
    width: 100%;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid transparent;
}

.about-col-1 img:hover {
    transform: scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
}

.about-col-2{
    flex-basis: 60%;
}

.subtitle{
    font-size: 48px;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

.subtitle::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 60px;
    height: 3px;
    background: var(--primary);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.7);
}

.tab-titles{
    display: flex;
    margin: 30px 0 20px;
    border-bottom: 1px solid rgba(37, 99, 235, 0.2);
}

.tab-links{
    margin-right: 50px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    padding-bottom: 10px;
    color: var(--light);
    transition: var(--transition);
}

.tab-links:hover {
    color: var(--primary);
}

.tab-links::after{
    content: '';
    width: 0;
    height: 2px;
    background: var(--primary);
    position: absolute;
    left: 0;
    bottom: 0;
    transition: 0.5s;
    box-shadow: 0 0 5px rgba(37, 99, 235, 0.5);
}

.tab-links.active-link{
    color: var(--primary);
}

.tab-links.active-link::after{
    width: 100%;
}

.tab-contents ul li{
    list-style: none;
    margin: 20px 0;
    position: relative;
    padding-left: 25px;
}

.tab-contents ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(37, 99, 235, 0.7);
}

.tab-contents ul li span{
    color: var(--primary);
    font-weight: 600;
    font-size: 16px;
}

.tab-contents{
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-contents.active-tab{
    display: block;
}

/* serivces page */

#services{
    padding: 70px 0;
    background: var(--darker);
    border-bottom: 1px solid var(--primary);
}

.services-list{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.services-list div{
    background: rgba(17, 24, 39, 0.7);
    border-radius: 20px;
    padding: 30px;
    transition: var(--transition);
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.services-list div:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
}

.services-list div:hover:before {
    opacity: 0.1;
}

.services-list div:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
    border-color: var(--primary);
}

.services-list i {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 20px;
    transition: var(--transition);
}

.services-list div:hover i {
    color: var(--primary-light);
}

.services-list h2{
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--light);
    transition: var(--transition);
}

.services-list div:hover h2 {
    color: var(--primary);
}

.services-list div p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.services-list div a{
    display: inline-block;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 0;
    color: var(--primary);
    position: relative;
    font-weight: 500;
    transition: var(--transition);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.services-list div a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
    box-shadow: 0 0 5px rgba(37, 99, 235, 0.5);
}

.services-list div:hover a,
.services-list div a:hover {
    color: var(--primary-light);
}

/* portfolio */

#portfolio{
    padding: 80px 0;
    background: var(--darker);
    border-bottom: 1px solid var(--primary);
}

.work-list{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 40px;
    margin-top: 50px;
}

.work{
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.work img{
    width: 100%;
    border-radius: 15px;
    display: block;
    transition: transform 0.8s;
    height: 300px;
    object-fit: cover;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.work:hover img{
    transform: scale(1.1);
}

.layer{
    width: 100%;
    height: 0;
    background: linear-gradient(rgba(3, 7, 18, 0.7), rgba(37, 99, 235, 0.8));
    border-radius: 15px;
    position: absolute;
    left: 0;
    bottom: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    transition: height 0.5s;
    backdrop-filter: blur(3px);
}

.layer h3{
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--light);
}

.layer p {
    margin-bottom: 20px;
}

.layer a{
    margin-top: 20px;
    color: var(--darker);
    text-decoration: none;
    font-size: 18px;
    line-height: 50px;
    width: 50px;
    height: 50px;
    background: var(--light);
    border-radius: 50%;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--primary);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

.layer a:hover {
    transform: scale(1.1);
    background-color: var(--primary);
    color: var(--light);
}

.work:hover .layer{
    height: 100%;
}

.hidden {
    display: none;
}

.btn{
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--light);
    font-size: 16px;
    font-weight: 500;
    border-radius: 30px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.btn.vbtn{
   height: 50px;
   margin-top: 30px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary);
    z-index: -1;
    transition: 0.5s;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

.btn:hover::before {
    width: 100%;
}

.btn:hover {
    color: var(--light);
}

#seeMoreBtn {
    margin-top: 30px;
    margin-bottom: 0;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

#seeMoreBtn:hover {
    background: var(--primary);
    color: var(--light);
}

/* contact page */

#contact{
    padding: 80px 0;
    background: var(--darker);
}

.contact-left{
    flex-basis: 35%;
}

.contact-left a{
    margin-left: 6px;
}

.contact-right{
    flex-basis: 60%;
}

.contact-left p{
    margin-top: 20px;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.contact-left p i{
    color: var(--primary);
    margin-right: 15px;
    font-size: 20px;
    transition: var(--transition);
}

.contact-left p:hover i{
    transform: scale(1.2);
}

.social-icons{
    margin-top: 30px;
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    flex-wrap: wrap;
}

.social-icons a {
    text-decoration: none;
    font-size: 30px;
    margin-right: 15px;
    color: var(--gray);
    display: inline-block;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--primary);
    transform: translateY(-5px);
}

.btn.btn2 {
    display: inline-block;
    margin-top: 30px;
}

.contact-right form{
    width: 100%;
}

form input, form textarea{
    width: 100%;
    border: 0;
    outline: none;
    background: rgba(17, 24, 39, 0.7);
    padding: 15px;
    margin: 15px 0;
    color: var(--light);
    font-size: 18px;
    border-radius: 10px;
    border: 1px solid rgba(37, 99, 235, 0.2);
    transition: var(--transition);
}

form input:focus, form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.submitbtn {
    margin: 20px 0 0;
    padding: 14px 40px;
    font-size: 16px;
}

.copyright{
    width: 100%;
    text-align: center;
    padding: 25px 0;
    background: var(--darker);
    font-weight: 300;
    margin-top: 20px;
    border-top: 1px solid rgba(37, 99, 235, 0.1);
}

.copyright p {
    color: rgba(255, 255, 255, 0.6);
}

/* For mobile responsiveness */
nav .fa-solid{
    display: none;
}

@media only screen and (max-width: 768px){
    #header{
        background-attachment: scroll;
    }

    .header-text{
        margin-top: 100px;
        font-size: 24px;
    }

    .header-text h1{
        font-size: 36px;
    }

    nav ul{
        background: rgba(3, 7, 18, 0.95);
        backdrop-filter: blur(10px);
        position: fixed;
        top: 0;
        right: -200px;
        width: 200px;
        height: 100vh;
        padding-top: 50px;
        z-index: 100;
        transition: 0.5s;
        flex-direction: column;
        box-shadow: -5px 0 25px rgba(37, 99, 235, 0.2);
        border-left: 1px solid var(--primary);
    }

    nav ul li{
        display: block;
        margin: 25px;
    }

    nav ul .fa-solid{
        position: absolute;
        top: 25px;
        left: 25px;
        cursor: pointer;
    }

    nav .fa-solid{
        display: block;
        font-size: 24px;
        cursor: pointer;
        color: var(--primary);
    }

    .subtitle{
        font-size: 36px;
    }

    .about-col-1,.about-col-2{
        flex-basis: 100%;
    }

    .about-col-1{
        margin-bottom: 30px;
    }

    .about-col-2{
        font-size: 16px;
    }

    .tab-links{
        margin-right: 20px;
        font-size: 16px;
    }

    .contact-left,.contact-right{
        flex-basis: 100%;
    }

    .contact-left p{
        margin-bottom: 15px;
    }

    .contact-left p i{
        margin-right: 10px;
    }

    #contact, #portfolio, #services, #about {
        padding: 70px 0 30px;
    }
    
    .header-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .btn.btn2 {
        margin-top: 25px;
    }

    .contact-left {
        margin-bottom: 40px;
    }
    
    .contact-left p {
        margin-bottom: 12px;
    }
}

/* Add new media query for very small screens */
@media only screen and (max-width: 450px){
    .header-text {
        margin-top: 60px;
    }
    
    .header-text h1 {
        font-size: 28px;
    }
    
    .header-cta {
        margin-top: 20px;
        margin-bottom: 40px;
        gap: 10px;
    }
    
    .header-cta .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    #header {
        height: auto;
        min-height: 100vh;
        padding-bottom: 120px;
    }
    
    .scroll-down {
        bottom: 70px;
    }
    
    #about {
        padding-top: 60px;
    }
    
    .btn.vbtn {
        margin-top: 20px;
    }
    
    /* Fix animations on mobile */
    .header-text h1 span {
        width: auto;
        animation: none;
        border-right: none;
    }
    
    /* Enable hover animations on touch for mobile */
    .services-list div:hover,
    .work:hover .layer,
    .work:hover img,
    .social-links a:hover,
    .social-links-about a:hover,
    .layer a:hover,
    .btn:hover,
    nav ul li a:hover,
    .about-col-1 img:hover {
        transition: var(--transition);
    }
    
    .social-links a::after,
    .social-links-about a::after {
        opacity: 0;
        visibility: hidden;
    }
    
    .tab-contents {
        animation: fadeIn 0.5s ease forwards;
    }
    
    /* Force enable bounce animation */
    .scroll-down {
        animation: bounce 2s infinite !important;
    }

    .btn.btn2 {
        margin-top: 30px;
    }
}

#msg {
    color: var(--primary);
    margin-top: 15px;
    font-size: 16px;
}

/* New styles for enhanced elements */

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-desc {
    color: var(--light);
    max-width: 600px;
    margin: 0 auto;
    margin-top: 15px;
    font-size: 16px;
    opacity: 0.8;
}

.header-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 15px;
    max-width: 600px;
}

.highlight {
    color: var(--primary);
    position: relative;
    font-weight: 500;
}

.header-cta {
    margin-top: 40px;
    display: flex;
    gap: 20px;
}

.logo-link {
    display: inline-block;
    transition: transform 0.3s;
}

.logo-link:hover {
    transform: scale(1.05);
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

.scroll-down a {
    color: var(--light);
    font-size: 24px;
    transition: var(--transition);
}

.scroll-down a:hover {
    color: var(--primary);
}

.about-intro {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 30px;
}

.social-links-about {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.social-links-about a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    text-decoration: none;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 18px;
    transition: var(--transition);
    position: relative;
}

.social-links-about a:hover {
    transform: translateY(-5px);
    background: white;
    color: var(--primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.social-links-about a:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.social-links-about a::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: max-content;
    padding: 6px 12px;
    background: var(--secondary);
    color: white;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
}

.social-links-about a.linkedin:hover {
    background:linear-gradient(135deg,rgb(10, 104, 155) 50%,white 99%);
    color: white;
}

.social-links-about a.github:hover {
    background: #550c65;
    color: white;
}

.social-links-about a.portfolio:hover {
    background: linear-gradient(135deg,brown,black);
    color: white;
}

.service-card {
    position: relative;
    z-index: 1;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    transition: all 0.4s ease;
}

.service-icon {
    font-size: 50px;
    margin-bottom: 25px;
    color: var(--primary);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: translateY(-5px);
    color: var(--primary-light);
}

.contact-info {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 8px;
    transition: var(--transition);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.contact-item i {
    font-size: 20px;
    margin-right: 15px;
    color: var(--primary);
}

.form-group {
    margin-bottom: 20px;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(20px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-light);
    transform: translateY(-5px);
}

@media only screen and (max-width: 768px) {
    .header-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-cta .btn {
        margin: 0;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* Replace with improved media query that handles all screen sizes properly */
@media only screen and (max-width: 768px) {
    .section-header {
        margin-bottom: 30px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* Replace with new social links styling */
.social-links{
    margin-top: 35px;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.social-links a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    text-decoration: none;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 20px;
    transition: var(--transition);
    position: relative;
}

.social-links a:hover {
    transform: translateY(-5px);
    background: white;
    color: var(--primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.social-links a:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.social-links a::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: max-content;
    padding: 6px 12px;
    background: var(--secondary);
    color: white;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
}

.social-links a.linkedin:hover {
    background:linear-gradient(135deg,rgb(10, 104, 155) 50%,white 99%);
    color: white;
}

.social-links a.github:hover {
    background: #550c65;
    color: white;
}

.social-links a.portfolio:hover {
    background: linear-gradient(135deg,brown,black);
    color: white;
}

.social-links a.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

/* Fix for small screens */
@media only screen and (max-width: 450px) {
    .header-text h1 span {
        animation: typing 2s steps(15, end) forwards, blink 0.7s step-end infinite;
    }
    
    @keyframes typing {
        from{width: 0ch;}
        to{width: 15ch;}
    }
}

/* Touch device specific styles */
.touch-device .service-icon,
.touch-device .service-card,
.touch-device .services-list div,
.touch-device .social-links a,
.touch-device .social-links-about a,
.touch-device .work,
.touch-device .btn,
.touch-device .layer a {
    transition: all 0.3s ease !important;
}

.touch-device .services-list div:active {
    transform: translateY(-10px);
}

.touch-device .social-links a:active,
.touch-device .social-links-about a:active {
    transform: translateY(-5px);
}

.touch-device .btn:active::before {
    width: 100%;
}

.touch-device .layer a:active {
    transform: scale(1.1);
    background-color: var(--primary);
    color: var(--light);
}

/* Override span animation for small screens */
@media only screen and (max-width: 450px) {
    .header-text h1 span {
        width: auto !important;
        animation: none !important;
        border-right: none;
    }
}

/* Enhance button animations for touch devices */
.touch-device .btn {
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease !important;
}

.touch-device .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary);
    z-index: -1;
    transition: width 0.3s ease !important;
}

.touch-device .btn:active {
    color: white !important;
}

.touch-device .btn:active::before {
    width: 100% !important;
}

/* Fix button tap highlight */
.btn {
    -webkit-tap-highlight-color: transparent;
}

/* Enhanced button animations for mobile */
.btn-active {
    transform: scale(0.98);
    background-color: var(--primary) !important;
    color: white !important;
}

.btn-animating {
    transition: all 0.3s ease !important;
}

/* Ensure button animations work on all screen sizes */
@media only screen and (max-width: 450px) {
    /* Make buttons more responsive on mobile */
    .btn {
        position: relative;
        overflow: hidden;
        z-index: 1;
        transform: translateZ(0);
        -webkit-font-smoothing: subpixel-antialiased;
        backface-visibility: hidden;
    }

    .btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 0;
        height: 100%;
        background: var(--primary);
        z-index: -1;
        transition: width 0.3s ease;
    }

    .btn:active::before {
        width: 100%;
    }

    .btn:active {
        color: white;
        background-color: transparent;
    }
}

/* Add responsive adjustments for social-links */
@media only screen and (max-width: 450px) {
    .social-links {
        margin-top: 25px;
        margin-bottom: 10px;
    }
}
