:root {
    --tertiary-color: #275d39;
    --quarternary-color: #bf477c;
    --gray-lighter: #f3f3f3;
    --gray-light: #dfdfdf;
    --gray-light-1: #cbcbcb;
    --gray-light-2: #828282;
    --gray-dark: #2f2f2f;
    --background: white;
    --light-text: white;
    --error-color: #ba3a3a;
    --text: black;
    --email-color: #ea4335;
    --bsky-color: #1185fe;
    --scholar-color: #34a853;
}

body {
    margin: 0;
    height: 100%;
}

main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.errorlist {
    color: var(--error-color);
    display: flex;
    justify-content: center;
    list-style-type: none;
    flex-direction: column;
    align-items: center;
}

.basic {
    font-family: "Open Sans", sans-serif;
    padding: 160px 8px 8px;
}

.nav-bar {
    height: 150px;
    display: flex;
    justify-content: space-between;
    padding: 10px 200px;
    position: fixed;
    top: 0;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    border-bottom: 1px solid var(--gray-light);
    transition: all 0.25s ease-in-out;
    background: var(--background);
    z-index: 100;
}

.nav-bar.nav-hidden {
    transform: translateY(-100%);
}

.nav-links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

.nav-link {
    font-family: "Open Sans", sans-serif;
    font-weight: bold;
    font-size: 20px;
    color: var(--gray-dark);
    text-decoration: none;
    transition: all 0.1s ease-in-out;
    border: 0;
    background: 0;
    cursor: pointer;
    padding: 0;
    display: flex;    
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    color: var(--tertiary-color);
}

.nav-link.active {
    color: var(--quarternary-color);
}

.profile-icon {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 100%;
}

.dropdown {
    position: absolute;
    margin-top: 60px;
    margin-left: 4px;
    border: 1px solid var(--gray-light-1);
    background: var(--gray-lighter);
    padding: 4px;
    border-radius: 2px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.05s ease-in-out;
}

.dropdown.is-visible {
    opacity: 1;
    visibility: visible;
}

.link-button {
    font-family: "Open Sans", sans-serif;
    font-weight: bold;
    font-size: 20px;
    text-decoration: none;
    border: 0;
    background: 0;
    cursor: pointer;
    padding: 0;
    color: var(--light-text);
    display: block;
    width: 100%;
}

.link-inline-submit {
    display: flex;
    width: 100%;
    justify-content: center;
}

.info-footer {
    color: var(--gray-light-2);
    font-size: 12px;
    text-align: center;
    font-style: italic;
    margin-bottom: 6px;
}

.registration-label {
    text-align: center;
}

.registration-desc {
    text-align: center;
    font-size: 18px;
    display: flex;
    justify-content: center;
}

.registration-desc .disclaimer {
    font-size: 14px;
    color: var(--gray-light-2);
    font-style: italic;
}

.password-change-form {
    text-align: left;
}

.password-change-form ul {
    font-size: 14px;
    color: var(--gray-light-2);
    font-style: italic;
}

.password-change-form .button {
    margin-left: auto;
    margin-right: auto;
}

.registration-desc input {
    border: 0;
    border-bottom: 2px solid var(--gray-light-2);
    transition: all 0.1s ease-in-out;
    outline: none;
    font-size: 18px;
}

.registration-desc input:hover {
    border-color: var(--gray-dark);
}

.registration-desc input:focus {
    border-color: var(--tertiary-color);
}

.registration-desc .button {
    font-size: 24px;
    padding: 8px;
    border-radius: 10px;
}

.about__container.row {
    display: flex;
}

.news {
    margin-left: 20px;
    border-left: 1px solid var(--gray-light);
    padding-left: 20px;
    height: 75vh;
    overflow-y: auto;
}

.news-item {
    display: flex;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
}

.news-icon {
    --news-icon-size: 50px;
    min-width: var(--news-icon-size);
    min-height: var(--news-icon-size);
    max-width: var(--news-icon-size);
    max-height: var(--news-icon-size);
    object-fit: contain;
}

.news-item:not(.clickable) .news-title {
    cursor: default;
}

.news-title {
    font-family: "Open Sans", sans-serif;
    font-weight: bold;
    font-size: 20px;
    color: var(--gray-dark);
    transition: all 0.1s ease-in-out;
    border: 0;
    background: 0;
    cursor: pointer;
    padding: 0;
}

.news-item.clickable:hover .news-title {
    color: var(--tertiary-color);
}

