@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* reset box sizes */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* hide scrollbars */
::-webkit-scrollbar {
    display: none;
}

/* add root variables */
:root {
    /* darkest to lightest */
    --gray-0: #111111;
    --gray-1: #333333;
    --gray-2: #555555;
    --gray-3: #777777;
    --gray-4: #999999;
    --gray-5: #bbbbbb;
    --gray-6: #dddddd;
    --gray-7: #ffffff;

    /* basic theme usage */
    --bg-color: var(--gray-0); /* Very dark background */
    --light-bg: var(--gray-1); /* Slightly lighter sections */
    --text-color: var(--gray-7); /* Lightest text for contrast */
    --border-color: var(--gray-5); /* Medium-light border */
    --accent-color: var(--gray-6); /* Lighter accent for hovers/links */
    --heading-shadow: 2px 2px 0 var(--gray-1);

    /* the font sizes */
    --font-xxs: 0.6rem;
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-md: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 1.875rem;
    --font-4xl: 2.25rem;
    --font-5xl: 3rem;
    --font-6xl: 3.75rem;
    --font-7xl: 4.5rem;
    --font-8xl: 6rem;
    --font-9xl: 8rem;

    /* the shadows */
    --text-shadows: 3px 3px 0 var(--gray-2), 6px 6px 0 var(--gray-0);
    --box-shadows: 3px 3px 0 var(--gray-2), 6px 6px 0 var(--gray-0);
}

/* setup the body */
html,
body {
    width: 100%;
    height: 100%;
    font-family: "Press Start 2P", system-ui;
    font-weight: 400;
    font-style: normal;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;

    /* add a dithered background only for raw display */
    background-image: repeating-linear-gradient(
        0deg,
        var(--gray-5) 0px,
        var(--gray-5) 2px,
        var(--gray-6) 2px,
        var(--gray-6) 4px
    );
}

/* headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: var(--heading-shadow);
    color: var(--text-color);
}
h1 {
    border-bottom: 4px solid var(--border-color);
    padding-bottom: 0.5rem;
}
h2 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.15rem;
}
hr {
    margin: 1rem 0;
    box-shadow: var(--box-shadows);
}
.underline {
    border-bottom: 1px solid var(--border-color);
}

/* basic paragraph */
p {
    margin-bottom: 1rem;
    max-width: 60ch;
    word-wrap: break-word;
}

/* links, mostly for raw display */
a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 2px solid var(--accent-color);
}
a:hover {
    text-decoration: underline;
}

/* buttons, mostly for raw display */
button,
input[type="submit"],
input[type="button"] {
    font-family: inherit;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border: 4px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    border-radius: 0;
    transition:
        background-color 0.15s ease-in-out,
        color 0.15s;
}
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    background-color: var(--gray-3);
    color: var(--gray-7);
}

/* forms, mostly for raw display */
label {
    display: block;
    margin-bottom: 0.25rem;
    letter-spacing: 1px;
}
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    font-family: inherit;
    background-color: var(--gray-1);
    color: var(--gray-7);
    border: 2px solid var(--border-color);
    border-radius: 0;
    padding: 0.5rem;
    width: 100%;
    max-width: 500px;
    margin-bottom: 1rem;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    background-color: var(--gray-2);
    color: var(--gray-7);
}

/* basic lists; make more.. retro!? */
ul,
ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}
li {
    margin-bottom: 0.5rem;
}

/* code and pre displays */
code {
    font-family: "Courier New", Courier, monospace;
    background-color: var(--gray-3);
    color: var(--gray-7);
    padding: 0.2rem 0.4rem;
    display: inline-block;
    border: 2px solid var(--border-color);
}
pre {
    font-family: "Courier New", Courier, monospace;
    background-color: var(--gray-3);
    color: var(--gray-7);
    padding: 1rem;
    border: 2px solid var(--border-color);
    margin-bottom: 1rem;
    overflow-x: auto;
}

/* add nice block quotes */
blockquote {
    border-left: 4px solid var(--border-color);
    margin: 1rem 0;
    padding: 0.3rem 1rem;
    background-color: var(--gray-1);
    color: var(--gray-7);
    position: relative;
}
blockquote cite {
    display: block;
    margin-top: 0.5rem;
    font-style: italic;
    color: var(--gray-5);
    text-align: right;
    font-size: 0.9cqw;
    float: inline-end;
}
blockquote cite:before {
    content: "— ";
}
blockquote[cite] cite {
    display: none;
}
blockquote[cite]:after {
    content: "— " attr(cite);
    display: block;
    margin-top: 0.5rem;
    font-style: italic;
    color: var(--gray-5);
    text-align: right;
    font-size: 0.9cqw;
    float: inline-end;
}

