@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: black;
    color: white;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: all 0.3s ease;
}

header.sticky {
    padding: 1rem 9%;
    background-color: rgba(22, 22, 22, 0.95);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 3rem;
    color: #b74b4b;
    font-weight: 800;
    cursor: pointer;
    transition: 0.5s ease;
}

.logo:hover {
    transform: scale(1.1);
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    cursor: pointer;
    z-index: 101;
}

.hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    font-size: 1.8rem;
    color: white;
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background: #b74b4b;
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

nav a:hover,
nav a.active {
    color: #b74b4b;
}

/* Mobile Navigation */
@media (max-width: 995px) {
    .hamburger-menu {
        display: block;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: #161616;
        border-left: 3px solid #b74b4b;
        padding: 10rem 3rem;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        transition: right 0.5s ease;
        z-index: 100;
    }

    nav.active {
        right: 0;
    }

    nav a {
        margin: 2rem 0;
        font-size: 2.2rem;
        padding: 1rem 2rem;
        margin-left: 0;
    }

    nav a::after {
        display: none;
    }

    nav a:hover,
    nav a.active {
        background-color: #b74b4b;
        color: white;
        border-radius: 0.5rem;
        transform: scale(1.05);
    }
}

@media (max-width: 768px) {
    header {
        padding: 2rem 5%;
    }

    nav {
        width: 80%;
    }
}

section {
    min-height: 100vh;
    padding: 10rem 9% 5rem;
    scroll-margin-top: 8rem; /* For offsetting fixed header */
transition: opacity 0.5s ease, transform 0.5s ease;
}
        .section-hidden {
            opacity: 0;
            transform: translateY(50px);
            pointer-events: none;
            height: 0;
            overflow: hidden;
            padding: 0;
            margin: 0;
        }
        
        .section-visible {
            opacity: 1;
            transform: translateY(0);
            height: auto;
            overflow: visible;
            padding: inherit;
            margin: inherit;
        }

#home {
    padding-top: 15rem; /* Extra padding for home section */
}

.home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
    background-color: black;
}

.home .home-content h1 {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.3;
}

span {
    color: #b74b4b;
}

.home-content h3 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.home-content p {
    font-size: 1.6rem;
    margin-bottom: 3rem;
}

.home-img {
    border-radius: 50%;
    animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2.4rem);
    }
    100% {
        transform: translateY(0);
    }
}

.home-img img {
    position: relative;
    width: 32vw;
    border-radius: 50%;
    box-shadow: 0 0 25px #b74b4b;
    cursor: pointer;
    transition: 0.3s ease;
}

.home-img img:hover {
    box-shadow: 0 0 50px #b74b4b;
    transform: scale(1.05);
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background-color: transparent;
    border: 0.2rem solid #b74b4b;
    font-size: 2rem;
    border-radius: 50%;
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease;
    color: #b74b4b;
}

.social-icons a:hover {
    color: black;
    transform: scale(1.3) translateY(-5px);
    background-color: #b74b4b;
    box-shadow: 0 0 25px #b74b4b;
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: black;
    border-radius: 4rem;
    font-size: 1.6rem;
    color: #b74b4b;
    letter-spacing: 0.3rem;
    font-weight: 600;
    border: 2px solid #b74b4b;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    transform: scale(1.03);
    background-color: #b74b4b;
    color: black;
    box-shadow: 0 0 25px #b74b4b;
}

/* Typing Animation Styles */
.typing-text {
    font-size: 3.4rem;
    font-weight: 600;
    margin-bottom: 3rem;
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    white-space: pre;
}

#typing {
    color: #b74b4b;
}

.cursor {
    margin-left: 5px;
    color: #b74b4b;
    font-weight: bold;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
    
    .home {
        gap: 4rem;
    }
}

@media (max-width: 995px) {
    .home {
        flex-direction: column;
        margin: 5rem 4rem;
    }

    .home .home-content h3 {
        font-size: 2.5rem;
    }

    .home-content h1 {
        font-size: 5rem;
        text-align: center;
    }

    .home-img img {
        width: 70vw;
        margin-top: 4rem;
    }
    
    .typing-text {
        text-align: center;
        justify-content: center;
    }
    
    .social-icons {
        display: flex;
        justify-content: center;
    }
    
    .btn {
        display: block;
        margin: 0 auto;
        width: fit-content;
    }
}

