/* General Styles */
:root {
    --primary-color: #4A90E2; /* Blue */
    --secondary-color: #50E3C2; /* Teal */
    --text-color: #333;
    --light-text-color: #f4f4f4;
    --bg-color: #f4f7fa;
    --dark-bg-color: #2c3e50; /* Darker blue-grey */
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Ensure smooth scroll behavior across the document */
html {
    scroll-behavior: smooth;
}

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: var(--dark-bg-color);
    margin-bottom: 1rem;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

/* Initial state for animated h2 elements */
h2.animated-h2 {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

h2.animated-h2.is-visible {
    opacity: 1;
    transform: translateY(0);
}

h2.animated-h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 0px; /* Start with 0 width */
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: width 0.6s ease-out 0.3s; /* Animate width with a slight delay */
}
h2.animated-h2.is-visible::after {
    width: 60px; /* Animate to full width */
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--light-text-color);
    padding: 12px 25px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.btn:hover {
    background: #3a7bd5; /* A slightly darker primary blue */
}

.section-padding {
    padding: 80px 0;
}

/* Header & Navigation */
.hero {
    background: linear-gradient(135deg, var(--dark-bg-color) 0%, #34495e 100%);
    color: var(--light-text-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero .container {
    padding-top: 80px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(44, 62, 80, 0.95);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

nav .logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-left: 20px;
    transition: color 0.3s ease;
}

.nav-links {
    display: flex;
    list-style: none;
    margin-right: 20px;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--light-text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
}

/* Profile Picture with Glowing Border */
.profile-picture-container {
    width: 200px; /* Adjust size as needed */
    height: 200px;
    margin: 0 auto 30px auto; /* Center and add space below */
    border-radius: 50%;
    overflow: hidden; /* Ensures image stays within circular bounds */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px; /* Creates space for the glow */
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.7),
                0 0 30px rgba(74, 144, 226, 0.5);
    animation: glow-border 2s infinite alternate ease-in-out; /* Glowing animation */
}

.profile-picture {
    width: 100%; /* Fill the container */
    height: 100%;
    border-radius: 50%;
    object-fit: cover; /* Crop image to fit */
    display: block;
}

@keyframes glow-border {
    0% {
        box-shadow: 0 0 15px var(--primary-color),
                    0 0 30px rgba(74, 144, 226, 0.5);
    }
    50% {
        box-shadow: 0 0 25px var(--secondary-color),
                    0 0 45px rgba(80, 227, 194, 0.7),
                    0 0 60px rgba(80, 227, 194, 0.4);
    }
    100% {
        box-shadow: 0 0 15px var(--primary-color),
                    0 0 30px rgba(74, 144, 226, 0.5);
    }
}

/* Hero Content Initial Animations on page load */
.hero-content h1 {
    opacity: 0;
    animation: fadeInTop 1s ease-out 0.5s forwards;
}

.hero-content p:not(.tagline) { /* Exclude tagline for separate animation */
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.8s forwards;
}

.hero-content .tagline {
    opacity: 0;
    animation: fadeInUp 1s ease-out 1s forwards;
}

.hero-content .btn {
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.2s forwards;
}

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

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

/* Burger Menu */
.burger {
    display: none;
    cursor: pointer;
    margin-right: 20px;
}

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

/* Projects Section */
.projects {
    background-color: var(--bg-color);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 30px;
    /* Combined transitions for hover and scroll reveal */
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.7s ease-out, transform 0.7s ease-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Initial state for scroll reveal */
    opacity: 0;
    transform: translateY(30px);
}

.project-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.7rem;
}

.project-card p {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease; /* Added for smoother hover */
}

.project-link i {
    margin-left: 8px;
    font-size: 0.9em;
}
.project-link:hover {
    color: #3a7bd5; /* A slightly darker primary blue */
}

/* Skills Section */
.skills {
    background-color: var(--light-text-color);
    color: var(--text-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 40px;
    text-align: center;
}

.skill-item {
    background: var(--card-bg);
    padding: 25px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    font-weight: 600;
    color: var(--dark-bg-color);
    /* Combined transitions for hover and scroll reveal */
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.7s ease-out, transform 0.7s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1rem;
    /* Initial state for scroll reveal */
    opacity: 0;
    transform: translateY(30px);
}

.skill-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}


/* Contact Section */
.contact {
    background-color: var(--bg-color);
    text-align: center;
}

/* Initial state for individual contact elements for scroll reveal */
.contact-intro, .contact-info p, .social-links a {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.contact-intro.is-visible, .contact-info p.is-visible, .social-links a.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-intro {
    max-width: 700px;
    margin: 0 auto 40px auto;
    font-size: 1.15rem;
    color: var(--text-color);
}

.contact-info {
    margin-bottom: 40px;
}

.contact-info p {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--dark-bg-color);
}

.contact-info a {
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.3s ease; /* Added for smoother hover */
}
.contact-info a:hover {
    color: #3a7bd5; /* A slightly darker primary blue */
}

.contact-info i {
    margin-right: 10px;
    color: var(--primary-color);
}

.social-links {
    margin-top: 30px;
}

.social-links a {
    display: inline-block;
    margin: 0 15px;
    color: var(--dark-bg-color);
    font-size: 2.2rem;
    transition: color 0.3s ease, transform 0.2s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

/* Footer */
footer {
    background: var(--dark-bg-color);
    color: var(--light-text-color);
    text-align: center;
    padding: 40px 0;
    font-size: 0.9rem;
    /* Initial state for scroll reveal */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
footer.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    nav {
        padding: 15px 0;
    }

    .nav-links {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 60%;
        background-color: rgba(44, 62, 80, 0.98);
        flex-direction: column;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        justify-content: center;
        z-index: 999;
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .nav-links li {
        margin: 25px 0;
        opacity: 0;
    }

    .burger {
        display: block;
        z-index: 1001;
    }

    /* Burger animation */
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .toggle .line2 {
        opacity: 0;
    }
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    h2 {
        font-size: 2rem;
    }

    .section-padding {
        padding: 60px 0;
    }

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

    .project-card, .skill-item {
        padding: 25px;
    }
}

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