:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-mono: 'Fira Code', 'Courier New', monospace;

    /* Theme Matrix Parameters (Dark Mode Base Default) */
    --bg-main: #0b0f19;
    --bg-surface: rgba(20, 26, 42, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-muted: #9ca3af;
    --color-primary: #39ff14; /* Cyber Neon Green */
    --color-secondary: #00a8ff; /* Clean Blue Theme Accent */
    --terminal-output: #39ff14;
}

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-surface: rgba(255, 255, 255, 0.75);
    --border-color: rgba(15, 23, 42, 0.08);
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --color-primary: #059669; /* Balanced Forest Emerald */
    --color-secondary: #0284c7;
    --terminal-output: #0f172a;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background Node Element Mapping Canvas */
#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

/* Glassmorphic Panel Layout Architecture */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

/* Navigation Framework */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    z-index: 100;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.3rem;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Main Screen Core Structures */
.main-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 2rem 4rem 2rem;
}

.section {
    padding: 3.5rem 0;
}

.border-top-glow {
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.hero-desc {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--color-primary);
    color: #0b0f19 !important;
}

.btn-secondary {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    background: transparent;
}

/* Avatar Layout Engine */
.profile-card {
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.avatar-holder {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0,0,0,0.2);
    display: flex;
}

.profile-avatar-img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Premium Command Center Component Matrix */
.terminal-container {
    margin-top: 2rem;
    font-family: var(--font-mono);
    padding: 1.5rem;
    border: 1px solid rgba(57, 255, 20, 0.2);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.terminal-dots {
    display: flex;
    gap: 0.4rem;
}

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

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.terminal-body {
    min-height: 120px;
    max-height: 250px;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--terminal-output);
    margin-bottom: 1rem;
}

.terminal-highlight {
    color: var(--color-secondary);
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 6px;
}

.terminal-prompt {
    color: var(--color-secondary);
    font-weight: bold;
}

#terminalInput {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    flex-grow: 1;
}

.terminal-quick-actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.quick-label { color: var(--text-muted); }

.quick-cmd-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-mono);
}

.quick-cmd-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Markdown Dynamic Output Container Standard Formatting */
.section-heading {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

.markdown-body {
    line-height: 1.7;
    font-size: 1rem;
}
.markdown-body p { margin-bottom: 1rem; color: var(--text-muted); }
.markdown-body a { color: var(--color-secondary); text-decoration: none; }
.markdown-body a:hover { text-decoration: underline; }

/* Responsive Grid Adaptation Breakpoints */
.mobile-only { display: none; }

@media (max-width: 768px) {
    .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
    .nav-links { display: none; }
    .mobile-only { display: inline-flex; }
    .hero-title { font-size: 2.2rem; }
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: var(--bg-main);
    z-index: 200;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}
.mobile-links { display: flex; flex-direction: column; gap: 1.5rem; text-align: center;}
.mobile-link { font-size: 1.5rem; font-family: var(--font-heading); text-decoration: none; color: var(--text-primary); }
#mobile-close-btn { position: absolute; top: 20px; right: 20px; }

.footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}
.footer-copy { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.5rem;}
.footer-sub a { color: var(--color-secondary); text-decoration: none; font-size: 0.85rem;}
