/* .theme-switch-wrapper {
    display: flex;
    align-items: center;

    em {
        margin-left: 10px;
        font-size: 1rem;
    }
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
} */

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
}

input:checked+.slider {
    background-color: #66bb6a;
}

input:checked+.slider:before {
    transform: translateX(26px);
    background-color: #ccc;
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.row {
    width: 100%;
    display: flex;
    flex-flow: row wrap;
    margin: auto;
}
  
.class-title {
    font-style: italic;
    font-size: 1.25em;
    width: 52.5%;
}

body {
    transition: .4s;
}

.row .class-number {
    position: relative;
}

.clickable > div {
    position: relative;
    padding-right: 24px; /* space for icon */
}

.dropdown-icon-right {
    position: absolute;
    right: 0;
    top: 0.2em;
    font-size: 0.9em;
    transition: transform 0.2s ease;
}

.dropdown-icon-left {
    position: absolute;
    left: -1em;
    top: 0.2em;
    font-size: 0.9em;
    transition: transform 0.2s ease;
}

.clickable.open .dropdown-icon-right {
    transform: rotate(180deg);
}

.header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.header h1 {
    margin: 0;
    align-items: baseline;
    font-size: 2.5rem;
}

.header h1 a {
    text-decoration: none;
}

.navbar {
    display: flex;
    gap: 1.5rem;
}

.navbar a,
.navbar a:visited {
    color: inherit;
    text-decoration: none !important;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.navbar a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: red;
    transition: width 0.3s ease;
}

.navbar a:hover {
    color: red !important;
}

.navbar a:hover::after {
    width: 100%;
}

.navbar a.active {
    color: red !important;
}

.navbar a.active::after {
    width: 100%;
}

.thick-line {
    border: none;
    border-top: 5px solid black;
}

[data-theme="dark"] .thick-line {
    border-top-color: #888;
}

.thin-line {
    border: none;
    border-top: 1px solid black;
}

[data-theme="dark"] .thin-line {
    border-top-color: white;
}

.about-section {
    display: block;
}

.about-section > .profile-buttons {
    float: right;
    clear: right;
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.about-section > .profile-buttons .profile-button {
    width: 100%;
    box-sizing: border-box;
}

.profile-side {
    float: right;
    width: 250px;
    margin-left: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.profile-side img {
    display: block;
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
}

.profile-side .profile-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.8rem;
    margin-bottom: 0;
}


.theme-switch {
    display: flex;
    align-items: baseline;
    margin-left: 1rem;
    cursor: pointer;
}

.theme-switch input {
    display: none;
}

.theme-icon {
    display: inline-block;
    width: 1.4rem;
    text-align: center;
    font-size: 1.4rem;
    cursor: pointer;
    transition: 0.2s;
}

.theme-switch:hover .theme-icon {
    color: red;
}

.publication {
    display: flex;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ccc;
    max-width: 100%;
}

.pub-year {
    width: 100px;
    flex-shrink: 0;
    font-weight: bold;
    color: #3b6ea5;
}

.pub-content {
    flex: 1;
    min-width: 0;
}

.pub-title {
    position: relative;
    cursor: default;
    font-size: 1.25rem;
    font-weight: bold;
}

.pub-authors, .pub-journal {
    margin-top: 0.2rem;
}

.pub-details {
    display: none;
    margin-top: 0.6rem;
    font-size: 0.9rem;
}

.publication.open .pub-details {
    display: block;
}

.pub-details p {
    margin: 0.4rem 0;
}

.talk {
    display: flex;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ccc;
    max-width: 100%;
}

.talk-date {
    width: 150px;
    flex-shrink: 0;
    font-weight: bold;
    color: #3b6ea5;
}

.talk-content {
    flex: 1;
    min-width: 0;
}

.talk-title {
    cursor: default;
    font-size: 1.25rem;
    font-weight: bold;
}

.talk-conference, .talk-location {
    margin-top: 0.2rem;
}

.dropdown-button {
    align-self: flex-start;
    margin-left: 1.5rem;
    width: 80px;
    height: 32px;
    padding: 0;
    box-sizing: border-box;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: 1px solid currentColor;
    border-radius: 4px;

    font-family: inherit;
    font-size: 0.9rem;
    font-weight: normal;
    line-height: 1;

    color: #2f5f8f;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
}

.journal-button {
    align-self: flex-start;
    margin-left: 1.5rem;
    width: 80px;
    height: 32px;
    padding: 0;
    box-sizing: border-box;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: 1px solid red;
    border-radius: 4px;

    font-family: inherit;
    font-size: 0.9rem;
    font-weight: normal;
    line-height: 1;

    color: red !important;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
}

.journal-button:hover {
    color: red !important;
    border-color: red;
    background-color: #fbeaea;
}

.dropdown-button:hover {
    color: #0066cc !important;
    border-color: #0066cc !important;
    text-decoration: none !important;
    background-color: rgba(0, 102, 204, 0.06);
}

.pub-buttons {
    display: flex;
    font-family: inherit;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 1.5rem;
    gap: 0.5rem;
}

#classList {
    margin-top: 2rem;
}

#classList h1 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

#classList h2 {
    color: #2f5f8f;
    font-size: 1.25rem;
    font-weight: normal;
    margin-top: 2rem;
    margin-bottom: 0;
}


