/* miris.dev — Cyberpunk Data-Viz Dashboard */

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

:root {
    --bg: #0A0E1A;
    --cyan: #00D4FF;
    --amber: #FFB347;
    --silver: #B8C4D0;
    --panel: #141B2D;
    --rose: #FF6B9D;
    --slate: #2A3550;
    --grid-color: #1E90FF;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    font-family: 'Inter', sans-serif;
    color: var(--silver);
    overflow-x: hidden;
}

/* Dot grid background */
#dot-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
    background-image: radial-gradient(circle, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
}

#dot-grid.visible {
    opacity: 0.02;
}

/* Particle canvas */
#particle-canvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* Navigation monogram */
#nav-monogram {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 50;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 2px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#nav-monogram:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.25);
}

.monogram-letter {
    font-family: 'Share Tech Mono', monospace;
    font-size: 18px;
    color: var(--cyan);
}

/* Activity Sidebar */
#activity-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 15%;
    min-width: 200px;
    height: 100%;
    background: rgba(20, 27, 45, 0.9);
    border-left: 1px solid rgba(0, 212, 255, 0.15);
    z-index: 20;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s ease-out;
}

#activity-sidebar.visible {
    transform: translateX(0);
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.sidebar-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: var(--cyan);
    letter-spacing: 0.08em;
}

.activity-log {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    scroll-snap-type: y mandatory;
}

.activity-log::-webkit-scrollbar {
    width: 2px;
}

.activity-log::-webkit-scrollbar-thumb {
    background: var(--slate);
}

.log-entry {
    padding: 8px 16px;
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    line-height: 1.5;
    border-bottom: 1px solid rgba(42, 53, 80, 0.5);
    scroll-snap-align: start;
    transition: background 0.15s ease;
    cursor: default;
}

.log-entry:hover {
    background: rgba(0, 212, 255, 0.05);
}

.log-time {
    color: var(--slate);
}

.log-text {
    color: var(--amber);
    opacity: 0.7;
}

.sidebar-keys {
    padding: 12px 16px;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.key-hint {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: var(--slate);
}

kbd {
    display: inline-block;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 2px;
    padding: 1px 6px;
    font-family: 'Fira Code', monospace;
    font-size: 10px;
    color: var(--cyan);
    margin-right: 6px;
}

/* Main Content */
#main-content {
    width: 70%;
    margin-left: 15%;
    position: relative;
    z-index: 5;
    padding-right: 15%;
}

/* Hero */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.console-window {
    position: relative;
    width: 100%;
    max-width: 700px;
}

.console-border {
    position: absolute;
    inset: 0;
}

.console-border-svg {
    width: 100%;
    height: 100%;
}

.console-rect {
    stroke-dasharray: 2200;
    stroke-dashoffset: 2200;
    transition: stroke-dashoffset 1.2s ease;
}

.console-rect.drawn {
    stroke-dashoffset: 0;
}

.console-content {
    padding: 48px;
    text-align: center;
}

.ascii-logo {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    line-height: 1.2;
    color: var(--cyan);
    white-space: pre;
    margin-bottom: 24px;
    min-height: 120px;
}

.console-tagline {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    letter-spacing: 0.08em;
    color: var(--silver);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.console-tagline.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Waveform Divider */
.waveform-divider {
    padding: 40px 0;
    overflow: hidden;
}

.waveform-divider svg {
    width: 100%;
    height: 40px;
}

.waveform-path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 1s ease-in-out;
}

.waveform-divider.reveal .waveform-path {
    stroke-dashoffset: 0;
}

/* Content Sections */
.content-section {
    display: flex;
    gap: 40px;
    padding: 60px 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.content-section.reveal {
    opacity: 1;
}

.split-left {
    flex: 6;
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.content-section.reveal .split-left {
    opacity: 1;
    transform: translateX(0);
}

.split-right {
    flex: 4;
    opacity: 0;
    transition: opacity 0.5s ease 0.2s;
}

.content-section.reveal .split-right {
    opacity: 1;
}

.section-header {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    font-size: 28px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 32px;
}

.body-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.7;
    color: var(--silver);
    margin-bottom: 20px;
}

/* Project Cards */
.project-card {
    position: relative;
    background: var(--panel);
    padding: 24px;
    margin-bottom: 20px;
    border-radius: 2px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    cursor: default;
}

.project-card:hover {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
    transform: translateY(-2px);
}

.card-circuit {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.card-circuit svg {
    width: 100%;
    height: 100%;
}

.project-card:hover .card-circuit svg path {
    opacity: 1;
}

.project-name {
    font-family: 'Share Tech Mono', monospace;
    font-size: 20px;
    color: var(--cyan);
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}

.project-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 14px;
    line-height: 1.6;
    color: var(--silver);
    margin-bottom: 12px;
}

.project-stats {
    display: flex;
    gap: 16px;
}

.stat {
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: var(--slate);
}

.stat-label {
    color: var(--amber);
    opacity: 0.6;
}

.status-active {
    color: var(--cyan);
}

.status-dev {
    color: var(--amber);
}

/* Code Visualization */
.code-viz {
    background: var(--panel);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.code-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(0, 212, 255, 0.05);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.code-filename {
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: var(--silver);
    opacity: 0.7;
}

.code-lang {
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: var(--amber);
    opacity: 0.5;
}

.code-block {
    padding: 16px;
    margin: 0;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--silver);
}

.code-block code {
    font-family: inherit;
}

.kw { color: var(--rose); }
.type { color: var(--cyan); }
.fn { color: var(--amber); }
.str { color: #98C379; }

/* Tech Tags */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.tech-tag {
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    padding: 4px 12px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 2px;
    color: var(--cyan);
    transition: background 0.2s ease;
}

.tech-tag:hover {
    background: rgba(0, 212, 255, 0.15);
}

/* Responsive */
@media (max-width: 900px) {
    #activity-sidebar {
        display: none;
    }

    #main-content {
        width: 100%;
        margin-left: 0;
        padding: 0 24px;
        padding-right: 24px;
    }

    .content-section {
        flex-direction: column;
    }
}
