/* 
   style.css 
   Stage 1: Foundational styles & cinematic details
*/

body {
    background-color: #050505; /* Deep cinematic black */
    margin: 0;
}

/* Low-power profile for mobile/iOS thermal safety */
body.perf-low * {
    -webkit-tap-highlight-color: transparent;
}

body.perf-low .desert-card,
body.perf-low .volcanic-glass-form,
body.perf-low .beast-warp-shell,
body.perf-low .obsidian-tile {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body.perf-low #deep-sea-creatures,
body.perf-low #marine-snow-canvas {
    opacity: 0.75;
}

/* Hero deep-sea staging */
#hero {
    isolation: isolate;
}

#hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background:
        radial-gradient(ellipse at 50% 75%, rgba(24, 110, 150, 0.08), transparent 60%),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(2, 6, 12, 0.45) 100%);
}

#hero-content {
    padding-top: clamp(2rem, 6vh, 4.5rem);
    padding-bottom: clamp(1.5rem, 4vh, 3rem);
}

#hero-spotlight {
    animation: abyss-breathe 9s ease-in-out infinite;
}

@keyframes abyss-breathe {
    0%, 100% { opacity: 0.75; }
    50% { opacity: 1; }
}

#squid-container {
    right: clamp(-1.5rem, -2vw, -0.4rem) !important;
    top: clamp(-3.6rem, -9vh, -1.4rem) !important;
}

#deep-sea-creatures {
    overflow: hidden;
}

.deep-sea-creature {
    position: absolute;
    width: 2.2rem;
    height: 1.2rem;
    opacity: 0;
    filter: drop-shadow(0 0 12px rgba(120, 210, 255, 0.45));
    will-change: transform, opacity;
}

.deep-sea-creature svg {
    width: 100%;
    height: 100%;
}

.deep-sea-creature--shrimp {
    width: 1.8rem;
    height: 1rem;
    filter: drop-shadow(0 0 10px rgba(255, 150, 210, 0.4));
}

.deep-sea-creature--lantern {
    width: 2.4rem;
    height: 1.5rem;
    filter: drop-shadow(0 0 14px rgba(160, 230, 255, 0.5));
}

@media (max-width: 767px) {
    #hero-content {
        margin-top: 0 !important;
        padding-top: 4.8rem;
        padding-bottom: 6.8rem;
        gap: 1.25rem !important;
    }

    #squid-container {
        top: -0.85rem !important;
        right: -2.2rem !important;
        width: 9.5rem !important;
        height: 13rem !important;
        opacity: 0.72 !important;
    }

    .hero-title {
        margin-top: 2.8rem;
    }

    .hero-buttons {
        margin-top: 0.35rem;
    }
}

/* Base class to hide hero elements before animation */
.hero-anim {
    opacity: 0;
}

/* 
  Cinematic background effects 
*/
.bg-radial-gradient {
    background: radial-gradient(circle at center, #1a1a24 0%, #000000 80%);
}

.vignette {
    box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}

/* 
  Film Grain noise using CSS base64 SVG or static repeating linear gradient pseudo-noise.
*/
.noise-bg {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* 
  Utility class for splitting text 
*/
.word {
    display: inline-block;
    opacity: 0; 
    transform-origin: center center;
    text-shadow: 0 0 0px rgba(255, 255, 255, 0); 
}

/* 
  TV Static Effects 
*/
.scanlines {
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0) 50%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.4));
    background-size: 100% 4px;
}

@keyframes static-noise {
    0% { transform: translate(0, 0); }
    10% { transform: translate(-1%, -1%); }
    20% { transform: translate(-2%, 1%); }
    30% { transform: translate(1%, -2%); }
    40% { transform: translate(-1%, 2%); }
    50% { transform: translate(2%, -1%); }
    60% { transform: translate(-1%, 1%); }
    70% { transform: translate(1%, 2%); }
    80% { transform: translate(-2%, -1%); }
    90% { transform: translate(1%, -1%); }
    100% { transform: translate(0, 0); }
}

.animate-static {
    width: 110%;
    height: 110%;
    top: -5%;
    left: -5%;
    animation: static-noise 0.2s steps(2, end) infinite;
}

/* ═══════════════════════════════════════════════
   VAMPIRE SQUID — Photophore bioluminescence
   Individual circles blink asynchronously via
   staggered animation-delay values.
═══════════════════════════════════════════════ */

