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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.container {
    background: white;
    padding: 60px 40px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Header Section */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 50px;
    gap: 40px;
}

.header-left {
    flex: 1;
}

.name {
    font-family: Georgia, serif;
    font-size: 2.5em;
    font-weight: normal;
    color: #2563eb;
    margin-bottom: 8px;
}

.tagline {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 25px;
    font-style: italic;
}

.intro {
    font-size: 1em;
    line-height: 1.7;
    margin-bottom: 25px;
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 3px solid white;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-photo:hover img {
    transform: scale(1.05);
}

/* Navigation */
.nav {
    margin: 40px 0;
    border-bottom: 1px solid #e5e5e5;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    padding-bottom: 15px;
}

.nav a {
    color: #2563eb;
    text-decoration: none;
    font-size: 1em;
    transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Contact and Social */
.contact-social {
    display: flex;
    gap: 40px;
    margin: 30px 0;
    align-items: center;
}

.contact {
    color: #666;
}

.contact a {
    color: #2563eb;
    text-decoration: none;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.2s;
}

.social-links a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Content Sections */
.content-section {
    margin: 50px 0;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    position: relative;
}

.content-section.active {
    display: block;
    opacity: 1;
    position: relative;
    z-index: 1;
}

.section-title {
    font-family: Georgia, serif;
    font-size: 1.8em;
    color: #333;
    margin-bottom: 30px;
    font-weight: normal;
}

.experience-item,
.project-item {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.experience-item:last-child,
.project-item:last-child {
    border-bottom: none;
}

.item-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.item-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
}

.project-tech {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: #f0f4ff;
    color: #2563eb;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tech-tag:hover {
    background: #e0e7ff;
    transform: translateY(-1px);
}

/* Project Demo Video Styles */
.project-demo {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.demo-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.demo-description {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

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

.skill-category {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
}

.skill-category h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.skill-list {
    color: #666;
    font-size: 0.95em;
}

.honors-list {
    list-style: none;
}

.honors-list li {
    padding: 8px 0;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}

.honors-list li:last-child {
    border-bottom: none;
}

.resume-download {
    text-align: center;
    margin: 40px 0;
}

.resume-link {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s;
}

.resume-link:hover {
    background: #1d4ed8;
}

/* Recommendations */
.recommendation-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.recommendation-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
}

.rec-preview {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
}

.rec-preview iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.rec-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rec-title {
    font-weight: 600;
    color: #333;
}

.rec-professor {
    color: #666;
}

[data-theme="dark"] .recommendation-card {
    background: #2d2d2d;
}

[data-theme="dark"] .rec-preview {
    background: #1f2937;
    border-color: var(--border-color);
}

/* Publications Section */
.publication-item {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.publication-item:last-child {
    border-bottom: none;
}

.publication-item .item-meta {
    color: #666;
    font-style: italic;
    margin: 8px 0;
    font-size: 0.95em;
}

.publication-links {
    margin-top: 15px;
}

.pub-link {
    display: inline-block;
    padding: 6px 12px;
    margin-right: 10px;
    background: #f3f4f6;
    color: #2563eb;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.pub-link:hover {
    background: #e5e7eb;
    color: #1d4ed8;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
    color: #666;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }

    .header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .profile-photo {
        width: 150px;
        height: 150px;
        font-size: 20px;
    }

    .name {
        font-size: 2em;
    }

    .nav ul {
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
    }

    .contact-social {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark Theme Styles */
[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e5e5e5;
    --text-secondary: #a3a3a3;
    --accent-color: #60a5fa;
    --accent-hover: #3b82f6;
    --border-color: #404040;
    --card-bg: #262626;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
}

[data-theme="dark"] body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] .container {
    background: var(--card-bg);
    box-shadow: var(--shadow);
}

[data-theme="dark"] .name {
    color: var(--accent-color);
}

[data-theme="dark"] .tagline {
    color: var(--text-secondary);
}

[data-theme="dark"] .nav {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .nav a {
    color: var(--accent-color);
}

[data-theme="dark"] .nav a:hover,
[data-theme="dark"] .nav a.active {
    color: var(--accent-hover);
}

[data-theme="dark"] .contact {
    color: var(--text-secondary);
}

[data-theme="dark"] .contact a {
    color: var(--accent-color);
}

[data-theme="dark"] .social-links a {
    color: var(--accent-color);
}

[data-theme="dark"] .social-links a:hover {
    color: var(--accent-hover);
}

[data-theme="dark"] .section-title {
    color: var(--text-color);
}

[data-theme="dark"] .experience-item,
[data-theme="dark"] .project-item {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .item-title {
    color: var(--text-color);
}

[data-theme="dark"] .item-description {
    color: var(--text-secondary);
}

[data-theme="dark"] .tech-tag {
    background: #1e3a8a;
    color: var(--accent-color);
}

[data-theme="dark"] .tech-tag:hover {
    background: #1e40af;
}

/* Dark theme styles for project demo */
[data-theme="dark"] .project-demo {
    background: #374151;
    border-left-color: var(--accent-color);
}

[data-theme="dark"] .demo-title {
    color: var(--text-color);
}

[data-theme="dark"] .demo-description {
    color: var(--text-secondary);
}

[data-theme="dark"] .skill-category {
    background: #374151;
}

[data-theme="dark"] .skill-category h4 {
    color: var(--text-color);
}

[data-theme="dark"] .skill-list {
    color: var(--text-secondary);
}

[data-theme="dark"] .honors-list li {
    color: var(--text-secondary);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .resume-link {
    background: var(--accent-color);
}

[data-theme="dark"] .resume-link:hover {
    background: var(--accent-hover);
}

[data-theme="dark"] .publication-item {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .publication-item .item-meta {
    color: var(--text-secondary);
}

[data-theme="dark"] .pub-link {
    background: #374151;
    color: var(--accent-color);
}

[data-theme="dark"] .pub-link:hover {
    background: #4b5563;
    color: var(--accent-hover);
}

[data-theme="dark"] .footer {
    border-top-color: var(--border-color);
    color: var(--text-secondary);
}

/* Theme Toggle Button Styles */
.theme-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#theme-toggle {
    background: var(--card-bg, white);
    border: 2px solid var(--border-color, #e5e5e5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,0.1));
}

#theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

[data-theme="dark"] #theme-toggle {
    background: var(--card-bg);
    border-color: var(--border-color);
}

.theme-toggle-dark,
.theme-toggle-light {
    transition: opacity 0.3s ease;
}

[data-theme="light"] .theme-toggle-dark {
    opacity: 0;
}

[data-theme="light"] .theme-toggle-light {
    opacity: 1;
}

[data-theme="dark"] .theme-toggle-dark {
    opacity: 1;
}

[data-theme="dark"] .theme-toggle-light {
    opacity: 0;
}