/* General Setup and CSS Variables */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #081b29;
    --second-bg-color: #112e42;
    --text-color: #ededed;
    --main-color: #00aaff; /* Electric Blue */
    --accent-color: #aa00ff; /* Deep Violet */
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

/* General Section Styling */
section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.heading {
    font-size: 5rem;
    text-align: center;
    margin-bottom: 4rem;
}

.heading span {
    color: var(--main-color);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: rgba(8, 27, 41, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 600;
}

.navbar a {
    font-size: 1.7rem;
    color: var(--text-color);
    font-weight: 500;
    margin-left: 3.5rem;
    transition: .3s;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

/* Home Section */
.home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8rem;
}

.home-content {
    max-width: 60rem;
}

.home-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--main-color);
}

.dynamic-text {
    color: var(--accent-color);
}

.home-content p {
    font-size: 1.6rem;
    margin: 2rem 0 4rem;
}

.btn-box {
    display: flex;
    justify-content: space-between;
    width: 34.5rem;
    height: 5rem;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 15rem;
    height: 100%;
    background: var(--main-color);
    border: .2rem solid var(--main-color);
    border-radius: .8rem;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: .1rem;
    color: var(--bg-color);
    transition: .5s;
}

.btn:nth-child(2) {
    background: transparent;
    color: var(--main-color);
}

.btn:nth-child(2):hover {
    color: var(--bg-color);
    background: var(--main-color);
}

.home-sci {
    margin-top: 4rem;
    display: flex;
    gap: 2rem;
}

.home-sci a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    transition: .5s;
}

.home-sci a:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.home-img img {
    width: 35vw;
    max-width: 400px;
    border-radius: 50%;
    border: .5rem solid var(--main-color);
    box-shadow: 0 0 3rem var(--main-color), 0 0 5rem var(--accent-color);
    animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage {
    0% { transform: translateY(0); }
    50% { transform: translateY(-2.4rem); }
    100% { transform: translateY(0); }
}

/* About Section */
.about {
    background: var(--second-bg-color);
}
.about-content {
    max-width: 800px;
    margin: 0 auto 5rem auto;
    text-align: center;
}
.about-content h3 {
    font-size: 2.6rem;
    margin-bottom: 2rem;
}
.about-content p {
    font-size: 1.6rem;
    line-height: 1.8;
}

.education-container .sub-heading {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-image: linear-gradient(var(--main-color), var(--accent-color));
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
    border-radius: 3px;
}

.timeline-item {
    padding: 1rem 4rem;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -17px;
    background-color: var(--bg-color);
    border: 4px solid var(--main-color);
    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 white;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--bg-color);
}

.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--bg-color) transparent transparent;
}

.right::after { left: -16px; }

.timeline-content {
    padding: 2rem 3rem;
    background-color: var(--bg-color);
    position: relative;
    border-radius: 6px;
    border: 1px solid var(--main-color);
}

.timeline-content h4 {
    font-size: 1.8rem;
    color: var(--main-color);
}
.timeline-content p {
    font-size: 1.5rem;
}

/* Experience Section */
.experience {
    padding-bottom: 7rem;
}

.experience-timeline {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1.9rem;
    width: .4rem;
    height: 100%;
    background: linear-gradient(var(--main-color), var(--accent-color));
    z-index: -1;
    border-radius: .2rem;
}

.timeline-box {
    position: relative;
    padding-left: 5rem;
    padding-bottom: 2rem;
}

.experience-icon {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 4rem;
    color: var(--main-color);
}

.timeline-box .year {
    font-size: 1.5rem;
    color: var(--main-color);
    font-weight: 600;
}

.timeline-box h3 {
    font-size: 2rem;
    margin: .5rem 0;
}
.timeline-box p {
    font-size: 1.4rem;
}

/* Skills Section */
.skills {
    background: var(--second-bg-color);
}
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}
.skill-category {
    background: var(--bg-color);
    padding: 3rem;
    border-radius: 1rem;
    border: 1px solid var(--main-color);
    transition: .3s ease;
}
.skill-category:hover {
    transform: translateY(-1rem);
    box-shadow: 0 0 2rem rgba(0, 170, 255, 0.5);
}
.skill-category h3 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--main-color);
}
.skill-item {
    background: var(--second-bg-color);
    padding: 1rem 1.5rem;
    border-radius: .5rem;
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

/* Projects Section */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
    gap: 2.5rem;
}

.project-card {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    display: flex;
    box-shadow: 0 0 1rem rgba(0,0,0,.1);
}

.project-card img {
    width: 100%;
    transition: .5s ease;
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.1), var(--main-color));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 4rem;
    transform: translateY(100%);
    transition: .5s ease;
}

.project-card:hover .project-layer {
    transform: translateY(0);
}

.project-layer h4 {
    font-size: 3rem;
}

.project-layer p {
    font-size: 1.6rem;
    margin: .3rem 0 1rem;
}

.project-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
    background: var(--text-color);
    border-radius: 50%;
}

.project-layer a i {
    font-size: 2rem;
    color: var(--second-bg-color);
}

/* Contact Section */
.contact {
    background: var(--second-bg-color);
}

.contact form {
    max-width: 70rem;
    margin: 1rem auto;
    text-align: center;
    margin-bottom: 3rem;
}

.contact form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--bg-color);
    border-radius: .8rem;
    margin: .7rem 0;
    border: 1px solid var(--main-color);
}

.contact form .input-box input {
    width: 49%;
}

.contact form .btn {
    margin-top: 2rem;
    cursor: pointer;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 4rem;
}

.contact-info a {
    font-size: 1.8rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: .3s;
}

.contact-info a:hover {
    color: var(--main-color);
}

/* Footer */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--bg-color);
}

.footer-text p {
    font-size: 1.6rem;
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 1rem var(--main-color);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--bg-color);
}


/* Responsive Design */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media (max-width: 991px) {
    .header {
        padding: 2rem 3%;
    }
    section {
        padding: 10rem 3% 2rem;
    }
    .footer {
        padding: 2rem 3%;
    }
    .home {
        flex-direction: column-reverse;
        text-align: center;
    }
    .home-content h1 { font-size: 5rem; }
    .home-content h3 { font-size: 2.6rem; }
    .home-img img { width: 70vw; margin-top: 4rem; }
}

@media (max-width: 768px) {
    .navbar {
        /* Basic mobile nav - can be enhanced with JS for a hamburger menu */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 3%;
        background: var(--bg-color);
        display: none; /* Add JS to toggle this */
    }
    .navbar.active { display: block; }
    .navbar a { display: block; margin: 3rem 0; }
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item::before { left: 60px; border: medium solid white; border-width: 10px 10px 10px 0; border-color: transparent white transparent transparent; }
    .left::after, .right::after { left: 15px; }
    .right { left: 0%; }
    .experience-timeline::before { left: 1.9rem; } /* Keep line on left */
}

@media (max-width: 450px) {
    html {
        font-size: 50%;
    }
    .home-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .btn-box {
        width: 100%;
        flex-direction: column;
        height: auto;
        gap: 2rem;
    }
    .btn {
        width: 100%;
        height: 5rem;
    }
    .contact form .input-box input {
        width: 100%;
    }
}