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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* Left Side: Profile Section */
.left-side {
    background: #e5e7eb;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
    height: fit-content;
}

.profile-section {
    text-align: center;
}

.profile-image {
    margin-bottom: 30px;
    position: relative;
    width: 250px;
    height: 250px;
    margin-left: auto;
    margin-right: auto;
}

.profile-image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #1f2937;
    box-shadow: 0 10px 30px rgba(31, 41, 55, 0.3);
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 1s ease-in-out;
}

.profile-photo-1 {
    opacity: 1;
    z-index: 2;
}

.profile-photo-2 {
    opacity: 0;
    z-index: 1;
}

/* Photo cycling animation */
.profile-photo-1.cycling {
    animation: photoCycle1 20s infinite;
}

.profile-photo-2.cycling {
    animation: photoCycle2 20s infinite;
}

@keyframes photoCycle1 {
    0%, 40% {
        opacity: 1;
        z-index: 2;
    }
    50%, 90% {
        opacity: 0;
        z-index: 1;
    }
    100% {
        opacity: 1;
        z-index: 2;
    }
}

@keyframes photoCycle2 {
    0%, 40% {
        opacity: 0;
        z-index: 1;
    }
    50%, 90% {
        opacity: 1;
        z-index: 2;
    }
    100% {
        opacity: 0;
        z-index: 1;
    }
}

.profile-info .name {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}

.profile-info .title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 15px;
}

