/* assets/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #8b5cf6;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 4px 6px var(--shadow);
}

header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.5rem;
    opacity: 0.95;
}

.author-info {
    margin-top: 1.5rem;
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Navigation */
nav {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px var(--shadow);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Blog Section */
.blog-section {
    background: var(--bg);
    margin-bottom: 4rem;
}

.blog-content {
    max-width: 1100px;
    margin: 0 auto;
}

.section-tag {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    margin: 2rem 0 1rem;
    color: var(--text);
}

h3 {
    font-size: 2rem;
    margin: 1.5rem 0 1rem;
    color: var(--text);
}

p {
    margin-bottom: 1.2rem;
    color: var(--text);
    font-size: 1.1rem;
}

p ul {
    padding-left: 3rem;
}

.highlight-box {
    background: var(--bg-alt);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.formula-box {
    background: #f1f5f9;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    overflow-x: auto;
}

.formula-box p{
    font-size: 1.75rem;
    overflow-x: auto;
}

.reference-list {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.reference-list li {
    margin-bottom: 0.8rem;
    color: var(--text-light);
}

/* Interactive App Section */
.app-section {
    background: var(--bg-alt);
    padding: 4rem 2rem;
    border-top: 2px solid var(--border);
}

.app-container {
    max-width: 1000px;
    margin: 0 auto;
}

.app-header {
    text-align: center;
    margin-bottom: 3rem;
}

.app-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.interactive-panel {
    background: var(--bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px var(--shadow);
    margin-bottom: 2rem;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.control-group {
    display: flex;
    flex-direction: column;
}

.control-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
}

.slider-value {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

.control-group select {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    background: var(--bg);
    cursor: pointer;
}

.visualization-container {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    min-height: 400px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.viz-placeholder {
    text-align: center;
    color: var(--text-light);
}

.viz-placeholder svg {
    width: 100%;
    max-width: 600px;
    height: 350px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.metric-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.metric-label {
    font-size: 1.1rem;
    opacity: 0.9;
    color: white;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
}

.explanation-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    border-radius: 4px;
    margin-top: 2rem;
}

.explanation-box h4 {
    color: #92400e;
    margin-bottom: 0.5rem;
}

.explanation-box p {
    color: #78350f;
    margin-bottom: 0;
}

/* Footer */
footer {
    background: var(--text);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

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

    nav ul {
        gap: 1rem;
    }
}