/* @import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap");

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100;200;300;400;500;600;700;800;900&display=swap"); */
/* @import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap");

@import url("https://fonts.googleapis.com/css2?family=Fragment+Mono&display=swap");
@font-face {
    font-family: monocraft;
    src: url(/Monocraft.woff);
} */

@font-face {
    font-family: "Terminal Grotesque";
    src: url("/terminal-grotesque-webfont.eot"); /* IE9 Compat Modes */
    src: url("/terminal-grotesque-webfont.eot?#iefix")
            format("embedded-opentype"),
        /* IE6-IE8 */ url("/terminal-grotesque-webfont.woff2") format("woff2"),
        /* Super Modern Browsers */ url("/terminal-grotesque-webfont.woff")
            format("woff"),
        /* Modern Browsers */
            url("/terminal-grotesque-webfont.svg#terminal_grotesque")
            format("svg"),
        /* Legacy iOS */ url("/terminal-grotesque-webfont.ttf")
            format("truetype"); /* Safari, Android, iOS */
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* Optimize font loading */
}

/* @import url("https://fonts.cdnfonts.com/css/code-new-roman"); */

/* @media (prefers-color-scheme: dark) {
    :root {
        --dark-color: #ececec;
        --text-color: #e0d6cc;
        --light-color: #0d0e1c;
        --highlight-color: rgba(61, 61, 61, 0.5);
        --select-color: #ffffff;
        --footer-color: #535353;
    }
} */

:root {
	--dark-color: #0d0e1c;
	--text-color: #333333;
	--light-color: #ffffff;
	--highlight-color: rgba(200, 200, 200, 0.5);
	--select-color: #000000;
	--footer-color: #888888;
	--background-blue: rgb(0, 0, 113);
	
}
.star-container {
	display: none;
}


* {
    /* font-synthesis: none !important; */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

img {
    visibility: visible;
}
/* } */
/* 
h1,  .backmarker {
	text-decoration: none;
	font-family: "Outfit", sans-serif;
} */

h1 {
    font-size: calc(var(--base-font-size) * 4);
    margin-bottom: 0px;
    letter-spacing: -0.2vw;
    color: white;
    font-style: italic;
    font-weight: 900;
}
.nav {
    margin-top: 10px;
}

html {
	/* filter: invert(); */
}


html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    max-width: 100vw;
    overflow: visible; /* Let html handle all scrolling */
    color: white;
    background-color: var(--background-blue);
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: unset;
    font-smooth: never;
    font-weight: 400;
    font-family: "Terminal Grotesque", "Code New Roman", "Helvetica Neue",
        "HelveticaNeue", -apple-system, BlinkMacSystemFont, Inter, "Segoe UI",
        "Helvetica", Roboto, Arial, sans-serif, "Apple Color Emoji",
        "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: var(--base-font-size);
    letter-spacing: -1px;
    position: relative;
    
    /* Image-scaled positioning variables - adjust these to position text */
    --text-offset-x: 21vw;
    --text-offset-y: 37vw;
    --container-size: 60vw;
    --base-font-size: 2.7vw;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    z-index: -1;
    background-color: var(--background-blue);
    overflow: visible; /* Ensure background doesn't create scroll */
}

.background-image img {
    width: 100vw;
    height: auto;
    object-fit: contain;
    object-position: top center;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    display: block;
    margin: 0;
    padding: 0;
    min-width: 100vw;
}

.container {
    position: absolute;
    left: var(--text-offset-x);
    top: var(--text-offset-y);
    width: var(--container-size);
    max-width: none;
    z-index: 10;
    text-align: center;
}

img {
    max-width: min(500px, 80%);
}

h3 a {
    padding: 15px;
    margin: 10px;
    font-size: 3rem;
    text-decoration: none;
}

.footer {
    position: relative;
    width: 100%;
    color: var(--background-blue);
    /* font-size: clamp(0.7rem, 1.4vw, 1.1rem); */
    /* padding: 20px; */
    text-align: center;
    z-index: 10;
    margin-top: 20px;
}

/* Screen reader only - hidden from visual display but accessible to search engines and screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile responsive styles */
@media (max-width: 650px) {
    /* Inherit from desktop - html handles scrolling */
    
    body {
        --text-offset-x: 5vw;
        --text-offset-y: 56vw;
        --container-size: 90vw;
        --base-font-size: 4.5vw;
        min-height: 101vh; /* Slightly more than viewport to trigger Safari address bar collapse */
    }
    
    .background-image {
        transform: scale(1.7);
        transform-origin: center top;
        image-rendering: -moz-crisp-edges;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        image-rendering: pixelated;
        overflow: hidden;
    }
    
    .background-image img {
        image-rendering: -moz-crisp-edges;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        image-rendering: pixelated;
        -ms-interpolation-mode: nearest-neighbor;
    }
    
    .container {
        position: absolute;
        left: var(--text-offset-x);
        top: var(--text-offset-y);
        width: var(--container-size);
        z-index: 10;
        padding-bottom: 30vh; /* Use vh to ensure enough scrollable content */
        min-height: 50vh; /* Ensure container has minimum height */
    }
    
.footer {
        font-size: clamp(0.9rem, 3vw, 1.4rem);
        margin-top: 10vw;
    }
    
    #circle {
        font-size: 1.2rem !important;
		font-weight: normal !important;
    }
}


