/* CSS Variables for White & Modern Theme */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --text-primary: #111827;
    /* Dark grayish-blue for readable contrast */
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;

    /* Subtle gradient for accents */
    --gradient-start: #3b82f6;
    --gradient-end: #8b5cf6;

    /* Shadows for depth without feeling muddy */
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html {
    overflow-x: hidden;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease-in-out;
}

/* Typography Enhancements */
h1,
h2,
h3,
h4 {
    letter-spacing: -0.025em;
    font-weight: 700;
}

.text-gradient {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(255, 255, 255, 0.85);
    /* Glassmorphism */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    z-index: 50;
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.05em;
    color: var(--text-primary);
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding-bottom: 4px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background: var(--text-primary);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
    position: relative;
    z-index: 10;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.badge {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
}

.badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #10b981;
    /* Green dot indicating availability */
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1.1;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    max-width: 600px;
    font-weight: 400;
}

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

/* Buttons */
.btn {
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background-color: var(--text-primary);
    color: white;
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background-color: #000;
}

.btn-secondary {
    background-color: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: #d1d5db;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    align-items: center;
    justify-content: center;
}

.social-icon {
    color: var(--text-secondary);
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon:hover {
    color: var(--gradient-start);
    transform: translateY(-2px);
}

/* Page Constraints Details (About) */
.page-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
    width: 100%;
    position: relative;
    z-index: 10;
}

.page-header {
    text-align: center;
    margin-bottom: 4rem;
}

.page-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Grids & Cards */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-soft);
    border-radius: 20px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.about-card p {
    color: var(--text-secondary);
}

.full-width {
    grid-column: 1 / -1;
}

/* Experience & Education Lists */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.experience-item,
.education-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.experience-item:last-child,
.education-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.experience-item h4,
.education-item h4 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.education-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

/* Experience Accordions */
.experience-accordion {
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.4);
    overflow: hidden;
    transition: all 0.3s ease;
}

.experience-accordion:hover {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-soft);
}

.experience-accordion summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    list-style: none;
    /* Disable default triangle */
}

/* For Safari/Chrome to hide default triangle */
.experience-accordion summary::-webkit-details-marker {
    display: none;
}

.summary-content h4 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.summary-content .education-meta {
    margin-bottom: 0;
    /* Remove bottom margin to keep it tight */
}

.dropdown-icon {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.experience-accordion[open] .dropdown-icon {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(229, 231, 235, 0.5);
    margin-top: 1rem;
    padding-top: 1.5rem;
}

.experience-list {
    margin-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.experience-list li {
    color: var(--text-secondary);
}

/* Tags */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.skill-tag {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

.page-footer {
    margin-top: 4rem;
    text-align: center;
}

/* Publications List */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
    list-style: none;
    padding: 0;
}

.publications-list li {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.publications-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.publications-list strong {
    color: var(--text-primary);
    font-size: 1.05rem;
    display: block;
    margin-bottom: 0.25rem;
}

.publications-list a {
    color: var(--gradient-start);
    display: inline-block;
    margin-top: 0.25rem;
    font-weight: 500;
}

.publications-list a:hover {
    color: var(--gradient-end);
    text-decoration: underline;
}

/* Background Animated Blobs */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 1;
    opacity: 0.4;
    pointer-events: none;
}

.bg-shape-1 {
    width: 600px;
    height: 600px;
    background: rgba(59, 130, 246, 0.2);
    /* Soft Blue */
    top: -200px;
    right: -100px;
    animation: drift1 20s infinite alternate ease-in-out;
}

.bg-shape-2 {
    width: 500px;
    height: 500px;
    background: rgba(139, 92, 246, 0.2);
    /* Soft Purple */
    bottom: -150px;
    left: -150px;
    animation: drift2 25s infinite alternate-reverse ease-in-out;
}

@keyframes drift1 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-50px, 100px) scale(1.1);
    }
}

@keyframes drift2 {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, -50px) scale(1.05);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* In a real app, add a hamburger menu. Keeping simple for now. */
    }

    .nav-container {
        padding: 0 1rem;
    }

    .hero-container {
        padding: 6rem 1rem 3rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .btn {
        width: 100%;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: clamp(1rem, 5vw, 1.15rem);
    }

    .page-container {
        padding: 6rem 1rem 2rem;
    }

    .page-header {
        margin-bottom: 2rem;
    }

    .page-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    .about-grid {
        gap: 1.5rem;
    }

    .about-card {
        padding: 1.25rem;
    }

    .about-card h3 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }

    .experience-accordion summary {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
        gap: 0.75rem;
    }

    .dropdown-icon {
        align-self: flex-end;
        position: relative;
        top: -30px;
    }

    .summary-content h4 {
        font-size: 1.05rem;
        padding-right: 2rem;
        /* prevent overlap with the dropdown icon */
    }

    .education-meta {
        font-size: 0.85rem;
    }

    .accordion-content {
        padding: 0 1rem 1rem 1rem;
    }

    .accordion-content h4 {
        margin-left: 0;
    }

    .experience-list {
        margin-left: 0;
        padding-left: 1rem;
    }

    .experience-list li {
        font-size: 0.95rem;
    }

    .publications-list strong {
        font-size: 0.95rem;
    }

    .bg-shape-1,
    .bg-shape-2 {
        display: none;
        /* remove background blobs on mobile to prevent overflow/distraction */
    }
}