/* Services Section */
.services {
    background-color: #161616;
}

.heading {
    font-size: 5rem;
    text-align: center;
    margin-bottom: 5rem;
}

.services-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.service-box {
    flex: 1 1 30rem;
    background-color: #1f1f1f;
    padding: 3rem 2rem 4rem;
    border-radius: 2rem;
    text-align: center;
    border: 0.2rem solid #1f1f1f;
    transition: 0.5s ease;
}

.service-box:hover {
    border-color: #b74b4b;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(183, 75, 75, 0.3);
}

.service-box i {
    font-size: 7rem;
    color: #b74b4b;
    margin-bottom: 2rem;
}

.service-box h3 {
    font-size: 2.6rem;
    margin: 1rem 0;
}

.service-box p {
    font-size: 1.6rem;
    margin-bottom: 2rem;
    color: #d3d3d3;
}

/* Skills Section */
.skills {
    background-color: black;
}

/* Projects Section */
.projects {
    background-color: #161616;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.project-box {
    background-color: #1f1f1f;
    border-radius: 2rem;
    overflow: hidden;
    transition: 0.5s ease;
    border: 0.2rem solid #1f1f1f;
}

.project-box:hover {
    border-color: #b74b4b;
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(183, 75, 75, 0.3);
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #b74b4b, #8b3a3a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.5s ease;
}

.project-box:hover .project-overlay {
    opacity: 1;
}

.project-overlay h3 {
    font-size: 2.5rem;
    color: #b74b4b;
    margin-bottom: 1rem;
}

