/* Light & Dark Theme */
:root {
    --bg-color: #ffffff;
    --text-color: #3C3C3C;
    --text-lighter-color: #7b7b7b;
    --text-darker-color: #000000;
    --link-color: #000000;
    --link-hover-color: #303030;
    --footer-bg-color: #f5f5f5;
    --scroll-bg-color: #cbcbcb;
    --scroll-thumb-color: #909090;
    --scroll-border-color: #b7b7b7;
    --back-green: #e9f3ed;
    --back-blue: #e9f1f3;
    --back-red: #fff0ee;
    --back-orange: #ffeddf;
    --snu-logo-color: contrast(100%);
    --ldi-logo-color: contrast(100%);
    --header-bg-color: #f5f5f5;
    --bibtex-bg-color: #f5f5f5;
}

/* Dark mode */
[data-theme="dark"] {
    --bg-color: #1e1e1e;
    --text-color: #e0e0e0;
    --text-lighter-color: #7b7b7b;
    --text-darker-color: #ffffff;
    --link-color: #ffffff;
    --link-hover-color: #f0f0f0;
    --footer-bg-color: #2a2a2a;
    --scroll-bg-color: #3a3a3a;
    --scroll-thumb-color: #606060;
    --scroll-border-color: #2a2a2a;
    --back-green: #2e3e2e;
    --back-blue: #2e3e3e;
    --back-red: #3e2e2e;
    --back-orange: #3e3e2e;
    --snu-logo-color: invert(100%) sepia(0%) saturate(0%) hue-rotate(189deg) brightness(100%) contrast(10100%);
    --ldi-logo-color: invert(100%) sepia(0%) saturate(7492%) hue-rotate(189deg) brightness(100%) contrast(101%);
    --header-bg-color: #2a2a2a;
    --bibtex-bg-color: #2a2a2a;
}

body {
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
    font-size: 15px;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.8s;
}

.content {
    min-height: calc(100vh - 430px);
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 30px;
}

.category {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 25px;
    color: var(--text-darker-color);
    text-align: center;
}

/* Navigation */

nav {
    padding: 30px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1800px;
    margin: 0 auto;
    height: 100px;
}

.logo img {
    height: 50px;
    filter: var(--ldi-logo-color);
}

.nav-links-container {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li:not(:last-child) {
    margin-right: 35px;
}

.nav-links li a {
    text-decoration: none;
    color: var(--link-color);
}

.nav-links li a:hover {
    text-decoration: underline;
}

.nav-links li .active {
    text-decoration: none;
    color: var(--link-hover-color);
    font-weight: 600;
}

.nav-links li .theme-switch {
    display: none;
}

.theme-switch svg {
    width: 24px;
    height: 24px;
    fill: var(--text-darker-color);
}

.theme-switch-right svg {
    display: block;
}

.theme-switch-right svg:hover {
    cursor: pointer;
}

.toggle-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    height: 18px;
    cursor: pointer;
}

.toggle-btn span {
    width: 18px;
    height: 2px;
    background-color: var(--text-color);
}

/* Hero */

.hero {
    background-color: var(--bg-color);
    padding-top: 80px;
    padding-bottom: 30px;
    align-items: center;
    text-align: center;
    color: var(--text-darker-color);
    padding-left: 30px;
    padding-right: 30px;
}

.hero .welcome {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: -5px;
}

.hero .lab-name {
    margin-top: 0px;
    font-size: 40px;
    font-weight: 900;
    margin-bottom: 0px;
}

.hero .lab-info {
    font-size: 18px;
    font-style: italic;
    margin-bottom: 40px;
}

.hero .explore-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--text-darker-color);
    color: var(--bg-color);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 5px;
    outline: 2px solid var(--text-darker-color);
    transition: background-color 0.3s, color 0.3s;
}

.hero .explore-btn:hover {
    background-color: transparent;
    color: var(--text-darker-color);
}

.hero .github-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--text-darker-color);
    color: var(--bg-color);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 5px;
    outline: 2px solid var(--text-darker-color);
    transition: background-color 0.3s, color 0.3s;
    margin-left: 8px;
}

.hero .github-btn:hover {
    background-color: transparent;
    color: var(--text-darker-color);
}

/* Footer */

footer {
    background-color: var(--footer-bg-color);
    padding-top: 30px;
}

.footer-container {
    display: flex;
    align-items: center;
    max-width: 1800px;
    margin: 0 auto;
    padding: 30px;
    font-size: 14px;
}

.footer-logos {
    display: flex;
    align-items: center;
    margin-right: 30px;
}

.footer-logos img {
    height: 110px;
    margin-right: 25px;
    filter: var(--snu-logo-color);
}

.footer-info {
    text-align: justify;
}

