/* ============================================================
   RESET
============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    scroll-behavior: smooth;
}


body {
    min-height: 100vh;

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: #172033;

    background:
        #f7f9fc;

    line-height: 1.5;

    -webkit-font-smoothing: antialiased;
}


button,
input {
    font: inherit;
}


button {
    cursor: pointer;
}


a {
    color: inherit;
    text-decoration: none;
}


/* ============================================================
   THEME VARIABLES
============================================================ */

:root {

    --primary: #635bff;
    --primary-dark: #5048df;

    --accent: #14b8a6;

    --text: #172033;
    --text-soft: #657086;
    --text-light: #8b95a7;

    --surface: #ffffff;
    --surface-soft: #f3f5fa;

    --border: #e5e9f1;

    --shadow:
        0 10px 30px rgba(30, 41, 59, 0.07);

    --shadow-hover:
        0 18px 45px rgba(30, 41, 59, 0.13);

    --radius-large: 24px;
    --radius-medium: 18px;
    --radius-small: 12px;

    --max-width: 1200px;
}


[data-theme="dark"] {

    --text: #f1f5f9;
    --text-soft: #aab4c5;
    --text-light: #7f8ba0;

    --surface: #171b26;
    --surface-soft: #202532;

    --border: #2c3444;

    --shadow:
        0 10px 30px rgba(0, 0, 0, 0.2);

    --shadow-hover:
        0 18px 45px rgba(0, 0, 0, 0.35);

    background: #10131a;
}


[data-theme="dark"] body {
    background: #10131a;
}


/* ============================================================
   HEADER
============================================================ */

.site-header {

    position: sticky;

    top: 0;

    z-index: 100;

    background:
        color-mix(
            in srgb,
            var(--surface) 90%,
            transparent
        );

    backdrop-filter: blur(18px);

    border-bottom:
        1px solid var(--border);
}


.header-inner {

    width: min(
        calc(100% - 40px),
        var(--max-width)
    );

    min-height: 72px;

    margin: auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 30px;
}


/* ============================================================
   BRAND
============================================================ */

.brand {

    display: flex;

    align-items: center;

    gap: 11px;
}


.brand-icon {

    width: 40px;
    height: 40px;

    border-radius: 12px;

    display: grid;
    place-items: center;

    color: white;

    font-size: 22px;

    background:
        linear-gradient(
            135deg,
            #635bff,
            #8b5cf6
        );

    box-shadow:
        0 8px 18px rgba(99, 91, 255, 0.28);
}


.brand-text {

    display: flex;

    flex-direction: column;

    line-height: 1.15;
}


.brand-text strong {

    font-size: 16px;

    letter-spacing: -0.02em;
}


.brand-text span {

    color: var(--text-soft);

    font-size: 11px;

    margin-top: 3px;
}


/* ============================================================
   NAVIGATION
============================================================ */

.main-navigation {

    display: flex;

    align-items: center;

    gap: 28px;
}


.main-navigation a {

    color: var(--text-soft);

    font-size: 14px;

    font-weight: 600;

    transition:
        color 0.2s ease;
}


.main-navigation a:hover {

    color: var(--primary);
}


.header-actions {

    display: flex;

    align-items: center;

    gap: 8px;
}


.icon-button,
.mobile-menu-button {

    width: 40px;
    height: 40px;

    border: 1px solid var(--border);

    border-radius: 12px;

    color: var(--text);

    background: var(--surface);

    display: grid;

    place-items: center;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}


.icon-button:hover,
.mobile-menu-button:hover {

    transform: translateY(-1px);

    border-color: var(--primary);
}


.mobile-menu-button {

    display: none;

    font-size: 20px;
}


/* ============================================================
   HERO
============================================================ */

.hero {

    position: relative;

    overflow: hidden;

    min-height: 470px;

    display: grid;

    place-items: center;

    padding:
        80px 20px 75px;

    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(99, 91, 255, 0.14),
            transparent 32%
        ),
        radial-gradient(
            circle at 80% 10%,
            rgba(20, 184, 166, 0.13),
            transparent 28%
        ),
        var(--surface);
}


