/* General Body Styles */
:root {
    --primary-bg: #0d0d0d; /* Slightly lighter dark */
    --secondary-bg: #1c1c1c; /* Darker secondary for depth */
    --accent-color: #007bff; /* Professional blue */
    --text-color: #e0e0e0;
    --light-text: #b0b0b0;
    --border-color: #2a2a2a;
    --shadow-color: rgba(0, 0, 0, 0.6);
    --hover-shadow-color: rgba(0, 0, 0, 0.8);
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--primary-bg);
    color: var(--text-color);
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Global Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(13, 13, 13, 0.9); /* More opaque */
    backdrop-filter: blur(8px); /* Stronger blur */
    padding: 18px 0; /* Slightly more padding */
    box-shadow: 0 4px 15px var(--shadow-color); /* Enhanced shadow */
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

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

/* Sections - Full viewport height */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 0; /* Padding for content inside */
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
    background-size: cover;
    background-attachment: fixed; /* Parallax effect */
    background-position: center center;
}

.section:last-of-type {
    border-bottom: none;
}

.section-content {
    max-width: 900px;
    text-align: center;
    padding: 40px;
    background-color: rgba(28, 28, 28, 0.95); /* More opaque, matches secondary-bg */
    border-radius: 8px; /* Slightly less rounded */
    box-shadow: 0 12px 35px var(--shadow-color); /* Deeper shadow */
    /* Content is visible by default, animations are on children */
    transition: none; /* Ensure no lingering transitions on the wrapper */
}

/* Individual element animations */
.section-title,
.section-text,
.job-entry,
.edu-entry,
.project-entry,
.contact-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Skills section elements should be immediately visible */
.skills-grid,
.skills-section .section-title {
    opacity: 1;
    transform: translateY(0);
    transition: none; /* No animation for these elements */
}

.section.active .section-title,
.section.active .section-text,
.section.active .job-entry,
.section.active .edu-entry,
.section.active .project-entry,
.section.active .contact-card {
    opacity: 1;
    transform: translateY(0);
}

/* Specific delays for elements within sections */
.section.active .section-title { transition-delay: 0s; }
.section.active .summary-section .section-text { transition-delay: 0.1s; }

.section.active .job-entry:nth-child(1) { transition-delay: 0.05s; }
.section.active .job-entry:nth-child(2) { transition-delay: 0.1s; }

.section.active .edu-entry:nth-child(1) { transition-delay: 0.05s; }
.section.active .edu-entry:nth-child(2) { transition-delay: 0.1s; }
.section.active .edu-entry:nth-child(3) { transition-delay: 0.15s; }

.section.active .project-entry:nth-child(1) { transition-delay: 0.05s; }
.section.active .project-entry:nth-child(2) { transition-delay: 0.1s; }
.section.active .project-entry:nth-child(3) { transition-delay: 0.15s; }
.section.active .project-entry:nth-child(4) { transition-delay: 0.2s; }

.section.active .contact-card { transition-delay: 0.1s; }


/* Hero Section Specifics */
.hero-section {
    background-image: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('https://images.unsplash.com/photo-1517694712202-14dd9538aa97?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    color: #fff;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-color); /* Thinner border */
    margin-bottom: 30px;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.5); /* Blue glow */
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.profile-pic:hover {
    transform: scale(1.05); /* Less aggressive hover */
    box-shadow: 0 0 30px rgba(0, 123, 255, 0.8);
}

.hero-section h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4.5em;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 3px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    color: #fff;
}

.hero-section .tagline {
    font-size: 1.8em;
    margin-bottom: 40px;
    font-weight: 300;
    color: var(--light-text);
}

.contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 30px;
}

.contact-info a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    padding: 12px 20px; /* Slightly larger buttons */
    border: 1px solid var(--border-color);
    border-radius: 4px; /* Sharper corners */
    background-color: rgba(28, 28, 28, 0.7); /* Matches secondary-bg */
    box-shadow: 0 2px 8px var(--shadow-color);
}

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

.contact-info a:hover {
    color: var(--accent-color);
    transform: translateY(-3px); /* Less aggressive hover */
    border-color: var(--accent-color);
    background-color: rgba(28, 28, 28, 0.9);
    box-shadow: 0 4px 12px var(--hover-shadow-color);
}

/* Animations for Hero Section elements (initial load) */
.fade-in {
    animation: fadeIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; /* Faster and smoother */
    opacity: 0;
}

.hero-section .profile-pic { animation-delay: 0.2s; }
.hero-section h1 { animation-delay: 0.5s; }
.hero-section .tagline { animation-delay: 0.8s; }
.hero-section .contact-info { animation-delay: 1.1s; }

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

/* Section Background Images */
.summary-section {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1518655048521-f130df041f66?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
}
.skills-section {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
}
.experience-section {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
}
.education-section {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1541339907198-e087566f4240?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
}
.projects-section {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
}
.contact-section {
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1528716321680-815a8cdb8a2d?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
}


