/* ════════════════════════════════════════════════
   Gaussian Splatting — page styles
   anilbas.github.io/gaussian-splatting/
   ════════════════════════════════════════════════ */

/* ── Design tokens ── */
:root {
    --primary:   #16475E;
    --secondary: #5E2D16;
    --link:      #1e30f3;
    --font:      "Helvetica Neue", "Arimo", sans-serif;
}

* { box-sizing: border-box; }
body { font-family: var(--font); color: #212529; margin: 0; }

.text-primary { color: var(--primary) !important; }

.grad-text {
    background: -webkit-linear-gradient(315deg, #333 0%, #0081fb 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.grad-bg { background: linear-gradient(135deg, #333 0%, #0081fb 100%); }


/* ── Navbar ── */
#nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,.08);
    padding: .5rem 0;
}

.back-link {
    display: inline-flex; align-items: center; gap: .5rem;
    color: var(--primary); font-weight: 700;
    font-size: .92rem; text-decoration: none;
    border: 1.5px solid rgba(22,71,94,.22);
    border-radius: .5rem;
    padding: .3rem .85rem .3rem .65rem;
    transition: background .15s, box-shadow .15s;
}
.back-link:hover {
    color: var(--primary);
    background: rgba(22,71,94,.06);
    box-shadow: 0 2px 8px rgba(22,71,94,.1);
}
.back-link i         { font-size: 1rem; }
.back-link .back-sep { color: #ced4da; font-weight: 300; }
.back-link .back-sub { font-size: .78rem; font-weight: 400; color: #6c757d; }


/* ── Hero ── */
.gs-hero {
    background:
        radial-gradient(ellipse at 70% 35%, rgba(79,142,247,.14) 0%, transparent 60%),
        radial-gradient(ellipse at 10% 85%, rgba(167,139,250,.10) 0%, transparent 55%),
        linear-gradient(150deg, #0b1e2b 0%, #0e2637 55%, #0f1d2e 100%);
    color: #fff;
    min-height: calc(100dvh - 46px);
    display: flex; align-items: center;
    padding: 2.5rem 0;
    position: relative; overflow: hidden;
}
.gs-hero > .container { width: 100%; }

.gs-hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.032) 1px, transparent 0);
    background-size: 30px 30px;
    pointer-events: none;
}

.gs-hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800; line-height: 1.06; letter-spacing: -.02em;
}

.hero-title-grad {
    background: linear-gradient(90deg, #4f8ef7, #a78bfa);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-label {
    display: inline-block; font-size: .6rem; letter-spacing: .14em;
    text-transform: uppercase; color: #aac8ff;
    border: 1px solid rgba(79,142,247,.35); background: rgba(79,142,247,.14);
    padding: .28rem .9rem; border-radius: 2rem; margin-bottom: 1rem;
}

.hero-lead {
    color: rgba(255,255,255,.68); font-size: .95rem; line-height: 1.7; max-width: 480px;
}


/* ── Splat frame ── */
.splat-frame {
    position: relative; width: 100%;
    height: clamp(320px, calc(100dvh - 140px), 860px);
    border-radius: 1.1rem; overflow: hidden; background: #0d1f2e;
    box-shadow: 0 20px 56px rgba(0,0,0,.55), 0 0 0 1px rgba(79,142,247,.16);
}
.splat-frame iframe { width: 100%; height: 100%; border: none; display: block; }

.splat-hint {
    text-align: center; margin-top: .55rem;
    color: rgba(255,255,255,.5); font-size: .68rem; letter-spacing: .08em;
}
.splat-hint a       { color: rgba(255,255,255,.5); }
.splat-hint a:hover { color: rgba(255,255,255,.75); }


/* ── Page body ── */
.page-body { max-width: 800px; margin: 0 auto; }

section { padding: 2rem 0; }
section + section { border-top: 1px solid rgba(0,0,0,.09); }

.section-label {
    font-size: .68rem; letter-spacing: .13em; text-transform: uppercase;
    color: var(--primary); font-weight: 700; margin-bottom: .35rem;
}
.section-heading {
    font-size: 1.65rem; font-weight: 700; color: var(--primary); margin-bottom: 1.3rem;
}


/* ── Prose ── */
.prose p { line-height: 1.75; color: #333; margin-bottom: 1rem; }
.prose p:last-child { margin-bottom: 0; }
.prose a       { color: var(--link); }
.prose a:hover { color: var(--primary); }

.pill {
    display: inline-block; font-size: .7rem; font-weight: 700;
    letter-spacing: .05em; text-transform: uppercase;
    padding: .18rem .7rem; border-radius: 2rem;
    margin-right: .35rem; vertical-align: middle;
}
.pill-blue   { background: rgba(22,71,94,.09);  color: #16475E; }
.pill-brown  { background: rgba(94,45,22,.09);  color: #5E2D16; }
.pill-indigo { background: rgba(70,80,200,.09); color: #3535c0; }


/* ── Figures ── */
figure { margin: 2rem 0; }
figure img {
    width: 100%; border-radius: .75rem;
    box-shadow: 0 6px 28px rgba(0,0,0,.12); display: block;
}
figcaption {
    text-align: center; font-size: .8rem; color: #6c757d;
    margin-top: .6rem; line-height: 1.55;
}
figcaption strong { color: #444; }


/* ── Image placeholder ── */
.img-placeholder {
    width: 100%; border-radius: .75rem;
    background: linear-gradient(135deg, #f0f2f4, #e4e8eb);
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; color: #adb5bd; gap: .35rem; padding: 2rem 1rem;
}
.img-placeholder i    { font-size: 1.8rem; opacity: .35; }
.img-placeholder code { font-size: .7rem;  opacity: .6; }


/* ── Video ── */
.video-wrap {
    width: 100%; border-radius: .75rem; overflow: hidden;
    box-shadow: 0 6px 28px rgba(0,0,0,.12);
}
.video-wrap video { width: 100%; display: block; }


/* ── Photo carousel ── */
.gs-carousel .carousel-inner { border-radius: .75rem; overflow: hidden; }
.gs-carousel .carousel-item img {
    width: 100%; object-fit: cover;
    border-radius: .75rem;
    box-shadow: 0 6px 28px rgba(0,0,0,.12);
}

.gs-carousel .carousel-control-prev,
.gs-carousel .carousel-control-next {
    width: 2.6rem; height: 2.6rem;
    top: 50%; transform: translateY(-50%);
    background: rgba(22,71,94,.75); border-radius: 50%;
    margin: 0 .4rem;
}
.gs-carousel .carousel-indicators         { bottom: -3rem; }
.gs-carousel .carousel-indicators button  {
    background-color: rgba(22,71,94,.35) !important;
    border-radius: 50% !important;
    width: 7px !important; height: 7px !important;
}
.gs-carousel .carousel-indicators button.active {
    background-color: var(--primary) !important;
}

.carousel-caption-custom {
    font-size: .79rem; color: #6c757d; margin-top: 2rem; line-height: 1.5;
}


/* ── Demo buttons ── */
.demo-btn {
    border: 1px solid rgba(22,71,94,.22); border-radius: .75rem;
    padding: 1rem .75rem; text-align: center; text-decoration: none;
    color: var(--primary); background: #fff;
    display: flex; flex-direction: column; align-items: center; gap: .3rem;
    transition: box-shadow .18s, transform .18s;
}
.demo-btn:hover {
    box-shadow: 0 6px 20px rgba(22,71,94,.14);
    transform: translateY(-3px); color: var(--primary);
}
.demo-btn i          { font-size: 1.5rem; }
.demo-btn .btn-title { font-weight: 700; font-size: .9rem; }
.demo-btn .btn-sub   { font-size: .73rem; color: #6c757d; }


/* ── Splat modal ── */
.splat-modal {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,.88);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity .3s ease;
}
.splat-modal.open { opacity: 1; pointer-events: all; }

.splat-modal-inner {
    position: relative;
    width: min(92vw, 1100px); height: min(88vh, 760px);
    border-radius: 1rem; overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,.7);
    display: flex; flex-direction: column;
    transform: scale(.95) translateY(12px);
    transition: transform .3s ease;
    background: #0d1f2e;
}
.splat-modal.open .splat-modal-inner { transform: scale(1) translateY(0); }

.splat-modal-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: .55rem .75rem .55rem 1rem;
    background: rgba(0,0,0,.45);
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0; gap: .75rem;
}
.splat-modal-title {
    color: rgba(255,255,255,.85); font-size: .82rem; font-weight: 600;
    font-family: var(--font);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.splat-modal-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

.splat-modal-newtab {
    color: rgba(255,255,255,.55); font-size: .75rem; text-decoration: none;
    border: 1px solid rgba(255,255,255,.18); border-radius: .35rem;
    padding: .2rem .6rem; white-space: nowrap; font-family: var(--font);
    transition: color .15s, border-color .15s;
}
.splat-modal-newtab:hover { color: #fff; border-color: rgba(255,255,255,.45); }

.splat-modal-close {
    color: rgba(255,255,255,.55); font-size: .75rem;
    border: 1px solid rgba(255,255,255,.18); border-radius: .35rem;
    padding: .2rem .6rem; white-space: nowrap; font-family: var(--font);
    background: none; cursor: pointer;
    transition: color .15s, border-color .15s;
}
.splat-modal-close:hover { color: #fff; border-color: rgba(255,255,255,.45); }

.splat-modal-inner iframe { flex: 1; width: 100%; border: none; display: block; min-height: 0; }

.cite {
    background: linear-gradient(135deg, rgba(22,71,94,.05), rgba(22,71,94,.10));
    border: 1px solid rgba(22,71,94,.16); border-radius: 1rem; padding: 1.8rem;
}

/* ── Scroll reveal ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal        { opacity: 0; transform: translateY(15px); transition: opacity .5s ease, transform .5s ease; }
    .reveal.in     { opacity: 1; transform: none; }
    .reveal-d1     { transition-delay: .1s; }
    .reveal-d2     { transition-delay: .2s; }
}