.hero-content {

    position: relative;

    z-index: 2;

    width: min(
        720px,
        100%
    );

    text-align: center;
}


.hero-badge {

    display: inline-flex;

    align-items: center;

    padding: 7px 13px;

    border-radius: 100px;

    color: var(--primary);

    background:
        rgba(99, 91, 255, 0.09);

    font-size: 12px;

    font-weight: 700;

    margin-bottom: 20px;
}


.hero h1 {

    font-size:
        clamp(42px, 7vw, 72px);

    line-height: 0.98;

    letter-spacing: -0.055em;

    margin-bottom: 22px;
}


.hero h1 span {

    color: var(--primary);
}


.hero p {

    max-width: 580px;

    margin:
        0 auto 30px;

    color: var(--text-soft);

    font-size:
        clamp(16px, 2vw, 19px);
}


/* ============================================================
   SEARCH
============================================================ */

.search-box {

    width: min(
        580px,
        100%
    );

    height: 60px;

    margin: auto;

    display: flex;

    align-items: center;

    gap: 12px;

    padding:
        0 18px;

    background: var(--surface);

    border:
        1px solid var(--border);

    border-radius: 18px;

    box-shadow:
        0 15px 40px rgba(50, 60, 90, 0.1);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.search-box:focus-within {

    border-color: var(--primary);

    box-shadow:
        0 15px 40px rgba(99, 91, 255, 0.15);
}


.search-icon {

    color: var(--text-light);

    font-size: 28px;

    line-height: 1;
}


.search-box input {

    flex: 1;

    min-width: 0;

    border: 0;

    outline: 0;

    color: var(--text);

    background: transparent;

    font-size: 15px;
}


.search-box input::placeholder {

    color: var(--text-light);
}


.clear-search {

    border: 0;

    background: transparent;

    color: var(--text-soft);

    font-size: 22px;
}


/* ============================================================
   HERO STATS
============================================================ */

.hero-stats {

    display: flex;

    justify-content: center;

    gap: 45px;

    margin-top: 35px;
}


.hero-stat {

    display: flex;

    flex-direction: column;
}


.hero-stat strong {

    font-size: 20px;

    letter-spacing: -0.03em;
}


.hero-stat span {

    color: var(--text-light);

    font-size: 11px;

    margin-top: 2px;
}


/* ============================================================
   BACKGROUND SHAPES
============================================================ */

.hero-background-shape {

    position: absolute;

    border-radius: 50%;

    filter: blur(2px);

    pointer-events: none;
}


.shape-one {

    width: 180px;
    height: 180px;

    right: 4%;

    bottom: -70px;

    background:
        rgba(99, 91, 255, 0.08);
}


.shape-two {

    width: 130px;
    height: 130px;

    left: 6%;

    top: 35px;

    background:
        rgba(20, 184, 166, 0.08);
}


/* ============================================================
   CONTENT
============================================================ */

.content-section {

    width: min(
        calc(100% - 40px),
        var(--max-width)
    );

    margin:
        0 auto;

    padding:
        72px 0;
}


.featured-section {

    padding-top: 20px;
}


.section-heading {

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 28px;
}


.section-eyebrow {

    display: block;

    color: var(--primary);

    font-size: 11px;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: 0.12em;

    margin-bottom: 6px;
}


.section-heading h2 {

    font-size:
        clamp(25px, 4vw, 34px);

    line-height: 1.1;

    letter-spacing: -0.04em;
}


.text-button {

    display: flex;

    align-items: center;

    gap: 7px;

    border: 0;

    background: transparent;

    color: var(--primary);

    font-size: 13px;

    font-weight: 700;
}


.text-button span {

    transition:
        transform 0.2s ease;
}


.text-button:hover span {

    transform: translateX(4px);
}


/* ============================================================
   FILTER BAR
============================================================ */

.filter-bar {

    display: flex;

    align-items: center;

    gap: 8px;

    overflow-x: auto;

    padding-bottom: 10px;

    margin-bottom: 25px;

    scrollbar-width: thin;
}


.filter-button {

    flex: 0 0 auto;

    display: flex;

    align-items: center;

    gap: 6px;

    padding:
        9px 13px;

    border:
        1px solid var(--border);

    border-radius: 100px;

    color: var(--text-soft);

    background: var(--surface);

    font-size: 12px;

    font-weight: 700;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}


.filter-button:hover {

    border-color: var(--primary);

    color: var(--primary);
}


.filter-button.active {

    color: white;

    border-color: var(--primary);

    background: var(--primary);
}


/* ============================================================
   RESULTS
============================================================ */

.results-info {

    color: var(--text-light);

    font-size: 12px;
}


/* ============================================================
   EMPTY STATE
============================================================ */

.empty-state {

    text-align: center;

    padding:
        70px 20px;

    border:
        1px dashed var(--border);

    border-radius: var(--radius-large);

    background: var(--surface);
}


.empty-icon {

    font-size: 42px;

    margin-bottom: 12px;
}


.empty-state h3 {

    font-size: 20px;

    margin-bottom: 7px;
}


.empty-state p {

    color: var(--text-soft);

    font-size: 14px;

    margin-bottom: 20px;
}


.primary-button {

    border: 0;

    border-radius: 12px;

    padding:
        11px 18px;

    color: white;

    background: var(--primary);

    font-weight: 700;
}


.primary-button:hover {

    background: var(--primary-dark);
}


/* ============================================================
   FOOTER
============================================================ */

.site-footer {

    border-top:
        1px solid var(--border);

    background: var(--surface);
}


.footer-inner {

    width: min(
        calc(100% - 40px),
        var(--max-width)
    );

    min-height: 100px;

    margin: auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;
}


.footer-brand {

    display: flex;

    align-items: center;

    gap: 10px;
}


.footer-brand .brand-icon {

    width: 32px;
    height: 32px;

    border-radius: 9px;

    font-size: 17px;
}


.footer-brand strong {

    font-size: 13px;
}


.footer-brand p {

    color: var(--text-light);

    font-size: 10px;
}


.copyright {

    color: var(--text-light);

    font-size: 11px;
}


/* ============================================================
   MOBILE NAVIGATION
============================================================ */

.mobile-navigation {

    display: none;

    position: fixed;

    z-index: 90;

    top: 73px;

    left: 15px;
    right: 15px;

    padding: 12px;

    border:
        1px solid var(--border);

    border-radius: 16px;

    background: var(--surface);

    box-shadow: var(--shadow);
}


.mobile-navigation a {

    display: block;

    padding: 12px;

    border-radius: 10px;

    color: var(--text-soft);

    font-size: 14px;

    font-weight: 600;
}


.mobile-navigation a:hover {

    color: var(--primary);

    background: var(--surface-soft);
}


.mobile-navigation.open {

    display: block;
}


/* ============================================================
   ERROR PAGE
============================================================ */

.fatal-error {

    min-height: 100vh;

    display: grid;

    place-content: center;

    text-align: center;

    padding: 30px;
}


.fatal-error-icon {

    font-size: 50px;

    margin-bottom: 20px;
}


.fatal-error h1 {

    margin-bottom: 10px;
}


.fatal-error p {

    color: var(--text-soft);

    margin-bottom: 15px;
}


.fatal-error code {

    display: inline-block;

    padding: 10px 15px;

    border-radius: 8px;

    background: #eee;

    color: #b42318;

    font-size: 12px;
}


/* =========================================================
   Account button
   ========================================================= */

.header-account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;

    padding: 0 15px;

    border-radius: 11px;

    background: var(--primary);
    color: white;

    text-decoration: none;

    font-size: 0.82rem;
    font-weight: 800;

    box-shadow:
        0 7px 18px
        rgba(99, 91, 255, 0.18);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.header-account-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 10px 24px
        rgba(99, 91, 255, 0.25);
}