/* General Content Styling */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5em;
    color: var(--accent-color);
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    letter-spacing: 1px;
}

.section-title::after {
    content: '';
    width: 100px;
    height: 3px;
    background-color: var(--accent-color);
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.summary-section .section-text {
    font-size: 1.2em;
    line-height: 1.8;
    text-align: justify;
    max-width: 800px;
    margin: 0 auto;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
    text-align: left;
}

.skill-category {
    background-color: var(--secondary-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.skill-category:hover {
    transform: translateY(-5px); /* Less aggressive hover */
    box-shadow: 0 8px 20px var(--hover-shadow-color);
}

.skill-category h3 {
    font-family: 'Playfair Display', serif;
    color: var(--accent-color);
    font-size: 1.8em;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

.skill-category ul {
    list-style: none;
    padding: 0;
}

.skill-category ul li {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: var(--text-color);
    position: relative;
    padding-left: 25px;
}

.skill-category ul li::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-size: 1.5em;
    line-height: 1;
}

/* Experience & Education Entries */
.job-entry, .edu-entry, .project-entry {
    background-color: var(--secondary-bg);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    text-align: left;
}

.job-entry:hover, .edu-entry:hover, .project-entry:hover {
    transform: translateY(-5px); /* Less aggressive hover */
    box-shadow: 0 8px 20px var(--hover-shadow-color);
}

.job-entry h3, .edu-entry h3, .project-entry h3 {
    font-family: 'Playfair Display', serif;
    color: var(--accent-color);
    font-size: 2em;
    margin-bottom: 10px;
}

.job-entry .company, .edu-entry .institution {
    color: var(--light-text);
    font-size: 1.2em;
    font-weight: 400;
    margin-left: 10px;
}

.job-entry .duration, .edu-entry .duration {
    font-style: italic;
    color: var(--light-text);
    margin-bottom: 15px;
    display: block;
    font-size: 1em;
}

.job-entry ul {
    list-style: disc;
    margin-left: 25px;
    color: var(--text-color);
}

.job-entry ul li {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.edu-entry .coursework {
    font-size: 1em;
    color: var(--light-text);
    margin-top: 10px;
}

/* Projects Section */
.project-entry p {
    font-size: 1.1em;
    color: var(--text-color);
}

/* Contact Section */
.contact-card {
    background-color: var(--secondary-bg);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 25px var(--shadow-color);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

.contact-card h3 {
    font-family: 'Playfair Display', serif;
    color: var(--accent-color);
    font-size: 2.2em;
    margin-bottom: 20px;
}

.contact-card p {
    color: var(--light-text);
    margin-bottom: 30px;
    font-size: 1.1em;
}

.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff; /* White text for better contrast on blue */
    padding: 14px 30px; /* Slightly adjusted padding */
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600; /* Slightly less bold */
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1em; /* Slightly smaller font */
    letter-spacing: 0.2px; /* Less aggressive letter spacing */
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3); /* Blue shadow */
}

.btn:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: translateY(-2px); /* Less aggressive hover */
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.5);
}

.btn i {
    margin-right: 10px;
}

/* Footer */
.main-footer {
    background-color: var(--secondary-bg);
    color: var(--light-text);
    text-align: center;
    padding: 30px 0;
    font-size: 0.9em;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .section-title {
        font-size: 3em;
    }
    .hero-section h1 {
        font-size: 3.5em;
    }
    .hero-section .tagline {
        font-size: 1.5em;
    }
    .profile-pic {
        width: 160px;
        height: 160px;
    }
    .nav-links {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    .logo {
        font-size: 1.5em;
    }
    .hero-section h1 {
        font-size: 2.8em;
    }
    .hero-section .tagline {
        font-size: 1.3em;
    }
    .contact-info {
        flex-direction: column;
        gap: 15px;
    }
    .section-title {
        font-size: 2.5em;
    }
    .section-content {
        padding: 30px;
    }
    .skills-grid {
        grid-template-columns: 1fr;
    }
    .job-entry h3, .edu-entry h3, .project-entry h3, .skill-category h3 {
        font-size: 1.6em;
    }
    .contact-card {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 10px 0;
    }
    .logo {
        font-size: 1.3em;
    }
    .nav-links a {
        font-size: 0.9em;
    }
    .hero-section h1 {
        font-size: 2em;
    }
    .hero-section .tagline {
        font-size: 1em;
    }
    .profile-pic {
        width: 120px;
        height: 120px;
    }
    .section-title {
        font-size: 2em;
    }
    .section-content {
        padding: 20px;
    }
    .job-entry h3, .edu-entry h3, .project-entry h3, .skill-category h3 {
        font-size: 1.4em;
    }
    .btn {
        padding: 12px 25px;
        font-size: 1em;
    }
}