/* ============================================================
   KELOS — Global Stylesheet
   Design: Classical & Stoic
   Primary: Cornflower Blue #5170D7 | White #FFFFFF
   ============================================================ */

/* ---- CSS Custom Properties (Design Tokens) ---- */
:root {
    /* Colors */
    --color-primary: #5170D7;
    --color-primary-rgb: 81, 112, 215;
    --color-primary-dark: #3B52B5;
    --color-primary-light: #8DA4E8;
    --color-primary-ice: #C5D1F5;
    --color-white: #FFFFFF;
    --color-white-rgb: 255, 255, 255;
    --color-bg-deep: #0A0E1A;
    --color-bg-mid: #111827;
    --color-gold: #C9A84C;

    /* Typography */
    --font-display: 'Cinzel', 'GFS Didot', 'EB Garamond', serif;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Cormorant Garamond', serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 32px;
    --space-xl: 64px;
    --space-2xl: 128px;

    /* Transitions */
    --ease-reveal: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-deep);
    color: var(--color-white);
    overflow-x: hidden;
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

/* ============================================================
   SPLASH / OPENING SCREEN
   ============================================================ */

.splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--color-bg-deep);
    overflow: hidden;
}

.splash__fixed-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    /* width & height set by JS to initial viewport dimensions */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

/* ---- Background Video ---- */
.splash__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0;
    transition: opacity 2s var(--ease-smooth);
}

.splash__video.is-visible {
    opacity: 1;
}

/* ---- Video Dark Overlay ---- */
.splash__video-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(10, 14, 26, 0.35) 0%,
        rgba(10, 14, 26, 0.20) 40%,
        rgba(10, 14, 26, 0.35) 100%
    );
    pointer-events: none;
}



/* ---- Radial Glow ---- */
.splash__glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.05) 40%,
        transparent 70%
    );
    z-index: 3;
    opacity: 0;
    transition: opacity 2s var(--ease-smooth);
    pointer-events: none;
}

.splash__glow.is-visible {
    opacity: 1;
}

/* ---- Flourishes ---- */
.splash__flourish {
    position: relative;
    width: 400px;
    max-width: 80vw;
    aspect-ratio: 40 / 3;
    z-index: 5;
    opacity: 0;
    transition: opacity 1s var(--ease-smooth);
}

.splash__flourish.is-visible {
    opacity: 1;
}

.splash__flourish--top {
    margin-bottom: 50px;
}

.splash__flourish--bottom {
    margin-top: 50px;
}

.splash__flourish-wave-box {
    position: absolute;
    inset: 0;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent 0%, black 15%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 15%, black 85%, transparent 100%);
}

.flourish-svg-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
}

.splash__flourish--top.is-visible .flourish-svg-wave {
    animation: waveScroll 4s linear infinite;
}

.splash__flourish--bottom.is-visible .flourish-svg-wave {
    animation: waveScrollReverse 4s linear infinite;
}

.flourish-svg-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: flourishPulse 4s ease-in-out infinite 1s;
}

/* Fallback for the path if needed */
.flourish-path {
    /* No longer using stroke-dashoffset since it scrolls continuously */
}

/* ---- Logo Container ---- */
.splash__logo-container {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 320px;
    height: 320px;
}

/* ---- Logo Image ---- */
.splash__logo {
    width: 280px;
    height: 280px;
    object-fit: contain;
    position: relative;
    top: 20px;
    z-index: 4;
    opacity: 0;
    transform: scale(0.9);
    filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0));
    transition: opacity 2s var(--ease-reveal),
                transform 2s var(--ease-reveal),
                filter 2s var(--ease-reveal);
}

.splash__logo.is-revealed {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
    animation: logoFloat 6s ease-in-out infinite 2s;
}

/* ---- Concentric Rings ---- */
.splash__ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(var(--color-primary-rgb), 0);
    transition: border-color 1.5s var(--ease-smooth),
                transform 1.5s var(--ease-reveal),
                opacity 1.5s var(--ease-smooth);
    opacity: 0;
    pointer-events: none;
}

.splash__ring--outer {
    width: 380px;
    height: 380px;
    transform: scale(0.6) rotate(-30deg);
}

.splash__ring--inner {
    width: 340px;
    height: 340px;
    transform: scale(0.6) rotate(30deg);
}

.splash__ring.is-visible {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.4), inset 0 0 25px rgba(255, 255, 255, 0.4);
}

.splash__ring--outer.is-visible {
    transform: scale(1) rotate(0deg);
    animation: ringRotateSlow 30s linear infinite;
}

.splash__ring--inner.is-visible {
    transform: scale(1) rotate(0deg);
    animation: ringRotateSlow 25s linear infinite reverse;
}