.news-date {
    font-size: 12px;
    color: var(--gray-light-2);
    font-style: italic;
}

.about__content-container {
    display: flex;
}

.about__picture {
    width: 250px;
}

.label {
    font-family: "Open Sans";
    font-size: 40px;
    font-weight: bold;
    padding: 60px;
}

.category-label {
    font-size: 40px;
    font-weight: bold;
    padding-left: 60px;
    border-bottom: 1px solid var(--gray-light);
}

.research-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    background: var(--gray-lighter);
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
}

.category {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.research {
    display: flex;
    margin: 8px;
    padding: 20px;
    width: 60%;
    gap: 8px;
    position: relative;
}

.research-list .research {
    display: flex;
    border-top: 3px solid var(--tertiary-color);
    border-radius: 0 0 10px 10px;
    margin: 8px;
    padding: 20px;
    box-shadow: 1px 1px 6px 0px var(--gray-light);
    width: 60%;
    gap: 8px;
    position: relative;
    background: var(--background);
}

@media (orientation: portrait) {
    body {
        zoom: 2;
    }
    .research-list {
        width: 95%;
    }
    
    .research-list .research {
        width: 80%;
        flex-direction: column;
        align-items: center;
    }
    .nav-bar {
        padding: 8px;
    }
    .nav-links {
        gap: 15px;
    }
    
    .about__container.row {
        flex-direction: column;
    }
    
    .person {
        flex-direction: column;
        align-items: center;
    }
}

.new-research {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
    width: 70%;
    border: 1px solid grey;
    border: 1px solid var(--gray-light);
    box-shadow: 1px 1px 6px 0px var(--gray-light-2);
    border-radius: 20px;
    padding: 24px;
}

.new-research .title input {
    border: 0;
    border-bottom: 2px solid var(--gray-light-2);
    transition: all 0.1s ease-in-out;
    outline: none;
    width: 40%;
}

.new-research .title input:hover {
    border-color: var(--gray-dark);
}

.new-research .title input:focus {
    border-color: var(--tertiary-color);
}

.new-research select, .new-research .select-date input {
    border: 1px solid var(--gray-light);
    background: var(--gray-lighter);
    border-radius: 5px;
    padding: 5px;
    border-color: var(--gray-light-1);
    outline: none;
    transition: all 0.1s ease-in-out;
}

.new-research select:hover, .new-research .select-date input:hover {
    border-color: var(--gray-dark);
}

.new-research .venue-date {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.new-research .blurb textarea {
    max-width: calc(100% - 40px);
    width: calc(100% - 40px);
    min-width: calc(100% - 40px);
    border: 0;
    border-radius: 20px;
    background: var(--gray-lighter);
    padding: 20px;
    transition: all 0.1s ease-in-out;
    border: 1px solid transparent;
    outline: none;
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
}

.new-research .blurb textarea:hover {
    border-color: var(--gray-light-2);
}

.new-research .blurb textarea:focus {
    border-color: var(--tertiary-color);
}

.new-research .buttons {
    background: var(--gray-lighter);
    border-radius: 10px;
    justify-content: flex-start;
    padding: 0 24px;
}

.new-research .image-input, .profile .image-input {
    display: none;
}

.cancel-post {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 24px;
}

.submit-form {
    display: flex;
    border: 0;
    font-size: 24px;
    border-radius: 10px;
    padding: 8px 16px;
    background-color: var(--tertiary-color);
    color: var(--light-text);
    cursor: pointer;
    transition: all 0.1s ease-in-out;
    will-change: transform;
    font-weight: bold;
    gap: 8px;
}

.submit-form:hover {
    transform: scale(1.1);
    filter: drop-shadow(0px 1px 2px var(--tertiary-color));
}

.cancel-form {
    display: flex;
    border: 0;
    font-size: 19px;
    border-radius: 10px;
    padding: 8px 16px;
    background-color: var(--gray-lighter);
    border: 1px solid var(--gray-light-1);
    color: var(--gray-dark);
    user-select: none;
    transition: all 0.1s ease-in-out;
    will-change: transform;
    gap: 8px;
    text-decoration: none;
}

.cancel-form:hover {
    transform: scale(1.1);
    filter: drop-shadow(0px 1px 2px var(--gray-light-1));
}

.new-research .authors {
    align-items: center;
}

.author-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    box-sizing: border-box;
    cursor: grab;
}

.author-chip .author-label {
    user-select: none;
}

.author-chip input {
    border: 0;
    border-bottom: 2px solid var(--gray-light-2);
    transition: all 0.1s ease-in-out;
    outline: none;
}

.author-chip input:hover {
    border-color: var(--gray-dark);
}

.author-chip input:focus {
    border-color: var(--tertiary-color);
}

.author-chip .author-delete {
    transition: all 0.1s ease-in-out;
}

.author-chip .author-delete:hover {
    cursor: pointer;
    filter: drop-shadow(0px 1px 2px var(--error-color));
}

.author-chip.add-author {
    background: var(--tertiary-color);
    color: var(--light-text);
    aspect-ratio: 1;
    height: 100%;
    border: 0;
    border-radius: 10px;
    transition: all 0.1s ease-in-out;
    will-change: transform;
}

.author-chip.add-author:hover {
    cursor: pointer;
    filter: drop-shadow(0px 1px 2px var(--tertiary-color));
    transform: scale(1.1);
}

.author-dropdown {
    position: absolute;
    z-index: 1;
    border: 1px solid var(--gray-light-1);
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--gray-light-1);
    opacity: 0;
    visible: false;
    pointer-events: none;
    transition: all 0.03s ease-in-out;
}

