*{
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}
body{
    background: #080808;
    color: #fff;
    scroll-behavior: smooth;
    overflow-x: hidden;
}
#header{
    width: 100%;
    height: 100vh;
    background-image: url(images/background.png);
    background-size: cover; 
    background-position: 85% center;  /* Shifted further right to show more of the face */
}
.container{
    padding: 10px 10%;
}

nav{
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo{
    width: 140px;
}

nav ul li{
    display: inline-block;
    margin: 10px 20px;
    list-style: none;
}

nav ul li a{
    text-decoration: none;
    color: #fff;
    font-size: 18px;
    position: relative;
    transition: color 0.3s ease;
}

nav ul li a::after{
    content: '';
    width: 0%;
    height: 3px;
    background: #7008e8;
    position: absolute;
    left: 0;
    bottom: -6px;
    transition: width 0.3s ease;
}

nav ul li a:hover{
    color: #fa7101;
}

nav ul li a:hover::after{
    width: 100%;
}

.header-text{
    margin-top: 15%; /* Reduced from 20% to move text higher */
    font-size: 30px;
    animation: fadeInUp 1.2s ease-out;
    max-width: 60%;
    position: relative;
    z-index: 2;
    padding: 20px;
    border-radius: 10px;
}

.header-text h1{
    font-size: 60px;
    margin-top: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.header-text h1 span{
    color: #fa7101;
    position: relative;
    display: inline-block;
    background: linear-gradient(45deg, #fa7101, #ffae00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.header-text h2{
    font-size: 45px;
    margin-top: 5px;
    opacity: 0.9;
}

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

/*=====================================Projects==============================================*/
#projects{
    padding: 50px 0;
}
.project-list{
    display: flex; /* 1. Change display to flex */
    justify-content: center; /* 2. Center the items horizontally */
    flex-wrap: wrap; /* 3. Allow items to wrap on smaller screens */
    gap: 40px; /* 4. Use gap for spacing (replaces grid-gap) */
    margin-top: 50px;
}
.project{
    flex-basis: 45%; /* 5. Set a base width for each project */
    max-width: 600px; /* 6. Add a max-width to prevent them from getting too large */
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.4s ease-out, box-shadow 0.4s ease-out;
}

.project:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.project img{
    width: 100%;
    border-radius: 12px;
    display: block;
    transition: transform 0.5s;
    object-fit: cover;
    aspect-ratio: 16/9;  /* Maintain a consistent aspect ratio */
}
.layer{
    width: 100%;
    height: 0;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(112, 8, 232, 0.7));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 10px;
    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;
    font-size: 14px;
    transition: height 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.layer h3{
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 1px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
    transition-delay: 0.1s;
}

.project:hover .layer h3 {
    transform: translateY(0);
    opacity: 1;
}

.layer p {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
    transition-delay: 0.2s;
    margin-bottom: 20px;
}

.project:hover .layer p {
    transform: translateY(0);
    opacity: 1;
}

.layer a{
    margin-top: 20px;
    color: #fa7101;
    text-decoration: none;
    font-size: 18px;
    line-height: 60px;
    background: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease, background 0.3s ease, color 0.3s ease;
    transition-delay: 0.3s;
}

.project:hover .layer a {
    transform: translateY(0);
    opacity: 1;
}

.layer a:hover {
    background: #fa7101;
    color: #fff;
    transform: scale(1.1);
}
.project:hover img{
    transform: scale(1.1);
}
.project:hover .layer{
    height: 100%;
}

/*=====================================about==============================================*/

#about{
    padding: 80px 0;
    color: #ababab;
}

.row{
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.about-col-1{
    flex-basis: 35%;
    justify-content: space-between;
}

.about-col-1 img{
    width: 100%;
    border-radius: 15px;

}

.about-col-2{
    padding-bottom: 100px;
    flex-basis: 60%;
    position: relative; /* Added for proper positioning of tab contents */
}

.sub-title{
    font-size: 60px;
    color: #fff;
    font-weight: 700;
    text-align: center;
    position: relative;
    margin-bottom: 30px;
}

.sub-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(45deg, #7008e8, #fa7101);
    margin: 15px auto 0;
    border-radius: 2px;
}

.descriptivetext{
    font-size: 20px;
    line-height: 1.6;
    margin-top: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.3px;
}

.tab-titles{
    display: flex;
    margin: 20px 0px 40px;
}

.tab-links{
    margin-right: 50px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.tab-links::after{
    content: '';
    width: 0;
    height: 3px;
    background: linear-gradient(to right, #fa7101, #ffae00);
    position: absolute;
    left: 0;
    bottom: 0;
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 3px;
}

.tab-links:hover {
    color: #fa7101;
}

.tab-links.active-link {
    color: #fa7101;
}

.tab-links.active-link::after{
    width: 100%;
}

.tab-contents ul li{
    list-style: none;
    margin-top: 40px;
    font-size: 20px;
    line-height: 30px;
    position: relative;
    padding-left: 15px;
    border-left: 3px solid rgba(250, 113, 1, 0.5);
    padding-bottom: 20px;
}

.tab-contents ul li:last-child {
    padding-bottom: 0;
}

.tab-contents ul li span{
    color: #fa7101;
    font-size: 25px;
    font-weight: 800;
    display: inline-block;
    margin-bottom: 10px;
}

sigma{
    color: #fff;
    font-weight: 600;
}

.tab-contents{
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    visibility: hidden;
}

.tab-contents.active-tab{
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    position: relative;
    pointer-events: auto;
    z-index: 1;
}

/* Tab content container styling */
.tab-content-container {
    position: relative;
    min-height: 600px; /* Increased height to accommodate all content */
    overflow: hidden;
    margin-bottom: 40px; /* Add bottom margin for spacing */
}

/*=====================================Services==============================================*/

#services{
    padding: 30px 0;
    color: #ababab;
}

.services-list{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 40px;
    margin-top: 50px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.service{
    background: #262626;
    padding: 40px;
    font-size: 15px;
    font-weight: 300;
    border-radius: 16px;
    transition: background 0.5s, transform 0.5s, box-shadow 0.5s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.service::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(112, 8, 232, 0.1), rgba(250, 113, 1, 0.1));
    z-index: -1;
    transition: opacity 0.5s ease;
    opacity: 0;
}

.service:hover::before {
    opacity: 1;
}

.service i{
    font-size: 50px;
    margin-bottom: 30px;
    color: #fa7101;
    transition: transform 0.5s ease, color 0.5s ease;
    display: inline-block;
}

.service h2{
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 15px;
    color: white;
    position: relative;
    padding-bottom: 12px;
    transition: transform 0.5s ease, color 0.5s ease;
}

.service h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: #fa7101;
    transition: width 0.3s ease;
}

.service:hover h2::after {
    width: 70px;
}

.service p{
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    transition: transform 0.5s ease, color 0.5s ease;
}

.service:hover{
    background: #1e1e1e;
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 30px rgba(112, 8, 232, 0.2);
}

.service:hover i{
    color: #fa7101;
    transform: translateY(-5px) scale(1.1);
}

.service:hover h2{
    transform: translateY(-5px);
    color: #fa7101;
}

.service:hover p{
    transform: translateY(-5px);
    color: #ddd;
}

.learn-more{
    display: inline-block;
    color: #fa7101;
    text-decoration: none;
    margin-top: 25px;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid rgba(250, 113, 1, 0.1);
    border-radius: 30px;
    transition: color 0.3s, background 0.3s, border-color 0.3s;
    background: rgba(250, 113, 1, 0.05);
    align-self: center;
    margin-top: auto;
}

.learn-more i{
    font-size: 14px;
    margin-left: 5px;
    color: #fa7101;
    display: inline-block;
    transition: transform 0.3s ease-out;
}

.service:hover .learn-more {
    color: #fa7101;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(250, 113, 1, 0.3);
}

.service:hover .learn-more i{
    color: #fa7101;
}

.learn-more:hover i{
    transform: translateX(8px);
}

/* Animation styles */
#animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1.5s ease-out;
}

.typing-container {
    text-align: left;
    width: 80%;
    max-width: 800px;
    transition: all 1.2s ease-out;
    position: absolute;
    z-index: 1010;
    display: flex;
    flex-direction: column;
    left: 10%; /* Add left positioning to stick to the left side */
    right: auto; /* Ensure it doesn't stick to the right */
}

#typing-name, #typing-role, #typing-university {
    overflow: visible;
    white-space: nowrap;
    margin-bottom: 15px;
    opacity: 0;
    color: #fff;
    transition: opacity 0.5s;
    position: relative;
}

