@font-face {
    font-family: 'Autography';
    src: url('./../fonts/Autography.otf');
}

body {
    margin: 0;
}

/* For vars to be accessible to all elements */
:root {
    --scrollCaptureTime: 300px;

    --bannerWelcomeHeight: 360px;
    --bannerWidth: 400px;
    --bannerTop: 15vh;
    --profilePictureSize: 200px;
    --hoveredProfilePictureSize: 220px;
    --blob1Height: 275px;
    --blob2Height: 250px;
    --bannerRight: 10vw;
    --pictureContainerOverflow: 30px;
}
@media only screen and (max-width: 768px) {
    :root {
        --bannerWelcomeHeight: 340px;
        --bannerWidth: 90vw;
        --bannerTop: 3vh;
        --profilePictureSize: 150px;
        --hoveredProfilePictureSize: 168px;
        --blob1Height: 206px;
        --blob2Height: 183px;
        --bannerRight: 5vw;
        --pictureContainerOverflow: 16px;
    }
}

#oceanLanding {
    background-color: #fff;
    color: #1f2937;
    font-family: Inter, system-ui, -apple-system, "system-ui", "Segoe UI", Roboto, sans-serif;
    font-size: 18px;
    line-height: 26px;
    overscroll-behavior: none;
}

#threejs {
    height: calc(100vh + var(--scrollCaptureTime));
}

#overlay {
    height: 100vh;
    position: fixed;
    display: none; /* not visible by default as position: fixed makes it appear everywhere */
    right: 0;
    top: 0;
}

#banner {
    position: absolute;
    top: var(--bannerTop);
    width: var(--bannerWidth);
    right: var(--bannerRight);
    padding: 10px 30px;
    box-sizing: border-box;
    text-align: justify;
    /*
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
    */
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

@media only screen and (max-width: 768px) {
    /* Build laptop first as it is 2/3 of traffic */
    /* For mobiles | Ref.: https://www.w3schools.com/css/css_rwd_mediaqueries.asp */
    #oceanLanding {
        font-size: 16px;
    }
}
@media only screen and (max-width: 380px) { /* very small screens like iPhone SE */
    #banner {
        padding: 0px 15px;
    }
    #oceanLanding {
        font-size: 15px;
    }
}
#bannerWelcome {
    height: var(--bannerWelcomeHeight);
}
#bannerDetails {
    height: 430px;
}

#banner .bannerTitle {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 23px;
    padding-top: 20px;
}
#banner p {
    color: #6b7280;;
}

#banner .bottom {
    position: absolute;
    bottom: 0;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#bannerWelcome .bottom {
    /* banner.width - profilePicture.width + pictureContainer.offset - 2 * banner.padding */
    width: calc(var(--bannerWidth) - (var(--profilePictureSize)) + 30px - 2 * 20px);
}
#bannerDetails .bottom {
    flex-direction: column;
    /* banner.width - bannerDetailsIcon.width + bannerDetailsIcon.offset - 2 * banner.padding */
    width: calc(var(--bannerWidth) - 150px + 30px - 2 * 20px);
}

.signature {
    font-family: 'Autography', cursive;
    font-size: 22px;
}
#banner .signature {
    text-align: center;
    font-size: 32px;
    line-height: 36px;
}

#pictureContainer {
    height: calc(var(--profilePictureSize) + 25px);
    width: var(--profilePictureSize);
    overflow: hidden;
    position: fixed;
    right: calc(var(--bannerRight) - var(--pictureContainerOverflow));
    /* top: calc(55vh - 150px); -> set in JS */
    z-index: 10;
}

#pictureContainer > * {
    /* Center all elements to be on top of each other */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.profilePicture {
    height: var(--profilePictureSize);
    width: var(--profilePictureSize);
    object-fit: cover;
    box-sizing: border-box;
}

#profilePicture {
    border: 2px solid white;
    border-radius: 50%;
    object-position: 84% 0%;
    z-index: 5;
    /* setting max to avoid problems with scroll animation manipulations */
    max-height: var(--profilePictureSize);
    max-width: var(--profilePictureSize);
}

#profilePictureCropped {
    border-radius: 0% 0% 49% 50%;
    padding: 22px 2px 2px 2px;
    object-position: -8% 0%;
    z-index: 10;
}
@media only screen and (max-width: 768px) {
    #profilePictureCropped {
        padding-top: 16px;
    }
}

#blob1 {
    height: var(--blob1Height);
}

#blob1 path {
    --blob1Rotation: 140deg;
    transform: translate(80px, -25px) rotate(var(--blob1Rotation));
}

#blob2 {
    height: var(--blob2Height);
}

#blob2 path {
    --blob2TranslateX: 10px;
    --blob2TranslateY: 53px;
    --blob2Rotation: -53deg;
    transform: translate(var(--blob2TranslateX), var(--blob2TranslateY)) rotate(var(--blob2Rotation));
    transition: transform .7s ease-in-out;
}

/* HOVER ANIMATION */
#blob1 path, #blob2 path, #profilePictureCropped {
    transition: all .7s ease-in-out;
}

#pictureContainer:hover #profilePictureCropped {
    height: var(--hoveredProfilePictureSize);
    width: var(--hoveredProfilePictureSize);
    top: calc(50% - 12px);
    left: calc(50% - 1px);
    border-radius: 0% 0% 50% 50%;
}

#pictureContainer:hover #blob1 path {
    --blob1Rotation: 150deg;
}

#pictureContainer:hover #blob2 path {
    --blob2TranslateX: 17px;
    --blob2TranslateY: 50px;
    --blob2Rotation: -63deg;
}

/* bannerDetails */
#bannerDetailsTitle {
    text-align: center;
}
#bannerDetailsIcon {
    position: absolute;
    bottom: -30px;
    right: -30px;
    height: 150px;
    z-index: -1; /* Keep icon behind content */
}
