@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&family=Manrope:wght@200..800&display=swap");

:root {
    --paper-bg: #ece9d8;
    --paper-dark: #d5d0b4;
    --ink: #1a1a1a;
    --highlight: #e85d04;
}

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

html {
    background-color: var(--paper-bg);
    scrollbar-width: none;
    overflow-x: clip !important;
    width: 100vw;
}

/* ─── Hide Scrollbar for Webkit ─── */
::-webkit-scrollbar {
    display: none;
}

body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--paper-bg);
    color: var(--ink);
    position: relative;
    overflow-x: clip !important;
    width: 100vw;
}

/* ─── Intro Video Loading Screen ─── */
#intro-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--paper-bg);
    /* Opaque initially to hide the website while video loads */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 1s ease-in-out, background-color 1s ease;
}

#intro-video {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    /* Changed to 'cover' ensures no blank edges/borders */
}

/* ─── Background Layers ─── */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.grid-bg {
    background-image: url("assets/square grid.svg");
    background-size: 80px;
    background-repeat: repeat;
    opacity: 0.15;
}

.crumple-bg {
    background-image: url("assets/crumple texture.png");
    background-size: cover;
    background-position: center;
    mix-blend-mode: multiply;
    opacity: 0.5;
}

/* ─── Corner Decorations (Pinned to corners) ─── */
.decor-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    /* Behind scrolling profiles */
    overflow: hidden;
    /* Hide pieces pushed outside container */
}

.corner-decor {
    position: absolute;
    pointer-events: none;
}

.top-left-paper {
    top: -650px;
    left: -400px;
    width: clamp(800px, 45vw, 1600px);
    transform: rotate(-45deg);
    filter: drop-shadow(8px 8px 15px rgba(0, 0, 0, 0.25));
}

.middle-right-paper {
    top: 170px;
    right: -200px;
    width: clamp(700px, 45vw, 1400px);
    transform: rotate(-30deg);
    filter: drop-shadow(8px 8px 15px rgba(0, 0, 0, 0.25));
}


.top-dots {
    top: -50px;
    left: 0;
    width: 100%;
    opacity: 0.4;
}

