/* ===================================
   CSS Variables - Design System
   =================================== */
:root {
    /* Colors */
    --primary: hsl(210, 85%, 25%);
    --primary-light: hsl(210, 85%, 35%);
    --primary-dark: hsl(210, 85%, 15%);
    --accent: hsl(195, 75%, 45%);
    --accent-light: hsl(195, 75%, 55%);
    
    /* Backgrounds */
    --background: hsl(0, 0%, 100%);
    --surface: hsl(210, 20%, 98%);
    --card: hsl(0, 0%, 100%);
    
    /* Text */
    --foreground: hsl(210, 15%, 15%);
    --muted-foreground: hsl(210, 10%, 45%);
    --light-text: hsl(210, 10%, 65%);
    
    /* Borders */
    --border: hsl(210, 20%, 90%);
    --card-border: hsl(210, 20%, 88%);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Merriweather', Georgia, serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--foreground);
    background-color: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

/* Container Utilities */
.container {
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-wide {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--foreground);
}

.section-subtitle {
    font-size: 1.125rem;
    text-align: center;
    color: var(--muted-foreground);
    margin-bottom: 3rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================
   Navigation
   =================================== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: var(--transition);
}

.nav-logo:hover {
    background-color: var(--surface);
}

.desktop-nav {
    display: none;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    border-radius: 0.375rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--foreground);
    background-color: var(--surface);
}

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger {
    width: 1.5rem;
    height: 2px;
    background-color: var(--foreground);
    position: relative;
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 1.5rem;
    height: 2px;
    background-color: var(--foreground);
    transition: var(--transition);
}

.hamburger::before {
    transform: translateY(-6px);
}

.hamburger::after {
    transform: translateY(6px);
}

.mobile-menu-btn.active .hamburger {
    background-color: transparent;
}

.mobile-menu-btn.active .hamburger::before {
    transform: rotate(45deg);
}

.mobile-menu-btn.active .hamburger::after {
    transform: rotate(-45deg);
}

.mobile-nav {
    display: none;
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: var(--muted-foreground);
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
}

.mobile-nav-link:hover {
    color: var(--foreground);
    background-color: var(--surface);
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: none;
    }
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    padding-top: 8rem;
    padding-bottom: 5rem;
    background: linear-gradient(135deg, var(--surface) 0%, var(--background) 100%);
}

.hero-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero-content {
    display: grid;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hero-tagline {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

.hero-bio {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--foreground);
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

@media (max-width: 640px) {
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta .btn {
        width: 100%;
        text-align: center;
    }
}

.hero-image {
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, hsla(210, 85%, 25%, 0.2), hsla(195, 75%, 45%, 0.2));
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
}

.hero-image img {
    width: 16rem;
    height: 16rem;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--background);
    box-shadow: var(--shadow-lg);
}