.profile-info .institution {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.profile-info .bio {
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 20px;
    text-align: justify;
    line-height: 1.7;
}

.postdoc-text {
    display: inline-block;
    animation: moveRight 8s linear infinite;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

@keyframes moveRight {
    0% {
        transform: translateX(-50px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(50px);
        opacity: 0;
    }
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #f3f4f6;
    border-radius: 50%;
    color: #1f2937;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-links a:hover {
    background: #1f2937;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(31, 41, 55, 0.3);
}

/* Right Side: Interactive Graph */
.right-side {
    padding: 0;
}

.graph-navigation {
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
}

.graph-description {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 30px;
    line-height: 1.6;
}

.graph-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

#graph-svg {
    width: 100%;
    height: 400px;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* Graph Node Styling */
.graph-node circle {
    cursor: pointer;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.graph-node circle:hover {
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
    transform: scale(1.1);
}

.graph-node text {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 19.5px;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    opacity: 1 !important;
    transition: none;
    fill: white;
    stroke: none;
    visibility: visible !important;
}

.graph-link {
    stroke: #94a3b8;
    stroke-width: 2;
    opacity: 0.8;
}

/* Content Sections */
.content-sections {
    margin-top: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease;
    max-height: 0;
    overflow: hidden;
    margin-bottom: 0;
    display: none;
}

.content-sections.visible {
    opacity: 1;
    transform: translateY(0);
    max-height: none;
    margin-bottom: 80px;
}

.content-section {
    background: white;
    padding: 40px;
    margin-bottom: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
}

.content-section.active {
    opacity: 1;
    transform: translateY(0);
    max-height: none;
    padding-top: 40px;
    padding-bottom: 40px;
    margin-bottom: 40px;
}

.content-section h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 30px;
    text-align: center;
}

.content-section h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin: 25px 0 15px 0;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 8px;
}

.content-section h5 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #4b5563;
    margin: 20px 0 10px 0;
}

.content-section p {
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 15px;
    line-height: 1.7;
}

.content-section ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.content-section li {
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 12px;
    line-height: 1.6;
}

.content-section a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.content-section a:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Publications Section */
.publication-list h4 {
    color: #000000;
    font-size: 1.4rem;
    margin-top: 30px;
}

.publication-list ul {
    margin-bottom: 30px;
}

.publication-list li {
    background: #f9fafb;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #000000;
}

/* Projects Section */
.project-category {
    margin-bottom: 60px;
    padding: 30px;
    background: #f8fafc;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.project-category:last-child {
    margin-bottom: 0;
}

.category-title {
    color: #1f2937;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #6366f1;
    display: inline-block;
}

.project-section {
    margin-bottom: 40px;
}

.project-section:last-child {
    margin-bottom: 0;
}

.project-title {
    color: #1f2937;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #6366f1;
    display: inline-block;
}

.project-horizontal {
    display: flex;
    gap: 30px;
    background: #f8fafc;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.project-horizontal:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: #6366f1;
}

.project-photo {
    flex: 0 0 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: #f8f9fa;
}

.project-image {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-image embed {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.project-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    background: #f8f9fa;
    padding: 10px;
}

.project-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 20px;
}

.project-info h4 {
    color: #1f2937;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 600;
}

.abstract-box {
    background: #e5e7eb;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid #d1d5db;
    flex: 1;
    display: flex;
    align-items: center;
}

.project-abstract {
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
    font-size: 1rem;
    text-align: justify;
}

.project-abstract sup {
    font-size: 0.8rem;
    vertical-align: super;
}

.project-abstract sup a {
    color: #6366f1;
    text-decoration: none;
}

.project-abstract sup a:hover {
    text-decoration: underline;
}

.project-abstract a {
    color: #6366f1;
    text-decoration: none;
}

.project-abstract a:hover {
    text-decoration: underline;
}

.project-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.project-link {
    display: inline-block;
    background: transparent;
    color: #9ca3af;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    width: fit-content;
    border: 1px solid #d1d5db;
}

.project-link:hover {
    background: #f3f4f6;
    color: #6b7280;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-venue {
    color: #059669;
    font-weight: 600;
    font-size: 0.95rem;
}

.project-details {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Responsive design for projects */
@media (max-width: 768px) {
    .project-category {
        padding: 20px;
        margin-bottom: 40px;
    }

    .category-title {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }

    .project-title {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }

    .project-horizontal {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .project-photo {
        flex: none;
        order: 1;
    }

    .project-info {
        order: 2;
    }

    .abstract-box {
        padding: 15px;
    }
}

/* Teaching Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    text-align: center;
    background: #f8fafc;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.gallery-item p {
    font-weight: 500;
    color: #374151;
    margin: 0;
}

/* CV Section */
.cv-download {
    display: inline;
    background: none;
    color: #6366f1;
    padding: 0;
    border-radius: 0;
    font-weight: 600;
    margin-bottom: 0;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cv-download:hover {
    background: none;
    transform: none;
    box-shadow: none;
    text-decoration: underline;
    color: #4f46e5;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.contact-item i {
    font-size: 1.5rem;
    color: #6366f1;
    margin-top: 5px;
}

.contact-item h4 {
    margin: 0 0 8px 0;
    color: #1f2937;
    border: none;
    padding: 0;
}

.contact-item p {
    margin: 0;
    color: #6b7280;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.social-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: #4b5563;
    transition: all 0.3s ease;
}

.social-card:hover {
    background: #6366f1;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.social-card i {
    font-size: 1.8rem;
}

.social-card span {
    font-weight: 500;
}

/* Collaboration and Poem Links */
.collaboration-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.collaboration-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}

.poem-link {
    color: #10b981;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
}

.poem-link:hover {
    color: #059669;
    text-decoration: underline;
}





/* Responsive adjustments for contact section */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}



/* Experience Section */
.experience-item {
    background: #f8fafc;
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #000000;
}

.experience-item h5 {
    color: #1f2937;
    margin-bottom: 8px;
    border: none;
    padding: 0;
}

.experience-period {
    color: #6366f1;
    font-weight: 600;
    margin-bottom: 8px;
}

.experience-institution {
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 12px;
}

/* Updates Section */
.updates-section {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.updates-section .section-title {
    color: #1f2937;
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-align: left;
}

.updates-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.updates-list li {
    color: #1f2937;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    padding-left: 25px;
    line-height: 1.3;
    margin-bottom: 0;
    text-align: left;
    font-size: 0.85rem;
}

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

.updates-list li::before {
    content: "•";
    color: #1f2937;
    font-weight: bold;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: 6px;
}

.updates-list li:hover {
    color: #374151;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    padding-left: 30px;
    transition: all 0.3s ease;
}

/* Adjust graph container to be at the top */
.graph-container {
    margin-bottom: 0;
}

/* Ensure right side content flows properly */
.right-side .graph-navigation {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .left-side {
        position: static;
    }
    
    .right-side {
        margin: 0;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .left-side, .right-side {
        padding: 25px;
    }
    
    .profile-image img {
        width: 200px;
        height: 200px;
    }
    
    .profile-info .name {
        font-size: 2rem;
    }
    
    .project-horizontal {
        padding: 20px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    /* Mobile graph panel - increase vertical space */
    #graph-svg {
        height: 500px;
    }
    
    /* Mobile profile image centering */
    .profile-image {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 auto;
        margin-right: 20px;  /* Shift image to the right a little */
    }
    
    .profile-image img {
        margin: 0 auto;
        display: block;
    }
}

@media (max-width: 480px) {
    .profile-image img {
        width: 150px;
        height: 150px;
    }
    
    .profile-info .name {
        font-size: 1.8rem;
    }
    
    .social-links {
        gap: 15px;
    }
    
    .social-links a {
        width: 45px;
        height: 45px;
    }
    
    /* Small mobile graph panel - even more vertical space */
    #graph-svg {
        height: 600px;
    }
    
    /* Small mobile profile image centering */
    .profile-image {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 auto;
        margin-right: 20px;  /* Shift image to the right a little */
    }
    
    .profile-image img {
        margin: 0 auto;
        display: block;
    }
} 