/* === Reset & Base === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0f1117;
    --bg-card: #1a1d27;
    --bg-card-hover: #222632;
    --text: #e4e4e7;
    --text-muted: #9ca3af;
    --accent: #6d28d9;
    --accent-light: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.15);
    --green: #34d399;
    --blue: #60a5fa;
    --orange: #fb923c;
    --border: #2a2d3a;
    --radius: 12px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--green);
}

/* === Header === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.logo:hover {
    color: var(--text);
}

.logo-sharp {
    color: var(--accent-light);
    margin-right: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* === Hero === */
.hero {
    padding: 140px 0 80px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-tag {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-light);
    margin-bottom: 16px;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.highlight {
    color: var(--accent-light);
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-light);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent-light);
    color: var(--accent-light);
}

/* Hero Code Block */
.hero-code {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    overflow-x: auto;
}

.hero-code pre {
    margin: 0;
}

.hero-code code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text);
}

.hero-code .kw { color: var(--accent-light); }
.hero-code .type { color: var(--green); }
.hero-code .str { color: var(--orange); }
.hero-code .method { color: var(--blue); }

/* === Sections === */
.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 48px;
}

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

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
    border-color: var(--accent-light);
    transform: translateY(-2px);
}

.card-icon {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--accent-light);
    margin-bottom: 16px;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.card-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--green);
    background: rgba(52, 211, 153, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.card-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-light);
    background: var(--accent-glow);
    padding: 4px 12px;
    border-radius: 20px;
}

/* === How-To's === */
.howtos {
    background: linear-gradient(180deg, transparent, rgba(109, 40, 217, 0.03), transparent);
}

/* === About === */
.about-content {
    max-width: 640px;
}

.about-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 16px;
}

/* === Contact === */
.contact {
    text-align: center;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-weight: 500;
    transition: all 0.2s;
}

.contact-link:hover {
    border-color: var(--accent-light);
    color: var(--accent-light);
}

.contact-link svg {
    flex-shrink: 0;
}

/* === Footer === */
.footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* === Mobile === */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(15, 17, 23, 0.95);
        backdrop-filter: blur(12px);
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        text-align: center;
        justify-content: center;
    }

    .section {
        padding: 60px 0;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}