/* images/utilities, mostly for raw display */
img {
    display: block;
    max-width: 100%;
    height: auto;
}
.pixelated {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
}
.center {
    margin: 0 auto;
}
.pixel-border {
    border: 4px solid var(--border-color);
    border-radius: 0;
    padding: 1rem;
}
.pixel-shadow {
    box-shadow: var(--box-shadows);
}
.blink {
    animation: blink-animation 1s steps(1, start) infinite;
}
@keyframes blink-animation {
    50% {
        visibility: hidden;
    }
}
.pixel-title {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 4px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: var(--heading-shadow);
    background-color: var(--bg-color);
}
.blink-text {
    display: inline-block;
    animation: blink-animation 1s steps(1, start) infinite;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* a basic 8-bit styled table */
table {
    width: 100%;
    border-collapse: collapse;
    border: 4px solid var(--border-color);
    background-color: var(--light-bg);
    box-shadow: var(--box-shadows);
}
th,
td {
    border: 2px solid var(--border-color);
    padding: 0.5rem;
    text-align: center;
    box-shadow: var(--box-shadows);
}
th {
    background-color: var(--gray-2);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-7);
    text-shadow: var(--text-shadows);
}

/* create a container for all the page content */
.container {
    container: inky / size;
    position: relative;
    overflow: auto;
    width: 448px;
    height: 600px;
}
.container .content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto;
    padding: 0.5rem 1rem;
    background: var(--light-bg);
}
.container:has(footer) .content {
    bottom: 20px;
}
.container footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background-color: var(--gray-3);
    color: var(--gray-7);
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    border-top: 2px solid var(--border-color);
    letter-spacing: 1px;
}

/* add some shadow to the text */
.container *:not(.flat) {
    text-shadow: var(--text-shadows);
}

/* handle articles */
.articles {
    display: flex;
    flex-direction: column;
    gap: var(--gap, 1rem);
}
article {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}
article img {
    width: 100px;
    height: 100px;
    margin-right: 16px;
}
article div.article-content {
    flex: 1;
}
article div.article-snippet {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
article div.article-snippet div {
    margin: auto;
    margin-right: 0;
}
article div.article-snippet div img {
    margin: auto;
    margin-left: 16px;
}

/* default hide classes for media queries */
.for-448-600,
.for-600-448,
.for-825-1200,
.for-1200-825 {
    display: none !important;
}

/* foreground (text) override classes */
.color {
    color: transparent !important;
}
.color-0 {
    color: var(--gray-0) !important;
}
.color-1 {
    color: var(--gray-1) !important;
}
.color-2 {
    color: var(--gray-2) !important;
}
.color-3 {
    color: var(--gray-3) !important;
}
.color-4 {
    color: var(--gray-4) !important;
}
.color-5 {
    color: var(--gray-5) !important;
}
.color-6 {
    color: var(--gray-6) !important;
}
.color-7 {
    color: var(--gray-7) !important;
}

/* background override classes */
.bg {
    background-color: transparent !important;
}
.bg-0 {
    background-color: var(--gray-0) !important;
}
.bg-1 {
    background-color: var(--gray-1) !important;
}
.bg-2 {
    background-color: var(--gray-2) !important;
}
.bg-3 {
    background-color: var(--gray-3) !important;
}
.bg-4 {
    background-color: var(--gray-4) !important;
}
.bg-5 {
    background-color: var(--gray-5) !important;
}
.bg-6 {
    background-color: var(--gray-6) !important;
}
.bg-7 {
    background-color: var(--gray-7) !important;
}

/* border override classes */
.border {
    border-color: transparent !important;
}
.border-0 {
    border-color: var(--gray-0) !important;
}
.border-1 {
    border-color: var(--gray-1) !important;
}
.border-2 {
    border-color: var(--gray-2) !important;
}
.border-3 {
    border-color: var(--gray-3) !important;
}
.border-4 {
    border-color: var(--gray-4) !important;
}
.border-5 {
    border-color: var(--gray-5) !important;
}
.border-6 {
    border-color: var(--gray-6) !important;
}
.border-7 {
    border-color: var(--gray-7) !important;
}

/* responsive font sizes */
.fs-xxs {
    font-size: var(--font-xxs);
}
.fs-xs {
    font-size: var(--font-xs);
}
.fs-sm {
    font-size: var(--font-sm);
}
.fs-md {
    font-size: var(--font-md);
}
.fs-lg {
    font-size: var(--font-lg);
}
.fs-xl {
    font-size: var(--font-xl);
}
.fs-2xl {
    font-size: var(--font-2xl);
}
.fs-3xl {
    font-size: var(--font-3xl);
}
.fs-4xl {
    font-size: var(--font-4xl);
}
.fs-5xl {
    font-size: var(--font-5xl);
}
.fs-6xl {
    font-size: var(--font-6xl);
}
.fs-7xl {
    font-size: var(--font-7xl);
}
.fs-8xl {
    font-size: var(--font-8xl);
}
.fs-9xl {
    font-size: var(--font-9xl);
}

/* for raw home button */
.home-btn {
    position: absolute;
    color: darkslategray;
    top: 0;
    left: 0;
    padding: 5px;
}