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

:root {
    /* Color Palette */
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --accent-hover: #2980b9;
    --text-dark: #2c3e50;
    --text-medium: #555;
    --text-light: #777;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-mono: 'Monaco', 'Courier New', monospace;

    /* Spacing */
    --section-padding: 4rem 0;
    --container-max-width: 1100px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

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

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

/* Main Content */
main {
    flex: 1;
}

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

/* Tabs Navigation */
.tabs {
    display: flex;
    gap: 0;
    margin: 2rem 0 0 0;
    padding: 0;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--bg-light);
    background-color: var(--bg-white);
    border-radius: 8px 8px 0 0;
}

.tabs::-webkit-scrollbar {
    height: 4px;
}

.tabs::-webkit-scrollbar-track {
    background: var(--bg-light);
}

.tabs::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 2px;
}

.tab-button {
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-medium);
    padding: 1rem 1.15rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
    white-space: nowrap;
    position: relative;
}

.tab-button:first-child {
    margin-left: 0.75rem;
}

.tab-button:last-child {
    margin-right: 0.75rem;
}

.tab-button:hover {
    color: var(--accent-color);
    background-color: var(--bg-light);
}

.tab-button.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    font-weight: 600;
}

/* Tab Content */
.tab-content-wrapper {
    margin-top: 0;
    background-color: var(--bg-white);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 4px var(--shadow);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0 3.5rem;
    box-shadow: 0 4px 6px var(--shadow);
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.portrait {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.hero-content {
    flex: 1;
    text-align: left;
}

.hero .name {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero .title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-weight: 400;
    color: white;
}

.contact {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.contact-link {
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.contact-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.separator {
    color: rgba(255, 255, 255, 0.5);
}

/* Sections */
.section {
    padding: var(--section-padding);
    padding-left: 2rem;
    background-color: transparent;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

/* Summary Section */
.summary-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-medium);
    max-width: 900px;
}

/* Current Roles Grid */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.role-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.role-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px var(--shadow);
}

.role-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.company {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.location {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.role-description {
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.period {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Skills Grid */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    background-color: var(--bg-light);
    color: var(--text-dark);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

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

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: 3px solid var(--bg-white);
    box-shadow: 0 0 0 3px var(--accent-color);
}

.timeline-date {
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-content .job-title {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.timeline-content .company {
    color: var(--text-medium);
    margin-bottom: 0.75rem;
}

.timeline-content .description {
    color: var(--text-medium);
    line-height: 1.7;
}

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

.education-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    border-top: 4px solid var(--accent-color);
}

.degree {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.institution {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.education-period {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.thesis-title {
    font-style: italic;
    color: var(--text-medium);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.advisor {
    color: var(--text-medium);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.gpa {
    color: var(--text-medium);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.note {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 1rem;
    font-style: italic;
}

/* Research Section */
.subsection {
    margin-bottom: 2.5rem;
}

.subsection:last-child {
    margin-bottom: 0;
}

.subsection-title {
    font-size: 1.35rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.publication {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--accent-color);
}

.publication:last-child {
    margin-bottom: 0;
}

.pub-authors {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.pub-title {
    font-style: italic;
    color: var(--text-medium);
    margin-bottom: 0.5rem;
}

.pub-venue {
    color: var(--text-light);
    font-size: 0.95rem;
}

.simple-list {
    list-style: none;
    padding-left: 0;
}

.simple-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-medium);
    line-height: 1.6;
}

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

/* Achievements Grid */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.achievement-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px var(--shadow);
}

.achievement-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.achievement-desc {
    color: var(--text-medium);
    line-height: 1.6;
}

/* Languages */
.languages {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.language-tag {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
}

/* Contact Section */
.contact-section {
    max-width: 900px;
}

.contact-intro {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-medium);
    margin-bottom: 3rem;
}

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

.contact-method {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.contact-method-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--accent-color);
}

.contact-method-value {
    color: var(--text-medium);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.contact-method-link {
    color: var(--accent-color);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-method-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.reveal-email-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 0.5rem;
    font-family: var(--font-primary);
}

.reveal-email-btn:hover {
    background-color: var(--accent-hover);
}

.resume-link {
    display: inline-flex;
    align-items: center;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
    font-size: 0.875rem;
}

footer p {
    opacity: 0.8;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .hero-content {
        text-align: center;
    }

    .contact {
        justify-content: center;
    }

    .portrait {
        width: 140px;
        height: 140px;
    }

    .hero .name {
        font-size: 2.25rem;
    }

    .hero .title {
        font-size: 1.1rem;
    }

    .container {
        padding: 0 1.5rem;
    }

    .tab-button {
        padding: 0.9rem 1.25rem;
        font-size: 0.9rem;
    }

    .section {
        padding: 3rem 0;
        padding-left: 1.5rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .roles-grid,
    .education-grid,
    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .contact {
        flex-direction: column;
    }

    .separator {
        display: none;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-item::before {
        left: -2rem;
    }

    .contact-methods {
        grid-template-columns: 1fr;
    }

    .contact-method {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2.5rem 0 2rem;
    }

    .hero .container {
        gap: 1rem;
    }

    .portrait {
        width: 120px;
        height: 120px;
    }

    .hero .name {
        font-size: 1.75rem;
    }

    .hero .title {
        font-size: 1rem;
    }

    .tab-button {
        padding: 0.85rem 1rem;
        font-size: 0.85rem;
    }

    .section {
        padding: 2rem 0;
        padding-left: 1rem;
    }

    .role-card,
    .education-card {
        padding: 1.5rem;
    }
}