@media (max-width: 800px) {

    .header-account-button {
        min-height: 38px;

        padding: 0 12px;

        font-size: 0.78rem;
    }
}


/* =========================================================
   Account UI
   ========================================================= */

.account-area {
    position: relative;

    display: flex;
    align-items: center;
}


/* ---------------------------------------------------------
   Logged-out button
   --------------------------------------------------------- */

.header-account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;

    padding: 0 15px;

    border-radius: 11px;

    background: var(--primary);
    color: white;

    text-decoration: none;

    font-size: 0.82rem;
    font-weight: 800;

    box-shadow:
        0 7px 18px
        rgba(99, 91, 255, 0.18);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.header-account-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 10px 24px
        rgba(99, 91, 255, 0.25);
}


/* ---------------------------------------------------------
   Logged-in button
   --------------------------------------------------------- */

.account-menu-wrapper {
    position: relative;
}

.account-button {
    display: flex;
    align-items: center;
    gap: 8px;

    min-height: 42px;

    padding: 4px 10px 4px 5px;

    border:
        1px solid
        var(--border);

    border-radius: 13px;

    background: var(--surface);

    color: var(--text);

    font: inherit;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease;
}

.account-button:hover {
    border-color: var(--primary);
}

.account-avatar {
    width: 32px;
    height: 32px;

    display: grid;
    place-items: center;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--accent)
        );

    color: white;

    font-size: 0.78rem;
    font-weight: 900;
}