.author-dropdown.is-visible {
    opacity: 1;
    visible: true;
    pointer-events: auto;
}

.author-option {
    padding: 6px;
    background: var(--gray-lighter);
    user-select: none;
    transition: all 0.03s ease-in-out;
}

.author-option:hover {
    background: var(--gray-light-1);
    user-select: none;
}

.drag-ghost {
    opacity: 0.4;
}

.drag-dragging {
    cursor: grabbing;
    border: 1px solid var(--gray-light-1);
    border-radius: 10px;
    padding: 4px;
    background: var(--background);
}

.edit-button {
    position: absolute;
    right: 56px;
}

.edit-button, .delete-button {
    top: 6px;
}

.img-container {
    position: relative;
}

.img-background-selector {
    position: absolute;
    width: 110%;
    height: 110%;
    left: -5%;
    top: -5%;
    border-radius: 10px;
    background: var(--text);
    opacity: 0.5;
    transition: opacity 0.1s ease-in-out;
    cursor: pointer;
    filter: drop-shadow(0px 1px 2px var(--gray-light-2));
}

.img-background-selector:hover, .img-background-selector:hover + .camera-plus {
    opacity: 0.75;
}

.camera-plus {
    position: absolute !important;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.1s ease-in-out;
    z-index: 2;
}

.camera-plus:has(+ .select-img:hover), .img-background-selector:has(~ .select-img:hover) {
    opacity: 0.75;
}

.camera-plus .background-plus {
    -webkit-text-stroke: 8px white;
}

.camera-plus .plus {
    left: 28px;
    top: -14px;
}

.crop-preview {
    position: relative;
    z-index: 1;
}

.select-img {
    cursor: pointer;
    width: 200px;
}

.research-detail {
    display: flex;
    justify-content: center;
}

.research-detail .research {
    width: 70%
}


.title {
    font-style: italic;
    font-size: 30px;
}

.title a {
    text-decoration: none;
    color: black;
    transition: all 0.1s ease-in-out;
}

.title a:hover {
    color: var(--tertiary-color);
}

.buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
}

.button {
    cursor: pointer;
    background: var(--tertiary-color);
    color: var(--light-text);
    padding: 4px;
    border-radius: 4px;
    text-decoration: none;
    max-width: 30ch;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    transition: all 0.1s ease-in-out;
    border: 0;
    will-change: transform;
}

.delete-button {
    position: absolute;
    right: 20px;
    border: 0;
    width: 28px !important;
    height: 24px;
    background-color: var(--error-color);
}

.new-research-fab {
    position: fixed;
    right: 48px;
    bottom: 48px;
    z-index: 20;
    padding: 16px;
    border-radius: 100%;
    font-size: 48px;
    aspect-ratio: 1;
}

.new-link-button {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgb(0 0 0 / 25%);
    transition: all 0.1s ease-in-out;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 50;
}

.new-link-button .new-link-content {
    display: flex;
    flex-direction: column;
    background: var(--gray-light);
    box-shadow: 1px 1px 6px 0px var(--gray-light-2);
    border-radius: 5px;
    padding: 8px;
    gap: 8px;
    margin: auto;
    width: fit-content;
    height: fit-content;
    position: absolute;
    inset: 0;
}

