/**
 * This stylesheet applies to index.md.
 */

/* Makes the horizontal header bar transparent and removes all backdrop blur effects */
body:has(.hero-page) .md-header
{
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    width: 100%;
}

/* Hide the theme-toggle button */
body:has(.hero-page) .md-header [data-md-component="palette"]
{
    display: none !important;
}

/* Remove empty space left-behind by the hidden theme-toggle button */
body:has(.hero-page) .md-header__inner
{
    gap: 0;
}

/* Disable sticky scroll */
body:has(.hero-page) .md-header,
body:has(.hero-page) .md-header__inner
{
    position: static !important;
}

/* Makes the horizontal footer bar transparent */
body:has(.hero-page) .md-footer
{
    background: transparent !important;
}

body:has(.hero-page) .md-footer *
{
    background-color: transparent !important;
    background: transparent !important;
}

/* Kill the left nav sidebar on wide desktop layouts */
/* This preserves nav functionality on constrained layouts */
@media (min-width: 76.25em)
{
    /* Stop the nav bar from rendering */
    body:has(.hero-page) .md-sidebar--primary
    {
        display: none;
    }

    /* Remove the space occupied by the left navigation sidebar */
    body:has(.hero-page) .md-main
    {
        margin-left: 0;
    }
}

/* Let markdown content use the full width */
body:has(.hero-page) .md-content
{
    max-width: 100% !important;
}

/* Hide permalinks for markdown headers */
body:has(.hero-page) .md-typeset h1 .headerlink,
body:has(.hero-page) .md-typeset h2 .headerlink,
body:has(.hero-page) .md-typeset h3 .headerlink,
body:has(.hero-page) .md-typeset h4 .headerlink
{
    display: none;
}

/* Center the hero scene and put it behind all other page elements */
.hero-page #hero
{
    position: fixed;
    inset: 0; /* top: 0; right: 0; bottom: 0; left: 0 */
    width: 100vw;
    height: 100vh;
    z-index: -1; /* behind all content */
    overflow: hidden;
    pointer-events: none; /* so links still work */
}

/* Center the canvas and extend size to fullscreen */
.hero-page #hero #gfx-canvas
{
    width: 100%;
    height: 100%;
    display: block;
    will-change: transform;
    pointer-events: none;
}

/* Center the hero content */
.hero-page .hero-content
{
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    margin-top: -4rem; /* Reclaim the top space left by the blank markdown heading */
    padding: 0 1rem;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    /* Nudge the content box to the optical center */
    /* transform: translateX(5rem); */
}

/* Title style */
.hero-page .hero-content .hero-title
{
    font-family: var(--md-heading-font-family);
    font-weight: 600;
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    line-height: 1.15;
    margin: 0;
    color: white;
    letter-spacing: -0.095rem;
}

/* Subtitle style */
.hero-page .hero-content .hero-subtitle
{
    margin-top: 2.0rem;
    max-width: 720px;
    opacity: 0.85;
    font-size: 0.9rem;
    color: #888;
}

/* Centers the avatar image */
.hero-page .hero-content .avatar
{
    display: flex;
    flex-direction: column;
    align-items: center;
    /* margin-top: 5rem; */
}

/* Frames the avatar image in a round frame and adjusts the size */
.hero-page .hero-content .avatar img
{
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    pointer-events: none;
}

/* Centers the caption title text under the avatar image */
.hero-page .hero-content .avatar .caption-title
{
    margin-top: 0.85rem;
    font-size: 1.0rem;
    font-weight: 500;
    color: #888;
    text-align: center;
}

/* Centers the caption subtitle text and places it under the avatar image */
.hero-page .hero-content .avatar .caption-subtitle
{
    margin-top: 0.0rem;
    font-size: 0.9rem;
    font-style: italic;
    color: #888;
    text-align: center;
}

/* Debug render a bounding box around the hero content */
/* .hero-content
{
    outline: 1px solid red;
} */
