:root {
    --bg-color: #050508;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    /* Thematic Accents */
    --accent-heat-start: #ff512f;
    --accent-heat-end: #f09819;
    --accent-fluid-start: #00c9ff;
    --accent-fluid-end: #92fe9d;
    --accent-mech-start: #8a2387;
    --accent-mech-end: #e94057;

    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(12px);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(138, 35, 135, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 201, 255, 0.08), transparent 25%);
    background-attachment: fixed;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

/* Typography Utilities */
.text-gradient-heat {
    background: linear-gradient(to right, var(--accent-heat-start), var(--accent-heat-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-gradient-fluid {
    background: linear-gradient(to right, var(--accent-fluid-start), var(--accent-fluid-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-gradient-mech {
    background: linear-gradient(to right, var(--accent-mech-start), var(--accent-mech-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Header & Hero */
header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding-top: 4rem;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    z-index: 2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 3rem;
    z-index: 2;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--text-muted);
    font-size: 1.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-20px) translateX(-50%); }
    60% { transform: translateY(-10px) translateX(-50%); }
}

/* Sections */
section {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 4rem;
    font-size: 1.1rem;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Process Grid */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.process-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.process-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Interactive Visualizers */
.visualizer-container {
    width: 100%;
    height: 300px;
    border-radius: 16px;
    background: #0f111a;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    margin-bottom: 1.5rem;
}

.visualizer-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.control-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.control-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

input[type="range"] {
    -webkit-appearance: none;
    width: 60%;
    background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--text-main);
    cursor: pointer;
    margin-top: -6px;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--glass-border);
    border-radius: 2px;
}

/* Math Container */
.math-block {
    background: rgba(0,0,0,0.3);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5rem 0;
    text-align: center;
    font-size: 1.1rem;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Couplings Section */
.couplings-diagram {
    position: relative;
    height: 500px;
    margin: 4rem auto;
    max-width: 800px;
}

.coupling-node {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 2px solid;
    z-index: 2;
    transition: all 0.3s ease;
    cursor: pointer;
}

.coupling-node:hover {
    transform: scale(1.1);
}

#node-t { top: 0; left: 50%; transform: translate(-50%, 0); border-color: var(--accent-heat-start); box-shadow: 0 0 30px rgba(255, 81, 47, 0.2); }
#node-h { bottom: 0; left: 10%; border-color: var(--accent-fluid-start); box-shadow: 0 0 30px rgba(0, 201, 255, 0.2); }
#node-m { bottom: 0; right: 10%; border-color: var(--accent-mech-start); box-shadow: 0 0 30px rgba(138, 35, 135, 0.2); }

#node-t:hover { transform: translate(-50%, 0) scale(1.1); }

.coupling-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.coupling-path {
    fill: none;
    stroke: var(--glass-border);
    stroke-width: 3;
    stroke-dasharray: 8 8;
    animation: flow 20s linear infinite;
    pointer-events: auto;
    cursor: pointer;
    transition: stroke 0.3s ease, stroke-width 0.3s ease;
}

.coupling-path:hover {
    stroke: rgba(255,255,255,0.4);
    stroke-width: 5;
}

@keyframes flow {
    to { stroke-dashoffset: -100; }
}

.coupling-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.coupling-info.active {
    opacity: 1;
    z-index: 3;
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 3rem; }
    .couplings-diagram { height: 400px; }
    .coupling-node { width: 90px; height: 90px; font-size: 1rem; }
    #node-h { left: 0; }
    #node-m { right: 0; }
    .coupling-info { width: 250px; }
}
