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

/* ═══════════════════════════════════════════════════════════
   NEO-BRUTALISM DESIGN SYSTEM
   ═══════════════════════════════════════════════════════════ */

:root {
    color-scheme: only light;

    /* Neo-Brutalism Color Palette */
    --nb-bg: #FFFDF7;
    --nb-black: #1a1a1a;
    --nb-white: #ffffff;
    --nb-yellow: #FFD60A;
    --nb-pink: #FF6B9D;
    --nb-blue: #88D4FF;
    --nb-green: #A3E635;
    --nb-orange: #FF9F1C;
    --nb-purple: #C084FC;
    --nb-red: #FF4444;
    --nb-cream: #FEF3C7;
    --nb-lavender: #E9D5FF;
    --nb-mint: #BBF7D0;
    --nb-peach: #FECACA;

    /* Neo-Brutalism Borders & Shadows */
    --nb-border: 3px solid var(--nb-black);
    --nb-border-thin: 2px solid var(--nb-black);
    --nb-shadow: 4px 4px 0px var(--nb-black);
    --nb-shadow-lg: 6px 6px 0px var(--nb-black);
    --nb-shadow-sm: 3px 3px 0px var(--nb-black);
    --nb-shadow-hover: 6px 6px 0px var(--nb-black);
    --nb-radius: 12px;
    --nb-radius-sm: 8px;
}

html {
    font-family: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    min-height: 100vh;
    margin: 0 auto;
    padding: 0;
    display: grid;
    gap: 0;
    grid-template-rows: min-content 1fr min-content;
    background-color: var(--nb-bg);
    color: var(--nb-black);
}

/* ── Neo-Brutalism Component Classes ────────────────────── */

/* Cards */
.nb-card {
    background: var(--nb-white);
    border: var(--nb-border);
    border-radius: var(--nb-radius);
    box-shadow: var(--nb-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}

.nb-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--nb-shadow-lg);
}

.nb-card:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px var(--nb-black);
}

/* Buttons */
.nb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    border: var(--nb-border);
    border-radius: var(--nb-radius-sm);
    box-shadow: var(--nb-shadow);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    text-decoration: none;
    color: var(--nb-black);
    background: var(--nb-yellow);
}

.nb-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--nb-shadow-hover);
}

.nb-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px var(--nb-black);
}

.nb-btn-pink { background: var(--nb-pink); }
.nb-btn-blue { background: var(--nb-blue); }
.nb-btn-green { background: var(--nb-green); }
.nb-btn-orange { background: var(--nb-orange); }
.nb-btn-purple { background: var(--nb-purple); color: var(--nb-black); }
.nb-btn-white { background: var(--nb-white); }

/* Tags */
.nb-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    font-weight: 700;
    font-size: 0.8rem;
    border: var(--nb-border-thin);
    border-radius: 999px;
    box-shadow: var(--nb-shadow-sm);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    text-decoration: none;
    color: var(--nb-black);
    background: var(--nb-cream);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nb-tag:hover {
    transform: translate(-1px, -1px);
    box-shadow: var(--nb-shadow);
    background: var(--nb-yellow);
}

/* Section headings */
.nb-heading {
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--nb-black);
    text-transform: uppercase;
}

/* Images */
.nb-img {
    border: var(--nb-border);
    border-radius: var(--nb-radius);
    object-fit: cover;
}

/* Input fields */
.nb-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: var(--nb-border);
    border-radius: var(--nb-radius-sm);
    box-shadow: var(--nb-shadow-sm);
    background: var(--nb-white);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    outline: none;
}

.nb-input:focus {
    box-shadow: var(--nb-shadow);
    transform: translate(-1px, -1px);
    border-color: var(--nb-black);
}

/* Divider */
.nb-divider {
    border: none;
    border-top: var(--nb-border);
    margin: 1.5rem 0;
}

/* Accent backgrounds */
.nb-bg-yellow { background-color: var(--nb-yellow); }
.nb-bg-pink { background-color: var(--nb-pink); }
.nb-bg-blue { background-color: var(--nb-blue); }
.nb-bg-green { background-color: var(--nb-green); }
.nb-bg-orange { background-color: var(--nb-orange); }
.nb-bg-purple { background-color: var(--nb-purple); }
.nb-bg-cream { background-color: var(--nb-cream); }
.nb-bg-lavender { background-color: var(--nb-lavender); }
.nb-bg-mint { background-color: var(--nb-mint); }
.nb-bg-peach { background-color: var(--nb-peach); }

/* ── Mobile improvements ───────────────────────────────── */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .blogcontent h1 {
        font-size: 28px;
        line-height: 1.2;
    }

    .blogcontent h2 {
        font-size: 24px;
        margin-top: 2em;
    }

    .blogcontent h3 {
        font-size: 20px;
        margin-top: 1.5em;
    }

    .blogcontent section {
        font-size: 18px;
        line-height: 1.6;
    }

    button, .tag, .nb-tag, a {
        min-height: 44px;
        min-width: 44px;
    }

    .blogcontent p {
        margin-bottom: 1.2em;
    }

    .page-form input, .page-form textarea, .page-form select {
        font-size: 16px;
    }
}

footer {
    text-align: center;
}

.template-homepage main {
    text-align: center;
}

