/* styles.css - Custom Dark Mode Premium Design System for nicklaskin.ca */

/* Variables & Design System */
:root {
    --bg-darker: #08090f;
    --bg-dark: #0d0e16;
    --bg-card: rgba(18, 19, 32, 0.45);
    --border-color: rgba(255, 255, 255, 0.06);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    /* Harmonious Slate & Emerald Accents */
    --accent-emerald: #10b981;
    --accent-blue: #3b82f6;
    --accent-violet: #a855f7;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    
    --glow-color: rgba(16, 185, 129, 0.1);
    --transition-speed: 0.25s;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    letter-spacing: -0.1px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--accent-emerald);
}

/* Utilities */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 30px;
}

.section {
    padding: 120px 0;
}

.bg-dark {
    background-color: var(--bg-dark);
}

.bg-darker {
    background-color: var(--bg-darker);
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -1px;
}

.section-intro {
    font-size: 1.15rem;
    text-align: center;
    color: var(--text-secondary);
    max-width: 760px;
    margin: 0 auto 70px auto;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-emerald), var(--accent-blue) 40%, var(--accent-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-emerald), var(--accent-blue));
    color: #fff;
    border: none;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.35);
    color: #fff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* Glass Header */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(8, 9, 15, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 16px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.logo-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    padding: 6px 0;
}

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

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, var(--accent-emerald), var(--accent-blue));
    border-radius: 2px;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 0 80px 0;
    overflow: hidden;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    filter: blur(4px);
    z-index: 1;
}

.hero-bg-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 20%, var(--bg-darker) 85%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    text-align: left;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-emerald);
    margin-bottom: 24px;
}

.badge-icon {
    width: 14px;
    height: 14px;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 800;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 580px;
}

.hero-math-badge {
    font-family: 'Fira Code', monospace;
    font-size: 1.1rem;
    margin-bottom: 32px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.015);
    border-left: 3px solid var(--accent-emerald);
    border-radius: 0 8px 8px 0;
    display: inline-block;
    color: var(--text-primary);
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-visualizer-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.visualizer-header {
    height: 40px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.window-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.window-dot.red { background-color: var(--accent-rose); }
.window-dot.yellow { background-color: var(--accent-amber); }
.window-dot.green { background-color: var(--accent-emerald); }

.window-title {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: auto;
}

.hero-3d-plot {
    flex-grow: 1;
    width: 100%;
    height: 100%;
}

/* Staggered Timeline */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 60px auto 0 auto;
    padding: 40px 0;
}

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: var(--border-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    margin-bottom: 50px;
}

.timeline-item.stagger-left {
    left: 0;
    padding-right: 45px;
}

.timeline-item.stagger-right {
    left: 50%;
    padding-left: 45px;
}

.timeline-dot {
    position: absolute;
    top: 30px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--text-secondary);
    border: 2px solid var(--bg-dark);
    z-index: 5;
}

.timeline-dot-glowing {
    position: absolute;
    top: 26px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--accent-emerald);
    box-shadow: 0 0 15px var(--accent-emerald);
    z-index: 5;
}

.timeline-item.stagger-left .timeline-dot,
.timeline-item.stagger-left .timeline-dot-glowing {
    right: -6px;
}

.timeline-item.stagger-right .timeline-dot,
.timeline-item.stagger-right .timeline-dot-glowing {
    left: -6px;
}

.timeline-item.stagger-left .timeline-dot-glowing {
    right: -10px;
}

.timeline-item.stagger-right .timeline-dot-glowing {
    left: -10px;
}

.timeline-card {
    padding: 30px;
    border: 1px solid var(--border-color);
    position: relative;
}

.timeline-year {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent-emerald);
    display: inline-block;
    margin-bottom: 8px;
    background: rgba(16, 185, 129, 0.08);
    padding: 2px 10px;
    border-radius: 4px;
}

.timeline-card h3 {
    font-size: 1.35rem;
    margin-bottom: 6px;
    line-height: 1.3;
}

.timeline-role {
    font-size: 0.85rem;
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 14px;
}

.timeline-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.highlight-card {
    background: rgba(16, 185, 129, 0.03);
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.06);
}

/* Research Section Layout */
.research-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.research-card {
    padding: 35px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: transform 0.3s, border-color 0.3s;
}

.research-card:hover {
    transform: translateY(-4px);
    border-color: rgba(16, 185, 129, 0.3);
}

.card-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.card-svg {
    width: 24px;
    height: 24px;
}

.research-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

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

.card-math {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--accent-emerald);
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* Code Editor Window */
.editor-container {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    background: #0b0c14;
}

.editor-header {
    height: 45px;
    background: #11121d;
    border-bottom: 1px solid var(--border-color);
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-tabs {
    display: flex;
    gap: 4px;
    margin-left: 16px;
    height: 100%;
    align-items: flex-end;
}

.editor-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: all var(--transition-speed);
}

.editor-tab:hover {
    color: var(--text-primary);
}

