/* =========================
   Global & Typography
========================= */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #fff;
    margin: 0;
    padding: 20px;
}

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

header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

h1 {
    font-family: 'Lora', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #000;
    margin: 0;
}

h2 {
    font-family: 'Lora', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #000;
    border-bottom: 1px solid #ccc;
    padding-bottom: 6px;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

a {
    color: #0056b3;
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    text-decoration: underline;
}

p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

strong {
    font-weight: 700;
}

/* =========================
   Sections
========================= */
section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* The class that the JavaScript will add */
section.visible {
    opacity: 1;
    transform: translateY(0);
}

main section {
    margin-bottom: 2rem;
}

/* About Section */
#about h2 {
    border-bottom: none;
    margin-top: 0;
}

.about-container {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.about-text {
    flex: 3; 
}

.about-image {
    flex: 1; 
    text-align: center;
}

.about-image img {
    width: 160px; 
    height: 160px;
    border-radius: 50%; 
    object-fit: cover; 
}

.social-links {
    display: flex;
    flex-direction: column; /* Stack links vertically */
    align-items: flex-start; /* Align to the left */
    gap: 0.8rem; /* Space between rows */
    margin-top: 1.5rem;
    margin-left: 10px; /* Indent the links slightly */
}

.social-links a {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Space between icon and text */
}

.social-links .icon {
    display: inline-block;
    width: 22px; /* Consistent icon width */
    height: 22px; /* Consistent icon height */
    color: #555;
    flex-shrink: 0; /* Prevents icon from shrinking */
}

/* Remove the old span style if you have it */
.social-links a span {
    font-size: inherit; /* Reset old styles if any */
    color: inherit;
}

.social-links a span {
    font-size: 1.1rem; /* Adjust icon size */
    color: #555;
}


/* Publications Section */
.publication-item {
    margin-bottom: 2rem;
}

.publication-item .title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.publication-item .authors {
    font-size: 1rem;
    color: #555;
    margin-bottom: 0.2rem;
}

.publication-item .venue {
    font-size: 1rem;
    color: #555;
}

/* Experience & Teaching */
.experience-item {
    margin-bottom: 2rem;
}

.experience-item .role-title strong {
    font-size: 1.1rem;
    color: #000;
}

.experience-item .role-details {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0.4rem;
}

.experience-item .role-desc {
    font-size: 1rem;
    color: #333;
    margin-bottom: 0;
}

/* =========================
   Responsive Design
========================= */

@media (max-width: 700px) {
    .about-container {
        flex-direction: column-reverse; /* Stacks image on top of text */
        align-items: center;
    }
    
    .social-links {
        align-items: center; /* Center the links on mobile */
        margin-left: 0;
    }
    
    #about h2 {
        text-align: center;
    }
}

@media (max-width: 600px) {
    body {
        padding: 10px 5px;
    }
    .container {
        padding: 0 10px;
    }
    p {
        font-size: 1rem;
    }
}
