/* senggack.xyz — Thought Visualization Lab */
/* Palette: #08080F Thought Void, #12121E Synapse Dark, #A78BFA Neuron Purple,
   #6EC1E4 Synapse Cyan, #E8ECF1 Signal White, #6B7280 Dim Thought,
   #FFD93D Spark Gold, #1A1A2E Edge Dark */
/* Fonts: Sora 600/700, Inter 400/500, IBM Plex Mono 400 */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #08080F;
    color: #6B7280;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
}

/* ---- Section Headings ---- */
.section-heading {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #E8ECF1;
    text-align: center;
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
}

/* ---- Hero Zone ---- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.neural-field {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.neural-node {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #A78BFA;
    position: absolute;
    animation: pulse 3s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(167, 139, 250, 0.4);
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.35;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.4);
        box-shadow: 0 0 12px rgba(167, 139, 250, 0.7);
    }
}

.neural-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.neural-line {
    stroke: #6EC1E4;
    stroke-width: 0.25;
    stroke-dasharray: 4, 8;
    fill: none;
    animation: dash 4s linear infinite;
    opacity: 0.5;
}

@keyframes dash {
    to {
        stroke-dashoffset: -24;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.headline {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 6vw, 3rem);
    color: #E8ECF1;
    margin-bottom: 0.6rem;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.hero-sub {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    color: #6B7280;
    letter-spacing: 0.04em;
}

/* ---- Experiments Gallery ---- */
.experiments {
    max-width: 900px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.experiment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.experiment-card {
    background: #12121E;
    border: 1px dashed #1A1A2E;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.experiment-card:hover {
    border-color: #A78BFA;
    transform: translateY(-4px);
}

.experiment-card:hover .spark {
    color: #FFD93D;
    text-shadow: 0 0 8px rgba(255, 217, 61, 0.6);
}

.exp-preview {
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
}

.thought-burst {
    background: conic-gradient(from 0deg, #A78BFA, transparent, #A78BFA);
    animation: burst-rotate 12s linear infinite;
}

@keyframes burst-rotate {
    to {
        background: conic-gradient(from 360deg, #A78BFA, transparent, #A78BFA);
    }
}

.logic-chain {
    background: repeating-linear-gradient(
        90deg,
        #6EC1E4 0px,
        #6EC1E4 2px,
        transparent 2px,
        transparent 20px
    );
    animation: chain-shift 3s linear infinite;
}

@keyframes chain-shift {
    to {
        background-position: 20px 0;
    }
}

.assoc-cloud {
    background:
        radial-gradient(circle at 30% 40%, #A78BFA 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, #FFD93D 0%, transparent 35%),
        radial-gradient(circle at 50% 80%, #6EC1E4 0%, transparent 30%);
    background-color: #12121E;
}

.exp-info {
    padding: 0.75rem 1rem;
}

.exp-name {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: #E8ECF1;
    margin-bottom: 0.25rem;
}

.spark {
    color: #FFD93D;
    font-size: 0.55rem;
    vertical-align: middle;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.exp-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #6B7280;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.launch-btn {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: #A78BFA;
    text-decoration: none;
    padding: 0.3rem 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.launch-btn:hover {
    color: #E8ECF1;
    border-bottom-color: #A78BFA;
}

/* ---- Concept Map Editor ---- */
.editor {
    max-width: 650px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.editor-panel {
    background: #12121E;
    border: 1px solid #1A1A2E;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.editor-svg {
    width: 100%;
    max-height: 300px;
}

.curve-line {
    stroke: #6EC1E4;
    stroke-width: 1;
    fill: none;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

/* thought-map circles. inside each circle is a label at 0.7rem */
.thought-map-node,
.map-node {
    fill: rgba(167, 139, 250, 0.12);
    stroke: #A78BFA;
    stroke-width: 1;
    transition: fill 0.3s ease, stroke-width 0.3s ease;
    cursor: pointer;
}

.map-node:hover {
    fill: rgba(167, 139, 250, 0.3);
    stroke-width: 2;
}

.map-node.active {
    fill: rgba(255, 217, 61, 0.2);
    stroke: #FFD93D;
    stroke-width: 2;
}

.node-label {
    fill: #E8ECF1;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    text-anchor: middle;
    pointer-events: none;
}

.open-editor-btn {
    display: inline-block;
    margin-top: 1.5rem;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: #08080F;
    background: #A78BFA;
    padding: 0.65rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.open-editor-btn:hover {
    background: #b99dfc;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.35);
}

/* ---- Pattern Archive ---- */
.archive {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.archive-scroll {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.archive-scroll::-webkit-scrollbar {
    height: 4px;
}

.archive-scroll::-webkit-scrollbar-track {
    background: #12121E;
    border-radius: 2px;
}

.archive-scroll::-webkit-scrollbar-thumb {
    background: #1A1A2E;
    border-radius: 2px;
}

.archive-thumb {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px dashed #1A1A2E;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.archive-thumb:hover {
    border-color: #A78BFA;
    transform: scale(1.05);
}

.thumb-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.3rem;
    background: rgba(8, 8, 15, 0.8);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.55rem;
    color: #E8ECF1;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.archive-thumb:hover .thumb-label {
    opacity: 1;
}

.t1 {
    background: conic-gradient(from 45deg, #A78BFA, #6EC1E4, #A78BFA);
}

.t2 {
    background: radial-gradient(circle, #FFD93D, transparent);
    background-color: #12121E;
}

.t3 {
    background: repeating-linear-gradient(135deg, #A78BFA 0px, transparent 10px, transparent 20px);
    background-color: #12121E;
}

.t4 {
    background: conic-gradient(from 180deg, #6EC1E4, transparent, #6EC1E4);
}

.t5 {
    background:
        radial-gradient(circle at 20% 30%, #A78BFA 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, #FFD93D 0%, transparent 50%);
    background-color: #12121E;
}

.t6 {
    background: repeating-linear-gradient(0deg, #6EC1E4 0px, #6EC1E4 1px, transparent 1px, transparent 8px);
    background-color: #12121E;
}

.t7 {
    background:
        radial-gradient(circle at 25% 25%, #A78BFA 0%, transparent 30%),
        radial-gradient(circle at 75% 75%, #A78BFA 0%, transparent 30%),
        radial-gradient(circle at 50% 50%, #6EC1E4 0%, transparent 25%);
    background-color: #12121E;
}

.t8 {
    background: conic-gradient(from 0deg at 50% 50%, #A78BFA, #6EC1E4, #FFD93D, #A78BFA);
}

/* ---- Footer ---- */
.footer {
    max-width: 650px;
    margin: 0 auto;
    padding: 4rem 2rem 3rem;
    text-align: center;
    position: relative;
}

.footer-neural {
    position: relative;
    height: 40px;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.footer-node {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #A78BFA;
    position: absolute;
    animation: pulse 3s ease-in-out infinite;
}

.footer-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.footer-line {
    stroke-width: 0.2;
    opacity: 0.4;
}

.footer-tagline {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #E8ECF1;
    margin-bottom: 1.2rem;
}

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

.flink {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: #A78BFA;
    text-decoration: none;
    transition: color 0.3s ease;
}

.flink:hover {
    color: #E8ECF1;
}

.footer-copy {
    font-size: 0.7rem;
    color: #6B7280;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .experiment-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto;
    }

    .hero {
        min-height: 80vh;
    }

    .headline {
        font-size: 2rem;
    }

    .archive-thumb {
        width: 80px;
        height: 80px;
    }
}

/* ---- Fade-in Animation ---- */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Node Drag Indicator ---- */
.map-node.dragging {
    stroke: #FFD93D;
    stroke-width: 2;
    fill: rgba(255, 217, 61, 0.15);
}

/* ---- Experiment Card Active State ---- */
.experiment-card.active {
    border-color: #FFD93D;
    border-style: solid;
}

.experiment-card.active .spark {
    animation: spark-pulse 1s ease-in-out infinite;
}

@keyframes spark-pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 10px rgba(255, 217, 61, 0.8);
    }
}