a {
    color: white;
    /* border-radius: 5px; */

    /* padding-bottom: 3px; */

    text-underline-offset: 2px;
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-color: white;
    /* transition-duration: 0.1s; */
    z-index: -99;
}

a:hover {
    text-decoration-color: var(--light-color);
    text-decoration-style: solid;
    background-color: white;
    color: var(--dark-color);
    /* font-weight: 700; */

    height: 20px;
    width: 20px;
}

a:focus {
    animation: blinker 0.13s steps(2, end) 3;
    color: var(--light-color);
    background-color: var(--text-color);
}

@keyframes blinker {
    0% {
        color: var(--text-color);
        background-color: var(--light-color);
        animation-timing-function: steps(1, end);
    }

    50% {
        color: var(--light-color);
        background-color: var(--text-color);
        animation-timing-function: steps(1, end);
    }

    100% {
        color: var(--text-color);
        background-color: var(--light-color);
        animation-timing-function: steps(1, end);
    }
}

/* Noise */

.backmarker {
    position: fixed;
    top: 0;
    left: 0;
    padding: 20px;
}
.backmarker a:hover {
    background-color: var(--text-color);
}

.backmarker a {
    background-color: var(--light-color);
}

/* Responsive media queries removed - using fixed scaling system instead */

::selection {
    background: rgb(10, 10, 255);
    /* WebKit/Blink Browsers */
    color: var(--light-color);
}

::-moz-selection {
    background: #ffb7b7;
    /* Gecko Browsers */
}

/* Tooltips */

.tooltip {
    position: relative;
    /* making the .tooltip span a container for the tooltip text */
}

.tooltip:before {
    content: attr(data-text);
    /* here's the magic */
    position: absolute;

    /* vertically center */
    top: 0;
    margin-left: -3px;
    margin-top: 30px;

    font-size: medium;
    font-weight: bold;

    left: 0;
    /* margin-left:15px; and add a small left margin */

    /* basic styles */
    /* width:200px; */
    padding: 10px;
    background: var(--dark-color);
    /* WebKit/Blink Browsers */
    color: var(--light-color);
    /* color: red; */
    text-align: center;
    z-index: 99;

    display: none;
    /* hide by default */
}

#circle {
    position: fixed;
    transform: translate(0%, -100%);
    color: var(--dark-color);
    background-color: var(--light-color);
    font-weight: bold;
    font-size: 2vw;
    letter-spacing: normal;
    pointer-events: none;
    z-index: 99;
    max-width: 50vw;
    overflow: hidden;
}

/* MAKE IT WORK!!!!! */
.tooltip:hover:before {
    /* display:block; */
}

.surround {
    border: 2px solid var(--dark-color);
    padding-left: 20px;
    margin-bottom: 10px;
}

.surround a {
    text-decoration: none;
}

.surround a h2 {
    margin-top: 0;
}

.surround a p {
    margin-bottom: 0;
}

.surround:hover {
    /* background: var(--light-color); */
    backdrop-filter: invert(100%);
    -webkit-backdrop-filter: invert(100%);
    color: var(--light-color);
}

.surround:hover > a {
    color: var(--light-color);
    background: none;
}

.surround a:focus {
    animation: none;
    color: inherit;
    background: none;
}

.nounder a {
    text-decoration: none;
}

.mono {
    font-family: monospace;
    background-color: rgba(232, 232, 232, 0.648);
    /* border-radius: 5px; */
    padding: 2px;
    padding-left: 5px;
    padding-right: 5px;
}

.noise {
    z-index: 100;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.07;
    /* background-color: red; */
}

#circle2 {
    position: fixed;
    transform: translate(-50%, -50%);
    color: var(--text-color);
    font-weight: bold;
    font-size: 1.2rem;
    padding: 40px;
    border-radius: 50%;
    pointer-events: none;
    z-index: -99;
}

#bgcircle {
    position: absolute;
    transform: translate(-50%, -50%);

    color: var(--text-color);
    /* font-weight: bold; */
    font-size: 1.2rem;
    /* background-color: var(--light-color); */

    padding: 200px;
    border-radius: 50%;
    /* font-size: 1rem; */
    z-index: 20;
}

.star-container {
    position: absolute;
    width: 8px;
    height: 8px;
}

.star-pixel {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    opacity: 0;
}

.star-pixel.center {
    left: 3px;
    top: 3px;
    animation: centerPixel 10s infinite steps(1);
}

.star-pixel.north {
    left: 3px;
    top: 0;
    animation: cardinalPixel 10s infinite steps(1);
    animation-delay: 0.5s;
}

.star-pixel.south {
    left: 3px;
    bottom: 0;
    animation: cardinalPixel 10s infinite steps(1);
    animation-delay: 0.5s;
}

.star-pixel.east {
    right: 0;
    top: 3px;
    animation: cardinalPixel 10s infinite steps(1);
    animation-delay: 0.5s;
}

.star-pixel.west {
    left: 0;
    top: 3px;
    animation: cardinalPixel 10s infinite steps(1);
    animation-delay: 0.5s;
}

@keyframes centerPixel {
    0%,
    90% {
        opacity: 0;
    }
    92% {
        opacity: 1;
    }
    94%,
    100% {
        opacity: 0;
    }
}

@keyframes cardinalPixel {
    0%,
    92% {
        opacity: 0;
    }
    94% {
        opacity: 1;
    }
    96%,
    100% {
        opacity: 0;
    }
}

@keyframes scrollBackground {
    0% {
        background-position: top center;
    }
    100% {
        background-position: bottom center;
    }
}