@keyframes photophore-pulse {
    0%   { opacity: 0.15; filter: blur(0px); }
    45%  { opacity: 0.95; filter: blur(0.5px); }
    55%  { opacity: 1;    filter: blur(1px); }
    75%  { opacity: 0.3;  filter: blur(0px); }
    100% { opacity: 0.15; filter: blur(0px); }
}

@keyframes photophore-large-pulse {
    0%   { opacity: 0.2;  r: 6; }
    40%  { opacity: 1;    r: 8; }
    60%  { opacity: 0.9;  r: 7; }
    100% { opacity: 0.2;  r: 6; }
}

.photophore {
    animation: photophore-pulse 3.2s ease-in-out infinite;
    transform-origin: center;
}

/* Stagger each photophore individually so they never sync */
.photophore:nth-child(1)  { animation-delay: 0.0s;  animation-duration: 3.1s; }
.photophore:nth-child(2)  { animation-delay: 0.4s;  animation-duration: 4.3s; }
.photophore:nth-child(3)  { animation-delay: 0.8s;  animation-duration: 2.7s; }
.photophore:nth-child(4)  { animation-delay: 1.1s;  animation-duration: 3.8s; }
.photophore:nth-child(5)  { animation-delay: 0.2s;  animation-duration: 5.0s; }
.photophore:nth-child(6)  { animation-delay: 1.6s;  animation-duration: 2.9s; }
.photophore:nth-child(7)  { animation-delay: 0.6s;  animation-duration: 4.1s; }
.photophore:nth-child(8)  { animation-delay: 1.9s;  animation-duration: 3.3s; }
.photophore:nth-child(9)  { animation-delay: 0.9s;  animation-duration: 4.8s; }
.photophore:nth-child(10) { animation-delay: 2.1s;  animation-duration: 3.6s; }
.photophore:nth-child(11) { animation-delay: 0.3s;  animation-duration: 5.2s; }
.photophore:nth-child(12) { animation-delay: 1.4s;  animation-duration: 2.8s; }
.photophore:nth-child(13) { animation-delay: 2.5s;  animation-duration: 3.9s; }
.photophore:nth-child(14) { animation-delay: 0.7s;  animation-duration: 4.5s; }

/* Webbing photophores: slower, pink-ish flickers  */
.photophore--web {
    animation-duration: 6.5s;
    opacity: 0.1;
}
.photophore--web:nth-child(1) { animation-delay: 0.5s; }
.photophore--web:nth-child(2) { animation-delay: 2.0s; }
.photophore--web:nth-child(3) { animation-delay: 3.5s; }
.photophore--web:nth-child(4) { animation-delay: 1.2s; }
.photophore--web:nth-child(5) { animation-delay: 2.8s; }
.photophore--web:nth-child(6) { animation-delay: 4.1s; }

/* Terminal large photophores: dramatic slow pulse */
#photo-tip-l, #photo-tip-r {
    animation: photophore-pulse 7s ease-in-out infinite;
}
#photo-tip-l { animation-delay: 0s; }
#photo-tip-r { animation-delay: 1.8s; }

/* Cloak state: photophores dim while in defense pose */
.squid-cloaked .photophore {
    animation: none;
    opacity: 0.04;
    transition: opacity 0.6s ease;
}
.squid-cloaked #photo-tip-l,
.squid-cloaked #photo-tip-r {
    animation: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* ═══════════════════════════════════════════════
   TWILIGHT DESERT — Project Cards Glassmorphism
═══════════════════════════════════════════════ */

.desert-card {
    position: relative;
    padding: 1.25rem 1.4rem;
    border-radius: 1rem;
    background: rgba(45, 20, 75, 0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(140, 80, 220, 0.18);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    min-height: 160px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(180,120,255,0.08);
}

.desert-card:hover {
    transform: translateY(-6px) scale(1.025);
    border-color: rgba(160, 100, 255, 0.5);
    box-shadow: 0 16px 48px rgba(80, 20, 160, 0.35),
                0 0 0 1px rgba(160, 100, 255, 0.2),
                inset 0 1px 0 rgba(200, 160, 255, 0.12);
}

/* The animated border glow on hover */
.card-glow-border {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg,
        rgba(180, 100, 255, 0.06) 0%,
        transparent 50%,
        rgba(100, 50, 200, 0.04) 100%);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease;
    opacity: 0;
}
.desert-card:hover .card-glow-border { opacity: 1; }

