/* homescreen */

body {
    overflow: hidden;
    transition: background-color 0.3s ease-in-out;
}

#texture-container {
    height: 100dvh;
    width: 100dvw;
    position: absolute;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background-image: 0.3s ease-in-out;
    pointer-events: none;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.homescreen-main {
    height: 100dvh;
    width: 100dvw;
    font-family: var(--font-secondary);
}

.homescreen-main h1 {
    font-size: 1.4rem;
    font-weight: 500;

}

.homescreen-main p {
    font-weight: 400;
}

.homescreen-main .column {
    flex: 1;
}

#home-about-mobile {
    display: none;
    transition: opacity 0.2s ease-in-out;
}

/* left column */

.column:has(#home-about-desktop) {
    display: flex;
    align-items: center;
    justify-content: center;
}

#home-about-desktop-container {
    display: flex;
    align-items: center;
    width: 30dvw;
    max-width: 200px;
    height: 100dvh;
    padding-left: 2rem;
}

#home-about-desktop {
    position: relative;
    display: block;
    width: 100%;
    transition: opacity 0.2s ease-in-out;
    opacity: 0;
    z-index: 10;
}

#view-toggle-btn-mobile {
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

#view-toggle-btn-desktop {
    display: inline-block;
}

#view-toggle-btn-desktop,
#view-toggle-btn-mobile {
    padding: 2px 0 2px 10px;
    width: 7.5rem;
    border: 1.5px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s
}

#view-toggle-btn-desktop svg,
#view-toggle-btn-mobile svg {
    display: inline-block;
    height: 14px;
    vertical-align: -1px;
}

#view-toggle-btn-desktop svg path,
#view-toggle-btn-mobile svg path {
    stroke-width: 1pt;
    stroke: var(--primary-color);
    transition: all 0.3s
}

#view-toggle-btn-desktop:hover,
#view-toggle-btn-mobile:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
}

#view-toggle-btn-desktop:hover svg path,
#view-toggle-btn-mobile:hover svg path {
    stroke: var(--background-color);
}

#home-about-desktop .social-links {
    width: 60%;
    display: flex;
    justify-content: start;
    gap: 10px;
    margin-top: 1rem;
}

#home-about-desktop .social-links a {
    background-color: #121212;
    height: 20px;
    width: 20px;
}

/* right column */



/* middle column */

#intro-animation-container {
    position: absolute;
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease-in-out;
    opacity: 0;
}

#intro-label {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 60px;
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    text-align: center;
}

@keyframes spin-forward {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes spin-backward {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

#intro-animation {
    position: relative;
    width: 250px;
    aspect-ratio: 1;
    animation: spin-forward 10s linear infinite;
}

.intro-btn {
    position: absolute;
    width: 80px;
    aspect-ratio: 1;
    cursor: pointer;
    transition: scale 0.2s ease-in-out;
    animation: spin-backward 10s linear infinite;
}

.intro-btn:hover {
    scale: 1.1;
}

@media screen and (max-width: 400px) {

    #intro-animation {
        width: 200px;
    }

    #intro-label {
        width: 120px;
    }

    .intro-btn {
        width: 60px;
    }
}

/* tree drawing */

#treeCanvas,
#treeCanvasWhite {
    width: 100%;
    height: 100%;
    display: block;
    position: absolute;
    transition: opacity 0.3s ease-in-out;
}

#treeCanvasWhite {
    opacity: 0;
    pointer-events: none;
}

#tree-form-container {
    position: absolute;
    width: 100%;
    max-width: 350px;
    bottom: 2rem;
    left: 50%;
    transform: translate(-50%, 0);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

#form-header {
    margin-bottom: 0.2rem;
    opacity: 1;
    transition: opacity 0.3s;
}

#form-header.hidden {
    opacity: 0;
}

#tree-header-btns {
    margin-bottom: 0.6rem;
}

#tr-range-1,
#tr-range-2 {
    appearance: none;
    width: 100%;
    height: 22px;
    background-color: var(--background-color);
    outline: none;
    border: 1.5px solid var(--primary-color);
}

#tr-range-1::-webkit-slider-thumb,
#tr-range-2::-webkit-slider-thumb {
    appearance: none;
    width: 30px;
    height: 22px;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: none;
}

#tr-range-1::-moz-range-thumb,
#tr-range-2::-moz-range-thumb {
    appearance: none;
    width: 30px;
    height: 22px;
    background: var(--background-color);
    cursor: pointer;
    box-shadow: none;
}

#range-label {
    position: absolute;
    margin-left: 0.5rem;
    margin-top: 0.25rem;
    z-index: 1;
    color: var(--background-color);
    mix-blend-mode: difference;
    pointer-events: none;
}

form div:nth-of-type(2) {
    margin-top: 0.4rem;
}

.seed-btns-container {
    margin: auto;
    margin-top: 1rem;
    width: 90%;
    display: flex;
    justify-content: space-between;
}

.seed-btns-container .seed-btn {
    width: 40px;
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

.seed-btns-container .seed-btn:hover {
    transform: translateY(-20%);
}

#tree-selected-btn,
#intro-selected-btn {
    background-image: url(assets/circle-3.svg);
}

#tree-dataviz-btn,
#intro-dataviz-btn {
    background-image: url(assets/diamond-3.svg);
}

#tree-uiux-btn,
#intro-uiux-btn {
    background-image: url(assets/star-3.svg);
}

#tree-exhibition-btn,
#intro-exhibition-btn {
    background-image: url(assets/double-3.svg);
}

#tree-publication-btn,
#intro-publication-btn {
    background-image: url(assets/triangle-3.svg);
}

