:root {
    --bg: #ffffff;
    --bg-alt: #f8fbff;
    --surface: #ffffff;
    --text: #03045e;
    --text-muted: #4a5568;
    --border: #e2e8f0;
    --primary: #0077b6;
    --primary-dark: #03045e;
    --accent-soft: #caf0f8;
    --badge-bg: #e0f7fa;
}

[data-theme="dark"] {
    --bg: #000000;
    --bg-alt: #070b14;
    --surface: #0a0f1d;
    --text: #f0f9ff;
    --text-muted: #94a3b8;
    --border: #1e293b;
    --primary: #38bdf8;
    --primary-dark: #0284c7;
    --accent-soft: #0c4a6e;
    --badge-bg: #082f49;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

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

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

.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.brand-accent {
    color: var(--primary);
}

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

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

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

.theme-btn {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.2s;
}

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

.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* Hero */
.hero {
    padding: 88px 0 72px;
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--badge-bg);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.18;
    letter-spacing: -0.02em;
    max-width: 760px;
    margin: 0 auto 20px;
}

.hero h1 span {
    color: var(--primary);
}

.hero-desc {
    max-width: 600px;
    margin: 0 auto 32px;
    color: var(--text-muted);
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.2s;
}

.btn:active {
    transform: scale(0.98);
}

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

[data-theme="dark"] .btn-primary {
    color: #000000;
}

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

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

.section-alt {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header {
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 1.75rem;
    margin-bottom: 6px;
}

.section-header p {
    color: var(--text-muted);
}

/* Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 20px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tag {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
}

.status {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--text);
    font-weight: 600;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

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

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}

.tech {
    color: var(--text-muted);
}

.card-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Principles */
.principles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.principle-item {
    padding: 20px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.principle-num {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.principle-item h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.principle-item p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* Footer */
.footer {
    padding: 32px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

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

@media (max-width: 600px) {
    .nav-links a {
        display: none;
    }
    .hero {
        padding: 56px 0 48px;
    }
}