/* Hover shine sweep */
.card-hover-shine {
    position: absolute;
    top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg,
        transparent 0%,
        rgba(255,255,255,0.04) 50%,
        transparent 100%);
    transform: skewX(-18deg);
    pointer-events: none;
    z-index: 1;
    transition: left 0.55s ease;
}
.desert-card:hover .card-hover-shine { left: 130%; }

/* Card typography */
.card-index {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(160, 100, 255, 0.5);
    display: block;
    margin-bottom: 0.25rem;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ede0ff;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin: 0;
}

.card-tags {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(180, 130, 255, 0.55);
    margin: 0;
    line-height: 1.5;
}

.card-desc {
    font-size: 0.78rem;
    font-weight: 400;
    color: rgba(210, 185, 240, 0.6);
    line-height: 1.55;
    margin: 0;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(120, 70, 200, 0.12);
}

/* Stars twinkle */
@keyframes star-twinkle {
    0%, 100% { opacity: var(--star-op, 0.5); }
    50%       { opacity: calc(var(--star-op, 0.5) * 0.25); }
}
.desert-star {
    animation: star-twinkle 4s ease-in-out infinite;
    transform-origin: center;
}
.desert-star:nth-child(odd)  { animation-duration: 5.2s; animation-delay: 0.8s; }
.desert-star:nth-child(even) { animation-duration: 3.7s; animation-delay: 1.4s; }
.desert-star:nth-child(3n)   { animation-duration: 6.1s; animation-delay: 0.2s; }

/* Sandstorm Overlay Streaks */
#sandstorm-overlay {
    mix-blend-mode: screen;
}
.sand-streak {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--streak-color), transparent);
    animation: sand-rush linear infinite;
    opacity: 0.6;
    border-radius: 50%;
}
@keyframes sand-rush {
    0%   { transform: translateX(100vw); }
    100% { transform: translateX(-100vw); }
}

/* Twilight desert trail progress */
#desert-progress {
    position: relative;
    z-index: 20;
}

.desert-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.7rem;
}

.desert-progress-kicker,
.desert-progress-count {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.desert-progress-kicker {
    color: rgba(201, 163, 240, 0.72);
}

.desert-progress-count {
    color: rgba(245, 160, 96, 0.88);
}

.desert-progress-track {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.95rem 0.3rem 0.2rem;
}

.desert-progress-track::before {
    content: "";
    position: absolute;
    left: 0.5rem;
    right: 0.5rem;
    top: 1.15rem;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(106, 69, 128, 0.3), rgba(169, 127, 208, 0.18));
    box-shadow: 0 0 14px rgba(120, 70, 170, 0.14);
}

.desert-progress-fill {
    position: absolute;
    left: 0.5rem;
    top: 1.15rem;
    height: 3px;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #f5a060, #c694ff);
    box-shadow: 0 0 18px rgba(198, 148, 255, 0.35);
    transition: width 0.28s ease;
}

.desert-progress-stop {
    position: relative;
    z-index: 1;
    width: 2.15rem;
    height: 2.15rem;
    border: 1px solid rgba(245, 160, 96, 0.26);
    border-radius: 999px;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 214, 176, 0.32), rgba(80, 40, 10, 0.12) 45%, rgba(20, 10, 6, 0.84) 100%);
    color: rgba(245, 213, 176, 0.9);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 8px 20px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.desert-progress-stop::after {
    content: "";
    position: absolute;
    inset: 0.38rem;
    border-radius: 999px;
    background: rgba(245, 160, 96, 0.08);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.desert-progress-stop-icon {
    position: absolute;
    top: 2.45rem;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.48rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(201, 163, 240, 0.7);
}

.desert-progress-stop:hover,
.desert-progress-stop.active {
    transform: translateY(-2px) scale(1.06);
    border-color: rgba(245, 160, 96, 0.64);
    color: #fff0de;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 10px 26px rgba(110, 60, 10, 0.3),
        0 0 0 1px rgba(245, 160, 96, 0.12);
}

.desert-progress-stop.active::after {
    background: linear-gradient(145deg, rgba(245, 160, 96, 0.44), rgba(198, 148, 255, 0.32));
    box-shadow: 0 0 18px rgba(198, 148, 255, 0.28);
}

@media (max-width: 767px) {
    #gallery-guardian-column {
        min-height: 0;
        padding-bottom: 0.75rem;
    }

    #gallery-guardian-column #fennec-container {
        position: absolute;
        right: 0.75rem;
        bottom: 0.35rem;
        width: 5.6rem;
        height: 7.1rem;
        z-index: 24;
        opacity: 0.92;
        animation: mobile-fennec-float 3.4s ease-in-out infinite;
    }

    #gallery-guardian-column #fennec-container p {
        display: none;
    }

    @keyframes mobile-fennec-float {
        0%, 100% { transform: translateY(0px); }
        50% { transform: translateY(-8px); }
    }

    #desert-progress {
        order: 3;
        max-width: 100%;
    }

    .desert-progress-track {
        padding-top: 0.85rem;
    }

    .desert-progress-stop {
        width: 2rem;
        height: 2rem;
    }

    .desert-progress-stop-icon {
        top: 2.25rem;
        font-size: 0.44rem;
        letter-spacing: 0.12em;
    }
}

