@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --background-color: #121212;
    --text-color: #ffffff;
    --card-color: #1e1e1e;
    --border-color: #333333;
    --accent-color: #00bcd4; /* A new accent color for differentiation */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    word-wrap: break-word; /* Added for long words */
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

header {
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

header.scrolled {
    background-color: rgba(18, 18, 18, 0.95);
}

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

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav ul li a {
    font-weight: 500;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 100px;
    background: radial-gradient(ellipse at bottom, var(--primary-color) 0%, var(--background-color) 60%);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    animation: fadeInUp 10s ease;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-color);
}

section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.card {
    background-color: var(--card-color);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

#about .grid-container {
    grid-template-columns: 1fr 2fr;
    align-items: center;
}

.profile-picture {
    width: 100%;
    border-radius: 15px;
    border: 3px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-picture:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.progress-bar {
    background-color: #333;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.progress {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    height: 10px;
    border-radius: 5px;
    text-align: right;
    color: white;
    padding-right: 5px;
}

form input,
form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-color);
}

footer {
    text-align: center;
    padding: 2rem 0;
    background-color: var(--card-color);
}

/* Professional Experience Section Styling */
#experience .grid-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: relative;
    padding-left: 20px; /* Space for the timeline line */
}

#experience .grid-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}

.experience-item {
    background-color: var(--card-color);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    position: relative;
    margin-left: 20px; /* Offset for the dot */
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -28px; /* Position the dot on the timeline */
    top: 2.5rem;
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    border: 3px solid var(--background-color);
    z-index: 1;
}

.experience-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.experience-item p strong {
    color: var(--text-color);
}

.experience-item ul {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.experience-item ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.experience-item ul li::before {
    content: '\2022'; /* Bullet point */
    color: var(--accent-color);
    position: absolute;
    left: 0;
}

/* Awards Section Styling */
#awards .grid-container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

#awards .card {
    background-color: #2a2a2a; /* Slightly different card color */
    border: 1px solid #444;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    padding: 2.5rem;
}

#awards .card h4 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

#awards .card p strong {
    color: var(--text-color);
}

/* Contact Section Styling */
#contact .contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: start;
}

#contact .contact-info,
#contact .contact-form {
    background-color: var(--card-color);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

#contact .contact-info p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

#contact .contact-info p strong {
    color: var(--primary-color);
}

#contact .contact-info a {
    color: var(--text-color);
    text-decoration: underline;
}

#contact .contact-info i {
    font-size: 1.2rem;
    margin-right: 15px;
    color: var(--accent-color);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animated {
    opacity: 0;
    transition: opacity 0.5s, transform 0.5s;
}

.fadeInUp {
    transform: translateY(50px);
}

.fadeInLeft {
    transform: translateX(-50px);
}

.fadeInRight {
    transform: translateX(50px);
}

.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Burger menu styles */
.burger {
    display: none; /* Hidden by default on desktop */
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    nav ul {
        position: absolute;
        right: 0;
        height: 92vh;
        top: 8vh;
        background-color: var(--background-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%); /* This hides it initially */
        transition: transform 0.5s ease-in;
        z-index: 999;
        overflow-y: auto; /* Make it scrollable */
        gap: 0; /* Remove gap for mobile navigation */
    }

    nav ul li {
        display: block; /* Ensure list items are block-level */
        text-align: center; /* Center text within list items */
        padding: 1rem 0; /* Add vertical padding */
    }

    .burger {
        display: block;
    }

    .nav-active {
        transform: translateX(0%); /* This shows the nav */
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    #experience .grid-container {
        padding-left: 0; /* Remove padding-left from grid-container */
    }

    #experience .grid-container::before {
        left: 15px;
    }

    .experience-item {
        margin-left: 0; /* Remove margin-left from experience-item */
        padding-left: 40px; /* Add padding-left to experience-item to make space for dot */
    }

    .experience-item::before {
        left: 15px; /* Adjust dot position */
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    #about .grid-container {
        grid-template-columns: 1fr;
    }

    #contact .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    nav ul {
        width: 70%;
    }
}

@media screen and (max-width: 320px) {
    * {
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        word-wrap: break-word;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 0.8rem;
    }

    .section-title h2 {
        font-size: 1.6rem;
    }

    .container {
        padding: 0 0.5rem; /* Reduce padding further for very small screens */
    }

    nav ul {
        width: 100%; /* Adjust nav width for smaller screens */
    }

    .grid-container {
        grid-template-columns: 1fr; /* Ensure single column */
    }

    .card {
        padding: 1.5rem;
        min-width: 0;
    }

    #experience .experience-item {
        padding: 1.5rem;
        min-width: 0;
    }

    #awards .card {
        padding: 1.5rem;
        min-width: 0;
    }

    #contact .contact-info,
    #contact .contact-form {
        padding: 1.5rem;
        min-width: 0;
    }

    /* Adjust minmax for grid items to be smaller */
    .grid-container.minmax-adjust {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

/* Burger Animation */
.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Nav Link Fade Animation */
@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0px);
    }
}

/* Explicitly make nav links visible when active */
nav.nav-active li {
    opacity: 1 !important;
}
