:root {
    --bg-color: #ffffff;
    /* Pure White */
    --bg-alt: #f1f5f9;
    /* Slate 100 - Darker for better contrast */
    --text-primary: #0f172a;
    /* Slate 900 */
    --text-secondary: #64748b;
    /* Slate 500 */
    --accent: #2563eb;
    /* Blue 600 */
    --accent-hover: #1d4ed8;
    /* Blue 700 */
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --nav-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--bg-alt);
    /* Light background */
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Light border */
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

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

.btn-contact {
    color: var(--bg-color) !important;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--nav-height);
}

.greeting {
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: block;
}

.name {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 10px;
    /* Updated for contrast: Dark Slate to Blue gradient */
    background: linear-gradient(to right, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.headline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 20px;
}

.headline .accent {
    color: var(--accent);
    margin: 0 10px;
}

.location {
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
    /* White text pops on blue */
    padding: 12px 28px;
    border-radius: 5px;
    font-weight: 600;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
    /* Add shadow for pop */
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    border: 2px solid var(--accent);
    /* Thicker border */
    color: var(--accent);
    padding: 12px 28px;
    border-radius: 5px;
    font-weight: 600;
    background: transparent;
}

.btn-secondary:hover {
    background-color: rgba(37, 99, 235, 0.05);
}

/* Sections */
.section {
    padding: 100px 0;
}

.bg-alt {
    background-color: var(--bg-alt);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* About */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.bio strong {
    color: var(--text-primary);
}

.bio-quote {
    font-style: italic;
    color: var(--accent);
    font-size: 1.2rem;
    margin-top: 20px;
}

/* Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: var(--text-secondary);
    /* Visible color */
    opacity: 0.2;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--accent);
    border: 4px solid var(--bg-color);
    border-radius: 50%;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
    /* Subtle border for contrast */
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-date {
    width: 45%;
    text-align: right;
    color: var(--accent);
    font-weight: 600;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.timeline-item:nth-child(odd) .timeline-date {
    text-align: left;
    justify-content: flex-start;
}

.timeline-content {
    width: 45%;
    background: var(--bg-alt);
    /* Contrast background */
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.timeline-content h4 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category h3 {
    margin-bottom: 20px;
    color: var(--accent);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags span {
    background: var(--bg-alt);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.cert-list {
    list-style: disc inside;
    color: var(--text-secondary);
}

.cert-list li {
    margin-bottom: 10px;
}

/* Education */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.edu-card {
    background: var(--bg-alt);
    /* Contrast background */
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.edu-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.edu-major {
    color: var(--accent);
    margin-bottom: 5px;
}

.edu-school {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.edu-year {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 10px;
    opacity: 0.7;
}

/* Contact */
.contact-text {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px;
    color: var(--text-secondary);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: 8px;
    background: var(--bg-alt);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    color: var(--text-primary);
}

.contact-btn:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    background: #ffffff;
}

/* Footer */
.footer {
    padding: 30px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background-color: var(--bg-alt);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: var(--nav-height);
        right: 0;
        height: calc(100vh - var(--nav-height));
        background: #ffffff;
        /* Light background */
        flex-direction: column;
        width: 70%;
        padding: 50px;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        border-left: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-links.active {
        transform: translateX(0);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
    }

    .hamburger {
        display: flex;
    }

    .name {
        font-size: 2.5rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item::after {
        left: 20px;
    }

    .timeline-item {
        flex-direction: column !important;
        padding-left: 50px;
    }

    .timeline-date {
        width: 100%;
        text-align: left;
        padding: 0;
        margin-bottom: 10px;
        justify-content: flex-start !important;
    }

    .timeline-content {
        width: 100%;
    }
}

/* Expertise Section */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.expertise-card {
    background: var(--bg-alt);
    /* Contrast background */
    padding: 30px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, border-color 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.expertise-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.expertise-card h3 {
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

.expertise-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.expertise-card strong {
    color: var(--text-primary);
}

/* Certifications */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.cert-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    text-decoration: none;
    /* Remove underline for links */
    cursor: pointer;
    background: var(--bg-alt);
    /* Contrast background */
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.cert-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.cert-card h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.cert-issuer {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.cert-date {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Volunteering */
.volunteering-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.vol-card {
    background: var(--bg-alt);
    /* Contrast background */
    padding: 25px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.vol-card h3 {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.vol-event {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 5px;
}

.vol-date {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Education Details */
.edu-grade,
.edu-details {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Refinements */

/* Make Tools & Concepts span full width */
.skill-category:last-child {
    grid-column: 1 / -1;
}

/* Certifications Updates */
.cert-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    text-decoration: none;
    /* Remove underline for links */
    cursor: pointer;
}

/* Ensure non-link cert card looks same but no pointer */
div.cert-card {
    cursor: default;
}

.cert-footer {
    margin-top: 20px;
    /* Push to bottom if flex space-between is not enough, but space-between handles it */
}

/* Button Contrast Update */
.btn-primary {
    color: #ffffff;
    /* Very dark slate/black for max contrast */
    font-weight: 700;
}

/* Visual Separation Refinements */

/* Context-Aware Card Backgrounds */
/* If section is bg-alt, cards should be bg-color (White) */
.bg-alt .timeline-content,
.bg-alt .cert-card,
.bg-alt .vol-card {
    background: var(--bg-color);
}

/* If section is bg-color (default), cards should be bg-alt */
/* This is already the default for most, but let's ensure it */
.expertise-card,
.edu-card {
    background: var(--bg-alt);
}

/* Volunteering Alignment */
.vol-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.vol-footer {
    margin-top: 20px;
}

/* Center the first education card (B.E.) */
.education-grid .edu-card:first-child {
    grid-column: 1 / -1;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}