/* ═══════════════════════════════════════════════════════
   VOLCANIC SAVANNA — Contact Section
═══════════════════════════════════════════════════════ */

/* Volcanic Glass Form Container */
.volcanic-glass-form {
    background: rgba(10, 8, 5, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(180, 80, 20, 0.4);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow:
        0 0 0 1px rgba(255, 100, 20, 0.1),
        0 12px 50px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 120, 30, 0.15);
    position: relative;
    animation: ember-pulse 6s infinite alternate ease-in-out;
}

/* Fractured Edge SVG Pattern (via pseudo-element) */
.volcanic-glass-form::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='none' rx='20' stroke='rgba(255,100,20,0.5)' stroke-width='2' stroke-dasharray='10 4 2 8 20 6 4 12' stroke-dashoffset='0'/%3E%3C/svg%3E");
    mask-image: linear-gradient(to bottom right, black 20%, transparent 80%);
    -webkit-mask-image: linear-gradient(to bottom right, black 20%, transparent 80%);
}

@keyframes ember-pulse {
    0%   { box-shadow: 0 0 0 1px rgba(255, 100, 20, 0.1), 0 12px 50px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 120, 30, 0.15), 0 0 15px rgba(200, 40, 10, 0.1); }
    100% { box-shadow: 0 0 0 1px rgba(255, 100, 20, 0.2), 0 12px 50px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 120, 30, 0.3), 0 0 35px rgba(220, 60, 15, 0.25); }
}

/* Field group */
.vg-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.vg-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(220, 130, 74, 0.65);
}

.vg-input {
    background: rgba(40, 18, 8, 0.6);
    border: 1px solid rgba(160, 70, 20, 0.25);
    border-radius: 0.625rem;
    padding: 0.7rem 1rem;
    color: #f5d5b0;
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    width: 100%;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.vg-input::placeholder {
    color: rgba(160, 100, 60, 0.4);
}

.vg-input:hover {
    background: rgba(45, 20, 9, 0.7);
}

.vg-input:focus {
    border-color: rgba(255, 120, 30, 0.8);
    background: rgba(15, 10, 8, 0.9);
    box-shadow:
        inset 0 1px 3px rgba(0,0,0,0.5),
        0 0 0 3px rgba(255, 100, 20, 0.15),
        0 0 25px rgba(255, 80, 10, 0.15);
}

.vg-input:valid:not(:placeholder-shown) {
    border-color: rgba(180, 120, 40, 0.5);
}

.vg-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* Lava Stone Submit Button */
.lava-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 120, 30, 0.4);
    background: linear-gradient(135deg, #3a1a08, #5c2a10, #3a1a08);
    background-size: 200% 200%;
    color: #f5d5b0;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,80,10,0.05);
}

.lava-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(255, 120, 30, 0) 0%,
        rgba(255, 100, 20, 0.15) 50%,
        rgba(255, 140, 40, 0) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    border-radius: inherit;
}

.lava-btn:hover {
    border-color: rgba(255, 140, 40, 0.7);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(200, 60, 10, 0.35), 0 0 0 1px rgba(255,120,30,0.15);
}

.lava-btn:hover::before { opacity: 1; }
.lava-btn:active { transform: translateY(0); }

