:root {
    --bg: #0d0d0f;
    --bg-alt: #141416;
    --bg-card: #1a1a1e;
    --text: #e8e8e8;
    --text-muted: #888;
    --accent: #00ffa3;
    --accent-hover: #00dd8a;
    --accent-dim: rgba(0, 255, 163, 0.1);
    --border: #2a2a2e;
    --radius: 6px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: "SF Mono", "Fira Code", "Fira Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(13, 13, 15, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.02em;
    font-family: var(--mono);
}

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

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

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

/* Hero */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 32px 80px;
    background: radial-gradient(ellipse at 50% 30%, rgba(0,255,163,0.05) 0%, transparent 70%);
}

.hero-content {
    text-align: center;
    max-width: 700px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 20px;
    letter-spacing: -0.03em;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--text), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin: 0 0 36px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn-primary {
    background: var(--accent);
    color: var(--bg);
    border: none;
    padding: 14px 36px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

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

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 14px 36px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

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

/* Sections */
.section {
    padding: 80px 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 8px;
    text-align: center;
    letter-spacing: -0.02em;
}

.section-sub {
    color: var(--text-muted);
    text-align: center;
    margin: 0 0 48px;
    font-size: 1.05rem;
}

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

.section-dark .section-inner {
    max-width: 1200px;
    margin: 0 auto;
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

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

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

.card-icon {
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 10px;
}

.card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Template cards */
.template-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
}

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

.template-badge {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.template-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 8px;
}

.template-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Angle cards */
.angle-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
}

.angle-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--accent);
}

.angle-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.angle-card em {
    color: var(--text);
    font-style: normal;
    font-weight: 600;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 16px;
}

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

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

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

.footer-copy {
    color: #555;
    font-size: 0.8rem;
}

/* Editor toolbar */
.editor-toolbar {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    gap: 8px;
}

.toolbar-btn {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 16px;
    font-size: 0.8rem;
    font-family: var(--mono);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

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

.toolbar-btn.primary {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

.toolbar-btn.primary:hover {
    background: var(--accent-hover);
}

/* Editor home link */
.editor-home {
    position: fixed;
    top: 12px;
    left: 60px;
    z-index: 1000;
    font-family: var(--mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
}

@media (max-width: 640px) {
    .grid-4 { grid-template-columns: 1fr; }
    .nav { padding: 12px 16px; }
    .section { padding: 48px 16px; }
    .hero { padding: 100px 16px 60px; }
}