.new-link-button.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.link-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.link-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--gray-light);
    border-radius: 10px;
    padding: 4px;
    margin: 8px;
    user-select: none;
    transition: all 0.1s ease-in-out;
    will-change: transform;
    border: 1px solid var(--gray-light);
}

.link-chip:not(.disabled):hover {
    transform: scale(1.1);
    border-color: var(--gray-light-1);
}

.link-chip .chip-delete {
    transition: all 0.1s ease-in-out;
}

.link-chip .chip-delete:hover {
    cursor: pointer;
    filter: drop-shadow(0px 1px 2px var(--error-color));
}

.link-chip.add-link {
    background: var(--tertiary-color);
    color: var(--light-text);
    aspect-ratio: 1;
    height: 100%;
    cursor: pointer;
}

.new-link-button input:not([type="file"]) {
    border: 0;
    border-bottom: 2px solid var(--gray-light-2);
    transition: all 0.1s ease-in-out;
    outline: none;
    border-radius: 5px 5px 0 0;
    padding: 4px 4px 2px 4px;
}

.new-link-button input:not([type="file"]):hover {
    border-color: var(--gray-dark);
}

.new-link-button input:not([type="file"]):focus {
    border-color: var(--tertiary-color);
}

.new-link-button .link-file {
    display: flex;
    justify-content: center;
}

.new-link-button .link-file .selector {
    width: 100%;
    background: var(--gray-light);
    text-align: center;
    font-size: 18px;
    transition: all 0.1s ease-in-out;
}

.new-link-button .link-file .selector.selected {
    background: var(--tertiary-color);
    color: var(--light-text);
}

.new-link-button .link-file .selector:not(.selected):hover {
    background: var(--gray-light-1);
    cursor: pointer;
}

.new-link-button .file-link-delete {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-evenly;
}

.new-link-button .file-or-link.hidden {
    display: none;
}

.new-link-button .file-or-link input[type="checkbox"] {
    display: none;
}

.new-link-button .file-or-link label {
    display: none;
}

.new-link-button .delete-hidden {
    display: none;
}


.hidden {
    display: none;
}

/* fix this applying to disabled */
.button:not(.disabled):hover {
    transform: scale(1.1);
    filter: drop-shadow(0px 1px 2px var(--tertiary-color));
}

.button.disabled {
    cursor: default;
}
.text-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blurb {
    margin: 8px 0;
    width: 100%;
    text-align: justify;
}

.research-img {
    width: 200px;
}