/* Individual course */
.course {
    padding: 1.1rem 0;
    border-bottom: 1px solid #d0d0d0;
}


/* Main course information */
.course-main {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) auto;
    column-gap: 1.5rem;
    align-items: start;
}

.class-number {
    font-weight: bold;
    font-size: 0.95rem;
    color: #2f5f8f;
    padding-top: 0.15rem;
    white-space: nowrap;
}

.course-info {
    min-width: 0;
    width: 100%;
}

.class-title {
    font-size: 1.08rem;
    font-weight: 500;
    line-height: 1.35;
    width: 100%;
}

.class-prof {
    font-size: 0.92rem;
    margin-top: 0.25rem;
    color: #666;
    line-height: 1.35;
    white-space: nowrap;
}


/* Semester */
.semester {
    color: #2f5f8f;
    font-size: 1.05rem;
    margin-top: 1.5rem;
    margin-bottom: 0.25rem;
    font-weight: bold;
}


/* More button */
.course-more {
    align-self: flex-start;
    margin-left: 1.5rem;
    width: 75px;
    padding: 0.3rem 0.7rem !important;
    background: transparent;
    border: 1px solid #3b6ea5;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    color: #3b6ea5;
    text-decoration: none !important;
}

.course-more:hover {
    color: #0066cc !important;
    border-color: #0066cc !important;
    background-color: rgba(0, 102, 204, 0.06);
    text-decoration: none !important;
}


/* Description */
.course-description {
    margin: 0.8rem 0 0 calc(100px + 1.5rem);
    max-width: 750px;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--font-color);
}


/* Hidden description */
.course-description.hidden {
    display: none;
}


/* Mobile */
@media (max-width: 700px) {

    .course-main {
        grid-template-columns: 1fr auto;
    }

    .class-number {
        grid-column: 1 / -1;
        margin-bottom: 0.2rem;
    }

    .course-description {
        margin-left: 0;
    }
}

