:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-color: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 24px -8px rgba(15, 23, 42, 0.18);
    --shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, 0.28);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-theme {
    --bg-color: #0b1120;
    --surface: #131c2e;
    --surface-2: #1b2740;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #29354f;
    --nav-bg: rgba(11, 17, 32, 0.85);
    --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

/* ── Navbar ─────────────────────────────────────────────── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.brand-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.nav-links {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--surface-2);
}

.nav-links .nav-cta {
    background: var(--primary-color);
    color: #fff;
}

.nav-links .nav-cta:hover {
    background: var(--primary-hover);
    color: #fff;
}

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

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--text-primary);
    border-color: var(--primary-color);
}

.icon-moon {
    display: none;
}

.dark-theme .icon-sun {
    display: none;
}

.dark-theme .icon-moon {
    display: block;
}

.nav-toggle {
    display: none;
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
    position: relative;
    padding: 96px 24px 72px;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 60% at 50% 0%, color-mix(in srgb, var(--primary-color) 18%, transparent), transparent 70%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto;
}

.hero-actions {
    margin-top: 32px;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-ghost {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-ghost:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ── Sections ───────────────────────────────────────────── */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 24px;
}

.section-head {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px;
}

.section-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.01em;
}

.section-head p {
    margin-top: 12px;
    color: var(--text-secondary);
}

/* ── Theme grid ─────────────────────────────────────────── */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.theme-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.theme-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--primary-color) 40%, var(--border-color));
}

.theme-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--surface-2);
    overflow: hidden;
    cursor: pointer;
}

.theme-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.theme-thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: color-mix(in srgb, var(--text-primary) 55%, transparent);
    color: #fff;
    font-weight: 600;
    opacity: 0;
    transition: var(--transition);
}

.theme-thumb:hover .theme-thumb-overlay {
    opacity: 1;
}

.theme-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.theme-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.theme-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex: 1;
}

.theme-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
}

.theme-actions .btn {
    flex: 1;
    padding: 10px 14px;
    font-size: 0.9rem;
}

.theme-card-skeleton {
    height: 320px;
    border-radius: var(--radius-lg);
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--border-color) 37%, var(--surface-2) 63%);
    background-size: 400% 100%;
    animation: skeleton 1.4s ease infinite;
}

@keyframes skeleton {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* ── About ──────────────────────────────────────────────── */
.about-section {
    border-top: 1px solid var(--border-color);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.about-copy h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 16px;
}

.about-copy p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.about-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.about-features li {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}

.about-feature-title {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}

.about-feature-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border-color);
    background: var(--surface);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.brand-sm {
    font-size: 1.05rem;
}

.brand-sm .brand-icon {
    width: 26px;
    height: 26px;
}

.footer-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-link {
    margin-left: auto;
    color: var(--text-secondary);
    font-weight: 500;
}

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

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 760px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px 16px 16px;
        background: var(--surface);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        padding: 12px 14px;
    }

    .nav-links .nav-cta {
        text-align: center;
    }

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