.footer-info p {
    margin: 0;
    margin-bottom: 15px;
}

.footer-info a {
    color: var(--text-color);
    text-decoration: none;
}

.footer-info a:hover {
    text-decoration: underline;
}

.footer-info .copyrights {
    color: var(--text-lighter-color);
}

/* Research */

.research {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--text-darker-color);
}

.description {
    font-size: 18px;
    margin-bottom: 50px;
}

.research-topics {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.topic {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20%;
    padding: 20px;
    margin-bottom: 20px;
}

.blue {
    background-color: var(--back-blue);
}

.green {
    background-color: var(--back-green);
}

.red {
    background-color: var(--back-red);
}

.orange {
    background-color: var(--back-orange);
}

.topic-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.topic-icon img {
    max-width: 100%;
    max-height: 100%;
    filter: var(--ldi-logo-color);
}

.topic-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-darker-color);
}

.topic-description {
    font-size: 15px;
    text-align: center;
}

/* Publications */

.publications {
    display: flex;
    flex-direction: column;
}

.publications-content {
    display: flex;
    flex-direction: column;
    margin-bottom: 40px;
}

.publications-year {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 10px;
    color: var(--text-darker-color);
}

.publications-list {
    display: flex;
    flex-direction: column;
    align-items: left;
    margin-left: 15px;
}

.publication {
    display: flex;
    flex-direction: column;
    align-items: left;
    margin-bottom: 18px;
}

.publication-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
    text-decoration: underline transparent;
    color: var(--text-color);
    transition: text-decoration 0.3s ease-in-out;
}

.publication-title:hover {
    text-decoration-color: var(--text-color);
}

.publication-authors {
    font-size: 15px;
    font-style: italic;
    margin-bottom: 5px;
}

.publication-authors a {
    color: var(--text-color);
    text-decoration: none;
}

.publication-authors a:hover {
    text-decoration: underline;
}

.publication-venue {
    font-size: 15px;
    font-style: italic;
    margin-bottom: 5px;
}

/* People */

.people-category {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 25px;
    color: var(--text-darker-color);
}

.people-category-alumni {
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--text-darker-color);
}

.people-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.person {
    display: flex;
    width: 48%;
    margin-bottom: 30px;
    height: auto;
    flex-wrap: wrap;
}

.person-image-container {
    width: 200px;
    height: 200px;
    overflow: hidden;
    position: relative;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: border-radius 0.3s ease;
    flex-shrink: 0;
}

.person-image-container:hover {
    border-radius: 0%;
}

.person-image-container img {
    display: inline;
    height: 100%;
    width: auto;
}

.person-info-container {
    padding: 18px;
    position: relative;
    flex: 1;
}

.person-name {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
}

.person-mail {
    display: block;
    margin-bottom: 10px;
    color: var(--text-color);
    text-decoration: none;
    font-style: italic;
}

.person-moreinfo {
    position: absolute;
    font-size: 14px;
    color: var(--text-color);
    text-decoration: none;
    font-variant: small-caps;
    font-weight: 900px;
    bottom: 0;
    margin-bottom: 5px;
}

.person-moreinfo:hover {
    text-decoration: underline;
}

.person-interests {
    list-style-type: "- ";
    padding: 0;
    margin: 0;
    margin-left: 15px;
    margin-bottom: 10px;
}

@counter-style paper {
    system: cyclic;
    symbols: "📄";
    suffix: " ";
}

.person-publications {
    list-style-type: paper;
}

.person-publication-author-link {
    color: var(--text-color);
    text-decoration: none;
}

.person-publication-author-link:hover {
    text-decoration: underline;
}

.alumni {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    width: 100%;
    margin-bottom: 6px;
}

a.alumni:hover {
    text-decoration: underline;
}

.person-publication {
    color: var(--text-color);
    text-decoration: none;
    width: 100%;
    margin-bottom: 6px;
}

a.person-publication:hover {
    text-decoration: underline;
}

.person-pub-venue {
    color: var(--text-color);
    font-weight: 600;
}

/* Presentation */

.person-presentation {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
}

.photo {
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    border-radius: 50%;
    margin-right: 30px;
}

.photo img {
    display: inline;
    height: 100%;
    width: auto;
}

.person-description {
    flex: 1;
    max-width: calc(100% - 330px);
}

.name {
    font-size: 2rem;
    margin-bottom: 20px;
}

.main-info {
    margin-bottom: 30px;
}

.main-info p {
    margin: 5px 0;
}

.other-info {
    margin-top: 20px;
}

.other-info h1, h2, h3, h4, h5, h6 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.other-category {
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-align: left;
}

.category-interests li {
    margin-bottom: 5px;
}

.return-people {
    color: var(--text-darker-color);
    fill: var(--text-darker-color);
    text-decoration: none;
}

