/* Base styles (original repo appearance) */

@font-face {
    font-family: "Atkinson";
    src: url("fonts/AtkinsonHyperlegibleNextVF-Variable.woff2") format("woff2-variations");
    font-style: normal;
}

@font-face {
    font-family: "AtkinsonMono";
    src: url("fonts/AtkinsonHyperlegibleMono-Medium.woff2") format("woff2-variations");
    font-style: normal;
}

@font-face {
    font-family: "AtkinsonMono";
    src: url("fonts/AtkinsonHyperlegibleMono-Bold.woff2") format("woff2-variations");
    font-style: normal;
    font-weight: bold;
}

html, body {
    box-sizing: border-box;
    direction: ltr;
    background-color: #efefef;
    color: #111;
    margin: 0;
    padding: 0;
    font-family: "Atkinson", sans-serif;
}

code, pre, kbd, samp, tt, textarea {
    font-family: "AtkinsonMono", monospace;
}

main {
    position: absolute;
    left: 60vw;
    top: 0;
    bottom: 0;
    right: 0; /* reserve right-hand column for iframe */
    padding: 4vh 2vw;
    padding: 4dvh 2vw; /* Dynamic viewport height for mobile browsers */
    overflow-y: auto;
}

iframe {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 60vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    border: 0;
    background: transparent;
}

section {
    margin: 6vh auto;
    margin: 6dvh auto; /* Dynamic viewport height for mobile browsers */
    padding: 5vh 0;
    padding: 5dvh 0; /* Dynamic viewport height for mobile browsers */
    max-width: 640px;
    min-height: 90vh;
    min-height: 90dvh; /* Dynamic viewport height for mobile browsers */
}

section img { max-width: 100%; }

/* Caption overlay for active inflection links */
.inflect-caption {
    position: fixed;
    right: 26px;
    top: 1em;
    max-width: 56vw;
    background: rgba(0, 0, 0, 0.7);
    color: #ccc;
    padding: 0.2em 0.4em;
    border-radius: 6px;
    z-index: 1100;
    font-size: 0.75em;
    line-height: 1.4;
    pointer-events: none; /* don’t block map or page interactions */
}
.inflect-caption a { pointer-events: auto; }

h1 { font-size: 2.4em; font-weight: 200; margin-bottom: 0; }
h2 { font-size: 1.8em; }
h3 { font-size: 1.4em; }
h4 { font-size: 1.2em; }

p { font-size: 1em; line-height: 1.5em; }

a { color: #0b66a8; }

footer { opacity: 0.6; text-align: left; padding: 1rem 0; }

@media (max-width: 1000px) and (orientation: portrait) {
    iframe { 
        position: fixed; 
        left: 0; 
        width: 100vw; 
        height: 50vh;
        height: 50dvh; /* Dynamic viewport height for mobile browsers */
    }
    main { 
        right: 0; 
        left: 0; 
        padding: 2vh 4vw;
        padding: 2dvh 4vw; /* Dynamic viewport height for mobile browsers */
    }
}