/* ---- Text Block ---- */
.splash__text {
    position: relative;
    z-index: 5;
    text-align: center;
    margin-top: var(--space-lg);
}

.splash__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.75rem, 7vw, 4rem);
    letter-spacing: 0.2em;
    color: var(--color-white);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s var(--ease-reveal),
                transform 1s var(--ease-reveal);
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.6),
                 0 0 10px rgba(255, 255, 255, 0.4);
}

.splash__title.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Divider ---- */
.splash__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin: var(--space-md) 0;
    opacity: 0;
    transition: opacity 0.8s var(--ease-smooth);
}

.splash__divider.is-visible {
    opacity: 1;
}

.splash__divider-line {
    display: block;
    width: 65px;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.8),
        transparent
    );
    transform: scaleX(0);
    transition: transform 1s var(--ease-reveal);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.splash__divider.is-visible .splash__divider-line {
    transform: scaleX(1);
}

.splash__divider-ornament {
    color: var(--color-white);
    font-size: 0.7rem;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.6s var(--ease-smooth) 0.4s,
                transform 0.6s var(--ease-reveal) 0.4s;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.splash__divider.is-visible .splash__divider-ornament {
    opacity: 1;
    transform: scale(1);
}

/* ---- Subtitle ---- */
.splash__subtitle {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: clamp(0.75rem, 3vw, 1.15rem);
    letter-spacing: 0.12em;
    color: var(--color-white);
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 1s var(--ease-reveal),
                transform 1s var(--ease-reveal);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.6), 0 0 10px rgba(255, 255, 255, 0.4);
}

.splash__subtitle.is-visible {
    opacity: 1;
    transform: translateY(0);
    animation: textShimmer 4s ease-in-out infinite 2s;
}

/* ---- Enter Button ---- */
.splash__enter-btn {
    position: relative;
    z-index: 5;
    margin-top: var(--space-xl);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 32px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-white);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    background: rgba(10, 14, 26, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-sm);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s var(--ease-reveal),
                transform 1s var(--ease-reveal),
                border-color 0.3s var(--ease-smooth),
                box-shadow 0.3s var(--ease-smooth),
                background-color 0.3s var(--ease-smooth);
}

.splash__enter-btn.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.splash__enter-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    opacity: 0;
    transition: opacity 0.3s var(--ease-smooth);
}

.splash__enter-btn:hover {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3),
                inset 0 0 20px rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.1);
}

.splash__enter-btn:hover::before {
    opacity: 1;
}

.splash__enter-btn:hover .splash__enter-btn-icon {
    transform: translateX(4px);
}

.splash__enter-btn:disabled {
    cursor: default;
    color: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: none;
}

.splash__enter-btn:disabled:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: none;
    background-color: rgba(10, 14, 26, 0.3);
}

.splash__enter-btn:disabled:hover::before {
    opacity: 0;
}

.splash__enter-btn-text {
    position: relative;
    z-index: 1;
}

.splash__enter-btn-icon {
    position: relative;
    z-index: 1;
    display: flex;
    transition: transform 0.3s var(--ease-smooth);
}

/* ---- Attribution ---- */
.splash__attribution {
    position: absolute;
    bottom: 3vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transition: opacity 1.2s var(--ease-smooth);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.6), 0 0 5px rgba(255, 255, 255, 0.4);
}

.splash__attribution.is-visible {
    opacity: 1;
}

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */

@keyframes ringRotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes textShimmer {
    0%, 100% {
        color: rgba(255, 255, 255, 0.9);
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.6), 0 0 10px rgba(255, 255, 255, 0.4);
    }
    50% {
        color: var(--color-white);
        text-shadow: 0 0 35px rgba(255, 255, 255, 1), 0 0 15px rgba(255, 255, 255, 0.8);
    }
}

@keyframes waveScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes waveScrollReverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0%); }
}

@keyframes flourishPulse {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.4)); opacity: 0.7; }
    50% { filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.9)); opacity: 1; }
}

@keyframes breatheGlow {
    0%, 100% {
        box-shadow: 0 0 60px rgba(var(--color-primary-rgb), 0.1);
    }
    50% {
        box-shadow: 0 0 100px rgba(var(--color-primary-rgb), 0.2);
    }
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 15px rgba(255, 255, 255, 0.4)); }
    50% { transform: translateY(-8px) scale(1.02); filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.9)) drop-shadow(0 0 20px rgba(255, 255, 255, 0.6)); }
}

/* ============================================================
   HOME SCREEN
   ============================================================ */
.home {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    overflow: hidden;
}

.home__fixed-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    /* width & height set by JS to initial viewport dimensions */
    pointer-events: none;
}

.home__foggy-bg {
    position: absolute;
    inset: 0;
    background-color: var(--color-bg-deep); /* #5170D7 */
    /* Add subtle atmospheric fog around edges using radial gradients */
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 0%, transparent 60%);
}

