/* muhan.dev - Generative Art meets Developer Terminal */
/* Infinity in Code */

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

:root {
    --void: #0e0e12;
    --deep: #1a1a22;
    --surface: #1e1e24;
    --text-primary: #d0d4d8;
    --text-light: #f6f6f2;
    --accent-green: #4ae68a;
    --accent-dim: #2a7a4a;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--void);
    color: var(--text-primary);
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
    line-height: 1.75;
    overflow-x: hidden;
}

/* ========== HERO - THE CANVAS ========== */

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10vh;
    overflow: hidden;
    background: var(--void);
}

.dot-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-image:
        radial-gradient(circle, var(--accent-green) 1.5px, transparent 1.5px);
    background-size: 30px 30px;
    opacity: 0.15;
    animation: dotPulse 4s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.2; }
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    opacity: 0;
    animation: fadeInSlow 2s ease 0.5s forwards;
}

@keyframes fadeInSlow {
    to { opacity: 1; }
}

.hero-title {
    font-family: 'Major Mono Display', monospace;
    font-weight: 400;
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-family: 'Karla', sans-serif;
    font-weight: 300;
    font-size: clamp(0.85rem, 1.8vw, 1.1rem);
    color: var(--accent-green);
    opacity: 0.6;
}

/* ========== DOC PANELS ========== */

.doc-panel {
    background: var(--text-light);
    color: var(--void);
    padding: 5rem 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.doc-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.panel-content {
    max-width: 640px;
    margin: 0 auto;
}

.panel-tag {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-dim);
    background: rgba(42, 122, 74, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
    display: inline-block;
    margin-bottom: 1rem;
}

.panel-heading {
    font-family: 'Major Mono Display', monospace;
    font-weight: 400;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--void);
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.panel-body {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    line-height: 1.8;
    color: var(--deep);
    margin-bottom: 1.5rem;
}

.panel-body em {
    font-style: italic;
    color: var(--accent-dim);
}

/* Code blocks */
.code-block {
    font-family: 'Fira Code', monospace;
    font-size: clamp(0.75rem, 1.3vw, 0.88rem);
    line-height: 1.7;
    background: var(--void);
    color: var(--text-primary);
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--accent-green);
}

.code-keyword { color: var(--accent-green); }
.code-literal { color: #ffcc2a; }
.code-func { color: #4ab8e6; }
.code-comment { color: #5a5a6a; font-style: italic; }

/* ========== GENERATIVE ART PANELS ========== */

.gen-art-panel {
    position: relative;
    width: 100%;
    height: 60vh;
    background: var(--void);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.art-label {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--accent-green);
    opacity: 0.3;
}

/* ========== FOOTER ========== */

.site-footer {
    padding: 4rem 2rem;
    background: var(--void);
    text-align: center;
    border-top: 1px solid rgba(74, 230, 138, 0.1);
}

.footer-domain {
    font-family: 'Major Mono Display', monospace;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: var(--accent-green);
    opacity: 0.4;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 600px) {
    .doc-panel {
        padding: 3rem 1.5rem;
    }

    .code-block {
        padding: 1rem;
        font-size: 0.72rem;
    }

    .gen-art-panel {
        height: 40vh;
    }
}
