/* Modern Reset & Variables */
:root {
    /* Cool & Neutral Palette (Slate-based) */
    --bg-primary: #f8fafc;
    /* Slate 50 */
    --bg-secondary: #ffffff;
    /* White */
    --text-primary: #1e293b;
    /* Slate 800 */
    --text-secondary: #475569;
    /* Slate 600 */
    --accent: #64748b;
    /* Slate 500 */
    --accent-hover: #334155;
    /* Slate 700 */
    --border: #e2e8f0;
    /* Slate 200 */

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --max-width: 1200px;
    --header-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

/* Scroll Progress Bar */
#scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 1001;
    background: transparent;
}

#scroll-progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.1s ease-out;
}

/* Testimonials Section */
.testimonial-card p {
    font-style: italic;
    position: relative;
    padding-left: 1rem;
    border-left: 3px solid var(--secondary-color);
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--text-primary);
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.25rem;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

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

/* Layout Utilities */
.container {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
}

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

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    white-space: nowrap;
}

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

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

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

.nav-links a.active {
    color: var(--text-primary);
    font-weight: 700;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    background-color: #e0f2fe;
    background-position: 0 0, 20px 20px;
    /* Soft Blue */
}

/* 404 Page */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 0;
}

/* Resume Page */
.resume-body {
    background-color: #f1f5f9;
    padding-bottom: 4rem;
}

.hero-content {
    max-width: 1000px;
    margin-top: 4rem;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-text {
    flex: 1;
}

.hero-profile-pic {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-secondary);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-cta {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--text-primary);
    color: white;
    border-radius: 4px;
    font-weight: 500;
}

.hero-cta:hover {
    background-color: var(--accent-hover);
    color: white;
}

.hero-cta.secondary {
    background-color: transparent;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
}

.hero-cta.secondary:hover {
    background-color: var(--text-primary);
    color: white;
}

/* Affiliations Section */
#affiliations {
    background-color: var(--bg-secondary);
    padding: 4rem 0;
}

.logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.logo-item {
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.7;
}

.logo-item:hover {
    transform: scale(1.05);
    opacity: 1;
}

.logo-item img {
    max-width: 150px;
    height: auto;
    border-radius: 4px;
    /* Optional: Add a slight shadow or border if desired */
}

/* About Section */
.about {
    background-color: var(--bg-secondary);
}

/* Experience & Education Grid */
.grid-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-secondary);
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.card-header {
    margin-bottom: 1rem;
}

.date {
    font-size: 0.875rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: block;
}

/* Footer */
footer {
    background-color: var(--bg-secondary);
    padding: 4rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Mobile Nav */
.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

@media (max-width: 1024px) {
    h1 {
        font-size: 2.5rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--border);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
    }

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

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2rem;
    }

    .hero-profile-pic {
        width: 200px;
        height: 200px;
    }

    .hero-buttons {
        justify-content: center;
    }
}

/* Scroll Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

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

.skill-category {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.skill-category h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 2px solid #e0f2fe;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    padding: 4rem 0;
}

.skill-tags span {
    background: #f1f5f9;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.skill-tags span:hover {
    background: var(--text-primary);
    color: white;
    transform: translateY(-2px);
}

/* Testimonials Section */
.testimonial-card p {
    font-style: italic;
    position: relative;
    padding-left: 1rem;
    border-left: 3px solid var(--secondary-color);
}

/* 404 Page */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 0;
}

/* Resume Page */
.resume-body {
    background-color: #f1f5f9;
    padding-bottom: 4rem;
}

.resume-controls {
    max-width: 800px;
    margin: 2rem auto;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
}

.resume-page {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 4rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    color: #334155;
}

.resume-header {
    text-align: center;
    margin-bottom: 3rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 2rem;
}

.resume-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.resume-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.resume-contact a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 0.5rem;
}

.resume-section {
    margin-bottom: 2.5rem;
}

.resume-section h2 {
    font-size: 1.25rem;
    color: var(--primary-color);
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.resume-item {
    margin-bottom: 1.5rem;
}

.resume-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.25rem;
}

.resume-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.resume-item .date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

.resume-item .company {
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.resume-item ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.resume-item li {
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

.resume-skills-grid {
    display: grid;
    gap: 1rem;
}

@media print {
    .resume-body {
        background: white;
        padding: 0;
    }

    .resume-controls {
        display: none;
    }

    .resume-page {
        box-shadow: none;
        padding: 0;
        margin: 0;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .resume-page {
        padding: 2rem;
    }

    .resume-item-header {
        flex-direction: column;
    }
}