.account-name {
    max-width: 110px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 0.8rem;
    font-weight: 800;
}

.account-chevron {
    color: var(--muted-text);

    font-size: 0.75rem;
}


/* ---------------------------------------------------------
   Dropdown
   --------------------------------------------------------- */

.account-menu {
    position: absolute;

    top: calc(100% + 9px);
    right: 0;

    width: 230px;

    padding: 8px;

    z-index: 1000;

    background: var(--surface);

    border:
        1px solid
        var(--border);

    border-radius: 16px;

    box-shadow:
        0 18px 45px
        rgba(15, 23, 42, 0.14);
}

.account-menu-user {
    padding: 10px 10px 12px;
}

.account-menu-user strong {
    display: block;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 0.85rem;
}

.account-menu-user span {
    display: block;

    margin-top: 3px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    color: var(--muted-text);

    font-size: 0.73rem;
}

.account-menu-divider {
    height: 1px;

    margin: 2px 4px 6px;

    background: var(--border);
}

.account-menu-link {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 10px;

    min-height: 40px;

    padding: 0 10px;

    border: 0;
    border-radius: 10px;

    background: transparent;

    color: var(--text);

    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.account-menu-link:hover {
    background: var(--surface-soft);

    color: var(--primary);
}

.account-logout:hover {
    color: #dc2626;
}


/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 800px) {

    .account-name {
        display: none;
    }

    .account-button {
        padding-right: 5px;
    }

    .account-chevron {
        display: none;
    }

    .account-menu {
        right: -5px;
    }

    .header-account-button {
        min-height: 38px;

        padding: 0 12px;

        font-size: 0.78rem;
    }
}



/* =========================================================
ACCOUNT AREA
========================================================= */

.account-area {
position: relative;
display: flex;
align-items: center;
}

/* ---------------------------------------------------------
SIGN IN BUTTON
--------------------------------------------------------- */

.header-account-button {
display: inline-flex;
align-items: center;
justify-content: center;


min-height: 42px;
padding: 0.65rem 1rem;

border: 1px solid var(--border);
border-radius: 12px;

background: var(--surface);
color: var(--text);

font: inherit;
font-weight: 700;
text-decoration: none;

cursor: pointer;

transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;


}

