:root {
    --blue: #0e76bc;
    --orange: #f7941e;
    --bg: #0e0f12;
    --card: #151821;
    --text: #e8ebf1;
    --muted: #9fb3c8;
    --ring: rgba(14, 118, 188, .35)
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #0b0d12 0%, #0f1320 100%)
}

.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(10, 14, 22, .8);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, .06)
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between
}

.brand {
    display: inline-block;
    font-weight: 800;
    font-size: 1.4rem;
    color: #fff;
    padding: 1rem 0;
    text-decoration: none;
    letter-spacing: .2px
}

.hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
    cursor: pointer
}

.hamburger-box {
    position: relative;
    width: 22px;
    height: 16px
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #fff;
    border-radius: 2px
}

.hamburger-inner {
    top: 50%;
    transform: translateY(-50%)
}

.hamburger-inner::before {
    top: -6px
}

.hamburger-inner::after {
    top: 6px
}

body.menu-open .hamburger-inner {
    background: transparent
}

body.menu-open .hamburger-inner::before {
    transform: translateY(6px) rotate(45deg)
}

body.menu-open .hamburger-inner::after {
    transform: translateY(-6px) rotate(-45deg)
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 70
}

.menu-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    background: #0b0f19;
    border-left: 1px solid rgba(255, 255, 255, .08);
    box-shadow: -10px 0 30px rgba(0, 0, 0, .35);
    transform: translateX(100%);
    transition: transform .18s ease-out;
    z-index: 80;
    display: flex;
    flex-direction: column
}

body.menu-open .menu-panel {
    transform: translateX(0)
}

.menu-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    font-weight: 700
}

.menu-close {
    font-size: 1.6rem;
    line-height: 1;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer
}

.menu-panel ul {
    list-style: none;
    margin: 0;
    padding: 0.75rem;

    /* Force a two-column grid in the side panel */
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.5rem;
    row-gap: 0.35rem;
}

/* Make headings and key links span full width */
.menu-panel .menu-heading,
.menu-panel ul li:first-child,   /* Home */
.menu-panel ul li:last-child {   /* Contact */
    grid-column: 1 / -1;
}

/* Tidy headings slightly for grid context */
.menu-panel .menu-heading {
    margin: 0.35rem 0 0.15rem;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
}

/* Slightly tighter padding so the grid feels compact */
.menu-panel a {
    display: block;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    border: 1px solid transparent;
}
@media (max-width: 480px) {
    .menu-panel {
        width: 100%;
    }
    .menu-panel ul {
        grid-template-columns: 1fr;
    }
}

/* --- Tool / Meme link accents --- */
.menu-panel a.tool,
.menu-panel a.meme {
    position: relative;
    padding-left: 1.25rem;
    /* space for the left accent bar */
    border: 1px solid transparent;
}

/* left accent bar */
.menu-panel a.tool::before,
.menu-panel a.meme::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 4px;
    opacity: .65;
}

.menu-panel a.tool {
    color: var(--blue);
}

.menu-panel a.tool:hover {
    background: rgba(14, 118, 188, .08);
}

.menu-panel a.tool::before {
    background: var(--blue);
}

.menu-panel a.tool.active {
    background: var(--blue);
    color: #fff;
    border-color: rgba(255, 255, 255, .1);
}

.menu-panel a.meme {
    color: var(--orange);
}

.menu-panel a.meme:hover {
    background: rgba(247, 148, 30, .08);
}

.menu-panel a.meme::before {
    background: var(--orange);
}

.menu-panel a.meme.active {
    background: var(--orange);
    color: #0b0f19;
    /* better contrast on orange */
    border-color: rgba(255, 255, 255, .1);
}


/* Global page start spacing (tools can override --page-top per page) */
.site-main {
    padding: var(--page-top, 1rem) 0 3rem;
}


.hero {
    background: radial-gradient(600px 300px at 10% -10%, rgba(14, 118, 188, .25), transparent 60%), radial-gradient(500px 260px at 90% -20%, rgba(247, 148, 30, .18), transparent 60%);
    border: 1px solid rgba(255, 255, 255, .06);
    background-color: rgba(255, 255, 255, .02);
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .3)
}

.hero h1 {
    margin: 0 0 .5rem 0;
    font-size: 2rem
}

.hero p {
    margin: .25rem 0;
    color: var(--muted)
}

.grid {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem
}

@media (max-width:900px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

@media (max-width:600px) {
    .grid {
        grid-template-columns: 1fr
    }
}

.card {
    display: block;
    padding: 1.1rem;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, .08);
    text-decoration: none;
    color: var(--text);
    transition: transform .08s ease, box-shadow .15s ease, border .15s ease
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--ring);
    box-shadow: 0 6px 20px rgba(14, 118, 188, .18)
}

.card h3 {
    margin: 0 0 .4rem 0;
    font-size: 1.1rem
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: .95rem
}

.site-footer {
    padding: 1.4rem 0;
    border-top: 1px solid rgba(255, 255, 255, .06);
    background: rgba(10, 14, 22, .7);
    backdrop-filter: saturate(140%) blur(10px)
}

.site-footer p {
    margin: 0;
    color: #cbd6e2;
    font-size: .95rem
}


.footer-bottom .hit-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: #cbd6e2;
    opacity: 0.2;
}

/* --- Tool and Meme-Maker differentiation --- */

.card.tool {
    border-color: rgba(14, 118, 188, 0.25);
    position: relative;
}

.card.tool::before {
    content: "🛠️";
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 1rem;
    opacity: 0.6;
}

.card.tool h3 {
    color: var(--blue);
}

.card.meme {
    border-color: rgba(247, 148, 30, 0.25);
    position: relative;
}

.card.meme::before {
    content: "🎭";
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 1rem;
    opacity: 0.6;
}

.card.meme h3 {
    color: var(--orange);
}

/* On hover, brighten the accent a little */
.card.tool:hover {
    border-color: rgba(14, 118, 188, 0.5);
    box-shadow: 0 6px 20px rgba(14, 118, 188, 0.25);
}

.card.meme:hover {
    border-color: rgba(247, 148, 30, 0.5);
    box-shadow: 0 6px 20px rgba(247, 148, 30, 0.25);
}
