/* Design tokens (HSL) */
:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --primary: 222.2 47.4% 11.2%;
    --primary-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --radius: 12px;
}

/* Base */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: hsl(var(--foreground));
    background: hsl(var(--background));
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin-inline: auto;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: hsl(var(--background));
    border-bottom: 1px solid hsl(var(--border));
}

    .site-header .wrap {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 56px;
        gap: 12px;
    }

.brand {
    font-weight: 700;
    font-size: 1.0625rem;
}

.nav {
    display: flex;
    gap: 8px;
}

    .nav a {
        padding: 8px 12px;
        border-radius: 8px;
        color: hsl(var(--foreground));
    }

        .nav a:hover {
            background: hsl(var(--muted));
        }

        .nav a.active {
            background: hsl(var(--muted));
            color: hsl(var(--primary));
            font-weight: 600;
        }

/* Main */
main {
    padding-block: 32px;
}

h1 {
    font-size: clamp(1.5rem, 2vw + 1rem, 2rem);
    margin: 0 0 16px;
}

h2 {
    font-size: 1.125rem;
    margin: 0 0 12px;
}

p {
    line-height: 1.6;
}

.muted {
    color: hsl(var(--muted-foreground));
}

/* Cards */
.grid {
    display: grid;
    gap: 16px;
}

@media (min-width: 768px) {
    .grid.cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .grid.cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .grid.cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.card {
    background: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
    transition: transform .2s ease;
}

    .card:hover {
        transform: translateY(-2px);
    }

    .card .p {
        padding: 16px;
    }

    .card .header {
        padding: 14px 16px 0;
        font-weight: 600;
    }

    .card .meta {
        display: flex;
        gap: 16px;
        color: hsl(var(--muted-foreground));
        font-size: 0.875rem;
    }

/* Buttons & Inputs */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--muted));
    cursor: pointer;
}

    .btn.primary {
        background: hsl(var(--primary));
        color: hsl(var(--primary-foreground));
        border-color: transparent;
    }

    .btn:hover {
        filter: brightness(0.98);
    }

.input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid hsl(var(--border));
    border-radius: 10px;
}

/* Footer */
.site-footer {
    border-top: 1px solid hsl(var(--border));
    padding-block: 24px;
    color: hsl(var(--muted-foreground));
}

.footer-nav {
    display: flex;
    gap: 12px;
}

/* Utils */
.hover-scale {
    transition: transform .2s ease;
}

    .hover-scale:hover {
        transform: scale(1.02);
    }

.small {
    font-size: 0.875rem;
}
/* Global */
:root {
    --brand-from: #6366f1; /* indigo-500 */
    --brand-to: #22c55e; /* green-500 */
}

body {
    font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

/* Brand */
.brand .logo-badge {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: linear-gradient(135deg,var(--brand-from),var(--brand-to));
    color: #fff;
    font-size: 1.05rem;
    box-shadow: 0 6px 14px rgba(99,102,241,.25);
}

.brand .brand-text {
    font-weight: 700;
    letter-spacing: .2px;
    background: linear-gradient(135deg,var(--brand-from),var(--brand-to));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Navbar links */
.nav-link-underline {
    position: relative;
    transition: color .2s ease;
}

    .nav-link-underline::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: .25rem;
        height: 2px;
        width: 0;
        margin: auto;
        background: linear-gradient(90deg,var(--brand-from),var(--brand-to));
        transition: width .2s ease-in-out;
    }

    .nav-link-underline:hover {
        color: #111;
    }

        .nav-link-underline:hover::after {
            width: 70%;
        }

/* "New" badge */
.badge-new {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: .15rem .4rem;
    border-radius: 999px;
    color: #0a3622;
    background: #d1fae5; /* emerald-100 */
    animation: pulseNew 1.3s ease-in-out infinite;
}

@keyframes pulseNew {
    0% {
        box-shadow: 0 0 0 0 rgba(34,197,94,.5);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(34,197,94,0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(34,197,94,0);
    }
}

/* Search */
.searchbar .input-group {
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

    .searchbar .input-group .input-group-text {
        border: 0;
        color: #6c757d;
    }

.searchbar .form-control {
    border: 0;
    box-shadow: none;
}

.searchbar .btn {
    border-radius: 999px;
    margin: 2px; /* creates a pill look */
}

/* Footer */
.site-footer {
    background: #fff;
}

.footer-link {
    color: #6c757d;
    text-decoration: none;
}

    .footer-link:hover {
        color: #111;
        text-decoration: underline;
    }

/* Utilities */
.bg-light-subtle {
    background: linear-gradient(180deg, #fafafa 0%, #f5f7fb 100%);
    min-height: 100dvh;
}