/* Corner Layouts (Outside the frame cutouts) */
.home__logo-corner {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 220px !important;
    height: 60px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: auto;
}

.home__header-title {
    font-family: var(--font-display);
    font-size: 3rem !important;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.2em;
    color: var(--color-white);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    margin-bottom: -4px;
    white-space: nowrap;
}

.home__social-corner {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 120px !important;
    height: 40px !important;
    display: flex;
    gap: 20px;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 0px;
    margin-bottom: -2px;
    z-index: 20;
    pointer-events: auto;
}

/* Video Timer Button */


.home__video-controls {
    position: absolute;
    bottom: 7.2%;  /* Moved down a little bit more */
    right: 7.4%;   /* Moved right (~0.3cm) */
    z-index: 20;
    pointer-events: auto;
}

.scroll-down-btn {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 30;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--ease-smooth), transform 0.3s var(--ease-smooth);
}

.scroll-down-btn.is-visible {
    opacity: 1;
    pointer-events: auto;
    animation: bounce 2s infinite;
}

.scroll-down-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    animation-play-state: paused;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.video-play-btn {
    position: relative;
    width: 80px;
    height: 80px;
    min-width: 80px;
    min-height: 80px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: transform 0.3s var(--ease-smooth), background 0.3s;
}

.video-play-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.video-progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    transform: rotate(-90deg);
    pointer-events: none;
}

.video-progress-ring__bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 2;
}

.video-progress-ring__fill {
    fill: none;
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 2;
    stroke-linecap: round;
    /* Stroke dasharray is dynamically set in JS based on radius */
    transition: stroke-dashoffset 0.1s linear;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8));
}

.video-play-icon-wrapper {
    position: absolute;
    width: 80px;
    height: 80px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
}

.icon-play, .icon-pause, .icon-down {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth);
}

/* Default state: Video is playing, show PAUSE icon */
.icon-play {
    opacity: 0;
    transform: scale(0.8) rotate(-90deg);
}
.icon-pause {
    opacity: 1;
    transform: scale(1) rotate(0);
}
.icon-down {
    opacity: 0;
    transform: scale(0.8) translateY(-10px);
}

/* Paused state: Video is paused, show PLAY icon */
.video-play-btn.is-paused .icon-play {
    opacity: 1;
    transform: scale(1) rotate(0);
}
.video-play-btn.is-paused .icon-pause {
    opacity: 0;
    transform: scale(0.8) rotate(90deg);
}
.video-play-btn.is-paused .icon-down {
    opacity: 0;
    transform: scale(0.8) translateY(-10px);
}

/* Ended state: Video is ended, show DOWN icon with bounce */
.video-play-btn.is-ended .icon-play,
.video-play-btn.is-ended .icon-pause {
    opacity: 0;
    transform: scale(0.8);
}
.video-play-btn.is-ended .icon-down {
    opacity: 1;
    transform: scale(1) translateY(4px);
    animation: icon-bounce 2s infinite;
}

@keyframes icon-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: scale(1) translateY(4px);
    }
    40% {
        transform: scale(1) translateY(-2px);
    }
    60% {
        transform: scale(1) translateY(1px);
    }
}

.home__social-link {
    color: var(--color-white);
    opacity: 0.7;
    transition: opacity 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth);
}

.home__social-link:hover {
    opacity: 1;
    transform: scale(1.1);
}

.home__nav-corner {
    position: absolute;
    top: 40px;
    right: 40px;
    z-index: 20;
    pointer-events: auto;
}

.home__nav-btn {
    padding: 10px 24px;
    font-size: 0.75rem;
}

/* Inner Clipped Video Container */
.home__media-container {
    position: absolute;
    inset: 0;
    z-index: 2;
    clip-path: url(#frame-clip);
    overflow: hidden;
    pointer-events: auto;
}

.home__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.home__nav-btn {
    margin-top: 0;
    padding: 10px 24px;
    font-size: 0.75rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 640px) {
    .splash__logo-container {
        width: min(260px, 75vw);
        height: min(260px, 75vw);
    }

    .splash__logo {
        width: min(220px, 60vw);
        height: min(220px, 60vw);
    }

    .splash__ring--outer {
        width: min(310px, 90vw);
        height: min(310px, 90vw);
    }

    .splash__ring--inner {
        width: min(280px, 80vw);
        height: min(280px, 80vw);
    }

    .splash__glow {
        width: 400px;
        height: 400px;
    }

    .splash__enter-btn {
        margin-top: var(--space-lg);
        padding: 12px 28px;
        font-size: 0.75rem;
    }

    .splash__divider-line {
        width: 50px;
    }

    .splash__flourish--top {
        margin-bottom: 30px;
    }

    .splash__flourish--bottom {
        margin-top: 30px;
    }

}

@media (max-width: 1024px) and (min-width: 641px) {
    .splash__logo-container {
        width: 330px;
        height: 330px;
    }

    .splash__logo {
        width: 280px;
        height: 280px;
    }

    .splash__ring--outer {
        width: 380px;
        height: 380px;
    }

    .splash__ring--inner {
        width: 350px;
        height: 350px;
    }
}
/* ============================================================
   THESIS SCREEN
   ============================================================ */

.home__nav-container {
    position: absolute;
    top: 30px; /* Aligns visually inside the SVG cutout */
    left: 50%;
    transform: translate(-50%, -100%);
    display: flex;
    gap: 50px; /* Space between words */
    align-items: center;
    opacity: 0;
    transition: all 0.8s var(--ease-smooth);
    z-index: 20;
    pointer-events: none; /* Ignore clicks while hidden */
}

.home__nav-container.is-visible {
    opacity: 1;
    transform: translate(-50%, 0); /* Drop down into position */
    pointer-events: auto;
}

.home__nav-item {
    font-family: var(--font-display);
    font-size: clamp(1rem, 2vw, 1.4rem);
    letter-spacing: 0.25em;
    color: var(--color-white);
    opacity: 0.5;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: all 0.4s var(--ease-smooth);
}

.home__nav-item:hover {
    opacity: 1;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.home__nav-item.is-active {
    opacity: 1;
    font-weight: 500;
    text-shadow: 0 0 15px rgba(255,255,255,0.8), 0 0 30px rgba(255,255,255,0.5); /* Glow effect requested by user */
}

.home__frame-svg path {
    transition: d 0.8s var(--ease-smooth);
}

.thesis-screen {
    position: absolute;
    inset: 0;
    background-color: #5170D7;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s var(--ease-smooth);
    display: flex;
    justify-content: center;
    color: var(--color-white);
    font-family: var(--font-body);
}

.thesis-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    opacity: 0.25;
    mix-blend-mode: soft-light;
}

.thesis-screen.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.thesis__scroll-container {
    position: absolute;
    top: 51.5%; /* Shifted down slightly */
    left: 51.5%; /* Shifted left as requested */
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 65%;
    max-width: 950px; /* Scales proportionally with the 1400px scroll max-width */
    height: 60%; /* Clips perfectly between the top and bottom rolls */
    overflow-y: auto;
    padding: 10% 40px; /* Internal padding to allow scrolling past edges */
    scrollbar-width: none; 
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory; 
    text-wrap: pretty;
}

.thesis__scroll-container::-webkit-scrollbar {
    display: none; 
}

.thesis__section {
    opacity: 0; /* Fully hidden when inactive */
    filter: blur(12px); /* Cinematic blur for un-revealed text */
    transform: translateY(30px); /* Subtle slide instead of heavy bounce */
    transition: opacity 1.2s var(--ease-reveal), filter 1.2s var(--ease-reveal), transform 1.2s var(--ease-reveal);
    margin-bottom: 250px; /* Huge gap ensures only one is visible */
    scroll-snap-align: center; /* Snap to center of the viewport */
    min-height: 40vh; /* Takes up substantial vertical space */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.thesis-screen::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1400px;
    height: 85%;
    background-image: url('../assets/scroll.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 1; /* Below text (z-index: 2), above noise (z-index: 1) */
    opacity: 0.9;
}

.thesis__section.is-active {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0);
}

.thesis__section h3 {
    font-family: 'Caveat', cursive;
    color: #1a3b8c; /* Dark blue ink */
    font-size: 2.8rem;
    letter-spacing: 0.05em;
    margin-bottom: 1.2rem;
    font-weight: 700;
    text-align: center;
}

.thesis__section p {
    font-family: 'Caveat', cursive;
    color: #1a3b8c; /* Dark blue ink */
    font-size: 1.4rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

.thesis__section strong {
    font-weight: 700;
}

.thesis__outro {
    font-family: 'Caveat', cursive;
    color: #1a3b8c;
    font-weight: 700;
    font-size: 2rem !important;
    letter-spacing: 0.1em;
    margin-top: 50px;
    text-align: center;
    opacity: 0.9;
}

.thesis__spy {
    position: absolute;
    right: 110px; /* Shifted left */
    top: 51.5%; /* Shifted down slightly */
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 25px;
    z-index: 15;
}

.spy-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s var(--ease-smooth);
    cursor: pointer;
}

.spy-dot::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-white);
    opacity: 0;
    transform: scale(0);
    transition: all 0.4s var(--ease-smooth);
}

.spy-dot.active {
    border-color: var(--color-white);
}

.spy-dot.active::after {
    opacity: 1;
    transform: scale(1);
}