.special-link {
    color: var(--text-color);
    text-decoration: underline;
}

/* Middle */

.middle-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.middle-logo img {
    height: 15vh;
    max-height: 300px;
    filter: var(--snu-logo-color);
}

/* Project Pages */
.project-presentation {
    text-align: center;
}

.project-header {
    padding-top: 15px;
    padding-bottom: 15px;
    margin-bottom: 30px;
    background-color: var(--header-bg-color);
    display: flex;
    align-items: center;
}

.project-header-content {
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.project-title {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: bold;
}

.project-authors {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.project-affiliations {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.project-authors a {
    color: var(--text-color);
    text-decoration: none;
}

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

.project-authors sup {
    font-size: 0.7em;
    margin-left: 4px;
}

.project-affiliations sup {
    font-size: 0.7em;
    margin-right: 4px;
}

.project-mails {
    font-size: 1em;
    margin-bottom: 30px;
    color: var(--text-color);
}

.project-mails a {
    color: var(--text-color);
    text-decoration: none;
}

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

.project-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    padding: 10px 20px;
    font-size: 1.2rem;
    text-decoration: none;
    color: var(--bg-color);
    transition: background-color 0.3s, color 0.3s;
    background-color: var(--text-darker-color);
    outline: 2px solid var(--text-darker-color);
    border: none;
    border-radius: 50px;
}

.project-button:hover {
    background-color: transparent;
    color: var(--text-darker-color);
}

.project-button i {
    margin-right: 5px;
}

.project-corresponding {
    text-align: center;
    font-size: 0.8rem;
    margin-top: 10px;
    color: var(--text-color);
    font-style: italic;
    font-weight: bold;
}

.project-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.project-content {
    margin-bottom: 35px;
    max-width: 800px;
}

.project-content h1, h2, h3, h4, h5, h6 {
    margin-bottom: 10px;
    text-align: center;
}

.project-content h1:not(:first-child) {
    margin-top: 50px;
}

.project-content p, ul, ol {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-align: left;
}

.project-content a {
    color: var(--text-color);
    text-decoration: none;
}

.project-content a:hover {
    text-decoration: underline;
}
.project-content img {
    max-width: 100%;
    margin: 0 auto 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.bibtex-title {
    font-size: 1.8em;
    margin-bottom: 0.5em;
}

.project-bibtex {
    padding: 1em;
    background-color: var(--bibtex-bg-color);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.project-bibtex pre {
    font-family: monospace;
    text-align: left;
    max-width: 80%;
    min-width: 50%;
    max-height: 100px;
    overflow-x: auto;
    overflow-y: auto;
    background-color: var(--bg-color);
    padding: 15px;
}

.project-bibtex pre code {
    font-size: 0.8em;
}

/* Scrollbar styles */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track-piece {
    background-color: var(--bg-color)
}

::-webkit-scrollbar-thumb {
    background-color: var(--scroll-bg-color);
    outline: 2px solid var(--footer-bg-color);
    outline-offset: -2px;
    border: .1px solid var(--scroll-border-color)
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--scroll-thumb-color)
}

@media (max-width: 768px) {

    .show-nav {
        display: block !important;
        z-index: 1;
    }

    .nav-links-container {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        left: 0;
        top: 110px;
        background-color: var(--bg-color);
        padding: 15px;
        width: 95.5%;
        box-shadow: 0 4px 5px rgba(0, 0, 0, 0.1);
        animation: ease-in-out 0.3s slideIn forwards;
    }

    .nav-links {
        flex-direction: column;
        margin-left: 50px;
    }

    .nav-links li:not(:last-child) {
        margin-right: 0;
        margin-bottom: 18px;
    }

    .nav-links li .theme-switch {
        display: block;
    }

    .toggle-btn {
        display: flex;
    }

    .theme-switch-right svg {
        display: none;
    }

    .person-presentation {
        flex-direction: column;
        align-items: center;
    }

    .photo {
        margin-right: 0;
        margin-bottom: 20px;
    }
}

@media (max-width: 1024px) {
    .topic {
        width: 100%;
    }

    .person {
        width: 100%;
        flex-direction: column;
        align-items: center;
        height: auto;
    }

    .person-description {
        max-width: 100%;
    }

    .person-image-container {
        width: 150px;
        height: 150px;
    }

    .person-info-container {
        padding: 12px;
        text-align: center;
    }

    .person-moreinfo {
        text-align: center;
        position: relative;
        bottom: auto;
    }

    .person-name {
        font-size: 16px;
    }

    .project-content {
        max-width: 90%;
        font-size: 0.8em;
    }

    .project-content img {
        max-width: 100%;
    }

    .project-bibtex pre {
        max-width: 90%;
        min-width: 90%;
    }

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