.authors {
    column-gap: 24px;
    row-gap: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.author {
    display: flex;
    align-items: center;
    gap: 4px;
}

a.author {
    text-decoration: none;
    color: black;
    font-weight: bold;
    transition: all 0.1s ease-in-out;
}

a.author:hover {
    color: var(--tertiary-color);
}

.author-img {
    width: 40px;
    height: 40px;
    border-radius: 100%;
}

.venue a {
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: black;
    font-weight: bold;
    transition: all 0.1s ease-in-out;
    margin-top: -10px;
    margin-bottom: -10px;
}

.venue a:hover {
    color: var(--tertiary-color);
}

.venue-icon {
    width: 40px;
    height: 40px;
    border-radius: 100%;
}

.venue-date {
    display: flex;
    justify-content: space-between;
}

.date {
    color: var(--gray-light-2);
    font-style: italic;
    font-size: 12px;
}

.filters {
    display: flex;
    gap: 20px;
}

.filters [name="sort"], .filters .button {
    height: fit-content;
    margin: auto;
}

.filters select {
    max-height: 150px;
}

.filters-dropdown {
    display: flex;
    width: 60%;
    flex-direction: column;
    align-items: flex-start;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 12px;
    user-select: none;
}

.person-img {
    width: 200px;
    border-radius: 20px;
    border: 1px solid var(--gray-light);
}

.person {
    display: flex;
    border: 1px solid var(--gray-light-2);
    border-radius: 20px;
    margin: 8px;
    padding: 20px;
    box-shadow: 1px 1px 6px 0px var(--gray-light-2);
    width: 40%;
    gap: 8px;
    min-width: fit-content;
}

.person .info-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.person .info-container {
    width: 100%;
}

.person .buttons-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.person .button.email, .person .button.bsky, .person .button.scholar {
    border-radius: 100%;
}

.person .button.email {
    background-color: var(--email-color);
    margin-right: -15px;
}

.person .button.bsky {
    background-color: var(--bsky-color);
    margin-right: -15px;
}

.person .button.scholar {
    background-color: var(--scholar-color);
}

.person .edit-button {
    right: 12px;
}

.people-list .person .edit-button {
    display: none;
}

.person-profile {
    width: 80%;
}

.profile-form {
    width: 100%;
    display: flex;
    justify-content: center;
}

.person-profile input {
    max-width: 100%;
}

.person-profile .title {
    border: 0;
    border-bottom: 2px solid var(--gray-light-2);
    transition: all 0.1s ease-in-out;
    outline: none;
}

.person-profile .title:hover {
    border-color: var(--gray-dark);
}

.person-profile .title:focus {
    border-color: var(--tertiary-color);
}

.person-profile .blurb{
    max-width: calc(100% - 40px);
    width: calc(100% - 40px);
    min-width: calc(100% - 40px);
    height: 175px;
    border: 0;
    border-radius: 20px;
    background: var(--gray-lighter);
    padding: 20px;
    transition: all 0.1s ease-in-out;
    border: 1px solid transparent;
    outline: none;
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
}

.person-profile .blurb:hover {
    border-color: var(--gray-light-2);
}

.person-profile .blurb:focus {
    border-color: var(--tertiary-color);
}

.person-profile .img-name-links {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 24px;
    margin: 24px 24px 12px;
}

.person-profile .img-container {
    margin-bottom: -24px;
}

.person-profile .socialmedia-wrapper {
    margin-left: auto;
    margin-bottom: -24px;
    filter: drop-shadow(0px 1px 2px var(--gray-light-2));
}

.person-profile .socialmedia-links {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.person-profile .socialmedia-button {
    color: var(--light-text);
    background: black;
    border-radius: 100%;
    aspect-ratio: 1;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
}

.person-profile .socialmedia-button:hover {
    filter: drop-shadow(0px 1px 2px var(--gray-dark));
}

.person-profile .email .socialmedia-button {
    background-color: var(--email-color);
}

.person-profile .email input:focus {
    border-color: var(--email-color);
}

.person-profile .email-errors .errorlist {
    color: var(--email-color);
}

.person-profile .bsky .socialmedia-button {
    background-color: var(--bsky-color);
}

.person-profile .bsky input:focus {
    border-color: var(--bsky-color);
}

.person-profile .bsky-errors .errorlist {
    color: var(--bsky-color);
}

.person-profile .scholar .socialmedia-button {
    background-color: var(--scholar-color);
}

.person-profile .scholar input:focus {
    border-color: var(--scholar-color);
}

.person-profile .scholar-errors .errorlist {
    color: var(--scholar-color);
}

.person-profile .socialmedia {
    display: grid;
    grid-template-columns: auto 0fr;
    gap: 4px;
    transition: all 0.1s ease-in-out;
}

.person-profile .socialmedia .fieldWrapper {
    overflow: hidden;
    min-width: 0;
    opacity: 0;
    transition: all 0.1s ease-in-out;
}

.person-profile .socialmedia.is-open {
    grid-template-columns: auto 1fr;
}

.person-profile .socialmedia.is-open .fieldWrapper {
    opacity: 1;
}

.person-profile .socialmedia input {
    border: 0;
    border-bottom: 2px solid var(--gray-light-2);
    transition: all 0.1s ease-in-out;
    outline: none;
}

.person-profile .socialmedia input:hover {
    border-color: var(--gray-dark);
}

.person-profile .info-container {
    background: var(--gray-light);
    padding: 24px;
    border-radius: 0 0 20px 20px;
    box-shadow: inset 0px 8px 18px 0px #00000014;
}

.person-profile .buttons {
    background: var(--gray-lighter);
    border-radius: 10px;
    justify-content: flex-start;
    padding: 0 24px;
}

.person-profile .research-label {
    text-align: left;
    margin: 24px 4px 4px;
}

.person-profile .research-buttons {
    padding: 8px 24px;
}

.add-new-research-button {
    padding: 0;
    border-radius: 10px;
}

.add-new-research-button a {
    font-size: 24px;
    margin: 0 8px;
}

.links-label {
    font-size: 20px;
    font-weight:bold;
    margin: 4px;
}

.password-cancel-post {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.change-password {
    overflow: visible;
}

.person-detail {
    display: flex;
    justify-content: center;
}

.person-detail .person {
    width: 80%
}

.research-label {
    text-align: center;
    font-size: 20px;
    font-weight:bold;
}

.category.people {
    align-items: center;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
}

.brand {
    height: 100%;
}

.profile {
    display: flex;
    align-content: center;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}