/* ===========================================
   simulai.dev - Glassmorphism + Ma-Negative-Space
   =========================================== */

/* --- CSS Custom Properties --- */
:root {
    --hot-pink: #ff6b8a;
    --electric-violet: #a855f7;
    --sky-cyan: #38bdf8;
    --mint-pop: #34d399;
    --white: #ffffff;
    --glass-white: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.25);
    --text-white: #f0f0f8;
    --deep-plum: #1a0a2e;
    --bg-hue-rotate: 0deg;
    --font-headline: 'Sora', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-accent: 'Fraunces', serif;
    --font-code: 'Fira Code', monospace;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.75;
    color: var(--text-white);
    background: #1a0a2e;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Gradient Background --- */
#gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background: linear-gradient(
        135deg,
        var(--hot-pink),
        var(--electric-violet),
        var(--sky-cyan)
    );
    filter: hue-rotate(var(--bg-hue-rotate));
    transition: filter 0.1s linear;
    opacity: 0;
    animation: gradientFadeIn 600ms ease-out forwards;
}

@keyframes gradientFadeIn {
    from { opacity: 0; filter: saturate(0.2) hue-rotate(var(--bg-hue-rotate)); }
    to { opacity: 1; filter: saturate(1) hue-rotate(var(--bg-hue-rotate)); }
}

/* --- Background Pattern Canvas --- */
#bg-patterns {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    opacity: 0.07;
}

/* --- Breadcrumb Line --- */
#breadcrumb-line {
    position: fixed;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.15);
    z-index: 1;
    pointer-events: none;
    transform: translateX(-50%);
}

/* --- Breadcrumb Dots --- */
#breadcrumb-dots {
    position: fixed;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.breadcrumb-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.breadcrumb-dot:hover,
.breadcrumb-dot.active {
    transform: scale(1.5);
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

/* --- Section Spacing (Ma-Negative-Space) --- */
.section-viewport {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem 2rem;
}

.section-spaced {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6vh;
    padding: 12vh 2rem;
    position: relative;
}

/* --- Glass Panel Base --- */
.glass-panel {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* --- Glass Panel Variants --- */
.glass-panel--hero {
    max-width: 680px;
    width: 90%;
    text-align: center;
    padding: 4rem 3rem;
    transform: scale(0.8);
    opacity: 0;
}

.glass-panel--hero.visible {
    transform: scale(1);
    opacity: 1;
    transition: opacity 0.8s ease 0.6s, transform 0.8s ease 0.6s;
}

.glass-panel--wide {
    max-width: 800px;
    width: 90%;
}

.glass-panel--left {
    max-width: 640px;
    width: 85%;
    align-self: flex-start;
    margin-left: 8%;
}

.glass-panel--right {
    max-width: 640px;
    width: 85%;
    align-self: flex-end;
    margin-right: 8%;
}

.glass-panel--center {
    max-width: 720px;
    width: 90%;
    text-align: center;
}

.glass-panel--code {
    max-width: 800px;
    width: 90%;
}

.glass-panel--footer {
    max-width: 700px;
    width: 90%;
    text-align: center;
}

.glass-panel--inner {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(26, 10, 46, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

/* --- Typography --- */
#hero-title {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: clamp(42px, 7vw, 80px);
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-white);
    margin-bottom: 1rem;
}

#title-dev {
    color: var(--mint-pop);
}

.hero-subtitle {
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: clamp(16px, 2vw, 22px);
    color: rgba(240, 240, 248, 0.7);
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-subtitle.visible {
    opacity: 1;
}

.section-heading {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: clamp(26px, 4vw, 48px);
    letter-spacing: -0.015em;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    color: var(--text-white);
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.75;
    color: rgba(240, 240, 248, 0.85);
    max-width: 640px;
}

.pull-quote {
    font-family: var(--font-accent);
    font-weight: 600;
    font-style: italic;
    font-size: clamp(18px, 2.5vw, 28px);
    line-height: 1.6;
    color: var(--text-white);
    margin-top: 1.5rem;
    padding-left: 1.5rem;
    border-left: 3px solid var(--mint-pop);
}

/* --- Code Blocks --- */
.code-block {
    font-family: var(--font-code);
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-white);
}

.code-block pre {
    white-space: pre;
    overflow-x: auto;
}

.code-block code {
    font-family: var(--font-code);
    color: var(--text-white);
}

.typewriter-code {
    min-height: 1.5em;
}

/* --- Typing Cursor --- */
.typing-cursor {
    display: inline;
    font-family: var(--font-code);
    font-weight: 400;
    color: var(--mint-pop);
    animation: cursorBlink 500ms steps(1) infinite;
    position: absolute;
    opacity: 0;
}

.typing-cursor.active {
    opacity: 1;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typing-cursor.active {
    animation: cursorBlink 500ms steps(1) infinite;
}

.typing-cursor.done {
    opacity: 0;
    animation: none;
}

/* --- Community Links --- */
.community-links {
    display: flex;
    gap: 1.25rem;
    margin-top: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.glass-link {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--text-white);
    text-decoration: none;
    font-family: var(--font-headline);
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-link:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* --- Footer --- */
.footer-brand {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: clamp(28px, 4vw, 44px);
    margin-bottom: 0.5rem;
}

.footer-logo {
    color: var(--text-white);
}

.footer-dev {
    color: var(--mint-pop);
}

.footer-tagline {
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 600;
    font-size: clamp(16px, 2vw, 22px);
    color: rgba(240, 240, 248, 0.7);
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(240, 240, 248, 0.6);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-white);
}

.footer-copy {
    color: rgba(240, 240, 248, 0.35);
    font-size: 0.8rem;
}

/* --- Particle Canvas --- */
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .glass-panel--left,
    .glass-panel--right {
        align-self: center;
        margin-left: auto;
        margin-right: auto;
        width: 92%;
    }

    #breadcrumb-dots {
        right: 16px;
        gap: 18px;
    }

    .breadcrumb-dot {
        width: 8px;
        height: 8px;
    }

    .community-links {
        flex-direction: column;
        align-items: center;
    }

    .glass-panel {
        padding: 2rem 1.5rem;
    }

    .glass-panel--hero {
        padding: 3rem 2rem;
    }

    .section-spaced {
        padding: 8vh 1.25rem;
        gap: 4vh;
    }

    #breadcrumb-line {
        display: none;
    }
}

@media (max-width: 480px) {
    .footer-links {
        gap: 1.25rem;
    }

    .glass-link {
        padding: 0.6rem 1.25rem;
        font-size: 0.85rem;
    }
}
