/* Expo project detail page. */

:root {
    --bg: #0a0a0d;
    --bg-soft: #111116;
    --bg-soft-2: #16161d;
    --paper: #f5f3ed;
    --dim: #8b8b93;
    --accent: #3e63ff;
    --accent-hover: #5478ff;
    --line: rgba(245, 243, 237, 0.13);
    --line-strong: rgba(245, 243, 237, 0.24);
    --shadow: rgba(0, 0, 0, 0.55);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;

    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--paper);
    /* Guideline body face; Montserrat is not a Monash typeface. */
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, li, figure {
    margin: 0;
    padding: 0;
}

ul {
    list-style: none;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

svg {
    display: block;
    flex-shrink: 0;
}

::selection {
    background: var(--accent);
    color: var(--paper);
}

/* Page shell */

.expo-team {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    background-color: var(--bg);
    color: var(--paper);
}

.expo-team__sidebar {
    display: none;
}

.expo-team__main {
    --frame: max(38rem, min(calc(60vh * 16 / 9), 76rem));
    display: flex;
    flex: 1 1 0%;
    flex-direction: column;
    min-width: 0;
    padding-bottom: 6rem;
}

/* Mobile top bar */

.expo-team__topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 2px 0 var(--shadow);
}

.expo-team__back-icon {
    display: flex;
    padding: 0.5rem;
    margin-left: -0.5rem;
    color: var(--dim);
    border-radius: 9999px;
    transition: background-color 0.2s, color 0.2s;
}

.expo-team__back-icon:hover {
    color: var(--paper);
    background-color: var(--bg-soft-2);
}

.expo-team__back-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.expo-team__topbar-heading {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 2rem;
    text-align: center;
}

.expo-team__topbar-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--paper);
}

/* Sidebar */

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--paper);
    background-color: var(--bg-soft-2);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    transition: background-color 0.2s;
}

.back-link:hover {
    background-color: var(--bg);
}

.back-link svg {
    width: 1rem;
    height: 1rem;
}

/* Virtual booth */

.booth-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 2rem;
    padding: 0.75rem;
    font-weight: 500;
    color: #ffffff;
    background-color: var(--accent);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px 0 var(--shadow);
    transition: background-color 0.2s;
}

.booth-link:hover {
    background-color: var(--accent-hover);
}

.booth-link svg {
    width: 1.25rem;
    height: 1.25rem;
}

.booth-closed {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 2rem;
    padding: 0.75rem;
    font-weight: 500;
    color: var(--dim);
    background-color: var(--bg-soft-2);
    border-radius: var(--radius);
    cursor: not-allowed;
    user-select: none;
}

.booth-closed__label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.booth-closed svg {
    width: 1.25rem;
    height: 1.25rem;
}

.booth-closed__window {
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

.booth {
    margin-bottom: 2rem;
}

.booth .booth-link {
    margin-bottom: 0;
}

.booth-details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.15rem 0.75rem;
    margin: 0.75rem 0 0;
    padding: 0 0.25rem;
    font-size: 0.75rem;
}

.booth-details dt {
    color: var(--dim);
    font-weight: 500;
}

.booth-details dd {
    margin: 0;
    color: var(--paper);
    font-weight: 600;
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
}

/* Mobile navigation button */
.booth-fab {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    font-weight: 700;
    color: #ffffff;
    background-color: var(--accent);
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px var(--shadow);
    transition: background-color 0.2s, transform 0.2s;
}

.booth-fab:hover {
    background-color: var(--accent-hover);
}

.booth-fab:active {
    transform: scale(0.95);
}

.booth-fab svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Team panel */

.team-panel {
    margin-bottom: 1.5rem;
}

.team-panel__heading {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--paper);
    border-bottom: 2px solid var(--line);
}

.team-panel__meta {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--dim);
}

.team-panel__empty {
    font-size: 0.875rem;
    color: var(--dim);
}

.member-list > li + li {
    margin-top: 0.75rem;
}

.member {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0;
    font-weight: 500;
    color: var(--paper);
}

.member__photo {
    width: 2.25rem;
    height: 2.25rem;
    object-fit: cover;
    border-radius: 9999px;
    border: 1px solid var(--line);
}

.member__avatar {
    width: 2.25rem;
    height: 2.25rem;
    color: var(--dim);
    opacity: 0.8;
}

/* Mobile team panel */
.team-panel--mobile {
    padding: 0 1rem 2rem;
}

.team-panel--mobile .team-panel__heading,
.team-panel--mobile .team-panel__empty {
    text-align: center;
}

.team-panel--mobile .member-list {
    max-width: 24rem;
    margin: 0 auto;
}

.team-panel--mobile .member-list > li + li {
    margin-top: 1rem;
}

.team-panel--mobile .member {
    gap: 1rem;
    font-size: 1.125rem;
}

.team-panel--mobile .member__photo,
.team-panel--mobile .member__avatar {
    width: 3rem;
    height: 3rem;
}

/* Project header */

.project-head {
    display: none;
}

.project-head__text {
    min-width: 0;
}

.project-head__title {
    margin-bottom: 0.5rem;
    font-size: 2.25rem;
    line-height: 1.1;
    font-weight: 800;
    color: var(--paper);
}

.project-head__subtitle {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--dim);
}

.project-head__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--dim);
}

