:root {
    --paper-color: #f4f1ea;
    --ink-color: #1a1a1a;
    --secondary-ink: #333333;
    --accent-ink: #555555;
    --hole-color: #d1cdc2;
}

* {
    box-sizing: border-box;
    border-radius: 0 !important;
}

html,
body {
    margin: 0;
    padding: 0;
    background-color: #e0ddd5;
    color: var(--ink-color);
    font-family: 'IBM Plex Mono', monospace;
    line-height: 1.5;
    min-height: 100vh;
}

body {
    background-image:
        radial-gradient(#00000011 1px, transparent 0);
    background-size: 40px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

ul {
    list-style-type: none;
    margin: 0;
}

ul>li {
    text-indent: -5px;
}

ul>li:before {
    content: "-";
    text-indent: -5px;
}

ul>li>p {
    all: unset;
}

p {
    margin-bottom: 0;
}

/* Continuous roll effect */
.page-container {
    width: 100%;
    max-width: 900px;
    background-color: var(--paper-color);
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    position: relative;
    padding: 0 60px;
    border-left: 1px solid #dcd8ce;
    border-right: 1px solid #dcd8ce;
}

/* Perforated edges (holes) */
.page-container::before,
.page-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    background-image: radial-gradient(var(--hole-color) 6px, transparent 7px);
    background-size: 40px 40px;
    background-position: center 20px;
}

.page-container::before {
    left: 0;
}

.page-container::after {
    right: 0;
}

nav {
    padding: 40px 0;
    border-bottom: 2px dashed var(--ink-color);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

img {
    object-fit: contain;
}

.logo {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: var(--ink-color);
    padding: 10px;
    padding-top: 0;
}

.logo img {
    height: 60px;
    filter: grayscale(1) contrast(1.2);
}

.logo span {
    font-family: 'Special Elite', monospace;
    font-size: clamp(1rem, 5vw, 2rem);
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 30px;
    font-weight: bold;
}

nav a {
    color: var(--ink-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

nav a:hover {
    border-bottom-color: var(--ink-color);
}

main {
    padding-bottom: 40px;
}

h1,
h2,
h3 {
    font-family: 'Special Elite', monospace;
    text-transform: uppercase;
    margin-top: 1em;
    margin-bottom: 1em;
    letter-spacing: 1px;
}

h1 {
    font-size: 2.5rem;
    text-decoration: underline;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.8rem;
    border-bottom: 1px dashed var(--ink-color);
    display: inline-block;
}

h3 {
    font-size: 1.4rem;
}

p,
li {
    font-size: 1.1rem;
    max-width: 65ch;
}

a {
    color: var(--ink-color);
    text-decoration: underline;
}


footer {
    margin-top: auto;
    padding: 40px 0;
    border-top: 2px dashed var(--ink-color);
    text-align: center;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .page-container {
        padding: 0 40px;
    }

    .page-container::before,
    .page-container::after {
        width: 20px;
        background-size: 20px 20px;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 15px;
    }

    h1 {
        font-size: 1.8rem;
    }
}

/* Typewriter effect for content */
.typewriter {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    letter-spacing: .15em;
    padding-right: .15em;
    /* Space for the cursor to rest */
}

.typewriter::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    display: none;
}

.first-load .typewriter::after {
    display: block;
    height: 80%;
    width: 100%;
    background-color: var(--paper-color);
    border-left: .15em solid var(--ink-color);
    animation:
        typing 2s steps(30, end) forwards,
        hide-caret 2.5s step-end forwards;
}

@keyframes typing {
    from {
        width: 100%;
    }

    to {
        width: 0;
    }
}

@keyframes hide-caret {
    0% {
        border-color: var(--ink-color);
    }

    100% {
        border-color: transparent;
    }
}