.project-overlay p {
    font-size: 1.6rem;
    color: white;
    margin-bottom: 2rem;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.btn-demo, .btn-code {
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1.4rem;
    text-decoration: none;
    transition: 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-demo {
    background-color: #b74b4b;
    color: white;
}

.btn-demo:hover {
    background-color: #8b3a3a;
    transform: scale(1.05);
}

.btn-code {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-code:hover {
    background-color: white;
    color: #1f1f1f;
    transform: scale(1.05);
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    font-size: 2.2rem;
    color: #b74b4b;
    margin-bottom: 1rem;
}

.project-info p {
    font-size: 1.4rem;
    color: #d3d3d3;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background-color: #b74b4b;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 1.2rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-box {
        margin: 0 1rem;
    }

    .project-links {
        flex-direction: column;
        width: 100%;
    }

    .btn-demo, .btn-code {
        width: 100%;
        justify-content: center;
    }
}

.skills-container {
    width: 80%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skill-box {
    margin: 1rem 0;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.skill-info h3 {
    font-size: 2rem;
    font-weight: 500;
}

.skill-info .skill-percent {
    font-size: 1.6rem;
    color: #b74b4b;
}

.skill-bar {
    height: 1rem;
    background-color: #1f1f1f;
    border-radius: 0.5rem;
    overflow: hidden;
}

.skill-bar span {
    display: block;
    height: 100%;
    border-radius: 0.5rem;
    background-color: #b74b4b;
}

.html {
    width: 95%;
    animation: html 2s;
}

.css {
    width: 85%;
    animation: css 2s;
}

.javascript {
    width: 70%;
    animation: javascript 2s;
}

.react {
    width: 50%;
    animation: react 2s;
}

.kotlin {
    width: 80%;
    animation: kotlin 2s;
}

@keyframes html {
    0% {
        width: 0%;
    }
    100% {
        width: 95%;
    }
}

@keyframes css {
    0% {
        width: 0%;
    }
    100% {
        width: 85%;
    }
}

@keyframes javascript {
    0% {
        width: 0%;
    }
    100% {
        width: 70%;
    }
}

@keyframes react {
    0% {
        width: 0%;
    }
    100% {
        width: 50%;
    }
}

@keyframes kotlin {
    0% {
        width: 0%;
    }
    100% {
        width: 80%;
    }
}

/* Education & Experience Sections */
.education, .experience {
    background-color: #161616;
    padding: 8rem 9% 5rem;
}

.experience {
    background-color: #161616;
    padding: 5rem 9%;
}

.experience-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.experience-box {
    background-color: #1f1f1f;
    padding: 3rem;
    border-radius: 2rem;
    border-left: 5px solid #b74b4b;
    transition: 0.3s ease;
}

.experience-box:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(183, 75, 75, 0.3);
}

.exp-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.exp-content span {
    font-size: 1.4rem;
    color: #b74b4b;
    font-weight: 600;
}

.exp-content h3 {
    font-size: 2.6rem;
    color: white;
}

.exp-content p {
    font-size: 1.8rem;
    color: #d3d3d3;
}

.exp-desc p {
    font-size: 1.6rem;
    color: #d3d3d3;
    margin-bottom: 1rem;
}

.exp-desc ul {
    list-style-type: disc;
    padding-left: 2rem;
}

.exp-desc li {
    font-size: 1.6rem;
    color: #d3d3d3;
    margin-bottom: 0.5rem;
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: #b74b4b;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 10px;
}

.timeline-container {
    padding: 1px 1px;
    position: relative;
    background-color: inherit;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 50%;
}

.timeline-container:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(183, 75, 75, 0.3);
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -17px;
    background-color: #b74b4b;
    border: 4px solid #b74b4b;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid #1f1f1f;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent #1f1f1f;
}

.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 10px;
    border: medium solid #1f1f1f;
    border-width: 10px 10px 10px 0;
    border-color: transparent #1f1f1f transparent transparent;
}

.right::after {
    left: -16px;
}

.content {
    padding: 20px 30px;
    background-color: #1f1f1f;
    position: relative;
    border-radius: 6px;
}

.content .year {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #b74b4b;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.content p {
    font-size: 1.6rem;
    color: #d3d3d3;
}

/* Contact Section */
.contact {
    background-color: black;
    padding: 8rem 9% 5rem;
}

.contact form {
    max-width: 70rem;
    margin: 3rem auto 0;
    text-align: center;
}

.input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.input-field {
    flex: 1 1 48%;
}

.input-field input,
.textarea-field textarea {
    width: 100%;
    padding: 2rem;
    font-size: 1.8rem;
    color: white;
    background-color: #1f1f1f;
    border-radius: 1rem;
    border: 2px solid #2e2e2e;
    transition: all 0.3s ease;
}

.input-field input:focus,
.textarea-field textarea:focus {
    border-color: #b74b4b;
    box-shadow: 0 0 10px rgba(183, 75, 75, 0.5);
}

.textarea-field textarea {
    height: 20rem;
    resize: none;
    font-size: 1.8rem;
}

.contact form .btn {
    font-size: 1.8rem;
    padding: 1.5rem 4rem;
    margin-top: 3rem;
}

/* Footer */
footer {
    display: grid;
    place-items: center; 
    text-align: center;
    width: 100%;
    padding: 2rem 0;
    background: #1f1f1f;
    color: white;
}

footer p {
    font-size: 1.6rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .skills-container, 
    .contact form {
        width: 90%;
    }
    
    .input-field {
        flex: 1 1 100%;
    }
    
    .skill-title, .skill-percent {
        font-size: 2rem !important;
    }
    
    .timeline-title {
        font-size: 2.2rem !important;
    }
    
    .timeline::after {
        left: 31px;
    }

    .timeline-container {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-container::after {
        left: 18px;
    }

    .right::after,
    .left::after {
        left: 18px;
    }

    .right {
        left: 0;
    }

    .left::before,
    .right::before {
        border-width: 10px 10px 10px 0;
        border-color: transparent #1f1f1f transparent transparent;
        left: 60px;
    }
}

@media (max-width: 600px) {
    .contact form .input-box input {
        width: 100%;
    }
    
    section {
        padding: 10rem 5% 5rem;
    }
    
    .heading {
        font-size: 4rem;
    }
}
