/* Modern CSS Reset & Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #0f172a;
    --accent-color: #3b82f6;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --card-hover-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --code-bg: #1e293b;
    --code-text: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--secondary-color);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.25rem;
    letter-spacing: -0.01em;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 1rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--primary-color);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Hero Section */
.hero {
    padding: 8rem 0 4rem;
    text-align: center;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 40%),
        radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.1), transparent 40%);
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 1.5rem auto 2.5rem;
}

/* Main Content Styles */
section {
    padding: 5rem 0;
}

.section-bg {
    background-color: var(--bg-white);
}

/* Detailed Steps */
.steps-container {
    max-width: 800px;
    margin: 3rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step-detail {
    display: flex;
    gap: 2rem;
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.step-badge {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-weight: 700;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.2;
}

.step-content {
    flex-grow: 1;
}

.step-content h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.step-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.step-content li {
    margin-bottom: 0.5rem;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Graph Documentation */
.graph-layout {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 3rem;
}

.graph-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.graph-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.tag {
    font-size: 0.8rem;
    background: #dbeafe;
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 600;
}

.graph-content {
    padding: 2rem;
}

/* Code Blocks */
.code-block-wrapper {
    position: relative;
    margin-top: 1rem;
}

pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Footer */
footer {
    background: var(--secondary-color);
    color: white;
    padding: 4rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero {
        padding: 6rem 0 3rem;
    }

    .nav-links {
        display: none;
    }

    .step-detail {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }

    .step-badge {
        width: auto;
        height: auto;
        padding: 0.5rem;
        justify-content: flex-start;
        background: transparent;
        color: var(--primary-color);
        font-size: 1.2rem;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}