#typing-name {
    font-size: 60px;
    font-weight: bold;
    transition: margin-top 0.3s ease;
}

#typing-role {
    font-size: 30px;
    color: #fa7101;
    margin-bottom: 5px;
    transition: order 0.5s ease; /* Allow smooth transition when changing order */
}

#typing-university {
    font-size: 45px;
    margin-top: 10px;
}

.content-section {
    opacity: 0;
    transition: opacity 1.5s ease-in;
}

/* Animation keyframes */




/* Animation keyframes no longer needed for class-based typing */


.final-position {
    transform: translate(0%, 20%) !important; /* Changed from 10% to 0% to stick to left */
    opacity: 0.9 !important;
    z-index: 100;
}

.fade-out {
    opacity: 0 !important;
    pointer-events: none;
}

.fade-in {
    opacity: 1 !important;
}

.typing-cursor {
    display: inline-block;
    color: #fa7101;
    font-weight: bold;
    font-size: 120%; /* Make cursor slightly larger */
    animation: blink-caret 0.75s step-end infinite;
    margin-left: 2px;
    position: relative;
    top: -2px; /* Slight vertical adjustment */
}

@keyframes blink-caret {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

/* Animation styles moved to scroll-animation.css */

/*=====================================Contact==============================================*/

#contact {
    padding: 80px 0;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    margin-top: 50px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-item i {
    font-size: 25px;
    color: #fa7101;
    margin-right: 20px;
    margin-top: 5px;
}

.contact-item h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.contact-item p {
    color: #ababab;
}

.social-icons {
    margin-top: 40px;
}

.social-icons a {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: #262626;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    margin-right: 15px;
    color: #fff;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: #fa7101;
    transform: translateY(-5px);
}

.social-icons i {
    font-size: 20px;
}

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

.contact-form input, .contact-form textarea {
    width: 100%;
    border: 0;
    outline: none;
    background: #262626;
    padding: 15px;
    margin: 15px 0;
    color: #fff;
    font-size: 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.contact-form input:focus, .contact-form textarea:focus {
    background: #333;
}

.btn {
    display: inline-block;
    background: #fa7101;
    color: #fff;
    padding: 14px 30px;
    border: none;
    border-radius: 6px;
    margin-top: 20px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #7008e8;
    transform: translateY(-5px);
}

/* Footer Styles */
footer {
    background: #262626;
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-content p {
    color: #ababab;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #fa7101;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background: #7008e8;
    transform: translateY(-5px);
}

/* Media Queries for Responsiveness */
@media only screen and (max-width: 768px) {
    /* Ensure background shows your face on mobile */
    #header {
        background-size: cover;
        background-position: 65% center; /* Adjusted to move face more to the right */
    }
    
    /* Left-align logo on mobile and exactly match the header-text alignment */
    .logo {
        margin-left: 15px; /* Exact same left margin as header text content */
        text-align: left;
        padding-left: 0; /* Remove padding and use margin instead for precise alignment */
        width: 160px; /* Increased size for mobile */
        display: block; /* Ensure block display for proper alignment */
    }
    
    nav {
        justify-content: flex-start; /* Align navigation to the left */
    }
    
    nav ul {
        position: fixed;
        top: 0;
        right: -200px;
        width: 200px;
        height: 100vh;
        background: #262626;
        padding-top: 50px;
        z-index: 999;
        transition: all 0.3s ease;
    }
    
    nav ul.active {
        right: 0;
    }
    
    nav ul li {
        display: block;
        margin: 25px;
    }
    
    /* This duplicate header rule is removed as it's overriding the earlier setting */
    
    .header-text {
        margin-top: 40%;  /* Reduced from 50% to move text higher on mobile */
        font-size: 16px;
        max-width: 90%;  /* Allow more width on small screens */
        text-align: left; /* Left align header text on mobile */
        margin-left: 0;   /* No left margin for the container */
        padding: 0;      /* Remove padding from all sides */
        padding-left: 15px; /* Single padding value for precise alignment */
    }
    
    .header-text h1 {
        font-size: 30px;
        text-align: left; /* Ensure heading is left aligned */
    }
    
    .header-text h2 {
        font-size: 22px;
        text-align: left; /* Ensure subheading is left aligned */
    }
    
    .about-col-1, .about-col-2 {
        flex-basis: 100%;
    }
    
    .about-col-1 {
        margin-bottom: 30px;
    }
    
    .tab-links {
        margin-right: 20px;
        font-size: 16px;
    }
    
    .contact-info, .contact-form {
        flex-basis: 100%;
    }
    
    .sub-title {
        font-size: 40px;
    }
    
    .services-list {
        grid-template-columns: 1fr;
    }
    
    /* Fix for project images on mobile */
    .project {
        flex-basis: 100%;  /* Make projects take full width on mobile */
    }
    
    .project img {
        height: auto;      /* Allow height to adjust proportionally */
        object-fit: cover;  /* Ensure the image covers the area without distortion */
        max-height: 300px; /* Limit max height to prevent oversized images */
    }
    
    /* Ensure typing animation sticks to the left on mobile */
    .typing-container {
        left: 5%; /* Less margin on mobile */
        width: 90%; /* Wider on mobile */
    }
}

/* Additional media query for smaller phones to ensure face visibility */
@media only screen and (max-width: 480px) {
    #header {
        background-position: 70% center; /* Moved even further right on smaller screens */
    }
    
    /* Reinforce left alignment for very small screens */
    .container {
        padding: 10px 5%; /* Reduce side padding to give more space */
    }
    
    .header-text {
        margin-top: 45%; /* Reduced to move text higher on small screens */
        max-width: 70%; /* Ensure text doesn't overlap with face */
        padding-left: 5px; /* Exact same padding as logo margin for perfect alignment */
        text-align: left; /* Explicitly set text alignment to left */
        margin-left: 0;   /* No margin */
    }
    
    /* Ensure logo and text have exactly the same alignment on very small screens */
    .logo {
        width: 140px; /* Increased size for small screens */
        margin-left: 5px; /* Match the container padding */
        padding-left: 0;
    }
    
    nav {
        justify-content: flex-start; /* Reinforce left alignment */
    }
}
