:root {
    --background-color: #f5f5f5;
    --container-background: white;
    --text-color: #333;
    --link-color: #084B8A; /* Darker blue for links */
    --border-color: #ccc;
    --shadow-color: rgba(0,0,0,0.1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #1a1a1a;
        --container-background: #2d2d2d;
        --text-color: #e0e0e0;
        --link-color: #6699cc; /* Less bright blue for dark mode */
        --border-color: #555;
        --shadow-color: rgba(0,0,0,0.3);
    }
}

body {
    font-family: Avenir, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}
h1, h2, h3 {
    font-family: Georgia, Cambria, "Times New Roman", serif;
}
/* .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--container-background);
    box-shadow: 0 0 10px var(--shadow-color);
} */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--container-background);
    box-shadow: none;
    border: 1px solid var(--border-color); /* Optional: Add a border instead */
}
header {
    margin-bottom: 20px;
}
h1 {
    font-size: 22px; /* Changed from 28px to make it ~2/3 the original size */
    margin-bottom: 5px;
}
h2 {
    font-size: 20px;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 15px;
}
h3 {
    font-size: 18px;
    margin-bottom: 5px;
}
a {
    color: var(--link-color);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
.contact-info {
    margin-bottom: 20px;
}
.profile-section {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}
.profile-image {
    margin-right: 20px;
    border: 1px solid var(--border-color);
}
.publications li {
    margin-bottom: 10px;
}
.course {
    margin-bottom: 15px;
}
footer {
    margin-top: 30px; 
    border-top: 1px solid var(--border-color); 
    padding-top: 10px; 
    font-size: 0.9em;
}
.email {
    unicode-bidi: bidi-override;
    direction: rtl;
}
.protected-email {
display: inline-flex;
flex-direction: row;
flex-wrap: nowrap;
}
.protected-email > span {
display: inline-block;
width: auto;
}
.image-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.image-wrapper {
    display: flex;
    justify-content: center;
}

@media (max-width: 650px) {
    .image-container {
        flex-direction: column;
        align-items: center;
    }
}

.animation-trigger {
    text-align: center;
    margin: -10px 0 20px 0;
    height: 20px; /* Fixed height to prevent layout shift */
    font-size: 0.9em;
}

.animation-trigger a {
    color: var(--link-color);
    text-decoration: none;
}

.animation-trigger a:hover {
    text-decoration: underline;
}

.project-images {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.image-group {
    display: inline-block;
    vertical-align: top;
}

.image-with-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.inline-trigger {
    margin: 5px 0 15px 0;
    text-align: center;
    width: 100%;
    height: auto;
}