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

:root {
    color-scheme: light;
    --primary-color: #2c2c2c;
    --secondary-color: #5a5a5a;
    --accent-color: #8b7355;
    --text-light: #6b6b6b;
    --text-dark: #2c2c2c;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    color-scheme: light;
    background-color: #ffffff;
    color: #2c2c2c;
}

body {
    font-family: 'lora', serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
    font-weight: 300;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'lora', serif;
    font-weight: 400;
    line-height: 1.3;
    color: var(--primary-color);
    letter-spacing: -0.01em;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
}

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

.nav-logo {
    font-family: 'lora', serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

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

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

/* Subpages: offset content below fixed nav */
.main-subpage {
    padding-top: 100px;
}

/* Home: margin above banner */
main.home {
    padding-top: 1.25rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    color: #2c2c2c;
    text-align: center;
    padding: 2rem;
    overflow: hidden;
}

/* Tighter gap between banner and hero text on home */
.about-banner + .hero {
    min-height: auto;
    padding-top: 0.75rem;
    padding-bottom: 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeInUp 1s ease;
}

.hero-image-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.hero-profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-name {
    font-size: 4rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: #2c2c2c;
    text-shadow: none;
    letter-spacing: -0.02em;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    color: #5a5a5a;
    opacity: 1;
    letter-spacing: 0.01em;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #5a5a5a;
    opacity: 1;
    font-weight: 300;
}

.hero-affiliation {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #6b6b6b;
    opacity: 1;
    font-weight: 300;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-social {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-social .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--primary-color);
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    transition: var(--transition);
}

.hero-social .social-link:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    transform: translateY(-2px);
}

.hero-social .social-link svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary {
    background: #2c2c2c;
    color: #ffffff;
    border-color: #2c2c2c;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    background: #1a1a1a;
}

.btn-secondary {
    background: transparent;
    color: #2c2c2c;
    border-color: #2c2c2c;
}

.btn-secondary:hover {
    background: #2c2c2c;
    color: #ffffff;
    border-color: #2c2c2c;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #6b6b6b;
    font-size: 0.875rem;
    opacity: 0.6;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid #6b6b6b;
    border-bottom: 2px solid #6b6b6b;
    transform: rotate(45deg);
}

/* Sections */
.section {
    padding: 5rem 2rem;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
}

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

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.section-divider {
    width: 60px;
    height: 1px;
    background: #000000;
    margin: 1rem auto;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 1rem auto 0;
}

.cv-subtitle {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.cv-subtitle:first-of-type {
    margin-top: 0;
}

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

.about-banner {
    display: block;
    width: 100vw;
    max-width: 100vw;
    max-height: 280px;
    object-fit: cover;
    object-position: center;
    margin-bottom: 0.5rem;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    max-width: 100%;
}

.about-image-container {
    grid-column: 1 / -1;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.about-photo {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    object-fit: cover;
    filter: grayscale(100%);
}

@media (min-width: 769px) {
    .about-image-container {
        grid-column: 1;
        margin-bottom: 0;
    }
    
    .about-content {
        grid-template-columns: 300px 1fr;
    }

    .about-highlights {
        grid-column: 1 / -1;
        margin-top: 3rem;
    }

    .research-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.about-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.lead {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 2rem;
    max-width: 100%;
    width: 100%;
}

.highlight-item {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 12px;
    border-left: 4px solid #000000;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 150px;
}

.highlight-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.highlight-item h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.highlight-item p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* Research Section */
.research-section {
    background: var(--bg-light);
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.research-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.research-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #000000;
    transform: scaleX(0);
    transition: var(--transition);
}

.research-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.research-card:hover::before {
    transform: scaleX(1);
}

.research-number {
    font-size: 3rem;
    font-weight: 300;
    color: rgba(139, 115, 85, 0.35);
    font-family: 'lora', serif;
    margin-bottom: 1rem;
}

.research-card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.research-card-description {
    color: var(--text-light);
    line-height: 1.7;
}

/* Work Section */
.work-section {
    background: var(--bg-white);
}

.work-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.work-item {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 12px;
    transition: var(--transition);
    border-left: 4px solid transparent;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.work-item:hover {
    border-left-color: #000000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

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

.work-venue {
    font-size: 1rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1rem;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.work-description {
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 1rem;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.work-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.work-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.work-link:hover {
    color: #6b5d47;
}

/* Education Section */
.education-section {
    background: var(--bg-light);
}

.education-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 2rem;
}

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

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

.timeline-marker {
    position: absolute;
    left: -1.5rem;
    top: 0.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 3px solid var(--bg-white);
    box-shadow: 0 0 0 3px var(--border-color);
}

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

.timeline-institution {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.timeline-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(196, 168, 130, 0.2);
    color: var(--accent-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 400;
}

/* Keywords Section */
.keywords-section {
    background: var(--bg-white);
    padding: 3rem 2rem;
}

.keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.keyword-tag {
    padding: 0.5rem 1.25rem;
    background: var(--bg-light);
    border-radius: 25px;
    font-size: 0.875rem;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.keyword-tag:hover {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
    transform: translateY(-2px);
}

/* Contact Section */
.contact-section {
    background: var(--bg-white);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-dark);
    font-weight: 400;
    font-size: 0.9rem;
}

.form-group .required {
    color: var(--accent-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-light);
    color: var(--text-dark);
    font-family: 'lora', serif;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.contact-message.success {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.35);
    color: #2e7d32;
}

.contact-message.error {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.35);
    color: #c62828;
}

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

.contact-item h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.contact-item a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: #000000;
    text-decoration: underline;
}

.contact-item p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Footer */
.footer {
    background: var(--bg-white);
    color: var(--text-dark);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-container p {
    margin: 0.5rem 0;
    color: var(--text-light);
}

.footer-affiliation {
    font-size: 0.875rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: 0;
        top: 70px;
        width: 100%;
        flex-direction: column;
        background: var(--bg-white);
        text-align: center;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

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

    .nav-toggle {
        display: flex !important;
        flex-shrink: 0;
        position: relative;
        z-index: 1001;
    }

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

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

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

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-highlights {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }

    .highlight-item {
        padding: 1.5rem;
        min-height: auto;
    }

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

    .hero-social {
        gap: 1.5rem;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .hero-profile-image {
        width: 220px;
        height: 220px;
    }

}

@media (max-width: 480px) {
    .hero-name {
        font-size: 2rem;
    }

    .section {
        padding: 3rem 1rem;
    }

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