/* ─── TOKENS ──────────────────────────────────────────────────────── */
:root {
    --c-bg: #FAFAF9;
    --c-surface: #FFFFFF;
    --c-border: #E8E6E1;
    --c-border-light: #F0EEE9;
    --c-text-primary: #18181B;
    --c-text-secondary: #6B7280;
    --c-text-muted: #9CA3AF;
    --c-accent: #1A6B4A;
    --c-accent-light: #E8F5EF;
    --c-accent-hover: #155E3E;
    --c-amber: #D97706;
    --c-amber-light: #FEF3C7;
    --c-danger: #DC2626;
    --c-danger-light: #FEF2F2;
    --c-danger-border: #FECACA;

    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 16px;
    --r-xl: 24px;
    --r-2xl: 32px;
    --r-full: 100px;

    --sh-xs: 0 1px 2px rgba(0, 0, 0, .05);
    --sh-sm: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
    --sh-md: 0 4px 12px rgba(0, 0, 0, .08), 0 2px 4px rgba(0, 0, 0, .04);
    --sh-lg: 0 12px 32px rgba(0, 0, 0, .10), 0 4px 8px rgba(0, 0, 0, .04);
    --sh-xl: 0 24px 48px rgba(0, 0, 0, .12), 0 8px 16px rgba(0, 0, 0, .06);

    --font-display: 'Sora', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --nav-h: 56px;
}

[data-theme="dark"] {
    --c-bg: #111110;
    --c-surface: #1C1C1A;
    --c-border: #2A2A28;
    --c-border-light: #232321;
    --c-text-primary: #F4F3F0;
    --c-text-secondary: #A09F99;
    --c-text-muted: #6B6A64;
    --c-accent: #22C278;
    --c-accent-light: #0D2B1F;
    --c-accent-hover: #1EAA69;
    --c-amber: #F59E0B;
    --c-amber-light: #1F1500;
    --c-danger: #F87171;
    --c-danger-light: #1F0A0A;
    --c-danger-border: #3F1515;
    --sh-xs: 0 1px 2px rgba(0, 0, 0, .2);
    --sh-sm: 0 1px 3px rgba(0, 0, 0, .3);
    --sh-md: 0 4px 12px rgba(0, 0, 0, .4);
    --sh-lg: 0 12px 32px rgba(0, 0, 0, .5);
    --sh-xl: 0 24px 48px rgba(0, 0, 0, .6);
}

/* ─── RESET ───────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--c-bg);
    color: var(--c-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background .2s, color .2s;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

/* ─── NAV ─────────────────────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: var(--nav-h);
    background: rgba(17, 17, 16, .95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--c-border);
    transition: background .2s;
}

[data-theme="light"] .nav {
    background: rgba(250, 250, 249, .92);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--c-text-primary);
    letter-spacing: -.02em;
}

.nav-logo-mark {
    width: 30px;
    height: 30px;
    background: var(--c-accent);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-logo-mark svg {
    width: 16px;
    height: 16px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--c-text-secondary);
    padding: 5px 10px;
    border-radius: var(--r-sm);
    transition: color .12s, background .12s;
}

.nav-link:hover {
    color: var(--c-text-primary);
    background: var(--c-border-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-theme-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text-secondary);
    border: 1px solid var(--c-border);
    transition: all .12s;
}

.nav-theme-btn:hover {
    color: var(--c-text-primary);
    border-color: var(--c-text-muted);
}

.nav-menu-btn {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    align-items: center;
    justify-content: center;
    color: var(--c-text-primary);
    border: 1px solid var(--c-border);
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--r-md);
    padding: 8px 16px;
    transition: all .15s ease;
    white-space: nowrap;
    line-height: 1;
}

.btn-nav-primary {
    background: var(--c-accent);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .12);
}

.btn-nav-primary:hover {
    background: var(--c-accent-hover);
    transform: translateY(-1px);
}

.btn-nav-secondary {
    background: var(--c-surface);
    color: var(--c-text-primary);
    border: 1px solid var(--c-border);
    box-shadow: var(--sh-xs);
}

.btn-nav-secondary:hover {
    border-color: var(--c-text-muted);
}

/* mobile drawer */
.nav-mobile {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    padding: 16px 20px 20px;
    z-index: 199;
    box-shadow: var(--sh-lg);
}

