/* ===================================
    FONTS
=================================== */
/* regular font */
@font-face {
    font-family: 'deluxe220';
    src: url('/fonts/deluxe220-regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

/* bold font */
@font-face {
    font-family: 'deluxe220';
    src: url('/fonts/deluxe220-bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ===================================
    BODY
=================================== */
body {
    font-family: 'deluxe220', monospace;
    font-weight: 400;
    font-size: 1.125rem;
    line-height: 1.75;
    color: #111;
    background-color: #fefefe;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0 auto;
    max-width: 800px;
    padding: 2.5rem 1.5rem 0.5rem 1.5rem;
    text-align: left;
}

/* ===================================
    MAIN CONTENT
=================================== */
main {
    flex: 1;
    width: 100%;
    margin: 0 auto;
}

/* ===================================
    HEADINGS 
=================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'deluxe220', monospace;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #111;
}

/* heading sizes */
h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.6rem;
}

h4 {
    font-size: 1.3rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
    color: #333;
}

/* ===================================
    PARAGRAPHS / TEXT 
=================================== */
p {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

/* ===================================
    TEXT STYLE 
=================================== */
/* bold text */
strong,
b {
    font-family: 'deluxe220', monospace;
    font-weight: 700;
}

/* italic & emphasis */
em,
i {
    font-style: italic;
}

/* ===================================
    LINKS
=================================== */
/* external links */
a {
    color: #111;
    text-decoration: none;
    background-color: rgba(255, 230, 0, 0.3);
    padding: 0 2px;
    border-bottom: 2px solid rgba(255, 230, 0, 0.7);
    transition: background 0.2s;
}

a:hover {
    background-color: rgba(255, 230, 0, 0.6);
}

/* internal links */
#internal-link {
    background-color: transparent;
    border-bottom: none;
    padding: 0;
    color: inherit;
    transition: none;
}

#internal-link:hover {
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-decoration-style: wavy;
    background-color: transparent;
}

/* navbar link */
#navbar a {
    color: #ffffff;
    text-decoration: none;
    background-color: rgba(0, 0, 0, 0.75);
    padding: 0 2px;
    border-bottom: 0px solid rgba(0, 0, 0, 1);
    transition: background 0.2s;
}

#navbar a:hover {
    background-color: rgba(0, 0, 0, 0.85);
}

/* =================================== 
    DROPDOWN 
=================================== */
details {
    margin-bottom: 1.5rem;
}

summary {
    cursor: pointer;
    position: relative;
}

summary:hover {
    opacity: 0.7;
}

/* ===================================
    LISTS
=================================== */
ul,
ol {
    margin: 1rem 0 1.5rem 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* nested links inside dropdown */
details ul,
details ol {
    margin: 0.5rem 0 0.5rem 2rem;
}

details ul li,
details ol li {
    margin-bottom: 0.4rem;
}

/* ===================================
    IMAGES
=================================== */
img {
    display: block;
    margin: 1rem auto;
    max-width: 100%;
    border-radius: 8px;
}

/* ===================================
    BLOCKQUOTES
=================================== */
blockquote {
    border-left: 4px solid #ccc;
    margin: 1.5rem 0;
    padding-left: 1rem;
    color: #555;
    font-style: italic;
    background: #f9f9f9;
}

/* nested blockquotes */
blockquote blockquote {
    border-color: #aaa;
}

/* ===================================
    TABLES
=================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

th,
td {
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
}

th {
    background-color: #f5f5f5;
    text-align: left;
}

/* ===================================
    INLINE CODE & CODE BLOCKS
=================================== */
code {
    font-family: 'Fira Code', monospace;
    color: #f0f0f0;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.95rem;
}

pre {
    background: #1e1e1e;
    color: #f0f0f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    margin: 1.5rem 0;
}

/* inline code syntax highlight */
.hljs-keyword {
    color: #d73a49;
    font-weight: bold;
}

.hljs-number {
    color: #005cc5;
}

.hljs-string {
    color: #032f62;
}

.hljs-comment {
    color: #6a737d;
    font-style: italic;
}

.hljs-function .hljs-title {
    color: #6f42c1;
}

/* ===================================
    HORIZONTAL RULES 
=================================== */
hr {
    border: none;
    border-top: 1px solid #c0c0c0;
    margin: 2rem 0;
}

/* ===================================
    FOOTER 
=================================== */
footer {
    text-align: right;
}

/* ===================================
    RESPONSIVE DESIGN 
=================================== */
@media (max-width: 1023px) {
    #internal-link:active {
        text-decoration-line: underline;
        text-decoration-thickness: 1px;
        text-decoration-style: wavy;
    }

    summary:active {
        opacity: 0.7;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 1.1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.4rem;
    }
}