@media (min-width: 640px) {
    .hero-image img {
        width: 20rem;
        height: 20rem;
    }
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background-color: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (min-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-title {
        font-size: 4rem;
    }
}

/* ===================================
   About / Core Strengths
   =================================== */
.about {
    background-color: var(--background);
}

.strengths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.strength-card {
    padding: 2rem;
    background-color: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    transition: var(--transition);
}

.strength-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.strength-card h3 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.strength-card p {
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* ===================================
   Experience Section
   =================================== */
.experience {
    background-color: var(--surface);
}

.timeline {
    position: relative;
    max-width: 70rem;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 3rem;
}

.timeline-marker {
    position: absolute;
    left: -7px;
    top: 1.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary);
    border: 4px solid var(--background);
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.timeline-content {
    background-color: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.timeline-content:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.experience-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.experience-company {
    color: var(--primary);
    font-weight: 500;
    transition: var(--transition);
}

.experience-company:hover {
    text-decoration: underline;
}

.experience-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-align: right;
}

.experience-date,
.experience-location {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.experience-achievements {
    list-style-position: inside;
    color: var(--foreground);
}

.experience-achievements li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .timeline::before {
        left: 2rem;
    }
    
    .timeline-item {
        padding-left: 5rem;
    }
    
    .timeline-marker {
        left: calc(2rem - 8px);
    }
}

/* ===================================
   Education Section
   =================================== */
.education {
    background-color: var(--background);
}

.education-timeline {
    max-width: 50rem;
    margin: 0 auto;
}

.education-item {
    background-color: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.education-item:hover {
    box-shadow: var(--shadow-md);
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.education-header h3 {
    font-size: 1.25rem;
    color: var(--foreground);
}

.accordion-btn {
    background: none;
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.accordion-btn:hover {
    background-color: var(--surface);
    color: var(--foreground);
}

.accordion-icon {
    font-size: 1.25rem;
    font-weight: bold;
}

.education-institution {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 500;
}

.education-date {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

.education-honors {
    font-size: 0.875rem;
    color: var(--accent);
    font-style: italic;
    margin-top: 0.5rem;
}

.education-topic {
    font-size: 0.9rem;
    color: var(--foreground);
    margin-top: 0.75rem;
    font-weight: 500;
}

.education-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.education-details.active {
    max-height: 1000px;
    margin-top: 1.5rem;
}

.education-details ul {
    list-style-position: outside;
    padding-left: 1.5rem;
}

.education-details li {
    margin-bottom: 0.75rem;
    color: var(--foreground);
    line-height: 1.6;
}

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

.skills-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.skills-tab {
    padding: 0.75rem 1.5rem;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--muted-foreground);
    transition: var(--transition);
}

.skills-tab:hover {
    background-color: var(--surface);
    color: var(--foreground);
}

.skills-tab.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.skills-content {
    position: relative;
    min-height: 200px;
}

.skills-category {
    display: none;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.skills-category.active {
    display: flex;
}

.skill-badge {
    padding: 0.5rem 1rem;
    background-color: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--foreground);
    transition: var(--transition);
}

.skill-badge:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.05);
}

/* ===================================
   Publications Section
   =================================== */
.publications {
    background-color: var(--background);
}

.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.publication-card {
    background-color: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.publication-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.publication-card h3 {
    font-size: 1.125rem;
    color: var(--foreground);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.publication-conference,
.publication-date,
.publication-authors {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.publications-footer {
    text-align: center;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

/* ===================================
   Interests Section
   =================================== */
.interests {
    background-color: var(--surface);
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.interest-card {
    background-color: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.interest-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.interest-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.interest-icon {
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.astronomy-icon {
    background-color: hsla(210, 85%, 25%, 0.1);
}

.history-icon {
    background-color: hsla(195, 75%, 45%, 0.2);
}

.interest-card h3 {
    font-size: 1.5rem;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.interest-subtitle {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.interest-content {
    margin-bottom: 1.5rem;
}

.interest-content p {
    color: var(--foreground);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.interest-project {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    padding: 1rem;
}

.interest-project h4 {
    font-size: 1rem;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.interest-project p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.75rem;
}

.project-link {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.interests-quote {
    background: linear-gradient(135deg, hsla(210, 85%, 25%, 0.05) 0%, hsla(195, 75%, 45%, 0.05) 100%);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 2rem;
    margin-top: 3rem;
}

.interests-quote blockquote {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-style: italic;
    text-align: center;
    color: var(--foreground);
    line-height: 1.8;
    max-width: 56rem;
    margin: 0 auto;
}

/* ===================================
   Contact Section
   =================================== */
.contact {
    background-color: var(--background);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    transition: var(--transition);
}

.contact-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

a.contact-card:hover {
    background-color: var(--surface);
}

.contact-icon {
    font-size: 1.5rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--surface);
    border-radius: 0.5rem;
}

.contact-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
}

.contact-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
}

.contact-cta {
    text-align: center;
    padding: 2rem;
    background-color: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 0.5rem;
    margin-top: 2rem;
}

.contact-cta p {
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

.contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 0.375rem;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: transparent;
    color: var(--foreground);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--surface);
}

/* ===================================
   Footer
   =================================== */
.footer {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

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

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-fade-in:nth-child(1) { animation-delay: 0.1s; }
.animate-fade-in:nth-child(2) { animation-delay: 0.2s; }
.animate-fade-in:nth-child(3) { animation-delay: 0.3s; }
.animate-fade-in:nth-child(4) { animation-delay: 0.4s; }
.animate-fade-in:nth-child(5) { animation-delay: 0.5s; }

/* Scroll Animation Observer */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 640px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .experience-header {
        flex-direction: column;
    }
    
    .experience-meta {
        text-align: left;
    }
    
    .interests-quote blockquote {
        font-size: 1.125rem;
    }
}