.nav-mobile.open {
    display: block;
}

.nav-mobile-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.nav-mobile-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--c-text-secondary);
    padding: 10px 12px;
    border-radius: var(--r-sm);
    display: block;
    transition: all .1s;
}

.nav-mobile-link:hover {
    background: var(--c-bg);
    color: var(--c-text-primary);
}

.nav-mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-mobile-actions .btn-nav {
    width: 100%;
    font-size: 15px;
    padding: 12px 20px;
    border-radius: var(--r-lg);
}

/* ─── BREADCRUMB ──────────────────────────────────────────────────── */
.breadcrumb-bar {
    max-width: 1120px;
    margin: 0 auto;
    padding: calc(var(--nav-h) + 24px) 20px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--c-text-muted);
}

.breadcrumb-bar a {
    color: var(--c-text-muted);
    transition: color .12s;
}

.breadcrumb-bar a:hover {
    color: var(--c-accent);
}

.breadcrumb-sep {
    color: var(--c-border);
}

.breadcrumb-current {
    color: var(--c-text-secondary);
    font-weight: 500;
}

/* ─── PAGE WRAP ───────────────────────────────────────────────────── */
.page-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 20px 80px;
}

/* ─── PROFILE HERO ────────────────────────────────────────────────── */
.profile-hero {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-sm);
    overflow: hidden;
    margin-bottom: 20px;
}

/* gradient banner */
.hero-banner {
    height: 100px;
    background: linear-gradient(135deg, var(--c-accent-light) 0%, rgba(34, 194, 120, .08) 50%, var(--c-amber-light) 100%);
    position: relative;
}

[data-theme="dark"] .hero-banner {
    background: linear-gradient(135deg, #0D2B1F 0%, #111110 50%, #1F1500 100%);
}

/* subtle grid on banner */
.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(34, 194, 120, .12) 1px, transparent 1px);
    background-size: 20px 20px;
}

.hero-body {
    padding: 0 28px 28px;
}

/* avatar */
.hero-avatar-wrap {
    margin-top: -44px;
    margin-bottom: 14px;
    position: relative;
    width: fit-content;
}

.hero-avatar-img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--c-surface);
    box-shadow: var(--sh-md);
    display: block;
}

.hero-avatar-initials {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--c-accent-light);
    color: var(--c-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    border: 4px solid var(--c-surface);
    box-shadow: var(--sh-md);
}

.hero-online {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #22C55E;
    border: 3px solid var(--c-surface);
}

/* name + meta */
.hero-name {
    font-family: var(--font-display);
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--c-text-primary);
    margin-bottom: 4px;
}

.hero-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.hero-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--c-text-muted);
}

.hero-meta-item svg {
    color: var(--c-text-muted);
    flex-shrink: 0;
}

/* badges */
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 16px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: var(--r-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.badge-seller {
    background: var(--c-accent-light);
    color: var(--c-accent);
}

.badge-campus {
    background: var(--c-amber-light);
    color: var(--c-amber);
    border: 1px solid rgba(217, 119, 6, .15);
}

[data-theme="dark"] .badge-campus {
    border-color: rgba(245, 158, 11, .15);
}

/* bio */
.hero-bio {
    font-size: 14px;
    color: var(--c-text-secondary);
    line-height: 1.7;
    max-width: 580px;
    padding-top: 14px;
    border-top: 1px solid var(--c-border-light);
}

/* ─── STATS ROW ───────────────────────────────────────────────────── */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--c-surface);
    box-shadow: var(--sh-sm);
    margin-bottom: 28px;
}

.stat-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 22px 16px;
    background: var(--c-bg);
    text-align: center;
}

.stat-cell+.stat-cell {
    border-left: 1px solid var(--c-border);
}

.stat-num {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1;
    color: var(--c-text-primary);
}

.stat-num span {
    color: var(--c-accent);
}

.stat-label {
    font-size: 12px;
    color: var(--c-text-muted);
    margin-top: 4px;
}

/* ─── SECTION HEADER ──────────────────────────────────────────────── */
.section-head {
    margin-bottom: 18px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--c-accent);
    margin-bottom: 6px;
}

.eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-accent);
    flex-shrink: 0;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--c-text-primary);
    margin-bottom: 4px;
}

.section-sub {
    font-size: 13px;
    color: var(--c-text-secondary);
}

