/* cms.css — styles for components introduced by the CMS architecture
   (site search, timeline, product editions, case studies). Kept separate
   from style.css so the diff of what changed is easy to review; merge
   into style.css whenever convenient. */

/* Currently Building cards (homepage) */
.currently-building-card {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 1.5rem;
    color: #fff;
    transition: transform 0.15s ease, background 0.15s ease;
}
.currently-building-card:hover {
    background: rgba(255,255,255,0.16);
    transform: translateY(-3px);
}
.currently-building-card p { color: rgba(255,255,255,0.85); }

.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}
.availability-badge-footer {
    background: rgba(25, 135, 84, 0.15);
    color: #75d9a3;
}
.availability-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 0 rgba(46, 204, 113, 0.6);
    animation: availability-pulse 2s infinite;
}
@keyframes availability-pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.skip-link {
    position: absolute;
    top: -3rem;
    left: 1rem;
    background: #fff;
    color: #0d6efd;
    padding: 0.5rem 1rem;
    border-radius: 0 0 6px 6px;
    z-index: 2000;
}
.skip-link:focus {
    top: 0;
}

/* Site-wide search modal */
.site-search-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 1080;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8vh 1rem 1rem;
}
.site-search-panel {
    background: #fff;
    border-radius: 12px;
    max-width: 640px;
    width: 100%;
    padding: 1.25rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}
.site-search-results {
    overflow-y: auto;
}
.site-search-result {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
}
.site-search-result:hover {
    background: #f1f5f9;
}

/* Learning-in-progress badge variant */
.tech-badge-learning {
    background: #fff3cd;
    color: #7a5c00;
    border: 1px dashed #e2b93b;
}

/* Timeline (auto-generated /timeline page) */
.timeline {
    position: relative;
    padding-left: 2.25rem;
    border-left: 3px solid #e2e8f0;
}
.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}
.timeline-marker {
    position: absolute;
    left: -2.65rem;
    top: 0;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.timeline-content {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

/* Product edition cards */
.product-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    background: #eef2ff;
    color: #4338ca;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.edition-card {
    background: #fff;
}

/* Project image placeholder for entries without a screenshot yet */
.project-image-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

/* Case study markdown body */
.case-study-body h2 { margin-top: 2rem; }
.case-study-body pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}
.case-study-body code {
    background: #f1f5f9;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

/* Product screenshots */
.product-screenshot {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: top;
    border-bottom: 1px solid #e2e8f0;
}
.product-screenshot-large {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    object-position: top;
    border: 1px solid #e2e8f0;
}

/* Interactive hero network animation (homepage only) */
.hero-network-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}
/* Hero content and its background shapes must sit above the canvas */
.hero-section .container { z-index: 1; }
.hero-section .hero-shape-bottom { z-index: 1; }

/* Splash screen */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd, #0a4fc2);
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.splash-screen.splash-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.splash-content {
    text-align: center;
    color: #fff;
}
.splash-logo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: #fff;
    padding: 8px;
    animation: splash-pulse 1.4s ease-in-out infinite;
}
.splash-spinner {
    width: 28px;
    height: 28px;
    margin: 1.25rem auto 0.75rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: splash-spin 0.8s linear infinite;
}
.splash-tagline {
    font-weight: 600;
    letter-spacing: 0.03em;
    opacity: 0.9;
    margin: 0;
}
@keyframes splash-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
@keyframes splash-spin {
    to { transform: rotate(360deg); }
}
/* Respect reduced-motion: no pulsing/spinning, just a plain static mark */
@media (prefers-reduced-motion: reduce) {
    .splash-logo, .splash-spinner { animation: none; }
}