/* ─── Scattered Animated Flowers ─── */
@keyframes flower-spin {
    from {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    to {
        transform: rotate(360deg) scale(1);
    }
}

.flower {
    width: clamp(80px, 15vw, 150px);
    filter: drop-shadow(-3px 5px 10px rgba(0, 0, 0, 0.15));
    animation: flower-spin 20s linear infinite;
}

.flower-1 {
    top: 25%;
    left: 8%;
}

.flower-2 {
    top: 60%;
    left: 8%;
    animation-direction: reverse;
    animation-duration: 25s;
}

.flower-3 {
    bottom: 5%;
    right: 2%;
    width: 180px;
}

/* Lock scrolling during intro animation */
body.intro-locked {
    overflow: hidden;
}

/* (Removed old paper-texture logic, handled by bg-layer now) */

h1,
h2 {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    line-height: 1.1;
    transform: rotate(-1deg);
}

h1 {
    font-size: 5rem;
    letter-spacing: 0.05rem;
}

h2 {
    font-size: 2.8rem;
    letter-spacing: 0.02rem;
}

p {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.6;
}

/* ─── Plane SVG Overlays ─── */
.plane-svg-overlay {
    position: absolute;
    top: 5%;
    left: 2%;
    width: 300px;
    height: 300px;
    pointer-events: none;
    z-index: 5;
    overflow: visible;
}

.trail-path {
    stroke: var(--ink);
    stroke-width: 2;
    stroke-dasharray: 6 8;
    stroke-linecap: round;
    opacity: 0.25;
}

.plane-icon {
    filter: drop-shadow(2px 5px 4px rgba(0, 0, 0, 0.2));
}

/* ─── Hero (Large GIF, connects to road) ─── */
.hero {
    width: 100%;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Align to bottom so road connects */
    padding-top: 6rem;
    /* Increased to push the entire website contents downward */
    padding-bottom: 0;
    padding-right: 2rem;
    min-height: 60vh;
}

.hero-gif {
    /* Significantly larger hero GIF */
    width: 1000px;
    max-width: 90vw;
    height: auto;
    display: block;
    position: relative;
    z-index: 5;
    /* Shift down slightly to overlap perfectly with road start */
    transform: translateY(20px);
}

/* ─── Spotlight / Timeline Section ─── */
.spotlight {
    position: relative;
    width: 100%;
    /* 
       Make the overall aspect ratio taller so the road spans a longer vertical distance
       and doesn't stretch too wide side-to-side. 
       A narrower container makes the SVG road narrower.
    */
    max-width: 800px;
    margin: 0 auto;
    aspect-ratio: 170 / 571;
    overflow: visible;
    padding-top: 0;
}

/* The SVG road */
.timeline-svg {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    /* Restrict max width of the SVG so the road doesn't span side to side excessively */
    max-width: 100%;
    width: auto;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
    /* Allow road extension past viewBox */
}

/* ─── Profile Spots ─── */
.profile-spot {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 700px;
}

/* ─── Cutout Images & Sway Animation ─── */
.profile-image {
    flex: 0 0 280px;
    /* Much larger images for cutouts */
    position: relative;
}

/* Make Hari Ganapathy bigger on desktop */
.profile-4 .profile-image {
    flex: 0 0 330px;
}

.profile-image .profile-link img {
    width: 100%;
    height: auto;
    display: block;
    /* Removes the bounding box look since they are cutouts */
    border-radius: 0;
    /* 8-axis tight orange drop-shadows to create a flawless boundary outline */
    filter:
        drop-shadow(3px 0 0 #FF8001) drop-shadow(0 3px 0 #FF8001) drop-shadow(-3px 0 0 #FF8001) drop-shadow(0 -3px 0 #FF8001) drop-shadow(2.1px 2.1px 0 #FF8001) drop-shadow(-2.1px -2.1px 0 #FF8001) drop-shadow(2.1px -2.1px 0 #FF8001) drop-shadow(-2.1px 2.1px 0 #FF8001) drop-shadow(4px 10px 10px rgba(0, 0, 0, 0.15));
    transition: filter 0.3s ease, transform 0.3s ease;
}

.profile-image .profile-link:hover img {
    /* Slightly thicker and elevated on hover */
    filter:
        drop-shadow(4px 0 0 #FF8001) drop-shadow(0 4px 0 #FF8001) drop-shadow(-4px 0 0 #FF8001) drop-shadow(0 -4px 0 #FF8001) drop-shadow(2.8px 2.8px 0 #FF8001) drop-shadow(-2.8px -2.8px 0 #FF8001) drop-shadow(2.8px -2.8px 0 #FF8001) drop-shadow(-2.8px 2.8px 0 #FF8001) drop-shadow(4px 15px 20px rgba(0, 0, 0, 0.25)) brightness(1.05);
    transform: scale(1.02);
}

.anim-icon {
    position: absolute;
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(2px 5px 5px rgba(0, 0, 0, 0.2));
}

/* ─── Sepak Takraw (Sahil) ─── */
.sepak-kick {
    top: -12%;
    left: 20%;
    width: 100px;
    transform: rotate(90deg) scaleX(-1);
    animation: sepak-kick-anim 4s ease-in-out infinite;
    z-index: 12;
}

@keyframes sepak-kick-anim {

    0%,
    15% {
        transform: rotate(180deg) scaleX(-1) translate(0, 0);
    }

    22% {
        transform: rotate(200deg) scaleX(-1) translate(-10px, -20px);
    }

    40%,
    100% {
        transform: rotate(180deg) scaleX(-1) translate(0, 0);
    }
}

.sepak-ball {
    top: -10%;
    left: 35%;
    width: 32px;
    z-index: 15;
    animation: sepak-ball-anim 4s ease-out infinite;
}

@keyframes sepak-ball-anim {
    0% {
        transform: translate(-80px, 80px) scale(0.6);
        opacity: 0;
    }

    15% {
        transform: translate(-15px, 15px) scale(1);
        opacity: 1;
    }

    21% {
        transform: translate(0, 0) scale(1.1);
        opacity: 1;
    }

    33% {
        transform: translate(120px, -50px) scale(1.1);
        opacity: 1;
    }

    45% {
        transform: translate(240px, -20px) rotate(720deg) scale(0.6);
        opacity: 0;
    }

    100% {
        transform: translate(240px, -20px) rotate(720deg) scale(0.6);
        opacity: 0;
    }
}

.sepak-net {
    top: -15%;
    right: -25%;
    width: 110px;
    opacity: 0.9;
    z-index: 5;
    transform: rotate(-5deg);
}

.bts-scene {
    position: absolute;
    top: -20px;
    right: -550px;
    /* Pull it far to the right side of the card into the empty space */
    width: 500px;
    /* Make it large enough to be seen but not overpowering */
    opacity: 0.85;
    /* Very ghosted so it doesn't take attention away */
    z-index: 1;
    filter:
        drop-shadow(2px 0 0 #ffffff) drop-shadow(0 2px 0 #ffffff) drop-shadow(-2px 0 0 #ffffff) drop-shadow(0 -2px 0 #ffffff);
    animation: bts-float 5s ease-in-out infinite;
}

@keyframes bts-float {

    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-15px) rotate(2deg);
    }
}

.bts-scene-2 {
    position: absolute;
    top: -20px;
    left: -550px;
    /* Pull it far to the left side of the card into the empty space */
    width: 500px;
    opacity: 0.85;
    z-index: 1;
    filter:
        drop-shadow(2px 0 0 #ffffff) drop-shadow(0 2px 0 #ffffff) drop-shadow(-2px 0 0 #ffffff) drop-shadow(0 -2px 0 #ffffff);
    animation: bts-float 5s ease-in-out infinite;
}

.bts-scene-3 {
    position: absolute;
    top: 400px;
    right: -200px;
    /* Pull it far to the right side of the card into the empty space */
    width: 400px;
    opacity: 0.85;
    z-index: 1;
    filter:
        drop-shadow(2px 0 0 #ffffff) drop-shadow(0 2px 0 #ffffff) drop-shadow(-2px 0 0 #ffffff) drop-shadow(0 -2px 0 #ffffff);
    animation: bts-float 5s ease-in-out infinite;
}

/* Notes */
.music-note-1 {
    top: -5%;
    left: 10%;
    width: 45px;
    animation: float-music 4s ease-in-out infinite;
}

.music-note-2 {
    top: 5%;
    right: 5%;
    width: 35px;
    animation: float-music 5s ease-in-out infinite alternate-reverse;
    animation-delay: -1s;
}

.music-note-3 {
    bottom: 12%;
    left: 2%;
    width: 40px;
    animation: float-music 4.5s ease-in-out infinite;
    animation-delay: -2.5s;
}

@keyframes float-music {
    0% {
        transform: translateY(0) rotate(-10deg) scale(1);
    }

    50% {
        transform: translateY(-20px) rotate(15deg) scale(1.1);
    }

    100% {
        transform: translateY(0) rotate(-10deg) scale(1);
    }
}

.cricket-bat {
    bottom: 10%;
    right: -5%;
    width: 90px;
    transform-origin: bottom center;
    animation: bat-swing 4s ease-in-out infinite;
}

@keyframes bat-swing {
    0% {
        transform: rotate(-15deg);
    }

    20% {
        transform: rotate(25deg);
    }

    40% {
        transform: rotate(-15deg);
    }

    100% {
        transform: rotate(-15deg);
    }
}

.cricket-ball {
    bottom: 25%;
    right: 20%;
    width: 30px;
    animation: ball-bounce 4s ease-out infinite;
}

@keyframes ball-bounce {
    0% {
        transform: translate(40px, 20px) scale(0.6);
        opacity: 0;
    }

    15% {
        transform: translate(10px, 5px) scale(1);
        opacity: 1;
    }

    20% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    35% {
        transform: translate(-100px, -60px) scale(0.7);
        opacity: 0;
    }

    100% {
        transform: translate(-100px, -60px) scale(0.7);
        opacity: 0;
    }
}

.plane-orbit {
    position: absolute;
    width: 150px;
    bottom: 20%;
    right: 50%;
    transform-origin: center right;
    animation: plane-globe 6s linear infinite;
    z-index: 7;
    /* Stay above portrait */
    opacity: 0.9;
}

@keyframes plane-globe {
    0% {
        /* Start from left side, behind him potentially or just off left */
        transform: translateX(-120px) translateY(20px) scale(0.8) rotate(15deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    50% {
        /* Bottom center, swooping down and around */
        transform: translateX(20px) translateY(50px) scale(1.1) rotate(0deg);
        z-index: 7;
    }

    90% {
        opacity: 1;
    }

    100% {
        /* Curve up right side, going away/behind */
        transform: translateX(150px) translateY(-30px) scale(0.6) rotate(-25deg);
        opacity: 0;
    }
}

@keyframes sway {
    0% {
        transform: rotate(-3deg) translateY(0);
    }

    50% {
        transform: rotate(3deg) translateY(-8px);
    }

    100% {
        transform: rotate(-3deg) translateY(0);
    }
}

.sway {
    animation: sway 6s ease-in-out infinite;
    transform-origin: bottom center;
}

.reverse-sway {
    animation-direction: reverse;
    animation-duration: 7s;
}

/* ─── Scribble Cards ─── */
.scribble-box {
    background-color: var(--paper-bg);
    border: 3px solid var(--ink);
    /* Irregular border radius for hand-drawn look */
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
    padding: 1.5rem 2rem;
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.1);
    transform: rotate(1deg);
    transition: transform 0.2s;
}

.scribble-box:hover {
    transform: rotate(-1deg) scale(1.02);
}

.profile-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.name-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.yt-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: tick-anim 2s infinite ease-in-out;
}

.yt-icon {
    width: 45px;
    height: 45px;
    background-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.2s;
}

.yt-link:hover .yt-icon {
    transform: scale(1.15);
}

@keyframes tick-anim {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    10% {
        transform: scale(1.1) rotate(10deg);
    }

    20% {
        transform: scale(1.1) rotate(-10deg);
    }

    30% {
        transform: scale(1.1) rotate(10deg);
    }

    40% {
        transform: scale(1) rotate(0deg);
    }
}

.profile-card .subtitle {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--highlight);
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    font-family: 'Caveat', cursive;
}

/* Positioning Profiles */
/* 
   Since container is max 800px wide, the percentages are relative to that.
   We pull them a bit to overlap with the svg path nicely.
*/
.profile-1 {
    top: 18%;
    right: 48%;
    /* Adjusting overlap */
}

.profile-2 {
    top: 33%;
    left: 48%;
}

.profile-3 {
    top: 48%;
    right: 48%;
}

.profile-4 {
    top: 69%;
    left: 48%;
    width: 750px;
    /* Expanded to compensate for his larger image size! */
}

.profile-5 {
    top: 86.5%;
    right: 48%;
    width: 650px;
    /* New left curve for Surobhi */
}

.profile-6 {
    top: 96%;
    left: 58%;
    width: 750px;
    align-items: flex-end;
    /* Align card and image to same baseline */
    /* Right curve after Surobhi — shifted right */
}

/* Make Vivek bigger on desktop */
.profile-6 .profile-image {
    flex: 0 0 450px;
    margin-left: -80px;
    /* Pull image left toward the box */
}

.profile-6 .profile-card {
    padding-right: 0.5rem;
}

/* Make Surobhi bigger on desktop */
.profile-5 .profile-image {
    flex: 0 0 330px;
    margin-right: -80px;
    /* Overlaps text box slightly to close the massive transparent gap gracefully */
}

.profile-5 .profile-image .profile-link img {
    transform: scale(1.45);
    transform-origin: bottom center;
}

.profile-5 .profile-image .profile-link:hover img {
    transform: scale(1.5);
    transform-origin: bottom center;
}

/* ─── Ending Box ─── */
.ending-box {
    position: absolute;
    z-index: 2;
    top: 116%;
    /* At the road endpoint, below Profile 6 */
    left: -5%;
    transform: translateX(-50%) rotate(-2deg);
    text-align: center;
    padding: 2rem 3rem;
    max-width: 415px;
}

.dark-scribble {
    background-color: var(--ink);
    color: var(--paper-bg);
    border: none;
    box-shadow: 8px 8px 0px var(--highlight);
}

.dark-scribble h2 {
    color: var(--paper-bg);
}

/* ─── Reveal animation ─── */
.reveal {
    opacity: 0;
    transform: translateY(40px) rotate(0deg);
}

/* ─── Media Queries moved to bottom to ensure overrides ─── */

/* ─── Story Section ─── */
.story-section {
    padding: 6rem 2rem;
    margin-top: 35rem;
    /* Moves the section well below the road + Profile 6 */
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.story-title-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3rem;
}

.story-section .section-title {
    text-align: center;
    font-size: 4.5rem;
    color: var(--ink);
    margin-bottom: 0;
    /* Handled by container */
}

.story-title-anim {
    /* Set up text clipping gradient */
    background: linear-gradient(to right, var(--ink) 50%, rgba(0, 0, 0, 0.15) 50%);
    background-size: 200% 100%;
    background-position: 100% 0;
    /* starts transparently/light */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    /* Prevent cursive descenders and tails like 'p' from getting cut off */
    padding-bottom: 0.2em;
    padding-right: 0.2em;
}

.story-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    width: 100%;
    max-width: 900px;
}

.story-video {
    flex: 0 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 4px 8px 15px rgba(0, 0, 0, 0.2);
    transform: rotate(-2deg);
    border: 6px solid var(--paper-bg);
}

.story-video iframe {
    display: block;
}

.story-content {
    flex: 1;
    min-width: 300px;
}

.socials-container {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed #D9D9D9;
}

.socials-container h3 {
    font-family: 'Caveat', cursive;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--highlight);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* ─── Pointers Animation ─── */
.pointer-anim {
    width: 1000px;
    height: auto;
    position: absolute;
    top: 50%;
    margin-top: -300px;
    /* Center it vertically relative to the title */
    display: block;
}

.pointer-anim img {
    width: 100%;
    height: auto;
    display: block;
}

.shobit-pointer {
    right: 100%;
    margin-right: -20rem;
    /* Pushed into the empty space on the left */
    animation: wiggle-shobit 1.5s infinite;
}

.sreejan-pointer {
    left: 100%;
    margin-left: -20rem;
    /* Pushed into the empty space on the right */
    animation: wiggle-sreejan 1.5s infinite;
}

@keyframes wiggle-shobit {

    0%,
    49.9% {
        transform: rotate(-12deg);
        filter: drop-shadow(2px 0 0 #ffffff) drop-shadow(0 2px 0 #ffffff) drop-shadow(-2px 0 0 #ffffff) drop-shadow(0 -2px 0 #ffffff) drop-shadow(2px 5px 5px rgba(0, 0, 0, 0.2));
    }

    50%,
    100% {
        transform: rotate(12deg);
        filter: drop-shadow(2px 0 0 #FF8001) drop-shadow(0 2px 0 #FF8001) drop-shadow(-2px 0 0 #FF8001) drop-shadow(0 -2px 0 #FF8001) drop-shadow(2px 5px 5px rgba(0, 0, 0, 0.2));
    }
}

@keyframes wiggle-sreejan {

    0%,
    49.9% {
        transform: rotate(12deg);
        filter: drop-shadow(2px 0 0 #ffffff) drop-shadow(0 2px 0 #ffffff) drop-shadow(-2px 0 0 #ffffff) drop-shadow(0 -2px 0 #ffffff) drop-shadow(2px 5px 5px rgba(0, 0, 0, 0.2));
    }

    50%,
    100% {
        transform: rotate(-12deg);
        filter: drop-shadow(2px 0 0 #FF8001) drop-shadow(0 2px 0 #FF8001) drop-shadow(-2px 0 0 #FF8001) drop-shadow(0 -2px 0 #FF8001) drop-shadow(2px 5px 5px rgba(0, 0, 0, 0.2));
    }
}

/* ─── Unified Responsive Engine ─── */
@media (max-width: 1000px) {
    .spotlight {
        max-width: 100%;
        margin: 0 auto;
    }

    .profile-spot {
        width: 100%;
        max-width: 500px;
    }

    .profile-image {
        flex: 0 0 200px;
    }
}

@media (max-width: 800px) {
    .story-container {
        flex-direction: column;
        gap: 2rem;
    }

    .story-section {
        padding: 3rem 1rem;
        margin-top: 30rem;
        /* Pushed down to clear road + Profile 6 */
    }

    .story-video iframe {
        max-width: 70vw;
    }

    .pointer-anim {
        width: 400px;
    }

    .shobit-pointer {
        margin-right: -4rem;
    }

    .sreejan-pointer {
        margin-left: -4rem;
    }

    .story-section .section-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {

    /* Hero Animation */
    .hero-gif {
        width: 95vw;
        max-width: 500px;
    }

    .hero {
        padding-top: 5rem;
        min-height: 25vh;
        overflow: hidden;
    }

    /* Shrink the crumpled paper corners so they frame gently */
    .top-left-paper {
        width: 250px;
        top: -200px;
        left: -100px;
    }

    .middle-right-paper {
        width: 200px;
        top: 200px;
        right: -120px;
    }

    /* Reset road to perfect UN-STRETCHED native ratio */
    .spotlight {
        aspect-ratio: 170 / 571;
        height: auto;
    }

    .timeline-svg {
        max-width: 100% !important;
        width: 100%;
        height: 100%;
        overflow: visible;
    }

    /* Cards stack flawlessly perfectly spaced */
    .profile-spot {
        width: 90%;
        max-width: 300px;
        flex-direction: column;
        gap: 0;
    }

    /* Distributed natively along the un-stretched road */
    .profile-1 {
        top: 6%;
    }

    .profile-2 {
        top: 28%;
    }

    .profile-3 {
        top: 50%;
    }

    .profile-4 {
        top: 63%;
    }

    .profile-1,
    .profile-2,
    .profile-3 {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .profile-4 {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        min-height: 250px;
        /* Pre-allocate space for the absolutely positioned elements */
    }

    /* Shrink the Profile Images! */
    .profile-image {
        flex: none;
        width: 110px;
        /* Much smaller so they look proportional */
        height: auto;
        z-index: 5;
        margin-bottom: -35px;
        /* Pulls overlapping cutout down onto text card */
    }

    /* Person 1: Sahil - Curve Left */
    .profile-1 .profile-image {
        align-self: flex-start;
        margin-left: -40px;
        margin-top: 50px;
        width: 38%;
        /* Bumped in so he doesn't clip off left screen edge */
    }

    /* Person 2: Kashyap - Right Side Curve */
    .profile-2 .profile-image {
        order: 1;
        /* Render Portrait Visually First! */
        align-self: flex-end;
        margin-right: -20px;
        margin-top: 30px;
        /* Consistently push down from origin */
        width: 45%;
        /* Make portrait decently sized */
        z-index: 6;
        /* Make sure it overlaps text box */
    }

    /* Person 3: Manav - Left Side Curve */
    .profile-3 .profile-image {
        align-self: flex-start;
        margin-left: -10px;
        margin-top: 50px;
        width: 38%;
    }

    /* Person 4: Ganapathy - Right Side Curve */
    .profile-4 .profile-image {
        position: absolute;
        /* Move profile pic to the right a bit, edit 'right' and 'top' to move freely */
        right: -75px;
        top: 10px;
        width: 60%;
        /* Bumped up from 50% to make him visibly bigger on mobile */
        z-index: 6;
        margin: 0;
        /* Reset margins */
    }

    /* Make BTS scenes smaller and pin opposite */
    .bts-scene,
    .bts-scene-2,
    .bts-scene-3 {
        width: 130px;
        opacity: 0.6;
        z-index: 1;
    }

    /* Sahil is Left -> BTS Right */
    .profile-1 .bts-scene {
        top: 20px;
        right: -40px;
        left: auto;
    }

    /* Kashyap is now Right -> BTS Left */
    .profile-2 .bts-scene-2 {
        top: 35px;
        left: 10px;
        right: auto;
    }

    /* Manav is Left -> BTS Right */
    .profile-3 .bts-scene-3 {
        top: 225px;
        left: -70px;
        right: auto;
    }

    /* Shrink the text & padding so everything fits cleanly */
    .scribble-box {
        z-index: 4;
        padding: 1rem;
    }

    /* Push Sahil's text box to the right for staggered overlap effect */
    .profile-1 .scribble-box {
        align-self: flex-end;
        width: 70%;
        margin-right: -30px;
        margin-top: -150px;
    }

    /* Push Kashyap's text box left under his right portrait */
    .profile-2 .scribble-box {
        order: 2;
        /* Render Box Visually Second! */
        align-self: flex-start;
        width: 70%;
        margin-left: -30px;
        margin-top: -125px;
        /* Now pulls cleanly UP because portrait is above it */
        z-index: 4;
    }

    /* Push Manav's text box right under his left portrait */
    .profile-3 .scribble-box {
        align-self: flex-end;
        width: 70%;
        margin-right: -30px;
        margin-top: -150px;
    }

    /* Push Ganapathy's text box left under his right portrait */
    .profile-4 .scribble-box {
        position: absolute;
        /* Move scribble box a bit up, edit 'left' and 'top' to move freely */
        left: -20px;
        top: 100px;
        width: 75%;
        z-index: 4;
        margin: 0;
        /* Reset margins */
    }

    /* Person 5: Surobhi - Left Side Curve */
    .profile-5 {
        top: 80%;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        min-height: 250px;
    }

    .profile-5 .profile-image {
        position: absolute;
        left: -120px;
        /* Mirrors Ganapathy's right: -75px — bleeds off left edge */
        top: 105px;
        /* Same as Ganapathy */
        width: 100%;
        /* Same as Ganapathy */
        z-index: 6;
        margin: 0;
    }

    .profile-5 .profile-image .profile-link img {
        transform: none;
        /* No scale, matching Ganapathy's mobile treatment */
    }

    .profile-5 .profile-image .profile-link:hover img {
        transform: scale(1.05);
        transform-origin: bottom center;
    }

    .profile-5 .scribble-box {
        position: absolute;
        right: -10px;
        top: 100px;
        /* Matches Ganapathy's card offset from image top */
        width: 75%;
        z-index: 4;
        margin: 0;
    }

    /* Person 6: Vivek Sundar — Right Side Curve (mirrors Ganapathy) */
    .profile-6 {
        top: 100%;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        min-height: 220px;
    }

    .profile-6 .profile-image {
        position: absolute;
        right: -125px;
        /* Mirrors Surobhi's left: -120px */
        top: 80px;
        /* Same as Surobhi */
        width: 100%;
        /* Same as Surobhi */
        z-index: 6;
        margin: 0;
    }

    .profile-6 .scribble-box {
        position: absolute;
        left: -40px;
        top: 100px;
        /* Matches Surobhi's card offset */
        width: 75%;
        z-index: 4;
        margin: 0;
    }

    .ending-box {
        left: 0;
        right: 0;
        margin: 0 auto;
        top: 120%;
        /* Tighter to Profile 6 */
        width: 90%;
        max-width: 320px;
        transform: rotate(-2deg);
    }

    /* Radically shrink the Sepak Takraw SVGs so they are smaller than Sahil */
    .sepak-kick {
        width: 50px;
        top: -5%;
        left: 0%;
    }

    .sepak-net {
        width: 55px;
        top: -5%;
        right: -10%;
    }

    .sepak-ball {
        width: 16px;
        top: -2%;
        left: 15%;
    }

    /* Shrink the Music SVG Notes */
    .music-note-1 {
        width: 25px;
        top: -5%;
        left: 0%;
    }

    .music-note-2 {
        width: 20px;
        top: 5%;
        right: 0%;
    }

    .music-note-3 {
        width: 22px;
        bottom: 10%;
        left: -5%;
    }

    /* Shrink Cricket SVGs */
    .cricket-bat {
        width: 45px;
        bottom: 5%;
        right: -10%;
    }

    .cricket-ball {
        width: 15px;
        bottom: 15%;
        right: 10%;
    }

    .profile-card h2 {
        font-size: 1.4rem;
    }

    .profile-card .subtitle {
        font-size: 0.75rem;
        letter-spacing: 0;
    }

    .profile-card p {
        font-size: 0.85rem;
        line-height: 1.2;
    }

    /* Shrink the Ending Box layout so it sits safely below Surobhi */
    .ending-box {
        /* Pushed down to clear mobile stacked cards */
        padding: 1.5rem 1rem;
        max-width: 250px;
    }

    .ending-box h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .ending-box p {
        font-size: 0.85rem;
    }

    .ep-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }

    .yt-icon {
        width: 30px;
        height: 30px;
    }

    /* Titles */
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2rem;
    }

    .story-section .section-title {
        font-size: 2.2rem;
    }

    .pointer-anim {
        width: 200px;
        top: -40px;
        margin-top: 0;
        display: block !important;
        position: absolute;
    }

    .shobit-pointer {
        right: auto;
        left: -105px;
        margin-right: 0;
        margin-top: -40px;
    }

    .sreejan-pointer {
        left: auto;
        right: -105px;
        margin-left: 0;
        margin-top: -40px;
    }

    body {
        background-size: 150px;
        overflow-x: hidden;
    }
}

@media (max-width: 500px) {
    .profile-spot {
        width: 90vw;
        max-width: 300px;
        text-align: left;
        /* Keep text clean and readable */
    }

    .profile-image {
        width: 100px;
        /* Slightly smaller for highly compact phones */
    }

    .story-video iframe {
        width: 75vw;
        max-width: 280px;
        height: auto;
        aspect-ratio: 9 / 16;
    }
}

/* Adjust landscape orientation constraints to perfectly center the Hero GIF at scroll zero */
@media (max-width: 950px) and (orientation: landscape) {
    .hero {
        /* Strip the large desktop empty padding so the GIF naturally slides up into view */
        padding-top: 0rem;
        min-height: auto;
    }

    .hero-gif {
        width: 100vw;
        max-width: 750px;
        /* Increased max-width significantly so it doesn't get artificially restrained */
        /* Negate the +20px downward shifting meant for portraits */
        transform: translateY(0);
    }

    /* ─── Landscape: pull all profiles toward center ─── */
    .profile-1 .profile-image {
        margin-left: -10px;
    }

    .profile-1 .scribble-box {
        margin-right: -10px;
    }

    .profile-2 .profile-image {
        margin-right: 0px;
    }

    .profile-2 .scribble-box {
        margin-left: -10px;
    }

    .profile-3 .profile-image {
        margin-left: 0px;
    }

    .profile-3 .scribble-box {
        margin-right: -10px;
    }

    .profile-4 .profile-image {
        right: -20px;
    }

    .profile-4 .scribble-box {
        left: 5px;
    }

    .profile-5 .profile-image {
        left: -20px;
    }

    .profile-5 .scribble-box {
        right: 5px;
    }

    .profile-6 .profile-image {
        right: -20px;
    }

    .profile-6 .scribble-box {
        left: 5px;
    }

    .profile-1 .bts-scene {
        right: 10px;
    }

    .profile-3 .bts-scene-3 {
        left: -20px;
    }
}