.lava-btn-text { position: relative; z-index: 1; }
.lava-btn-icon { position: relative; z-index: 1; font-size: 1rem; }

/* Social Ember Buttons */
.social-ember-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 2rem;
    border: 1px solid rgba(140, 70, 20, 0.3);
    background: rgba(30, 14, 6, 0.6);
    color: rgba(210, 140, 80, 0.75);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(8px);
}

.social-ember-btn:hover {
    border-color: rgba(255, 120, 30, 0.6);
    background: rgba(60, 25, 10, 0.8);
    color: #ffd4a0;
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 24px rgba(180, 60, 10, 0.25);
}

/* Ember floating particles */
.ember-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: ember-float linear infinite;
    opacity: 0;
    background: #ff6020;
    box-shadow: 0 0 8px 1px #ffaa00;
}

@keyframes ember-float {
    0%   { transform: translateY(0) translateX(0) scale(1);   opacity: 0; }
    10%  { opacity: 0.8; }
    80%  { opacity: 0.4; }
    100% { transform: translateY(-100vh) translateX(var(--drift)) scale(0.3); opacity: 0; }
}

/* Komodo ambient glow pulse */
@keyframes lava-pulse {
    0%, 100% { opacity: 0.12; transform: scale(1); }
    50%       { opacity: 0.22; transform: scale(1.15); }
}
#lava-glow { animation: lava-pulse 4s ease-in-out infinite; }

/* ═══════════════════════════════════════════════════════
   STAGE 5: SOCIAL HUNT & HEAT VISION
═══════════════════════════════════════════════════════ */

/* Obsidian Tiles (Social Links) */
.obsidian-tile {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #1f110a 0%, #0a0503 100%);
    border-radius: 0.75rem;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    pointer-events: auto;
    color: #ffb347;
    border: 1px solid rgba(255, 120, 30, 0.6);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.1), 0 0 20px rgba(255, 80, 10, 0.4);
    animation: heat-shimmer 2s infinite alternate ease-in-out;
}

.obsidian-tile:hover {
    transform: scale(1.1) translateY(-2px);
    color: #fff;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.2), 0 0 30px rgba(255, 120, 30, 0.6);
}

/* Lava-stone social placement */
.social-stone {
    border-radius: 0.95rem;
}
.social-stone--facebook  { left: 8%;  bottom: 20%; transform: rotate(-8deg); }
.social-stone--linkedin  { left: 23%; top: 18%;    transform: rotate(-3deg); }
.social-stone--instagram { left: 42%; bottom: 9%;  transform: rotate(7deg); }
.social-stone--github    { right: 46%; top: 22%;   transform: rotate(-9deg); }
.social-stone--threads   { right: 12%; bottom: 17%; transform: rotate(6deg); }
.social-stone--email     { right: 5%;  top: 11%;   transform: rotate(-4deg); }
.social-stone--telegram  { left: 65%;  top: 43%;   transform: rotate(11deg); }

@keyframes heat-shimmer {
    0% { filter: drop-shadow(0 0 5px rgba(255,60,0,0.3)); }
    100% { filter: drop-shadow(0 0 15px rgba(255,100,20,0.6)) hue-rotate(10deg); }
}

/* THERMAL VISION MODE */
body.thermal-active #contact {
    /* Apply pseudo-thermal SVG filter to the whole section */
    filter: url(#pseudo-thermal);
}
body.thermal-active #snail-svg {
    /* Intense glow for the Snail in thermal mode */
    filter: drop-shadow(0 0 20px #ff0000) drop-shadow(0 0 40px #ffaa00) brightness(1.5);
}
body.thermal-active .obsidian-tile {
    /* Reveal all tiles hot */
    opacity: 1 !important;
    transform: scale(1);
    pointer-events: auto;
    color: #fff;
    filter: drop-shadow(0 0 20px #ffff00);
}

/* Secret Achievements */
body.thermal-active #secret-achievements {
    opacity: 1;
    transform: translateX(-50%) translateY(10px);
}
.secret-tile {
    background: rgba(0,0,0,0.8);
    border: 1px solid rgba(255, 50, 0, 0.5);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
    box-shadow: 0 0 15px rgba(255,0,0,0.3);
}

/* FIRE AURA ANIMATION */
.fire-flame {
    animation: flicker-flame 3s infinite alternate ease-in-out;
    transform-origin: center bottom;
}
.fire-flame:nth-child(even) {
    animation-duration: 2.5s;
    animation-direction: alternate-reverse;
}
.fire-flame:nth-child(3n) {
    animation-duration: 3.5s;
}

@keyframes flicker-flame {
    0% { transform: scale(0.9) skewX(2deg); opacity: 0.6; fill: #ff4400; }
    50% { transform: scale(1.1) skewX(-2deg); opacity: 0.9; fill: #ff8800; }
    100% { transform: scale(0.95) skewX(1deg); opacity: 0.7; fill: #ff2200; }
}

/* Beast Warp Menu */
#beast-warp-menu {
    position: fixed;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1200;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

#beast-warp-toggle {
    pointer-events: auto;
    width: 2.45rem;
    height: 2.45rem;
    position: relative;
    border: 1px solid rgba(var(--beast-accent-rgb, 245, 166, 35), 0.32);
    border-radius: 0.78rem;
    background:
        linear-gradient(140deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.01)),
        rgba(8, 10, 14, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.24rem;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

#beast-warp-toggle::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

#beast-warp-toggle span {
    width: 1rem;
    height: 2px;
    border-radius: 2px;
    background: var(--beast-text, #e9eef6);
    display: block;
}

#beast-warp-toggle:hover {
    transform: translateX(-2px);
    border-color: rgba(var(--beast-accent-rgb, 245, 166, 35), 0.65);
    box-shadow: 0 8px 20px rgba(var(--beast-accent-rgb, 245, 166, 35), 0.2);
}

#beast-owl-guide {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    margin-top: 0.5rem;
    margin-right: 0.2rem;
    text-align: right;
    font-size: 0.63rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    font-weight: 700;
    color: #ffe8b8;
    text-shadow: 0 0 14px rgba(245, 166, 35, 0.65);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#beast-warp-menu.show-owl-guide #beast-owl-guide {
    opacity: 1;
    transform: translateY(0);
}

.beast-warp-shell {
    position: relative;
    --beast-accent: #f5a623;
    --beast-accent-rgb: 245, 166, 35;
    --beast-text: #e4edf7;
    --beast-bg-top: rgba(255, 255, 255, 0.14);
    --beast-bg-mid: rgba(255, 255, 255, 0.04);
    --beast-bg-deep: rgba(20, 26, 38, 0.72);
    --beast-shell-bg: rgba(8, 10, 14, 0.62);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: auto;
    background:
        linear-gradient(160deg, var(--beast-bg-top), var(--beast-bg-mid) 24%, var(--beast-bg-deep) 72%),
        var(--beast-shell-bg);
    border: 1px solid rgba(186, 201, 226, 0.24);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-radius: 1.25rem;
    padding: 0.55rem 0.45rem;
    box-shadow:
        0 22px 46px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 1px 0 rgba(255, 255, 255, 0.14) inset;
    overflow: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.3s ease, padding 0.3s ease, border-width 0.3s ease, margin-top 0.3s ease;
}

.beast-warp-shell::before {
    content: "";
    position: absolute;
    top: -10%;
    left: -55%;
    width: 210%;
    height: 42%;
    pointer-events: none;
    background: linear-gradient(90deg, transparent 8%, rgba(255, 255, 255, 0.22), transparent 90%);
    opacity: 0.65;
    filter: blur(4px);
}

.beast-warp-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    color: var(--beast-text);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
    border-radius: 0.85rem;
    padding: 0.45rem 0.65rem;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
    font-family: inherit;
    min-width: 7rem;
}

.beast-warp-btn .beast-icon {
    font-size: 1rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(var(--beast-accent-rgb), 0.3));
}

.beast-warp-btn .beast-label {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 800;
    opacity: 0.9;
}

.beast-warp-btn:hover,
.beast-warp-btn.active {
    border-color: rgba(var(--beast-accent-rgb), 0.52);
    background: linear-gradient(140deg, rgba(var(--beast-accent-rgb), 0.24), rgba(var(--beast-accent-rgb), 0.09));
    color: #fff3da;
    transform: translateX(-3px) scale(1.01);
    box-shadow:
        0 10px 22px rgba(var(--beast-accent-rgb), 0.22),
        0 0 0 1px rgba(var(--beast-accent-rgb), 0.14) inset;
}

