/* ------- All Pages ------- */

/* Helps keep design consistent on browsers */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    background-color: black;
    font-family: 'Arial', sans-serif;
    /* No bouncing when scrolling */
    overscroll-behavior: none;
}

/* Helps with accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

.hidden-header {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
}

/* Background image */
#background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    object-fit: cover;
    z-index: -2;
    opacity: 0.5;
    pointer-events: none;
}

/* Navigation bar */
.navbar {
    z-index: 4;
    width: 100%;
}

.navbar ul {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 10px 20px;
    list-style-type: none;
    margin: 0;
    overflow-x: visible;
}

.navbar li {
    flex-shrink: 0;
}

/* Images */
.photo {
    position: relative;
    z-index: 1;
    width: 300px;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

/* Footer general rules */
#footer {
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

.footer-left,
.footer-right {
    display: flex;
    align-items: center;
}

/* Container used for positioning footer content */
.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
}

/* Specific rules for the icons on the right of the footer */
.footer-right a {
    color: white;
    margin-left: 15px;
    font-size: 20px;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Used to help align the text with the icons in the footer */
.footer-content p {
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
}

/* Header text general rules */
h1 {
    color: white;
}

h2 {
    color: white;
}

/* Paragraph text general rules */
p {
    margin-top: 10px;
    color: white;
}

/* Zoomable option for images rules */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: zoom-out;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

#lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    user-select: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

#lightbox-close:hover {
    opacity: 1;
}

.zoomable {
    cursor: zoom-in;
    transition: filter 0.3s ease;
}

.zoomable:hover {
    filter: brightness(0.85);
}

/* ------- Case Study Pages Only ------- */

/* Used to position title and description of case study page */
.page-container {
    position: absolute;
    margin-top: 60px;
    z-index: 3;
    text-align: center;
    width: 100%;
}

/* Title of case study page */
#pagetitle {
    /* clamp is used instead of 50px to resize title when window shrinks */
    font-size: clamp(28px, 4vw, 50px);
    color: white;
    white-space: nowrap;
    margin: 0;
}

/* Rules for description text on the case study page */
.italic-text {
    font-style: italic;
}

/* Used to prevent the content from being too high on the case study page */
#experience-section {
    margin-top: 200px;
    padding: 60px 20px;
    padding-top: 100px;
}

/* Used to help position the content shown on the case study page */
.experience-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    grid-auto-rows: minmax(400px, auto);
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 40px;
}

/* Adjusting the case study page for smaller windows */
@media (max-width: 600px) {
    .experience-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
    }

    #experience-section {
        margin-top: 230px;
    }

    #pagetitle {
        font-size: 32px;
        white-space: normal;
        line-height: 1.2;
        padding: 0 20px;
    }
}

/* Used for aligning the image, frame, and buttons 
correctly on the case study page */
.image-button-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.image-button-container img {
    display: block;
    width: 350px;
    height: auto;
}

/* Container, title text, and description text
of content shown on case study page */
.image-labels {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 2;
    width: max-content;
    max-width: 280px;
}

.image-title {
    color: white;
    padding: 6px 12px;
    font-size: 18px;
    border-radius: 4px;
    line-height: 1.4;
}

.image-description {
    color: white;
    font-size: 14px;
    font-style: italic;
    margin-top: 8px;
}

/* Container used for positioning the buttons 
on the case study page */
.button-container {
    position: absolute;
    bottom: 0%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: row;
    gap: 15px;
    z-index: 3;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

/* Button general rules */
.example-button {
    color: white;
    border: none;
    width: 100px;
    height: 50px;
    font-size: 12px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.3s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

/* Container to align external link buttons in one row */
.external-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
    z-index: 3;
}

/* ------- Home Page Only ------- */

/* Container used at top of home page */
.home-top-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: visible;
}

/* Home navigation bar */
.navbar-home a {
    font-family: Arial;
    color: #FFFFFF;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
}

.navbar-home a:hover {
    font-weight: bold;
    color: #8D8DF6;
}

/* Pencil stars */
#pencilstars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    object-fit: contain;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

/* Container used for positioning the greeting text animation */
.greeting-container {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    text-align: center;
    width: 100%;
}

/* Greeting string, initialized for the animation */
#greeting {
    font-size: 50px;
    color: white;
    white-space: nowrap;
    margin: 0;
}

/* Introduction string, initialized for the animation */
#introduction {
    font-size: 20px;
    color: white;
    z-index: 3;
    margin: 0;
}

/* Scroll hint arrow (with glow animation) */
.scroll-hint {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.scroll-hint.visible {
    opacity: 1;
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {

    0%,
    100% {
        text-shadow: 0 0 0px white;
    }

    50% {
        text-shadow: 0 0 8px white;
    }
}

/* Container used for positioning the about me information */
.about-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
}

/* About me text shared rules */
.about-text {
    width: 350px;
    text-align: center;
    margin-top: 100px;
    z-index: 2;
}

/* About me text header rules */
.about-text h1 {
    font-size: 50px;
    margin-bottom: 20px;
    white-space: nowrap;
}

/* About me text paragraph rules */
.about-text p {
    font-size: 18px;
    line-height: 1.6;
}

/* Container used for positioning the photo, frame, and buttons */
.image-container {
    position: relative;
    width: fit-content;
    height: fit-content;
    z-index: 2;
}

/* Container used for positioning the case study preview information */
.case-study-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
}