.editor-tab.active {
    background: #0b0c14;
    color: var(--accent-emerald);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
}

.editor-body {
    padding: 24px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
}

.code-block {
    display: none;
}

.code-block.active {
    display: block;
}

/* Syntax Highlighting */
.code-keyword { color: var(--accent-rose); font-weight: 500; }
.code-func { color: var(--accent-emerald); }
.code-comment { color: #64748b; font-style: italic; }
.code-number { color: var(--accent-amber); }

/* Interactive Labs Selector */
.labs-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 50px;
}

.tab-btn {
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--accent-emerald);
    box-shadow: 0 4px 20px var(--glow-color);
}

.tab-content {
    display: none;
    padding: 50px;
    border-radius: 20px;
}

.tab-content.active {
    display: block;
}

.lab-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 50px;
}

.lab-controls {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.lab-controls h3 {
    font-size: 1.6rem;
}

.lab-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

.control-group label {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
}

.control-group input[type="range"] {
    width: 100%;
    accent-color: var(--accent-emerald);
    background: #1e293b;
    height: 5px;
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--accent-emerald);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.inverse-design-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    padding: 22px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.inverse-design-card h4 {
    font-size: 1rem;
    color: var(--accent-emerald);
}

.inverse-design-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group input {
    width: 75px;
    padding: 10px;
    background: #090a0f;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #fff;
    outline: none;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
}

.input-group span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.result-box {
    margin-top: 8px;
    padding: 12px;
    background: rgba(16, 185, 129, 0.03);
    border: 1px dashed rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: 'Fira Code', monospace;
    line-height: 1.5;
}

.lab-visualization {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.plotly-chart {
    width: 100%;
    height: 420px;
    border-radius: 12px;
    overflow: hidden;
}

.plotly-chart-mini {
    width: 100%;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
}

/* Book Monograph Cards */
.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: transform 0.3s, border-color 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.3);
}

.card-banner {
    width: 100%;
    height: 170px;
    object-fit: cover;
    opacity: 0.45;
}

.card-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tag-book {
    align-self: flex-start;
    padding: 4px 10px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--accent-emerald);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.tag-book-upcoming {
    align-self: flex-start;
    padding: 4px 10px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--accent-amber);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.book-publisher {
    font-size: 0.85rem;
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 12px;
}

/* Proposal Section Container */
.proposal-container {
    margin-top: 70px;
    padding: 50px;
    border-radius: 20px;
}

.proposal-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.proposal-logo {
    width: 42px;
    height: 42px;
}

.proposal-sub {
    font-size: 0.9rem;
    color: var(--accent-emerald);
    font-weight: 600;
    text-transform: uppercase;
}

.proposal-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: start;
}

.proposal-text h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.proposal-text p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.roadmap-benefits {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.benefit {
    display: flex;
    flex-direction: column;
    padding-left: 18px;
    border-left: 3px solid var(--accent-blue);
}

.benefit strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.benefit span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.proposal-charts {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Footer Styling */
.footer {
    background-color: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 80px 0 30px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-logo {
    width: 40px;
    height: 40px;
}

.footer-contact h5 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-contact p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 8px;
}

.footer-legal {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* Theory Focus Section */
.theory-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.theory-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.theory-badge {
    align-self: flex-start;
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-transform: uppercase;
}

.theory-lead {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.5;
}

.theory-text p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.theory-visual {
    padding: 30px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.visual-header {
    margin-bottom: 24px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-comparison {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.model-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    transition: border-color var(--transition-speed);
}

.model-box:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.model-box h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.model-math {
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.04);
    border-radius: 6px;
    padding: 10px;
    margin: 10px 0;
    text-align: center;
}

.model-box p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.model-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-emerald);
}

.arrow-icon {
    width: 28px;
    height: 28px;
    transform: rotate(90deg); /* point down in column view */
}

/* Grid of Cards (2 Columns) */
.grid-cards-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Responsive Adjustments */
@media(max-width: 1024px) {
    .hero-grid, .theory-grid, .grid-cards-2, .lab-grid, .proposal-grid {
        grid-template-columns: 1fr;
    }
    .hero-visualizer-container {
        max-width: 600px;
        margin: 0 auto;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .timeline-line {
        left: 20px;
    }
    .timeline-item {
        width: 100%;
    }
    .timeline-item.stagger-left,
    .timeline-item.stagger-right {
        padding-left: 50px;
        padding-right: 0;
        left: 0;
    }
    .timeline-item.stagger-left .timeline-dot,
    .timeline-item.stagger-left .timeline-dot-glowing,
    .timeline-item.stagger-right .timeline-dot,
    .timeline-item.stagger-right .timeline-dot-glowing {
        left: 14px;
    }
    .timeline-item.stagger-left .timeline-dot-glowing,
    .timeline-item.stagger-right .timeline-dot-glowing {
        left: 10px;
    }
    .hero-title {
        font-size: 3rem;
    }
}
