@font-face {
font-family: "CitizenGrotesk-Medium";
src: url("fonts/CitizenGrotesk-Medium.woff2") format("woff2");
font-weight: 400;
font-style: normal; /* Scripts are typically normal style; use 'italic' if the file is italicized */
font-display: swap; /* Paint with fallback first, then swap when ready */
}


:root {
/* --bg: #FFF; */
/* --type-primary: #1C1C1C; */
--bg: #1C1C1C;
--type-primary: #FFF;
--type-secondary:#FFF;
--color-accent:#0000FF;
--sidebar-width: 25vw;
--gutter: 10px;
}


@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1C1C1C;
        --type-primary: #FFF;
        --type-secondary: #FFF;
        --color-accent:#0000FF;
        
    }
}


body{
    background:var(--bg);
    color:var(--type-primary);
    margin: 0;
    padding-left: calc(var(--sidebar-width) + var(--gutter));
    font-family: "CitizenGrotesk-Medium", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    -webkit-touch-callout: none;
    touch-action: pan-y;
}

.sidebar {
    color:var(--type-secondary);
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--sidebar-width);
    padding: var(--gutter) 0 var(--gutter) var(--gutter);
    flex-direction: column;
    background: var(--color-accent);
    overflow: hidden;
}
.masthead{
    display: flex;
    flex-direction: column;
    position: absolute;
    bottom: calc(var(--gutter) + 2vh);
    /* transform: translateY(calc(var(--gutter) * -12)); */
}

.masthead a{
    color:var(--type-secondary);
    font-size: 20px;
}

h1 {
    display: flex;
    margin: 0;
    font-size: 164.48px;
    font-weight: normal;
    text-align: center;
    justify-content: center;
    align-items: center;
    height: 100%;
}
h2 {
    display: flex;
    font-weight: normal;
    flex-direction: column;
    font-size: clamp(20px, 10vh, 32px);
    width: 100%;
    margin: 0;
}
.sidebar-toggle{
    display: none;
    border: none;
    background: transparent;
    color: var(--type-secondary);
    font-family: "CitizenGrotesk-Medium", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.bio{
    position: absolute;
    /* top: 10px; */
    margin: 0;
    margin-right: var(--gutter);
    left: var(--gutter);
    right: var(--gutter);
    font-size: clamp(20px, 8vh, 32px);
    opacity: 0;
    /* max-height: 0; */
    overflow: hidden;
    /* transform: translateY(6px); */
    transition: opacity 300ms ease;
}

.sidebar:hover .bio{
    opacity: 1;
    /* max-height: 140px; */
    /* transform: translateY(0); */
}

.content{
    padding: 0 0 0 var(--gutter);
    display: flex;
    flex-direction: column;
    font-size: clamp(68px, 8vw, 200px);
    line-height: 1;
    margin: 0;
    overflow: hidden;
    margin-bottom: 50vh;
    touch-action: pan-y;
}

.content a{
    color: var(--type-primary);
    text-decoration: none;
    -webkit-user-select: none;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    display: block;
}

@media (max-width: 1024px) {
    body, .content, .content a{
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }
}

.cursor-preview{
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    max-width: clamp(220px, 50vw, 1024px);
    max-height: clamp(180px, 62vh, 520px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
    z-index: 10;
    transition: opacity 200ms ease;
    will-change: transform, opacity;
    background: var(--bg);
    /* border: 1px solid rgba(0,0,0,0.05); */
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    touch-action: none;
}

.cursor-preview.is-visible{
    opacity: 1;
    visibility: visible;
}

.cursor-preview__img{
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: inherit;
    object-fit: contain;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 120ms ease;
    pointer-events: none;
}

.cursor-preview__video{
    display: none;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: inherit;
    object-fit: contain;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 120ms ease;
    background: #000;
}

.cursor-preview.has-video .cursor-preview__img{
    display: none;
}

.cursor-preview.has-video .cursor-preview__video{
    display: block;
}

.cursor-preview__open{
    position: absolute;
    right: 8px;
    top: 8px;
    padding: 6px 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.9);
    color: #111;
    cursor: pointer;
    pointer-events: auto;
}

.img{
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 100%;
    transform: translate(-50%,-50%);
    /* background-image: url(images/book-mockup.png); */
    background-size:cover;
    background-position: center;
}

span {
    display: none;
}


@media (max-width: 1024px) and (orientation: portrait) {
    body{
        padding-left: 0;
        padding-bottom: 64px;
    }

    .sidebar{
        width: 100%;
        height: 100vh;
        inset: auto 0 0 0;
        transform: translateY(calc(100% - 8vh));
        transition: transform 320ms ease;
        padding: var(--gutter);
        z-index: 20;
    }

    .sidebar.is-open{
        transform: translateY(0);
        top: 0px;
    }

    .sidebar:not(.is-open) h2,
    .sidebar:not(.is-open) .masthead,
    .sidebar:not(.is-open) .bio{
        opacity: 0;
        pointer-events: none;
    }

    .sidebar-toggle{
        display: block;
        position: relative;
        bottom: -4px;
        left: 10px;
        /* transform: translateX(-89%); */
        text-align: left;
        opacity: 1;
        transition: opacity 200ms ease;
    }

    .masthead{
        /* transform: translateY(calc(var(--gutter) * -12)); */
    }

    .sidebar.is-open .bio{
        opacity: 1;
    }

    .sidebar.is-open h2,
    .sidebar.is-open .masthead{
        opacity: 1;
    }

    .sidebar.is-open .sidebar-toggle{
        opacity: 0;
        pointer-events: none;
    }

    h2,
    .masthead a,
    .bio,
    .sidebar-toggle{
        font-size: 42px;
    }

    .content{
        font-size: 86px;
    }

}

@media (max-width: 1024px) and (orientation: landscape) {
    h2,
    .masthead a,
    .bio{
        font-size: 18px;
    }
    
    .content{
        font-size: 76px;
    }
    .cursor-preview{
        max-width: min(50vw, 1024px);
        max-height: min(90vh, 500px);
    }
}

@media (min-width: 1025px) and (max-width: 1366px) {
    h2,
    .masthead a,
    .bio{
        font-size: 22px;
    }

    .content{
        font-size: clamp(52px, 6vw, 120px);
        line-height: 1.05;
    }
}


/* Mobile-specific tuning */
@media (max-width: 768px) and (orientation: portrait) {
    body{
        /* padding-left: 0; */
        padding-bottom: 48px;
    }

    .sidebar{
        transform: translateY(calc(100% - 8vh));
    }

    h2,
    .masthead a,
    .bio,
    .sidebar-toggle{
        font-size: 20px;
        bottom: 2px;
    }

    .content{
        font-size: 52px;
    }
}
@media (max-width: 768px) and (orientation: landscape) {
    body{
        /* padding-left: 0; */
        padding-bottom: 40px;
    }

    h2,
    .masthead a,
    .bio,
    .sidebar-toggle{
        font-size: 12px;
    }

    .content{
        font-size: 48px;
    }
}