.skip-link:focus-visible {
    top: 5px;
}

.page-form label {
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: 700;
}

.page-form :is(textarea, input, select) {
    width: 100%;
    max-width: 500px;
    min-height: 40px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.page-form .helptext {
    font-style: italic;
}


/* Legacy .tag class - now styled as neo-brutalism */
.tag {
    display: inline-flex;
    align-items: center;
    background-color: var(--nb-cream);
    color: var(--nb-black);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    border: var(--nb-border-thin);
    box-shadow: var(--nb-shadow-sm);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag:hover {
    background-color: var(--nb-yellow);
    color: var(--nb-black);
    text-decoration: none;
    cursor: pointer;
    transform: translate(-1px, -1px);
    box-shadow: var(--nb-shadow);
}

/* Mobile-specific tag improvements */
@media (max-width: 768px) {
    .tag {
        padding: 0.5rem 0.875rem;
        font-size: 0.85rem;
        margin-right: 0.75rem;
        margin-bottom: 0.75rem;
        min-height: 44px;
    }
}

/* ── Blog Content Neo-Brutalism ────────────────────────── */

.blogcontent h1 {
    margin-top: 0;
    font-family: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
    font-weight: 900;
    font-size: 42px;
    letter-spacing: -0.03em;
}

.blogcontent h2 {
    margin-top: 3em;
    font-family: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
    font-weight: 800;
    font-size: 30px;
    letter-spacing: -0.02em;
    padding-bottom: 0.3em;
    border-bottom: var(--nb-border-thin);
}

.blogcontent h3 {
    margin-top: 1em;
    font-family: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.01em;
}

.blogcontent ol {
    padding-left: 20px;
}
.blogcontent ul {
    padding-left: 20px;
}
.blogcontent ol li {
    margin-bottom: 0.5em;
    list-style: decimal;
}

.blogcontent ul li {
    list-style: disc;
}

.blogcontent section {
    font-size: 20px;
    font-weight: 400;
    overflow-wrap: break-word;
    letter-spacing: -0.06px;
    line-height: 32px;
    color: var(--nb-black);
}

.blogcontent p {
    margin-bottom: 1em;
}

.blogcontent img {
    max-width: 100%;
    height: auto;
    border-radius: var(--nb-radius);
    border: var(--nb-border);
}

.blogcontent blockquote {
    border-left: 6px solid var(--nb-yellow);
    background: var(--nb-cream);
    padding: 1rem 1.5rem;
    margin: 1.5em 0;
    border-radius: 0 var(--nb-radius-sm) var(--nb-radius-sm) 0;
    font-style: italic;
    font-weight: 600;
}

/* ── Pygments / Code Blocks — Neo-Brutalism ────────────── */
.highlight {
    background: var(--nb-black);
    border: var(--nb-border);
    border-radius: var(--nb-radius-sm);
    margin: 1.5em 0;
    box-shadow: var(--nb-shadow);
}

.highlight pre {
    margin: 0;
    padding: 1.25em;
    overflow-x: auto;
    color: #f8f8f8;
    font-size: 0.9rem;
    line-height: 1.6;
}



.highlight .c { color: #408080; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #008000; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #BC7A00 } /* Comment.Preproc */
.highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0044DD } /* Generic.Traceback */
.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008000 } /* Keyword.Pseudo */
.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #B00040 } /* Keyword.Type */
.highlight .m { color: #666666 } /* Literal.Number */
.highlight .s { color: #BA2121 } /* Literal.String */
.highlight .na { color: #7D9029 } /* Name.Attribute */
.highlight .nb { color: #008000 } /* Name.Builtin */
.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.highlight .no { color: #880000 } /* Name.Constant */
.highlight .nd { color: #AA22FF } /* Name.Decorator */
.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0000FF } /* Name.Function */
.highlight .nl { color: #A0A000 } /* Name.Label */
.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #19177C } /* Name.Variable */
.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #666666 } /* Literal.Number.Bin */
.highlight .mf { color: #666666 } /* Literal.Number.Float */
.highlight .mh { color: #666666 } /* Literal.Number.Hex */
.highlight .mi { color: #666666 } /* Literal.Number.Integer */
.highlight .mo { color: #666666 } /* Literal.Number.Oct */
.highlight .sa { color: #BA2121 } /* Literal.String.Affix */
.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
.highlight .sc { color: #BA2121 } /* Literal.String.Char */
.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
.highlight .sd { color: #BA2121 } /* Literal.String.Doc */
.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
.highlight .se { color: #BA2121 } /* Literal.String.Escape */
.highlight .sh { color: #BA2121 } /* Literal.String.Herald */
.highlight .si { color: #BA2121 } /* Literal.String.Interpol */
.highlight .sx { color: #BA2121 } /* Literal.String.Other */
.highlight .sr { color: #BA2121 } /* Literal.String.Regex */
.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
.highlight .ss { color: #BA2121 } /* Literal.String.Symbol */
.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0000FF } /* Name.Function.Magic */
.highlight .vc { color: #19177C } /* Name.Variable.Class */
.highlight .vg { color: #19177C } /* Name.Variable.Global */
.highlight .vi { color: #19177C } /* Name.Variable.Instance */
.highlight .vm { color: #19177C } /* Name.Variable.Magic */
.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */