@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400&display=swap');


:root {
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
}

html {
    scrollbar-width: none; 
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    position: relative;
    margin: 0;
    padding: 0;
}
html::-webkit-scrollbar {
    display: none; 
}

body {
    font-family: 'JetBrains Mono';
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--bg-color);
    padding-top: 10%;
    padding-left: 20%;
    transition: background-color 0.3s, color 0.3s;
    position: relative;
    margin: 0;
}


canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    cursor: move;
}

details > summary {
  display: inline-flex;
  align-items: center;
  cursor: pointer; /* improves usability */
  list-style: none;
}

/* Ensure the header renders inline */
details > summary h2 {
  display: inline;
  margin: 0;
}

.photo-page {
    padding-left: 0;
    height: 100vh;
    overflow: hidden;
    padding-top: 0 !important;
}

.photo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
}

#photo {
    max-height: 70vh;
    max-width: 70vw;
    width: auto;
    height: auto;
    object-fit: contain;
    order: 2;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.474);
}

.nav-area {
    flex-grow: 1;
    height: 100vh;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; 
}

#prev-btn {
    order: 1;
}

#next-btn {
    order: 3;
}

body.dark-mode::before {
    opacity: 1%; 
}

#essay {
    padding-right: 20%;
    padding-bottom: 10%;
    font-family: serif;
    font-size: 17px;
}

.name {
    font-size: 20px;
    padding-bottom: 12px;
}

.flashing-cursor {
    animation: blink 2.3s step-end infinite;
    margin-left: -10px;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.about-text {
    padding-top: 2px;
    padding-left: 10px;
    width: 65ch;
    color: #FFF7D1;
    opacity: 0;
    animation: fadeIn 4s forwards;
    animation-delay: 0.7s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    margin-left: 8%;
}

canvas {
    display: block;
    transform: scaleY(-1) scaleX(-1);
}

.marker {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #ffd700;
    display: flex; 
    flex-direction: row; 
    justify-content: center; 
    gap: 5px; 
}

body.dark-mode .marker {
    color: #03cdff;
}

#right-marker {
    right: 10px;
    text-align: right;
}

ol {
    display: flex;
    flex-direction: column;
    padding-bottom: 12px;
    font-size: 16px;
    padding-left: 0%;
    padding-left: 8px;
}

a {
    margin-bottom: 4px;
    text-decoration: none;
    color: inherit;    
}

ul {
    list-style-type: none;
    padding-left: 8px;
}

li {
    padding-bottom: 0;
}

#quote:hover,
a:hover {
    color: #ffd700;
}

body.dark-mode a:hover,
body.dark-mode #quote:hover {
    color: #03cdff;
}

#quote {
    color: rgb(255, 255, 175);
}

body.dark-mode #quote {
    color: #6faab8;
}

.circle-button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #ffd700;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
    position: relative;
    z-index: 3;
}

body .circle-button:hover {
    background-color: #fff7cc;
}

body.dark-mode {
    --bg-color: #baffd823;
    --text-color: rgb(22, 22, 22);
}

body.dark-mode .circle-button {
    background-color: #1a1a1ab9;
}

body.dark-mode .circle-button:hover {
    background-color: #1a1a1a;
}

.photo-album {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50%;
    height: 40vh;
    gap: 20px;
    margin: 0 auto;
}

#photo {
    max-width: 35vw;
    max-height: 80vh;
    object-fit: cover;
}

.social-icon {
    width: 24px;
    height: 24px;
    margin-top: 1%;
    margin-left: 2px;
    filter: invert(1);
    transition: filter 0.2s;
    margin-top: 25px;
}

.social-icon:hover {
    filter: invert(0.5) sepia(1) saturate(5) hue-rotate(175deg);
    transition: filter 0.3s;
}

.line-container {
    position: relative;
    width: 100%;
    height: 50vh;
}

.line {
    position: absolute;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.91);
    animation: moveUpDown 3s infinite ease-in-out, fade 2s infinite alternate; 
    animation: fadeMove 6s ease-in-out infinite;
    z-index: 2;
    animation-delay: var(--animation-delay, 0s);
    transition: transform 3s ease-in-out;
    transform-origin: center center;
}

@keyframes fade {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

@keyframes fadeMove {
    0%, 100% {
        opacity: 0;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-10%);
    }
}

body.dark-mode .line {
    background-color: #1a1a1a;
}

@keyframes moveUpDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}


@media (max-width: 800px) {
    .photo-page {
        padding-top: 0;
    }

    .photo-container {
        position: relative;
    }

    .nav-area {
        position: absolute;
        top: 0;
        bottom: 0;
        width: 50%;
        height: 100%;
        -webkit-tap-highlight-color: transparent;
    }

    #prev-btn {
        left: 0;
    }

    #next-btn {
        right: 0;
    }

    li {
        padding-bottom: 18px;
    }

    body,
    .about-text,
    ol,
    ul {
        padding-left: 0;
    }

    .circle-button {
        top: auto;
        opacity: 1;
    }

    .photo-page {
        padding-top: 30%;
    }

    #photo {
        max-width: 80vw;
        max-height: 80vh;
        object-fit: fill;
    }

    .social-icon {
        margin-left: 0;
    }

    #essay, .about-text {
        padding-left: 2%;
        padding-right: 2%;
    }

}

@media (min-width: 800px) {
    .social-icon {
        margin-left: 7px;
    }

    .essay, .about-text {
        display: flex;
        flex-direction: column;
        justify-content: center;
        max-width: 65ch;
    }

    .essay-pre {
        display: flex;
        justify-content: flex-end;
        text-align: right;
        margin-bottom: 10px;
        font-size: 0.9em;
    }
    
}


@media (height < 720px) or (width > 720px) {
    .photo-page {
        padding-top: 15%;
    }

}

@media (height < 720px) and (width > 720px) {
    .photo-page {
        padding-top: 25%;
    }
    
    #photo {
        max-width: 80vw;
        max-height: 80vh;
        object-fit: fill;
    }

}

@media (width < 820px) {
    .backbutton {
        padding-left: 5%;
    }

    .about-text {
        max-width: 95vw;
    }
}