.header-account-button:hover {
background: var(--surface-soft);
border-color: var(--primary);
transform: translateY(-1px);
}

/* ---------------------------------------------------------
ACCOUNT WRAPPER
--------------------------------------------------------- */

.account-menu-wrapper {
position: relative;
}

/* ---------------------------------------------------------
ACCOUNT BUTTON
--------------------------------------------------------- */

.account-button {
display: inline-flex;
align-items: center;
gap: 0.55rem;


min-height: 42px;
padding: 0.35rem 0.7rem 0.35rem 0.35rem;

border: 1px solid var(--border);
border-radius: 999px;

background: var(--surface);
color: var(--text);

font: inherit;
font-weight: 700;

cursor: pointer;

transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;


}

.account-button:hover {
background: var(--surface-soft);
border-color: var(--primary);
}

.account-button:focus-visible {
outline: 3px solid rgba(99, 91, 255, 0.2);
outline-offset: 2px;
}

/* ---------------------------------------------------------
AVATAR
--------------------------------------------------------- */

.account-avatar {
display: inline-flex;
align-items: center;
justify-content: center;


width: 32px;
height: 32px;

border-radius: 50%;

background: var(--primary);
color: #ffffff;

font-size: 0.78rem;
font-weight: 800;


}

/* ---------------------------------------------------------
ACCOUNT NAME
--------------------------------------------------------- */

.account-name {
max-width: 130px;


overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;


}

/* ---------------------------------------------------------
CHEVRON
--------------------------------------------------------- */

.account-chevron {
font-size: 0.8rem;
opacity: 0.65;
}

/* ---------------------------------------------------------
DROPDOWN
--------------------------------------------------------- */

.account-menu {
position: absolute;


top: calc(100% + 10px);
right: 0;

width: 270px;

padding: 0.7rem;

border: 1px solid var(--border);
border-radius: 16px;

background: var(--surface);

box-shadow:
    0 18px 50px rgba(15, 23, 42, 0.16);

z-index: 1000;

/* JavaScript controls this explicitly */
display: none;


}

/* ---------------------------------------------------------
USER INFORMATION
--------------------------------------------------------- */

.account-menu-user {
padding: 0.65rem 0.75rem 0.8rem;
}

.account-menu-user strong {
display: block;


margin-bottom: 0.2rem;

color: var(--text);

font-size: 0.95rem;


}

.account-menu-user span {
display: block;


overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

color: var(--muted-text);

font-size: 0.8rem;


}

/* ---------------------------------------------------------
DIVIDER
--------------------------------------------------------- */

.account-menu-divider {
height: 1px;


margin: 0.25rem 0 0.5rem;

background: var(--border);


}

/* ---------------------------------------------------------
MENU LINKS
--------------------------------------------------------- */

.account-menu-link {
display: flex;
align-items: center;
gap: 0.7rem;


width: 100%;

padding: 0.7rem 0.75rem;

border: 0;
border-radius: 10px;

background: transparent;
color: var(--text);

font: inherit;
font-size: 0.9rem;
font-weight: 600;

text-align: left;
text-decoration: none;

cursor: pointer;

box-sizing: border-box;


}

.account-menu-link:hover {
background: var(--surface-soft);
}

.account-menu-link span:first-child {
width: 22px;


text-align: center;

font-size: 1rem;


}

/* ---------------------------------------------------------
SIGN OUT
--------------------------------------------------------- */

.account-logout {
color: #dc2626;
}

.account-logout:hover {
background: rgba(220, 38, 38, 0.08);
}

/* ---------------------------------------------------------
MOBILE
--------------------------------------------------------- */

@media (max-width: 700px) {


.account-name {
    display: none;
}

.account-button {
    padding-right: 0.45rem;
}

.account-menu {
    position: fixed;

    top: 70px;
    right: 1rem;

    width: min(
        280px,
        calc(100vw - 2rem)
    );
}


}