/* Coursework table of contents */
.coursework-toc {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.coursework-toc h2 {
    color: #2f5f8f;
    font-size: 1.15rem;
    font-weight: bold;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.7rem;
    max-width: 750px;
}

.toc-grid-subject {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.7rem;
    max-width: 750px;
}

.toc-grid-subject .toc-card {
    font-size: 0.92rem;
}

.toc-card {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0.65rem 0.8rem;
    border: 1px solid #c8c8c8;
    border-radius: 5px;
    color: var(--font-color) !important;
    text-decoration: none !important;
    background: transparent;
    transition: border-color 0.2s ease,
                color 0.2s ease,
                background-color 0.2s ease;
}

.toc-card:hover {
    color: #0066cc !important;
    border-color: #0066cc;
    text-decoration: none !important;
}

.toc-semester {
    font-size: 0.92rem;
}

.toc-year {
    font-size: 0.82rem;
    color: #777;
    margin-left: 0.5rem;
}

.toc-card:hover .toc-year {
    color: #0066cc;
}

/* Mobile */
@media (max-width: 700px) {
    .toc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.coursework-toc h2,
#classList h2 {
    color: #2f5f8f;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.coursework-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.coursework-header h1 {
    margin: 0;
}

.view-toggle {
    margin-left: auto;
}

.view-toggle button {
    padding: 0.3rem 0.7rem;
    /* width: 200px; */
    background: transparent;
    border: 1px solid #3b6ea5;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    color: #3b6ea5;
    text-decoration: none !important;
}

.view-toggle button:hover {
    color: #0066cc;
    border-color: #0066cc;
    background-color: rgba(0, 102, 204, 0.06);
}

.profile-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    border: 2px solid #3b6ea5;
    border-radius: 5px;
    background: transparent;
    color: #3b6ea5 !important;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.profile-button span {
    font-size: 0.78rem;
    font-weight: normal;
    color: #666;
}

.profile-button:hover {
    color: #0066cc !important;
    border-color: #0066cc;
    background-color: rgba(0, 102, 204, 0.06);
    text-decoration: none !important;
}

.profile-button:hover span {
    color: #0066cc;
}

.profile-section {
    display: flex;
    align-items: flex-start;
    gap: 35px;
    margin-bottom: 30px;
}

.profile-left {
    flex: 0 0 250px;
}

.profile-picture {
    width: 250px;
    height: auto;
    display: block;
    border-radius: 12px;
}

.profile-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.contact {
    padding-top: 0;
}

.contact h3 {
    margin-top: 0;
}

@media (max-width: 700px) {
    .profile-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-header h2 {
    margin: 0;
}

.see-all-button {
    min-width: 150px !important;
    height: 32px;
    padding: 0;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid red;
    border-radius: 4px;
    color: red !important;
    text-decoration: none !important;
    font-size: 1.1rem;
    white-space: nowrap;
}

.see-all-button:hover {
    color: red;
    border-color: red;
    background-color: #fbeaea;
}

.external-arrow {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    position: relative;
    margin-left: 4px;
    top: -2px;
}

.external-arrow::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 1.5px;
    background: currentColor;
    transform: rotate(-45deg);
    transform-origin: right center;
    right: -1px;
    top: 6px;
}

.teaching-entry {
    display: flex;
    align-items: baseline;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ccc;
}

.teaching-term {
    width: 175px;
    flex-shrink: 0;
    font-weight: bold;
    color: #2f5f8f;
}

.teaching-info {
    flex: 1;
    min-width: 0;
}

.teaching-course {
    font-weight: bold;
}

.teaching-location {
    margin-top: 0.2rem;
}

.teaching-position {
    margin-top: 0.2rem;
    color: #666 !important;
}

.teaching-more {
    align-self: flex-start;
    margin-left: 1.5rem;
    min-width: 80px;
    padding: 0.3rem 0.7rem !important;
    background: transparent;
    border: 1px solid #3b6ea5;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    color: #3b6ea5;
    text-decoration: none !important;
}

.teaching-more:hover {
    color: #0066cc !important;
    border-color: #0066cc !important;
    background-color: rgba(0, 102, 204, 0.06);
    text-decoration: none !important;
}

.teaching-abstract {
    margin: 0.6rem 0 1rem 0;
    font-size: 0.8rem;
    line-height: 1.55;
}

.site-footer {
    margin-top: 3rem;
    padding: 1.5rem 0 2rem;
    border-top: 1px solid #ddd;
    text-align: center;
    font-size: 8.5pt;
    color: #777;
}

.footer-main {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    line-height: 1.8;
}

.footer-accessibility {
    margin-top: 0.4rem;
}

.site-footer a {
    color: #777;
    text-decoration: none;
}

.site-footer a:hover {
    color: #c00;
    text-decoration: underline;
}

.footer-separator {
    color: #bbb;
}

.site-footer img {
    vertical-align: middle;
    margin-left: 0.15rem;
}