.tree-link-btn {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    z-index: 6;
    width: 60px;
    height: 90px;
    overflow: visible;
    cursor: pointer;
    transform: scale(2);
    transition: opacity 0.3s ease-in-out
}

.tree-link-btn svg * {
    transition: fill 0.3s ease-in-out, stroke 0.3s ease-in-out;
}

.tree-link-btn.grey svg [fill] {
    fill: var(--grey);
}

.tree-link-btn.white svg [fill] {
    fill: transparent;
    stroke: var(--background-color);
}

.all-btn {
    width: 30px;
    height: 30px;
}

.selected-btn {
    width: 50px;
}

.tree-link-btn-icon {
    transition: transform 0.3s;
}

.tree-link-btn-label {
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    color: var(--primary-color);
    text-align: center;
    width: 150%;
    z-index: 7;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.tree-link-btn-label.hidden {
    display: none;
    opacity: 0;
}

.tree-link-btn-label span {
    background-color: var(--background-color);
    transition: opacity 0.3s ease-in-out;
}

.tree-link-btn-label:has(.all-label) {
    width: 300%;
}

.tree-link-btn.white .tree-link-btn-label span {
    opacity: 0;
}

.tree-link-btn:hover {
    z-index: 8;
}

.tree-link-btn:hover .tree-link-btn-icon {
    transform: scale(120%);
}

.tree-link-btn:hover .tree-link-btn-label {
    transform: translateY(6px);
}

.tree-link-btn:hover .dataviz-label {
    background-color: var(--dataviz);
}

.tree-link-btn:hover .exhibition-label {
    background-color: var(--exhibition);
}

.tree-link-btn:hover .uiux-label {
    background-color: var(--uiux);
}

.tree-link-btn:hover .publication-label {
    background-color: var(--publication);
}

.tree-link-btn.grey:hover .dataviz-label {
    background-color: var(--grey);
}

.tree-link-btn.grey:hover .exhibition-label {
    background-color: var(--grey);
}

.tree-link-btn.grey:hover .uiux-label {
    background-color: var(--grey);
}

.tree-link-btn.grey:hover .publication-label {
    background-color: var(--grey);
}

/* list drawing */

#list-section {
    position: absolute;
    inset: 0;
    height: 100dvh;
    width: 100dvw;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    display: none;
    justify-content: center;
}

#list-menu-container {
    position: absolute;
    top: 15%;
    width: calc(100dvw - 520px);
    z-index: 5;
}

#list-menu {
    transition: opacity 0.3s ease-in-out;
    max-width: 630px;
    margin: auto;
}

#list-header {
    transition: opacity 0.2s ease-in-out;
    margin-bottom: 0.2rem;
}

#list-header.hidden {
    opacity: 0;
}

#list-header-btns,
#tree-header-btns {
    cursor: pointer;
}

#list-header-btns span:hover,
#tree-header-btns span:hover {
    text-decoration: underline;
}

#list-container {
    position: absolute;
    bottom: 0;
    height: 70dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    overflow-y: scroll;
    overflow-x: hidden;
    padding: 3% 0 1rem 0;
    mask-image: linear-gradient(transparent, black 3%);
    transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
}

#list-container::-webkit-scrollbar {
    display: none;
}

#list-container .list-link-btn {
    width: calc(100dvw - 550px);
    max-width: 600px;
    padding: 1rem 1rem 1.5rem 1rem;
    border: 1.5px solid var(--primary-color);
    text-decoration: none;
    color: var(--primary-color);
    transition: opacity 0.3s ease-in-out, border 0.3s ease-in-out, transform 0.15s ease-in-out;

    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "title tags"
        "subtitle blank"
        "blurb blurb";
    column-gap: 1rem;
    align-items: start;
    align-content: start;
}

#list-container .list-link-btn:hover {
    transform: scale(1.05);
}

.list-link-btn .list-link-title {
    grid-area: title;
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: 1.4rem;
    transition: color 0.3s ease-in-out;
}

.list-link-btn .list-link-subtitle {
    grid-area: subtitle;
    margin-bottom: 1rem;
    transition: color 0.3s ease-in-out;
}

.list-link-btn .list-link-tags {
    grid-area: tags;
    font-size: 0.8rem;
    transition: color 0.3s ease-in-out;
}

.list-link-btn .list-link-blurb {
    grid-area: blurb;
    margin: 0;
    transition: color 0.3s ease-in-out;
}

#list-container .list-link-btn.white {
    border: 1.5px solid var(--background-color);
}

.list-link-btn.white .list-link-title,
.list-link-btn.white .list-link-subtitle,
.list-link-btn.white .list-link-blurb {
    color: var(--background-color);
}

@media screen and (max-width: 767px) {
    .homescreen-main {
        flex-direction: column;
    }

    #home-about-desktop {
        display: none;
    }

    #home-about-mobile {
        display: inline-block;
        position: absolute;
        padding: 1rem;
    }

    #home-about-mobile h1 {
        font-family: var(--font-secondary);
        font-weight: 400;
        font-size: 1.2rem;
        margin-top: 60px;
    }

    #tree-form-container {
        position: absolute;
        width: 90%;
        max-width: none;
    }

    .seed-btns-container {
        width: 80%;
        max-width: 300px;
    }

    .seed-btns-container .seed-btn {
        width: 36px;
    }

    #list-section {
        width: 100%;
        margin-left: 0;
        display: none;
    }

    #list-menu-container {
        width: 90%;
    }

    #list-container {
        width: 90%;
    }

    #list-container .list-link-btn {
        width: 90%;
    }

    #list-container .list-link-btn:hover {
        transform: none;
    }

    #view-toggle-btn-mobile {
        display: inline-block;
        position: absolute;
        top: 60px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 5;
        background-color: var(--background-color);
    }

}