/* ========= Reset / base ========= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; }

/* ========= Theme tokens ========= */
:root{
    --bg: #050406;              /* deep near-black */
    --bg-2: #0b0a0f;            /* soft panel bg */
    --bg-3: #121019;            /* deeper panel */
    --fg: #ececf1;              /* main text */
    --fg-dim: #c7c7d4;          /* secondary text */
    --muted: #9a98a8;

    --accent: #ff004d;          /* brand red */
    --accent-2: #ff3e73;        /* gradient partner */

    --border: #221f2b;
    --glow: 0 0 10px rgba(255, 0, 77, .25);

    --radius: 14px;
    --shell: 1120px;
}

/* ========= Typography ========= */
body{
    background: radial-gradient(1200px 600px at 50% -10%, rgba(255,0,77,.10), transparent 60%) , var(--bg);
    color: var(--fg);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
    line-height: 1.75;
    font-size: clamp(15px, 1.7vw, 16.5px);
}

/* Better text rendering */
body, input, button { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Utilities */
.shell{ width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 1.25rem; }
.section{ padding: clamp(2rem, 4vw, 3rem) 0; }
a { color: inherit; text-underline-offset: 2px; }

/* ========= Header & Nav ========= */
.site-header{
    position: sticky; top: 0; z-index: 50;
    background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0)) , var(--bg);
    border-bottom: 1px solid #0e0c14;
    backdrop-filter: saturate(120%) blur(6px);
}
.site-header .shell{
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: .9rem 1.25rem;
}

/* Brand */
.brand-link{
    display: inline-flex; align-items: baseline; gap: .6rem;
    text-decoration: none;
}
.brand-mark{ color: var(--accent); text-shadow: var(--glow); }
.brand-name{ font-weight: 700; letter-spacing:.02em; }
.brand-tag{ margin: .15rem 0 0 1.7rem; color: var(--fg-dim); font-size: .9rem; }

@media (max-width: 520px){
    .brand-tag{ display:none; }
}

/* Nav */
.site-nav{
    display: flex; align-items: center; gap: 1.2rem;
}
.site-nav a{
    text-decoration: none; position: relative; padding: .2rem 0;
    color: var(--fg); opacity: .95; font-weight: 600;
}
.site-nav a::after{
    content:""; position: absolute; left:0; right:100%; bottom:-6px; height:2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: var(--glow);
    transition: right .2s ease;
}
.site-nav a:hover::after, .site-nav a:focus-visible::after { right: 0; }
.site-nav a:focus-visible{ outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Mobile nav toggle */
.nav-toggle{
    display: none;
    width: 42px; height: 34px; border: 1px solid #1e1a26; border-radius: 8px;
    background: #0c0a12; color: var(--fg); cursor: pointer;
    align-items: center; justify-content: center; gap: 4px;
}
.nav-toggle-line{ display:block; width: 22px; height: 2px; background: var(--fg); }
.sr-only{ position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); border:0; }

@media (max-width: 820px){
    .nav-toggle{ display: inline-flex; }
    .site-nav{
        grid-column: 1 / -1;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: .75rem 1rem;
    }
    .site-header .shell{
        grid-template-columns: auto auto 1fr;
    }
    /* collapsed state */
    .site-nav[data-collapsed="true"] { display: none; }
}

/* ========= Hero ========= */
.hero{
    background: radial-gradient(1200px 600px at 50% -20%, rgba(255,62,115,.08), transparent 55%), var(--bg);
    border-bottom: 1px solid #0f0c15;
}
.hero-body{
    padding: clamp(2rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3rem);
}
.hero-title{
    margin: 0 0 .5rem;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    letter-spacing: .01em;
}
.hero-sub{
    color: var(--fg-dim);
    max-width: 60ch;
    margin: 0 0 1.2rem;
    font-size: clamp(.95rem, 2vw, 1.05rem);
}
.hero-cta{ display:flex; gap:.75rem; flex-wrap: wrap; }


.btn{
    display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
    padding: .65rem .9rem;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    border: 0; border-radius: 10px; color: #0b0810;
    font-weight: 800; text-decoration: none;
    box-shadow: var(--glow);
}
.btn:hover{ filter: brightness(1.05); }
.btn:focus-visible{ outline: 2px solid var(--fg); outline-offset: 3px; }
.btn.ghost{
    background: #0e0b14; color: var(--fg);
    border: 1px solid #231f2b;
    box-shadow: none;
}

/* ========= Sections ========= */
.section-title{
    margin: 0 0 .8rem;
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    font-weight: 700;
}
.section-title::after{
    content:"";
    display:block; height:2px; width:72px; margin-top:.5rem;
    background: linear-gradient(90deg, var(--accent), transparent);
    box-shadow: var(--glow);
}

/* ========= Cards ========= */
.cards{
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}
.card{
    grid-column: span 12;
    background: linear-gradient(180deg, var(--bg-2), var(--bg-3));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem 1.2rem;
    box-shadow: 0 6px 24px rgba(0,0,0,.35);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    position: relative;
}
.card:hover{
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(0,0,0,.45);
    border-color: #2a2436;
}
.card-bar{
    position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: var(--radius) 0 0 var(--radius);
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
    box-shadow: var(--glow);
}
.card-title{
    margin: 0 0 .25rem;
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    font-weight: 700;
}
.card-text{
    margin: 0;
    color: var(--fg-dim);
    font-size: clamp(.95rem, 1.8vw, 1rem);
}
.card-link{
    display:inline-flex; align-items:center; gap:.5rem; margin-top:.85rem;
    color: var(--accent); text-decoration: none; font-weight: 800;
}
.card-link span{ transition: transform .18s ease; }
.card-link:hover span{ transform: translateX(3px); }