/* Badge colours are paired inline for contrast. */
.project-tag {
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    text-transform: none;
    letter-spacing: normal;
    border-radius: 9999px;
}

.project-head--mobile {
    display: block;
    padding: 1.5rem 1rem;
    text-align: center;
    background-color: var(--bg-soft);
    border-bottom: 1px solid var(--line);
}

.project-head--mobile .project-head__subtitle {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.project-head--mobile .project-head__meta {
    justify-content: center;
    gap: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Share button */

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: 0;
    border-radius: 0.625rem;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    /* The icon uses currentColor. */
    color: #ffffff;
    background-color: #1f6f8b;
    cursor: pointer;
    transition: background-color 0.2s;
}

.share-button:hover {
    background-color: #2a86a6;
}

.share-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.share-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Centre below the mobile header. */
.share-button--block {
    display: flex;
    margin: 1rem auto 0;
}

/* Image carousel */

.carousel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    touch-action: pan-y;
    background-color: var(--bg-soft-2);
    background-image: repeating-linear-gradient(
        135deg,
        transparent,
        transparent 13px,
        rgba(245, 243, 237, 0.022) 13px,
        rgba(245, 243, 237, 0.022) 14px
    );
    border: 1px solid var(--line);
    box-shadow: inset 0 2px 4px 0 var(--shadow);
}

.carousel__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--dim);
}

.carousel__empty svg {
    width: 5rem;
    height: 5rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.carousel__empty span {
    font-size: 0.875rem;
    font-weight: 500;
}

.carousel__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
    transform: translateX(5%);
    transition: opacity 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.carousel[data-direction="prev"] .carousel__slide {
    transform: translateX(-5%);
}

.carousel__slide.is-leaving {
    transform: translateX(-5%);
}

.carousel[data-direction="prev"] .carousel__slide.is-leaving {
    transform: translateX(5%);
}

.carousel__slide.is-active,
.carousel[data-direction] .carousel__slide.is-active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.carousel__slide.is-peeking {
    opacity: 1;
}

.carousel.is-dragging .carousel__slide {
    transition: none;
}

.carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.5rem;
    color: var(--paper);
    background-color: rgba(10, 10, 13, 0.8);
    border: 1px solid var(--line);
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px var(--shadow);
    backdrop-filter: blur(4px);
    cursor: pointer;
    transition: opacity 0.2s, background-color 0.2s;
}

.carousel__nav:hover {
    background-color: var(--bg);
}

.carousel__nav svg {
    width: 1.5rem;
    height: 1.5rem;
}

.carousel__nav--prev {
    left: 0.5rem;
}

.carousel__nav--next {
    right: 0.5rem;
}

.carousel__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.carousel__dot {
    width: 0.625rem;
    height: 0.625rem;
    padding: 0;
    background-color: rgba(10, 10, 13, 0.7);
    border: 1px solid var(--line);
    border-radius: 9999px;
    box-shadow: 0 1px 2px 0 var(--shadow);
    cursor: pointer;
    transition: width 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
                background-color 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
                border-color 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.carousel__dot:hover {
    background-color: var(--bg);
}

.carousel__dot.is-active {
    width: 1.5rem;
    background-color: var(--accent);
    border-color: var(--accent);
}

.carousel__nav:focus-visible,
.carousel__dot:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    opacity: 1;
}

/* Description */

.project-about {
    padding: 2rem 1rem;
}

.project-about__heading {
    display: none;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--paper);
}

.project-about__body {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--paper);
    white-space: pre-line;
}

.project-about__empty {
    font-style: italic;
    color: var(--dim);
}

/* Tablet and up */

@media (min-width: 768px) {
    .expo-team {
        flex-direction: row;
    }

    .expo-team__topbar,
    .project-head.project-head--mobile,
    .team-panel--mobile,
    .booth-fab {
        display: none;
    }

    .expo-team__sidebar {
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
        position: sticky;
        top: 0;
        width: 18rem;
        height: 100vh;
        height: 100svh;
        padding: 1.5rem;
        overflow-y: auto;
        background-color: var(--bg-soft);
        border-right: 1px solid var(--line);
    }

    .expo-team__main {
        padding: 2rem;
        width: 100%;
        max-width: calc(var(--frame) + 4rem);
        margin-inline: auto;
    }

    .project-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .carousel {
        height: auto;
        aspect-ratio: 16 / 9;
        max-width: var(--frame);
        border-radius: var(--radius-lg);
    }

    /* Reveal carousel arrows on hover. */
    .carousel__nav {
        opacity: 0;
    }

    .carousel:hover .carousel__nav,
    .carousel:focus-within .carousel__nav {
        opacity: 1;
    }

    .carousel__nav--prev {
        left: 1rem;
    }

    .carousel__nav--next {
        right: 1rem;
    }

    .carousel__nav {
        padding: 0.75rem;
    }

    .project-about {
        padding: 2rem 0;
    }

    .project-about__heading {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    .carousel__slide,
    .carousel__slide.is-leaving,
    .carousel__slide.is-active,
    .carousel[data-direction] .carousel__slide,
    .carousel[data-direction] .carousel__slide.is-leaving {
        transform: none;
    }

    .carousel__slide {
        transition: opacity 0.45s ease;
    }

    .carousel__dot {
        transition: background-color 0.3s ease, border-color 0.3s ease;
    }

    .booth-fab {
        transition: none;
    }
}
