/* General Styles */
:root {
    --bg-color: #fcfcfc;
    --text-color: #212529;
    --primary-color: #2C5F2D;
    --secondary-color: #384a38;
    --accent-color-1: #97BC62; /* Leaf Green */
    --accent-color-light: #DCE8B0; /* Soft, earthy yellow */
    --header-bg-color: rgba(252, 252, 252, 0.85);
    --header-border-color: #e0e0e0;
    --header-text-color: #212529;
    --button-bg-color: var(--primary-color);
    --button-text-color: #ffffff;
    --button-hover-bg-color: var(--accent-color-1);
    --section-bg-color: #ffffff;
    --card-bg-color: #fdfdfd;
    --footer-bg-color: var(--secondary-color);
    --footer-text-color: #ffffff;
    --back-to-top-bg-color: var(--primary-color);
    --back-to-top-hover-bg-color: var(--accent-color-1); 
}

body {
    margin: 0;
    font-family: 'Poppins', Arial, sans-serif;
    line-height: 1.7;
    background-color: var(--bg-color);
    color: var(--text-color);
    scroll-behavior: smooth;
    padding-top: 80px;
}

/* Header Styles */
.main-header {
    background-color: var(--header-bg-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--header-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2%;
    transition: padding 0.3s ease-in-out;
    box-sizing: border-box;
}
.main-header.scrolled {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.header-brand a {
    text-decoration: none;
    color: var(--header-text-color);
}
.header-brand h1 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}
.header-brand p {
    font-size: 0.85rem;
    margin: 0;
    font-weight: 300;
    color: var(--text-color);
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 1.2rem; 
}
.nav-links {
    display: flex;
    gap: 0.2rem; 
}
.nav-links a {
    color: var(--header-text-color);
    text-decoration: none;
    padding: 0.5rem 0.8rem; 
    font-weight: 500;
    font-size: 0.95rem; 
    border-radius: 8px;
    position: relative;
    transition: color 0.3s ease;
}
.nav-links a:hover {
    color: var(--primary-color);
}
.header-socials {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 0.8rem; 
    border-left: 1px solid var(--header-border-color);
}
.header-socials a {
    color: var(--header-text-color);
    font-size: 1.4rem;
    transition: color 0.3s ease, transform 0.3s ease;
}
.header-socials a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* General Section Styles */
section {
    padding: 4rem 10%;
    margin: 2rem auto;
    background-color: var(--section-bg-color);
    max-width: 1280px;
    border-radius: 12px;
}
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--text-color);
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color-light); 
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    text-align: center;
}
.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--accent-color-light); 
    margin-bottom: 1rem;
    box-shadow: 0 0 25px rgba(220, 232, 176, 0.4); 
}
.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}
.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
}
#typed-text {
    color: var(--accent-color-1);
}

/* Skills Section */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}
.skill-item {
    background-color: var(--card-bg-color);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.skill-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--accent-color-1);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}
.timeline-item {
    position: relative;
    width: calc(50% - 40px);
}
.timeline-item:nth-child(odd) {
    left: 0;
    margin-bottom: 30px;
}
.timeline-item:nth-child(even) {
    left: calc(50% + 40px);
    margin-bottom: 30px;
}
.timeline-dot {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--bg-color);
    border: 4px solid var(--accent-color-light); 
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}
.timeline-item:nth-child(odd) .timeline-dot {
    right: -50px;
}
.timeline-item:nth-child(even) .timeline-dot {
    left: -50px;
}
.timeline-content {
    padding: 20px 30px;
    background-color: var(--card-bg-color);
    position: relative;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.company-logo {
    height: 30px;
    margin-bottom: 1rem;
}
.timeline-content h3 {
    margin-top: 0;
}
.date { 
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
}
.timeline-content ul {
    padding-left: 20px;
}

/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.project-card {
    background-color: var(--card-bg-color);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}
.project-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color-1);
    padding-bottom: 0.5rem;
    display: inline-block;
}
.project-card .date {
    font-size: 0.9em;
    color: var(--secondary-color);
}
.project-card ul {
    padding-left: 20px;
    margin: 0;
    text-align: left;
}

/* Contact Section */
.contact p {
    text-align: center;
    margin-bottom: 2rem;
}
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    max-width: 600px;
    margin: 0 auto; /* Keeps the form itself centered */
    padding: 2rem;
    background-color: var(--card-bg-color);
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}
.contact-form textarea {
    width: 100%;
    box-sizing: border-box; /* Ensures padding stays inside the box width */
    padding: 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    resize: none;
    background-color: var(--bg-color);
    color: var(--text-color);
}
.contact-form textarea:focus {
    border-color: var(--accent-color-1);
    outline: none;
    box-shadow: 0 0 5px rgba(151, 188, 98, 0.5);
}
.contact-form button {
    padding: 1rem;
    background-color: var(--button-bg-color);
    color: var(--button-text-color);
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}
.contact-form button:hover {
    background-color: var(--button-hover-bg-color);
    transform: scale(1.05);
}

/* Social Links */
.social-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.social-icon {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: block;
}
.social-icon:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

/* Popup Styles */
body.popup-active {
    overflow: hidden;
}
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
}
.popup-overlay:not(.hidden) {
    display: block;
}
.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-color);
    box-shadow: 0px 4px 30px rgba(0,0,0,0.2);
    border-radius: 12px;
    z-index: 10000;
    display: none;
    max-width: 400px;
    width: 90%;
    padding: 30px 20px;
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}
.popup:not(.hidden) {
    display: block;
}
.popup-content p {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.6;
}
#close-popup {
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    background: var(--accent-color-1);
    color: var(--secondary-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}
#close-popup:hover {
    background: var(--primary-color);
    color: white;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Footer */
footer {
    background-color: var(--footer-bg-color);
    color: var(--footer-text-color);
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}
footer p {
    margin: 0;
    font-size: 1rem;
}

/* Back to Top Button */
#back-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    background-color: var(--back-to-top-bg-color);
    color: var(--button-text-color);
    border: none;
    border-radius: 50%;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
#back-to-top:hover {
    background-color: var(--back-to-top-hover-bg-color);
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        cursor: auto; 
    }
    .cursor-dot, .cursor-outline {
        display: none !important;
    }

    .main-header {
        flex-direction: column; 
        padding: 10px 5%;
    }
    .header-brand {
        margin-bottom: 10px;
        text-align: center;
    }
    .header-brand p {
        display: none; 
    }
    .main-nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap; 
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    .nav-links a {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    .header-socials {
        display: none; 
    }
    
    body {
        padding-top: 110px; 
    }

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

    section {
        padding: 3rem 5%;
    }

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

    .timeline::after {
        left: 10px;
    }
    .timeline-item {
        width: calc(100% - 40px);
    }
    .timeline-item:nth-child(odd) {
        left: 15px;
    }
    .timeline-item:nth-child(even) {
        left: 15px;
    }
    .timeline-dot {
        left: -25px;
    }
    .timeline-item:nth-child(even) .timeline-dot {
        left: -25px;
    }
}

/* Extra tweaks for very small phones */
@media (max-width: 480px) {
    .profile-pic {
        width: 120px;
        height: 120px;
    }
    .skills-container {
        gap: 1rem;
    }
    .skill-item {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
}