/* Case study section general rules */
.case-study {
    padding-bottom: 60px;
}

/* Case study about text rules */
.case-study .about-text {
    margin-top: 0px;
    width: 320px;
    text-align: left;
}

/* Case study image rules */
.case-study-container .image-container img {
    width: 320px;
    height: auto;
}

/* Case study title rules */
.case-study h1 {
    font-size: 20px;
    font-weight: bold;
    text-decoration: underline;
    margin-bottom: 10px;
}

/* Reverse case study logic for displaying further information */
.case-study-container.reverse {
    flex-direction: row-reverse;
}

/* The color the button is without hovering in the home page */
.home-page .example-button {
    background-color: #3305BE;
}

/* The color the button becomes from hovering in the home page */
.home-page .example-button:hover {
    background-color: #8D8DF6;
}

/* Purple photo frame for the headshot */
.purple-photo-frame {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 100%;
    height: 100%;
    background-color: #200435;
    border-radius: 10px;
    z-index: 0;
}

/* The color the footer icon becomes from hovering in the home page */
.home-page .footer-right a:hover {
    color: #8D8DF6;
}

/* Javascript code for typing animation */
#cursor {
    display: inline-block;
    color: white;
    font-weight: bold;
    animation: blink 1s step-start infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Adjusting the home page for smaller windows */
@media (max-width: 900px) {
    .home-top-container {
        padding: 20px;
        min-height: auto;
    }

    .greeting-container {
        position: static;
        transform: none;
        margin-bottom: 20px;
        padding: 0 20px;
        text-align: center;
    }

    #greeting {
        font-size: 32px;
        white-space: normal;
        line-height: 1.2;
        min-height: 2.4em;
    }

    #introduction {
        font-size: 18px;
        line-height: 1.4;
        max-width: 320px;
        margin: 12px auto 0;
        min-height: 6.5em;
    }

    #background {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 70vh;
        object-fit: cover;
        z-index: -2;
        opacity: 0.5;
    }

    .about-text {
        margin-top: 5px;
        margin-bottom: 40px;
    }

    .case-study {
        padding-bottom: 10px;
    }

    .scroll-hint {
        display: none;
    }

    #lightbox-close {
        font-size: 48px;
        top: 30px;
        right: 20px;
    }
}

/* ------- Case Study 1 Page Only ------- */

/* Case study 1 page navigation bar */
.navbar-casestudy1 a {
    font-family: Arial;
    color: #FFFFFF;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
}

.navbar-casestudy1 a:hover {
    font-weight: bold;
    color: #629BF1;
}

/* Pencil bubbles */
#pencilbubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    object-fit: contain;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.1s ease;
    pointer-events: none;
}

/* The color the button is without hovering in the case study 1 page */
.casestudy1-page .example-button {
    background-color: #050337;
}

/* The color the button becomes from hovering in the case study 1 page */
.casestudy1-page .example-button:hover {
    background-color: #629BF1;
}

/* The color the footer icon becomes from hovering in the case study 1 page */
.casestudy1-page .footer-right a:hover {
    color: #629BF1;
}

/* ------- Case Study 2 Page Only ------- */

/* Case study 2 page navigation bar */
.navbar-casestudy2 a {
    font-family: Arial;
    color: #FFFFFF;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
}

.navbar-casestudy2 a:hover {
    font-weight: bold;
    color: #6F07BE;
}

/* Pencil music notes */
#pencilmusicnotes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    object-fit: contain;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.1s ease;
    pointer-events: none;
}

/* The color the footer icon becomes from hovering in the case study 2 page */
.casestudy2-page .footer-right a:hover {
    color: #6F07BE;
}

/* The color the button is without hovering in the case study 2 page */
.casestudy2-page .example-button {
    background-color: #3B3B3B;
}

/* The color the button becomes from hovering in the case study 2 page */
.casestudy2-page .example-button:hover {
    background-color: #6F07BE;
}

/* ------- Case Study 3 Page Only ------- */

/* Case study 3 page navigation bar */
.navbar-casestudy3 a {
    font-family: Arial;
    color: #FFFFFF;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
}

.navbar-casestudy3 a:hover {
    font-weight: bold;
    color: #02760D;
}

/* Pencil sparkles */
#pencilsparkles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    object-fit: contain;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.1s ease;
    pointer-events: none;
}

/* The color the footer icon becomes from hovering in the case study 3 page */
.casestudy3-page .footer-right a:hover {
    color: #02760D;
}

/* The color the button is without hovering in the case study 3 page */
.casestudy3-page .example-button {
    background-color: #013C07;
}

/* The color the button becomes from hovering in the case study 3 page */
.casestudy3-page .example-button:hover {
    background-color: #02760D;
}