.meta-row{
    display:flex; align-items:center; justify-content: space-between; gap: .75rem; margin-top: .85rem;
}
.meta-date{
    color: var(--muted); font-size: .8rem; letter-spacing: .04em;
}

/* wider grids on desktop */
@media (min-width: 760px){
    .card{ grid-column: span 6; }
}

/* ========= Footer ========= */
.site-footer{
    border-top: 1px solid #0e0c14;
    background: linear-gradient(180deg, transparent, #07060b);
    padding: 1.5rem 0 2rem;
    color: var(--fg);
    text-align: center;
    font-size: .95rem;
}

/* ========= Motion respect ========= */
@media (prefers-reduced-motion: reduce){
    * { transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Make body full height & flex container */
html, body {
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #040404;
    font-family: 'Courier New', monospace;
    color: #e6e6e6;
    line-height: 1.6;
}

/* Main grows to fill leftover space */
main {
    flex: 1;
    padding-bottom: 2rem; /* spacing above footer */
}

/* Footer always sticks to bottom */
footer {
    background-color: #040404;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid #0f0f0f;
    color: #ffffff;
    font-size: 1rem;
}
/* === Hamburger Menu Button === */
.nav-toggle {
    width: 44px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #2f2f2f;
    border-radius: 10px;
    background: linear-gradient(180deg, #0f0f0f, #1a1a1a);
    cursor: pointer;
    position: relative;
    box-shadow: 0 0 12px rgba(255, 0, 77, 0.25), inset 0 0 6px rgba(255,0,77,0.15);
    transition: box-shadow .2s ease, transform .2s ease;
}

.nav-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 16px rgba(255,0,77,0.4), inset 0 0 10px rgba(255,0,77,0.2);
}

/* Hamburger lines */
.nav-toggle::before,
.nav-toggle::after,
.nav-toggle span {
    content: "";
    position: absolute;
    width: 18px;
    height: 2px;
    background: #ff004d;
    border-radius: 1px;
    box-shadow: 0 0 6px rgba(255,0,77,0.8);
    left: 50%;
    transform: translateX(-50%);
    transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle span {
    top: 50%;
}

.nav-toggle::before {
    top: calc(50% - 6px);
}

.nav-toggle::after {
    top: calc(50% + 6px);
}
/* === Hamburger visibility & nav behavior (global fix) === */

/* Hidden on desktop by default */
.nav-toggle{ display:none !important; }

/* Desktop: nav always visible, ignore data-collapsed */
@media (min-width: 861px){
    #site-nav{ display:flex !important; gap:2rem; }
    #site-nav[data-collapsed="true"]{ display:flex !important; }
}

/* Mobile: show toggle, collapse nav by default */
@media (max-width: 860px){
    .nav-toggle{ display:inline-flex !important; }
    #site-nav{ display:block; }
    #site-nav[data-collapsed="true"]{ display:none; }
}
/* === Smooth mobile nav slide animation === */
@media (max-width: 860px){
    #site-nav{
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transform: translateY(-6px);
        transition:
                max-height .35s ease,
                opacity .25s ease,
                transform .35s ease,
                padding .35s ease;
        padding: 0;
        display: block; /* keep block so we can animate height */
    }

    /* expanded */
    #site-nav[data-collapsed="false"]{
        max-height: 500px; /* enough for all links */
        opacity: 1;
        transform: translateY(0);
        padding: 10px 0 12px;
    }

    /* links look stacked */
    #site-nav a{
        display: block;
        text-align: center;
        padding: 10px 8px;
    }
}
/* === Smooth mobile nav slide (global) === */

/* Desktop: show nav, hide toggle */
@media (min-width: 901px){
    .nav-toggle{ display:none !important; }
    #site-nav{ display:flex !important; gap: 1.2rem; }
    #site-nav[data-collapsed]{ display:flex !important; } /* ignore collapsed on desktop */
}

/* Mobile: show toggle, animate the panel down */
@media (max-width: 900px){
    .nav-toggle{ display:inline-flex !important; }

    /* Keep your current look — only add animation props */
    #site-nav{
        display:block;                /* so we can animate height */
        overflow:hidden;
        max-height:0;                 /* collapsed */
        opacity:0;
        transform: translateY(-6px);
        padding:0;                    /* we'll add padding when opened */
        transition:
                max-height .35s ease,
                opacity .25s ease,
                transform .35s ease,
                padding .35s ease;
    }
    /* expanded state */
    #site-nav[data-collapsed="false"]{
        max-height:320px;             /* enough for your links */
        opacity:1;
        transform: translateY(0);
        padding:10px 0 12px;
    }

    /* stacked links (unchanged styling) */
    #site-nav a{
        display:block;
        text-align:center;
        padding:10px 8px;
    }
}

/* Respect Reduced Motion */
@media (prefers-reduced-motion: reduce){
    #site-nav{
        transition: none !important;
    }
}