.beast-warp-btn.active {
    border-color: rgba(var(--beast-accent-rgb), 0.72);
    box-shadow:
        0 12px 26px rgba(var(--beast-accent-rgb), 0.3),
        0 0 0 1px rgba(255, 220, 150, 0.25) inset;
}

#beast-warp-menu[data-theme="hero"] .beast-warp-shell {
    --beast-accent: #8f6dff;
    --beast-accent-rgb: 143, 109, 255;
    --beast-text: #e8e1ff;
    --beast-bg-top: rgba(186, 168, 255, 0.22);
    --beast-bg-mid: rgba(128, 93, 255, 0.1);
    --beast-bg-deep: rgba(24, 14, 48, 0.76);
    --beast-shell-bg: rgba(10, 8, 24, 0.68);
}

#beast-warp-menu[data-theme="about"] .beast-warp-shell {
    --beast-accent: #88c97b;
    --beast-accent-rgb: 136, 201, 123;
    --beast-text: #e7f2de;
    --beast-bg-top: rgba(196, 232, 175, 0.18);
    --beast-bg-mid: rgba(116, 167, 91, 0.1);
    --beast-bg-deep: rgba(16, 34, 20, 0.78);
    --beast-shell-bg: rgba(8, 20, 12, 0.66);
}

#beast-warp-menu[data-theme="skills"] .beast-warp-shell {
    --beast-accent: #ff9a3d;
    --beast-accent-rgb: 255, 154, 61;
    --beast-text: #ffe9d2;
    --beast-bg-top: rgba(255, 194, 130, 0.2);
    --beast-bg-mid: rgba(255, 145, 50, 0.1);
    --beast-bg-deep: rgba(58, 32, 9, 0.8);
    --beast-shell-bg: rgba(24, 14, 6, 0.7);
}

#beast-warp-menu[data-theme="gallery"] .beast-warp-shell {
    --beast-accent: #c694ff;
    --beast-accent-rgb: 198, 148, 255;
    --beast-text: #f0e4ff;
    --beast-bg-top: rgba(220, 190, 255, 0.2);
    --beast-bg-mid: rgba(170, 120, 235, 0.1);
    --beast-bg-deep: rgba(43, 21, 75, 0.8);
    --beast-shell-bg: rgba(16, 10, 28, 0.68);
}

#beast-warp-menu[data-theme="contact"] .beast-warp-shell {
    --beast-accent: #ff6a3d;
    --beast-accent-rgb: 255, 106, 61;
    --beast-text: #ffe1d6;
    --beast-bg-top: rgba(255, 165, 135, 0.2);
    --beast-bg-mid: rgba(255, 110, 68, 0.1);
    --beast-bg-deep: rgba(66, 16, 10, 0.82);
    --beast-shell-bg: rgba(28, 10, 8, 0.72);
}

#beast-warp-menu.collapsed .beast-warp-shell {
    opacity: 0;
    transform: translateY(-4px) scale(0.96);
    pointer-events: none;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: -0.15rem;
    border-width: 0;
}

#beast-warp-menu:not(.collapsed) #beast-warp-toggle {
    border-color: rgba(var(--beast-accent-rgb, 245, 166, 35), 0.7);
    box-shadow: 0 8px 20px rgba(var(--beast-accent-rgb, 245, 166, 35), 0.22);
}

#beast-warp-menu[data-theme="hero"] #beast-warp-toggle {
    --beast-accent-rgb: 143, 109, 255;
    --beast-text: #e8e1ff;
}

#beast-warp-menu[data-theme="about"] #beast-warp-toggle {
    --beast-accent-rgb: 136, 201, 123;
    --beast-text: #e7f2de;
}

#beast-warp-menu[data-theme="skills"] #beast-warp-toggle {
    --beast-accent-rgb: 255, 154, 61;
    --beast-text: #ffe9d2;
}

#beast-warp-menu[data-theme="gallery"] #beast-warp-toggle {
    --beast-accent-rgb: 198, 148, 255;
    --beast-text: #f0e4ff;
}

#beast-warp-menu[data-theme="contact"] #beast-warp-toggle {
    --beast-accent-rgb: 255, 106, 61;
    --beast-text: #ffe1d6;
    border-color: rgba(180, 80, 20, 0.45);
    background: rgba(10, 8, 5, 0.8);
    box-shadow:
        0 0 0 1px rgba(255, 100, 20, 0.12),
        0 10px 26px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 120, 30, 0.18);
}