/* ─── LISTINGS GRID ───────────────────────────────────────────────── */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.listing-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh-xs);
    transition: box-shadow .18s, transform .18s, border-color .18s;
    display: flex;
    flex-direction: column;
}

.listing-card:hover {
    box-shadow: var(--sh-md);
    transform: translateY(-3px);
    border-color: var(--c-accent);
}

/* image */
.card-img-wrap {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--c-bg);
    position: relative;
    flex-shrink: 0;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.listing-card:hover .card-img {
    transform: scale(1.04);
}

.card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--c-bg);
    color: var(--c-border);
    font-size: 32px;
}

.card-img-placeholder span {
    font-size: 11px;
    color: var(--c-text-muted);
    font-family: var(--font-body);
}

/* category pill on image */
.card-category-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-full);
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--c-accent);
    box-shadow: var(--sh-xs);
}

/* card body */
.card-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--c-text-primary);
    line-height: 1.3;
    letter-spacing: -.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-price {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--c-accent);
    letter-spacing: -.02em;
    line-height: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--c-border-light);
}

.card-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--c-text-muted);
    font-weight: 500;
}

.card-meta-item svg {
    flex-shrink: 0;
}

.card-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--c-border);
    flex-shrink: 0;
}

/* card CTA */
.card-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-top: 1px solid var(--c-border-light);
    font-size: 12px;
    font-weight: 600;
    color: var(--c-accent);
    transition: background .12s;
    gap: 5px;
}

.listing-card:hover .card-cta {
    background: var(--c-accent-light);
}

/* ─── EMPTY STATE ─────────────────────────────────────────────────── */
.empty-state {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-xl);
    padding: 56px 24px;
    text-align: center;
    box-shadow: var(--sh-sm);
}

.empty-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--r-xl);
    background: var(--c-accent-light);
    color: var(--c-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
}

.empty-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--c-text-primary);
    margin-bottom: 6px;
    letter-spacing: -.01em;
}

.empty-sub {
    font-size: 14px;
    color: var(--c-text-muted);
    line-height: 1.6;
    max-width: 280px;
    margin: 0 auto;
}

/* ─── FOOTER ──────────────────────────────────────────────────────── */
.footer {
    background: var(--c-surface);
    border-top: 1px solid var(--c-border);
    padding: 44px 0 28px;
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 36px;
}

.footer-brand-desc {
    font-size: 13px;
    color: var(--c-text-muted);
    line-height: 1.7;
    margin-top: 10px;
    max-width: 240px;
}

.footer-col-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--c-text-muted);
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.footer-link {
    font-size: 13px;
    color: var(--c-text-secondary);
    transition: color .1s;
}

.footer-link:hover {
    color: var(--c-text-primary);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--c-border-light);
}

.footer-copy {
    font-size: 12px;
    color: var(--c-text-muted);
}

.footer-legal {
    display: flex;
    gap: 16px;
}

.footer-legal a {
    font-size: 12px;
    color: var(--c-text-muted);
}

.footer-legal a:hover {
    color: var(--c-text-secondary);
}

/* ─── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-brand-desc {
        max-width: 100%;
    }
}

@media (max-width: 640px) {

    html,
    body {
        overflow-x: hidden;
        width: 100%;
    }

    :root {
        --nav-h: 52px;
    }

    .nav-links,
    .nav-desktop-cta {
        display: none;
    }

    .nav-menu-btn {
        display: flex;
    }

    .breadcrumb-bar {
        padding-top: calc(var(--nav-h) + 16px);
        font-size: 12px;
    }

    .page-wrap {
        padding: 16px 16px 60px;
    }

    .hero-body {
        padding: 0 18px 20px;
    }

    .hero-avatar-wrap {
        margin-top: -38px;
    }

    .hero-avatar-img,
    .hero-avatar-initials {
        width: 72px;
        height: 72px;
        font-size: 26px;
    }

    .hero-name {
        font-size: 20px;
    }

    .stats-row {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat-cell {
        padding: 16px 8px;
    }

    .stat-num {
        font-size: 20px;
    }

    .stat-label {
        font-size: 10px;
    }

    .listings-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .card-body {
        padding: 10px;
    }

    .card-title {
        font-size: 13px;
    }

    .card-price {
        font-size: 15px;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
}

@media (max-width: 400px) {
    .listings-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── UTILITY ─────────────────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}