#beast-warp-menu[data-theme="contact"] #beast-warp-toggle::before {
    border: 1px dashed rgba(255, 100, 20, 0.45);
    inset: 2px;
    border-radius: calc(0.78rem - 2px);
}

#beast-teleport-overlay {
    position: fixed;
    inset: 0;
    z-index: 1300;
    pointer-events: none;
    opacity: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at center, rgba(245, 166, 35, 0.45), rgba(4, 8, 12, 0.96) 62%),
        linear-gradient(145deg, rgba(12, 16, 24, 0.86), rgba(8, 10, 14, 0.96));
}

#beast-teleport-overlay.active {
    display: flex;
}

.beast-teleport-surge {
    position: absolute;
    inset: -14%;
    opacity: 0;
    background:
        radial-gradient(circle at center, rgba(255, 225, 155, 0.4), rgba(255, 170, 72, 0.2) 38%, rgba(22, 14, 6, 0.96) 78%),
        conic-gradient(from 180deg at 50% 50%, rgba(255, 195, 105, 0.16), rgba(255, 134, 54, 0.06), rgba(255, 195, 105, 0.16));
}

.beast-teleport-core {
    width: clamp(220px, 62vmax, 980px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 3px solid rgba(245, 166, 35, 0.65);
    box-shadow: 0 0 72px rgba(245, 166, 35, 0.65), inset 0 0 36px rgba(245, 166, 35, 0.45);
    background: radial-gradient(circle at center, rgba(245, 166, 35, 0.45), rgba(245, 166, 35, 0.08) 68%, transparent);
}

.beast-teleport-runes {
    position: absolute;
    color: #ffe8b8;
    letter-spacing: clamp(0.5rem, 1.2vw, 1.35rem);
    font-size: clamp(1rem, 2.6vw, 2.4rem);
    text-shadow: 0 0 24px rgba(245, 166, 35, 0.9);
}

.beast-teleport-flash {
    position: absolute;
    inset: 0;
    opacity: 0;
    background:
        radial-gradient(circle at center, rgba(255, 220, 140, 0.45), transparent 42%),
        repeating-linear-gradient(115deg, rgba(255, 190, 95, 0.12) 0 12px, rgba(255, 170, 70, 0.02) 12px 28px);
    mix-blend-mode: screen;
}

@media (max-width: 767px) {
    #beast-warp-menu {
        top: auto;
        left: 0.6rem;
        right: 0.6rem;
        bottom: 0.8rem;
        transform: none;
        align-items: stretch;
    }

    #beast-warp-toggle {
        align-self: flex-end;
        width: 2.25rem;
        height: 2.25rem;
    }

    .beast-warp-shell {
        flex-direction: row;
        border-radius: 1rem;
        gap: 0.3rem;
        padding: 0.38rem 0.42rem;
        width: 100%;
    }

    .beast-warp-btn {
        flex: 1 1 0;
        justify-content: center;
        min-width: 0;
        padding: 0.45rem 0.25rem;
        border-radius: 0.7rem;
    }

    .beast-warp-btn .beast-label {
        display: none;
    }

    #beast-owl-guide {
        margin-right: 0;
        text-align: center;
    }

    .social-stone--facebook  { left: 7%;  bottom: 18%; transform: rotate(-6deg); }
    .social-stone--linkedin  { left: 21%; top: 13%;    transform: rotate(-2deg); }
    .social-stone--instagram { left: 34%; bottom: 8%;  transform: rotate(6deg); }
    .social-stone--github    { right: 37%; top: 10%;   transform: rotate(-7deg); }
    .social-stone--threads   { right: 8%; bottom: 25%; transform: rotate(5deg); }
    .social-stone--email     { right: 5%;  top: 8%;    transform: rotate(-3deg); }
    .social-stone--telegram  { left: 57%;  top: 60%;   transform: rotate(8deg); }
}

/* Mobile guardrails for About section text overlap */
@media (max-width: 767px) {
    /* Reserve vertical room so revealed bio and nest content never collide */
    #about {
        padding-bottom: 14rem;
    }

    /* Keep the nest pinned lower and inside viewport width on small screens */
    #fun-facts-nest {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
    }

    /* Make fun fact copy wrap safely instead of floating too high */
    #fact-display {
        bottom: 2.25rem;
        width: min(82vw, 20rem);
    }
}
